This header file defines the prototypes for keyboard matrix driver functions.
More...
This header file defines the prototypes for keyboard matrix driver functions.
ret_code_t drv_keyboard_disable |
( |
void |
| ) |
|
Disable keyboard scanning.
- Returns
- NRF_SUCCESS on success, otherwise an error code.
ret_code_t drv_keyboard_enable |
( |
void |
| ) |
|
Enable keyboard scanning.
- Returns
- NRF_SUCCESS on success, otherwise an error code.
ret_code_t drv_keyboard_init |
( |
drv_keyboard_event_handler_t |
keyboard_event_handler | ) |
|
Keyboard driver initialization.
- Parameters
-
[in] | keyboard_event_handler | Handler for data read from the keyboard. |
- Returns
- NRF_SUCCESS on success, otherwise an error code.
ret_code_t drv_keyboard_keys_get |
( |
uint8_t * |
p_pressed_keys, |
|
|
uint8_t * |
p_number_of_pressed_keys, |
|
|
bool * |
p_keys_blocked |
|
) |
| |
Get the state of keyboard matrix.
One scan performed as a blocking function. Functional only when pulling is disabled. Returns an error otherwise.
- Parameters
-
[out] | p_pressed_keys | Pointer to the pressed_keys array. The array should have at least KEY_VECTOR_SIZE elements. |
[out] | p_number_of_pressed_keys | Number of pressed keys. |
[out] | p_keys_blocked | True, if some keys are blocked and cannot be read. |
- Returns
- NRF_SUCCESS on success, otherwise an error code.
bool drv_keyboard_shutdown |
( |
bool |
wakeup | ) |
|
Shutdown keyboard and prepare it for sleeping.
- Parameters
-
[in] | wakeup | If false, go to deepest sleep and do not prepare to wake up the system. |
- Returns
- True if the module is ready for shutdown, false otherwise.