AIROC™ BTSDK v4.9 - Documentation | ||||
Modules | |
Keyscan Button | |
Keyscan Interface Queue | |
Functions | |
void | wiced_hal_keyscan_configure (UINT8 num_rows, UINT8 num_columns) |
Defines the keyscan driver. More... | |
void | wiced_hal_keyscan_init (void) |
Keyscan driver initialization function. More... | |
void | wiced_hal_keyscan_reset (void) |
Reset the keyscan HW. More... | |
void | wiced_hal_keyscan_turnOff (void) |
Turns off the keyscan HW. More... | |
void | wiced_hal_keyscan_register_for_event_notification (void(*userfn)(void *), void *userdata) |
Register for notification of changes. More... | |
void | wiced_hal_keyscan_enable_ghost_detection (wiced_bool_t enable) |
Enable/disable keyscan ghost key detection. More... | |
void | wiced_hal_keyscan_config_gpios (void) |
Configure GPIOs for keyscan operation. More... | |
wiced_bool_t | wiced_hal_keyscan_is_any_key_pressed (void) |
check if HW detects any pressed key More... | |
uint8_t | wiced_hal_keyscan_get_key_pressed_count (void) |
wiced_hal_keyscan_get_key_pressed_count() – added in build 130 returns how many keys are pressed More... | |
void wiced_hal_keyscan_config_gpios | ( | void | ) |
Configure GPIOs for keyscan operation.
Note that only GPIOs that are in the matrix are configured for keyscan operation. GPIOs that are not part of the scan matrix are left alone.
-none |
void wiced_hal_keyscan_configure | ( | UINT8 | num_rows, |
UINT8 | num_columns | ||
) |
Defines the keyscan driver.
The keyscan driver provides the status and control for the keyscan driver. It provides the keyEvents to the interface, maintains the queue behind it. It also supports keyscanning turning on or off. configure Keyscan matrix row and column
Application use this to configure its number of keyscan matrix rows and columns. This only need to be done once before keyscan driver initialization
num_rows | - number of rows in keyscan matrix |
num_columns | - number of columns in keyscan matrix |
void wiced_hal_keyscan_enable_ghost_detection | ( | wiced_bool_t | enable | ) |
Enable/disable keyscan ghost key detection.
enable | - enable(WICED_TRUE)/disable(WICED_FALSE) |
uint8_t wiced_hal_keyscan_get_key_pressed_count | ( | void | ) |
wiced_hal_keyscan_get_key_pressed_count() – added in build 130 returns how many keys are pressed
-none |
void wiced_hal_keyscan_init | ( | void | ) |
Keyscan driver initialization function.
Thisw allocates space for the FW FIFO for key events and initializes the keyscan HW. This function should be invoked only once before using any keyscan services. Subsequent invocations will invoke undefined behavior. Keyscan driver must be initialized AFTER mia driver is initialized.
-none |
wiced_bool_t wiced_hal_keyscan_is_any_key_pressed | ( | void | ) |
check if HW detects any pressed key
-none |
void wiced_hal_keyscan_register_for_event_notification | ( | void(*)(void *) | userfn, |
void * | userdata | ||
) |
Register for notification of changes.
Once registered, you CAN NOT UNREGISTER; registration is meant to be a startup activity
userfn | - points to the function to call when the interrupt comes and matches one of the masks (if you pass a method, it must be static). The function does not need to clear the interrupt status; this will be done by KeyscanDriver::lhlInterrupt(). The function will be called ONCE per interrupt. |
userdata | - will be passed back to userfn as-is; |
void wiced_hal_keyscan_reset | ( | void | ) |
Reset the keyscan HW.
All state information and events are lost. Any pressed keys will be detected anew.
-none |
void wiced_hal_keyscan_turnOff | ( | void | ) |
Turns off the keyscan HW.
-none |