C Language Development Kit/Functions/GetBootVersion

From OptiWiki

Jump to: navigation, search
Description This function returns the version of the ROM of the handheld terminal. The version is returned in an 8 character long string, and is terminated by the null character '\0'. The first and third character of the version defines the terminal type, the second character defines the software type (in this case A, ROM firmware)
Code Terminal
XAC OPH1004 & H13
NONE OPH1003. The ROM version cannot be returned, but for compatibility reasons, NONE is returned.
CAG PHL1700-1MB
CAH PHL1700-2MB
CAQ DWT7133
CAW PHL2700
CAX PHL1300
LAB OPL97xx, DCL153x
XAC OPH1004, H13
Syntax
char *GetBootVersion( void );
Arguments None
Returns A pointer to a zero terminated string with the version number.
Remarks None
Example
#include "lib.h"
#include <stdio.h>
 
void main( void )
{
    int key;
 
    resetkey();
    printf("\fPress ENT key");
    for(;;)
    {
        if( (key = getchar()) != EOF)
        {
            resetkey();
            switch( key )
            {
                case ENT_KEY:
                    sound( TSTANDARD, VHIGH, SHIGH, 0);
                    printf("\nROM = %s", GetBootVersion());
                    printf("\nO/S = %s", GetOsVersion());
                    break;
                default:
                    sound( TCLICK, VHIGH, SLOW, 0);
                    break;
            }
        }
        idle();
    }
}


Views
Personal tools