|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
Direct polling of the 12-button keypad. More...
Macros | |
| #define | KEY_0 0 |
| #define | KEY_1 1 |
| #define | KEY_2 2 |
| #define | KEY_3 3 |
| #define | KEY_4 4 |
| #define | KEY_5 5 |
| #define | KEY_6 6 |
| #define | KEY_7 7 |
| #define | KEY_8 8 |
| #define | KEY_9 9 |
| #define | KEY_Y 10 |
| #define | KEY_N 11 |
Functions | |
| bool | host_key_pressed (uint8_t key) |
| True while key is currently held down. | |
| int | host_key_consume_next (uint8_t *out_key) |
| Pop the next queued key press, if any. | |
Direct polling of the 12-button keypad.
| #define KEY_0 0 |
Definition at line 1250 of file host_api.h.
| #define KEY_1 1 |
Definition at line 1251 of file host_api.h.
| #define KEY_2 2 |
Definition at line 1252 of file host_api.h.
| #define KEY_3 3 |
Definition at line 1253 of file host_api.h.
| #define KEY_4 4 |
Definition at line 1254 of file host_api.h.
| #define KEY_5 5 |
Definition at line 1255 of file host_api.h.
| #define KEY_6 6 |
Definition at line 1256 of file host_api.h.
| #define KEY_7 7 |
Definition at line 1257 of file host_api.h.
| #define KEY_8 8 |
Definition at line 1258 of file host_api.h.
| #define KEY_9 9 |
Definition at line 1259 of file host_api.h.
| #define KEY_N 11 |
Definition at line 1261 of file host_api.h.
| #define KEY_Y 10 |
Definition at line 1260 of file host_api.h.
| int host_key_consume_next | ( | uint8_t * | out_key | ) |
Pop the next queued key press, if any.
| out_key | Receives the KEY_* code on success. |
Definition at line 44 of file host_api_keypad.cpp.
References cdc::hal::getKeypadInstance(), HOST_ERR_GENERIC, HOST_ERR_INVALID_ARG, HOST_ERR_NOT_FOUND, HOST_OK, and cdc::hal::KEY_NONE.
Referenced by cdc::plugin_manager::w_host_key_consume_next().
| bool host_key_pressed | ( | uint8_t | key | ) |
True while key is currently held down.
Definition at line 36 of file host_api_keypad.cpp.
References cdc::hal::getKeypadInstance(), and cdc::hal::KEY_NONE.
Referenced by cdc::plugin_manager::w_host_key_pressed().