Infineon Logo AIROC BTSDK v4.4 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Keyscan Interface

Modules

 Keyscan Interface Queue
 

Functions

void wiced_hal_keyscan_configure (uint8_t num_rows, uint8_t 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...
 

Detailed Description

Function Documentation

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.

Parameters
-none
Returns
- none
void wiced_hal_keyscan_configure ( uint8_t  num_rows,
uint8_t  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

Parameters
num_rows- number of rows in keyscan matrix
num_columns- number of columns in keyscan matrix
Returns
- none
void wiced_hal_keyscan_enable_ghost_detection ( wiced_bool_t  enable)

Enable/disable keyscan ghost key detection.

Parameters
enable- enable(WICED_TRUE)/disable(WICED_FALSE)
Returns
- 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.

Parameters
-none
Returns
- none
wiced_bool_t wiced_hal_keyscan_is_any_key_pressed ( void  )

check if HW detects any pressed key

Parameters
-none
Returns
- WICED_TRUE -some key is pressed WICED_FALSE -all keys are released
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

Parameters
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;
Returns
- none
void wiced_hal_keyscan_reset ( void  )

Reset the keyscan HW.

All state information and events are lost. Any pressed keys will be detected anew.

Parameters
-none
Returns
- none
void wiced_hal_keyscan_turnOff ( void  )

Turns off the keyscan HW.

Parameters
-none
Returns
- none