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
Содержание Optimus R
Страница 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Страница 6: ......
Страница 8: ...2 C Programming Guide For Optimus S R...
Страница 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Страница 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Страница 24: ...18 C Programming Guide For Optimus S R...
Страница 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...
Страница 232: ...226 C Programming Guide For Optimus S R 4 11 Implementation defined Limits limits h float h Refer to limit h and float h...
Страница 238: ...232 C Programming Guide For Optimus S R...