Defines | |
#define | KEYCOL 6 |
#define | KEYROW 4 |
#define | GETROW(key) (key>>4) |
#define | GETCOL(key) (key&0x0f) |
Typedefs | |
typedef void(* | key_callback )(void *) |
Functions | |
ssize_t | Keyrx (int count, u8 *buffer) |
char | Key_getch (void) |
int | KeyCall (key_callback callback, void *privatedata) |
|
a keypad callback type of function can be registered to be called whenever a key is pressed. |
|
block until a key is pressed This function polls the keypad fifo until data appears. That character is then returned.
|
|
install a keypad callback KeyCall can be used to install a callback function on the keypad module. Whenever a key is pressed this function is called with the arguement privatedata. The callback doesn't return the key, this must be read with Keyrx A Keypad Callback can be removed by calling KeyCall again with NULL as the callback arg Note: this function briefly suspends the real-time interrupt when run.
|
|
Receive data from the Keypad fifo Pull data from the keypad fifo. To keep this module generic and not rely on a specific keypad, no keypad matix is used. instead the character returned indicates the row and column that the character belongs to. The row is the top nibble column is the bottom nibble; The macros GETROW and GETCOL can be used for this purpose
|