1.5.4 Keys Module APIs
touch_ret_t qtm_init_sensor_key(qtm_touch_key_control_t* qtm_lib_key_group_ptr, uint8_t which_sensor_key, qtm_acq_node_data_t* acq_lib_node_ptr)
Description: Initialize a touch key sensor and assigns the acquisition node pointer (to get the signal value)
Parameter:
Type | Description |
---|---|
qtm_touch_key_control_t* | Pointer to Keys Module Control Structure. |
uint8_t | Which key. |
qtm_acq_node_data_t* | This nodes corresponding Acquisition data. |
Return:
Type | Description |
---|---|
touch_ret_t | Touch Library Return Status |
touch_ret_t qtm_key_sensors_process(qtm_touch_key_control_t* qtm_lib_key_group_ptr)
Description: Performs key sensors processing - executes touch detect state machine for all the keys. This function is also responsible for performing drifting, anti-touch recalibration, Max-On-Duration (MOD) etc. Should be called after calling qtm_acquisition_process() (if frequency hopping is used, then after frequency hop process function).
Parameter:
Type | Description |
---|---|
qtm_touch_key_control_t* | Pointer to Keys Module Control Structure. |
Return:
Type | Description |
---|---|
touch_ret_t | Touch Library Return Status |
touch_ret_t qtm_key_suspend(uint16_t which_sensor_key, qtm_touch_key_control_t* qtm_lib_key_group_ptr)
Description: Suspends touch measurements for the key.
Parameter:
Type | Description |
---|---|
uint16_t | Which key. |
qtm_touch_key_control_t* | Pointer to Keys Module Control Structure. |
Return:
Type | Description |
---|---|
touch_ret_t | Touch Library Return Status |
touch_ret_t qtm_key_resume(uint16_t which_sensor_key, qtm_touch_key_control_t* qtm_lib_key_group_ptr)
Description: Resumes touch measurements for the key.
Parameter:
Type | Description |
---|---|
uint16_t | Which key. |
qtm_touch_key_control_t* | Pointer to Keys Module Control Structure. |
Return:
Type | Description |
---|---|
touch_ret_t | Touch Library Return Status |
void update_qtlib_timer(uint16_t time_elapsed_since_update)
Description: The internal time tracking variable will be updated and used for computing various time based functioning like Drift and MOD. It is recommended to call this function periodically (like 20msec and pass 20 as the value).
Parameter:
Type | Description |
---|---|
uint16_t | Timelapse since last call in millisecond. |
Return: void
uint16_t qtm_get_touch_keys_module_id(void)
Description: Returns the module ID
Parameter: void
Return:
Type | Description |
---|---|
uint16_t | Module ID |
uint8_t qtm_get_touch_keys_module_ver(void)
Description: Returns the module Firmware version
Parameter: void
Return:
Type | Description |
---|---|
uint8_t | Module Version |