74
"C" Programming Guide For Optimus S/R
Return
If successful, it returns 1.
Otherwise, it returns 0.
See Also
OSTimeDly
clr_kb
Purpose
To clear the keyboard buffer.
Syntax
void clr_kb (void);
Example
clr_kb();
Description
This routine is automatically called by the system upon powering up the
terminal.
Return
None
See Also
getchar, kbhit
getchar
Purpose
To read one character from the keyboard buffer and then remove it.
Syntax
int getchar (void);
Example
c = getchar();
if (c > 0) printf ("Key %d pressed",c);
else printf ("No key pressed");
Description
This routine can be used with menu operation to detect a shortcut key being
pressed.
Return
If successful, it returns the character read from the keyboard buffer.
Otherwise, it returns 0 to indicate the keyboard buffer is already empty.
See Also
clr_kb, kbhit
GetKeyClick
Purpose
To get the current setting of key click.
Syntax
int GetKeyClick (void);
Example
state = GetKeyClick();
Description
The key click is set to be enabled by default, but it can be changed from the
System Menu or through programming.
Return
If key click is enabled, it returns 1~5 to indicate different tones.
Otherwise, it returns 0.
See Also
SetKeyClick
Summary of Contents for Optimus R
Page 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Page 6: ......
Page 8: ...2 C Programming Guide For Optimus S R...
Page 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Page 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Page 24: ...18 C Programming Guide For Optimus S R...
Page 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...