Chapter 3 Terminal Specific Function Library
75
kbhit
Purpose
To check if there is any key being pressed.
Syntax
int kbhit (void);
Example
for (;!kbhit();); /* wait till a key is pressed */
Description
This routine checks if there is any character waiting in the keyboard buffer for
being read out.
Return
If any key is pressed, it returns 1 to indicate a character is put in the buffer.
Otherwise, it returns 0 to indicate the buffer is empty.
See Also
clr_kb, getchar
SetKeyClick
Purpose
To set key click.
Syntax
void SetKeyClick (int status);
int status; /* 0: disable key click, 1(~5): enable key click */
Example
SetKeyClick (1); /* enable key click sound */
Description
There are five different tones available. You can choose a tone from the System
Menu or through programming.
Moreover, the frequency and duration pair of the key click is held in the system
global variable KEY_CLICK, which can be used to generate the key click
sound. Example: on_beeper(KEY_CLICK);
Return
None
See Also
GetKeyClick
TriggerStatus
Purpose
To check if the scan key has been pressed.
Syntax
int TriggerStatus (void);
Example
if (TriggerStatus())
printf ("Scan key is pressed");
Description
This routine is used to check if the scan key has been pressed or not.
Return
If the scan key is pressed, it returns 1.
Otherwise, it returns 0.
See Also
dis_alpha, en_alpha, get_alpha_enable_state, get_alpha_lock_state
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...