Bluetooth® Sample Application Programmer's Reference
|
Keyboard processing
Presentation
Functions | |
int | kbdStart (unsigned char fls) |
start waiting for a key More... | |
int | kbdStop (void) |
stop waiting for a key More... | |
char | kbdKey (void) |
get a key pressed More... | |
Function Documentation
int kbdStart | ( | unsigned char | fls | ) |
start waiting for a key
Start waiting for a key. This function should be called when an application is ready to accept a user input. The keys waiting in the buffer are flushed if fls is not zero.
- Parameters
-
fls (I) Indicates whether key flush is to be done
- Returns
- non-negative value if OK; negative otherwise Utilities.h Peripherals.c
int kbdStop | ( | void | ) |
stop waiting for a key
Stop waiting for a key. All the keys pressed after calling this function will be ignored.
- Returns
- 0 Utilities.h Peripherals.c
char kbdKey | ( | void | ) |
get a key pressed
Retrieve a key pressed if any. Return its key code.
- Returns
- Key code according to eKbd enum.
- If no key pressed zero value is returned.
- In case of error it returns 0xFF. Utilities.h Peripherals.c
