for AVR UC3 L0
This is the QTouch Library for ARV UC3 L0 devices that consists in one api header file(touch_api_at32uc3l.h) and one pre-compiled library(libuc3l-qtouch-gnu.a). All projects using this library must also provide the required header file(touch_config_at32uc3l.h) used to configure the library. For more information on the Qtouch Library, check www.atmel.com/qtouchlib.
Data Structures | |
struct | tag_sensor_t |
struct | tag_touch_at_config_t |
struct | tag_touch_at_param_t |
struct | tag_touch_at_pin_t |
struct | tag_touch_at_reg_t |
struct | tag_touch_at_status_t |
struct | tag_touch_config_t |
struct | tag_touch_filter_data_t |
struct | tag_touch_general_config_t |
struct | tag_touch_global_param_t |
struct | tag_touch_info_t |
struct | tag_touch_measure_data_t |
struct | tag_touch_qm_config_t |
struct | tag_touch_qm_dma_t |
struct | tag_touch_qm_param_t |
struct | tag_touch_qm_pin_t |
struct | tag_touch_qm_reg_t |
struct | tag_touch_qt_config_t |
struct | tag_touch_qt_param_t |
struct | tag_touch_qt_pin_t |
struct | tag_touch_qt_reg_t |
Macros | |
#define | _DEBUG_INTERFACE_ |
#define | PRIV_QT_RS_TABLE_INIT NULL |
Initialize rotor slider table. More... | |
QTouch Library Acquisition Status bitfields. | |
#define | TOUCH_NO_ACTIVITY (0x0000u) |
#define | TOUCH_IN_DETECT (0x0001u) |
#define | TOUCH_STATUS_CHANGE (0x0002u) |
#define | TOUCH_ROTOR_SLIDER_POS_CHANGE (0x0004u) |
#define | TOUCH_CHANNEL_REF_CHANGE (0x0008u) |
#define | TOUCH_BURST_AGAIN (0x0100u) |
#define | TOUCH_RESOLVE_CAL (0x0200u) |
#define | TOUCH_RESOLVE_FILTERIN (0x0400u) |
#define | TOUCH_RESOLVE_DI (0x0800u) |
#define | TOUCH_RESOLVE_POS_RECAL (0x1000u) |
QTouch method Acquisition Sensor Groups. | |
#define | TOUCH_QT_GRP_A (0u) |
#define | TOUCH_QT_GRP_B (1u) |
QMatrix API. | |
touch_ret_t | touch_qm_sensors_init_with_rs_table (touch_config_t *p_touch_config,(void)) |
This API is used to initialize the Touch Library with QMatrix pin, register and sensor configuration provided by the user. More... | |
touch_ret_t | touch_qm_sensor_config (sensor_type_t sensor_type, channel_t from_channel, channel_t to_channel, aks_group_t aks_group, threshold_t detect_threshold, hysteresis_t detect_hysteresis, resolution_t position_resolution, uint8_t position_hysteresis, sensor_id_t *p_sensor_id) |
This API can be used to configure a sensor of type key, rotor or slider. More... | |
touch_ret_t | touch_qm_sensor_update_config (sensor_id_t sensor_id, touch_qm_param_t *p_touch_sensor_param) |
This API can be used to set the sensor configuration parameters. More... | |
touch_ret_t | touch_qm_sensor_get_config (sensor_id_t sensor_id, touch_qm_param_t *p_touch_sensor_param) |
This API can be used to read back the sensor configuration parameters information is being seeked. More... | |
touch_ret_t | touch_qm_channel_update_burstlen (channel_t channel_id, touch_bl_t qm_burst_length) |
This API can be used to update the burst length of a give input channel. More... | |
touch_ret_t | touch_qm_update_global_param (touch_global_param_t *p_global_param) |
This API can be used to update the global parameter of QMatrix method. More... | |
touch_ret_t | touch_qm_get_global_param (touch_global_param_t *p_global_param) |
This API can be used to read back the global parameter of QMatrix method. More... | |
touch_ret_t | touch_qm_sensors_calibrate (void) |
This API is used to calibrate the sensors for the first time before starting a Touch measurement. This API can also be used to force calibration of sensors when any of the Touch sensor parameters are changed during runtime. More... | |
touch_ret_t | touch_qm_sensors_start_acquisition (touch_time_t current_time_ms, touch_qm_dma_t *p_qm_dma, touch_acq_mode_t qm_acq_mode, void(*measure_complete_callback)(touch_measure_data_t *p_measure_data)) |
This API can be used to start a QMatrix Touch measurement. More... | |
touch_ret_t | touch_qm_get_libinfo (touch_info_t *p_touch_info) |
This API can be used to get the Touch Library configuration information for QMatrix Touch acquisition method. More... | |
touch_ret_t | touch_qm_sensor_get_delta (sensor_id_t sensor_id, touch_delta_t *p_delta) |
This API can be used retrieve the delta value corresponding to a given sensor. More... | |
#define | touch_qm_sensors_init(x) |
touch_ret_t touch_qm_sensors_init( touch_config_t *p_touch_config); More... | |
Autonomous QTouch API. | |
touch_ret_t | touch_at_sensor_init (touch_config_t *p_touch_config) |
This API is used to initialize the Touch Library with Autonomous Touch pin and register configuration provided by the user. More... | |
touch_ret_t | touch_at_sensor_update_config (touch_at_param_t *p_at_param) |
This API is used to update the register configuration information of the Autonomous Touch sensor. More... | |
touch_ret_t | touch_at_sensor_get_config (touch_at_param_t *p_at_param) |
This API is used to read back the register configuration information of the Autonomous Touch sensor. More... | |
touch_ret_t | touch_at_sensor_enable (void(*touch_at_status_change_interrupt_callback)(touch_at_status *p_at_status)) |
Enable the Autonomous Touch sensor to start Touch measurement. More... | |
touch_ret_t | touch_at_sensor_disable (void) |
Stop the Autonomous Touch sensor from doing Touch measurement. More... | |
touch_ret_t | touch_at_get_libinfo (touch_info_t *p_touch_info) |
This API can be used to read back Autonomous Touch configuration and status information in addition to the Touch Library version. More... | |
QTouch Group A/Group B API. | |
touch_ret_t | touch_qt_sensors_init_with_rs_table (touch_qt_grp_t touch_qt_grp, touch_config_t *p_touch_config,(void),(void)) |
This API is used to initialize the Touch Library with QTouch Group A or QTouch Group B pin, register and sensor configuration provided by the user. More... | |
touch_ret_t | touch_qt_sensor_config (touch_qt_grp_t touch_qt_grp, sensor_type_t sensor_type, channel_t from_channel, channel_t to_channel, aks_group_t aks_group, threshold_t detect_threshold, hysteresis_t detect_hysteresis, resolution_t position_resolution, sensor_id_t *p_sensor_id) |
This API can be used to configure a sensor of type key, rotor or slider. More... | |
touch_ret_t | touch_qt_sensor_update_config (touch_qt_grp_t touch_qt_grp, sensor_id_t sensor_id, touch_qt_param_t *p_touch_sensor_param) |
This API can be used to set the sensor configuration parameters. More... | |
touch_ret_t | touch_qt_sensor_get_config (touch_qt_grp_t touch_qt_grp, sensor_id_t sensor_id, touch_qt_param_t *p_touch_sensor_param) |
This API can be used to read back the sensor configuration parameters. More... | |
touch_ret_t | touch_qt_update_global_param (touch_qt_grp_t touch_qt_grp, touch_global_param_t *p_global_param) |
This API can be used to update the global parameter of QTouch method. More... | |
touch_ret_t | touch_qt_get_global_param (touch_qt_grp_t touch_qt_grp, touch_global_param_t *p_global_param) |
This API can be used to read back the global parameter of QTouch method. More... | |
touch_ret_t | touch_qt_sensors_calibrate (touch_qt_grp_t touch_qt_grp) |
This API is used to calibrate the sensors for the first time before starting a Touch measurement. This API can also be used to force calibration of sensors when any of the Touch sensor parameters are changed during runtime. More... | |
touch_ret_t | touch_qt_sensors_start_acquisition (touch_qt_grp_t touch_qt_grp, touch_time_t current_time_ms, touch_qt_dma_t qt_dma_ch, touch_acq_mode_t qt_acq_mode, void(*measure_complete_callback)(touch_measure_data_t *p_measure_data)) |
This API can be used to start a QTouch Group A or QTouch Group B Touch measurement. More... | |
touch_ret_t | touch_qt_get_libinfo (touch_qt_grp_t touch_qt_grp, touch_info_t *p_touch_info) |
This API can be used to get the Touch Library configuration information for QTouch Group A or Group B acquisition method. More... | |
touch_ret_t | touch_qt_sensor_get_delta (touch_qt_grp_t touch_qt_grp, sensor_id_t sensor_id, touch_delta_t *p_delta) |
This API can be used retrieve the delta value corresponding to a given sensor. More... | |
touch_ret_t | touch_qt_sensor_disable (touch_qt_grp_t touch_qt_grp, sensor_id_t sensor_id) |
This API can be used disable acquisition on a given Touch Sensor. More... | |
touch_ret_t | touch_qt_sensor_reenable (touch_qt_grp_t touch_qt_grp, sensor_id_t sensor_id) |
This API can be used re-enable acquisition on a disabled Touch Sensor. More... | |
#define | touch_qt_sensors_init(x, y) |
touch_ret_t touch_qt_sensors_init( touch_qt_grp_t touch_qt_grp, touch_config_t *p_touch_config); More... | |
Common API. | |
void | touch_event_dispatcher (void) |
Touch Library Event Dispatcher. Common to QTouch Group A, QTouch Group B or QMatrix Acquisition methods. More... | |
void | touch_deinit (void) |
This API can be used to deinitialize the touch library. Once this API is called, both the QMatrix method and Autonomous Touch method acquisition is stopped and the CAT hardware module is disabled. More... | |
QTouch Library internal use functions. | |
void | touch_qm_rs_table_init (void) |
This Touch Library ISR must be registered to the Interrupt Controller module when using the GCC Compiler. More... | |
void | touch_qt_rs_table_init (void) |
This is an extern function of the Touch Library. This function is NOT to be used by the user. More... | |
void | touch_qta_table_init (void) |
This is an extern function of the Touch Library. This function is NOT to be used by the user. More... | |
void | touch_qtb_table_init (void) |
This is an extern function of the Touch Library. This function is NOT to be used by the user. More... | |
#define _DEBUG_INTERFACE_ |
Enable QDebug interface
#define PRIV_QT_RS_TABLE_INIT NULL |
Initialize rotor slider table.
#define TOUCH_BURST_AGAIN (0x0100u) |
Indicates that reburst is required to resolve Filtering or Calibration state.
#define TOUCH_CHANNEL_REF_CHANGE (0x0008u) |
Change in Reference value of atleast one Touch channel.
Referenced by QDebug_SendData().
#define TOUCH_IN_DETECT (0x0001u) |
Atleast one Touch channel is in detect.
#define TOUCH_NO_ACTIVITY (0x0000u) |
No Touch activity.
#define touch_qm_sensors_init | ( | x | ) |
touch_ret_t touch_qm_sensors_init( touch_config_t *p_touch_config);
#define TOUCH_QT_GRP_A (0u) |
QTouch Group A.
#define TOUCH_QT_GRP_B (1u) |
QTouch Group B.
#define touch_qt_sensors_init | ( | x, | |
y | |||
) |
touch_ret_t touch_qt_sensors_init( touch_qt_grp_t touch_qt_grp, touch_config_t *p_touch_config);
#define TOUCH_RESOLVE_CAL (0x0200u) |
Indicates that reburst is needed to resolve Calibration.
#define TOUCH_RESOLVE_DI (0x0800u) |
Indicates that reburst is needed to resolve Detect Integration.
#define TOUCH_RESOLVE_FILTERIN (0x0400u) |
Indicates that reburst is needed to resolve Filtering.
#define TOUCH_RESOLVE_POS_RECAL (0x1000u) |
Indicates that reburst is needed to resolve Recalibration.
#define TOUCH_ROTOR_SLIDER_POS_CHANGE (0x0004u) |
Change in Rotor or Slider position of atleast one rotor or slider.
Referenced by QDebug_SendData().
#define TOUCH_STATUS_CHANGE (0x0002u) |
Change in Touch status of atleast one Touch channel.
Referenced by QDebug_SendData().
typedef enum tag_aks_group_t aks_group_t |
Which AKS group, if any, a sensor is in.
NO_AKS_GROUP = sensor is not in an AKS group, and cannot be suppressed. AKS_GROUP_x = sensor is in AKS group x.
typedef enum tag_at_status_change_t at_status_change_t |
Autonomous Touch status change enum.
typedef uint8_t channel_t |
Sensor start and end channel type of a Sensor. Channel number starts with value 0.
typedef enum tag_general_pin_options_t general_pin_options_t |
Options for SMP, DIS, VDIV and SYNC pins.
typedef enum tag_hysteresis_t hysteresis_t |
A sensor detection hysteresis value.
This is expressed as a percentage of the sensor detection threshold. HYST_x = hysteresis value is x% of detection threshold value (rounded down). NB: a minimum value of 2 is used.
Example: if detection threshold = 20, then: HYST_50 = 10 (50% of 20) HYST_25 = 5 (25% of 20) HYST_12_5 = 2 (12.5% of 20) HYST_6_25 = 2 (6.25% of 20 = 1, but value is hardlimited to 2)
typedef enum tag_qt_pin_options_t qt_pin_options_t |
Autonomous QTouch, QTouch Group A and QTouch Group B Pin options available.
typedef enum tag_recal_threshold_t recal_threshold_t |
A sensor recalibration threshold.
This is expressed as a percentage of the sensor detection threshold. RECAL_x = recalibration threshold is x% of detection threshold value (rounded down). NB: a minimum value of 4 is used.
Example: if detection threshold = 40, then: RECAL_100 = 40 (100% of 40) RECAL_50 = 20 (50% of 40) RECAL_25 = 10 (25% of 40) RECAL_12_5 = 5 (12.5% of 40) RECAL_6_25 = 4 (6.25% of 40 = 2, but value is hardlimited to 4)
typedef enum tag_resolution_t resolution_t |
For rotors and sliders, the resolution of the reported angle or position.
RES_x_BIT = rotor/slider reports x-bit values.
Example: if slider resolution is RES_7_BIT, then reported positions are in the range 0..127.
typedef uint8_t sensor_id_t |
Sensor number type.
typedef struct tag_sensor_t sensor_t |
Sensor structure for storing sensor related information.
typedef enum tag_sensor_type_t sensor_type_t |
Sensor types available.
typedef uint8_t threshold_t |
An unsigned 8-bit number setting a sensor detection threshold.
typedef enum tag_touch_acq_mode_t touch_acq_mode_t |
Touch library acquisition mode.
typedef uint16_t touch_acq_status_t |
Status of Touch measurement.
typedef struct tag_touch_at_config_t touch_at_config_t |
Autonomous Touch configuration input.
typedef struct tag_touch_at_param_t touch_at_param_t |
Autonomous Touch sensor param type.
typedef struct tag_touch_at_pin_t touch_at_pin_t |
Autonomous Touch pin configuration type.
typedef struct tag_touch_at_reg_t touch_at_reg_t |
Autonomous Touch register configuration type.
typedef struct tag_touch_at_status_t touch_at_status |
Autonomous QTouch status type.
typedef uint8_t touch_bl_t |
QMatrix individual sensor burst length type.
typedef struct tag_touch_config_t touch_config_t |
Touch Input Configuration type.
typedef int16_t touch_delta_t |
Touch sensor delta value type.
typedef struct tag_touch_filter_data_t touch_filter_data_t |
Touch Filter Callback data type.
typedef struct tag_touch_general_config_t touch_general_config_t |
Touch General configuration input common to QMatrix, QTouch and Autonomous Touch.
typedef struct tag_touch_global_param_t touch_global_param_t |
Global sensor configuration info.
typedef struct tag_touch_info_t touch_info_t |
Touch library information type.
typedef enum tag_touch_lib_state_t touch_lib_state_t |
Touch library state.
typedef struct tag_touch_measure_data_t touch_measure_data_t |
Touch Measured data type.
typedef struct tag_touch_qm_config_t touch_qm_config_t |
QMatrix configuration input.
typedef struct tag_touch_qm_dma_t touch_qm_dma_t |
QMatrix dma type.
typedef struct tag_touch_qm_param_t touch_qm_param_t |
QMatrix sensor configuration type.
typedef struct tag_touch_qm_pin_t touch_qm_pin_t |
QMatrix pin configuration type.
typedef struct tag_touch_qm_reg_t touch_qm_reg_t |
QMatrix register configuration type.
typedef struct tag_touch_qt_config_t touch_qt_config_t |
QTouch Group A/Group B configuration input.
typedef uint8_t touch_qt_dma_t |
QTouch Group A/ Group B DMA channel type.
typedef uint8_t touch_qt_grp_t |
QTouch Group type. Used to identify TOUCH_QT_GRP_A or TOUCH_QT_GRP_B.
typedef struct tag_touch_qt_param_t touch_qt_param_t |
QTouch Group A/Group B sensor configuration type.
typedef struct tag_touch_qt_pin_t touch_qt_pin_t |
QTouch Group A/Group B pin configuration type.
typedef struct tag_touch_qt_reg_t touch_qt_reg_t |
QTouch Group A/Group B register configuration type.
typedef enum tag_touch_ret_t touch_ret_t |
Touch Library error codes.
typedef uint16_t touch_time_t |
Current time type.
typedef enum tag_x_pin_options_t x_pin_options_t |
QMatrix Sensor pair types available.
typedef enum tag_y_pin_options_t y_pin_options_t |
QMatrix Y Pin options available.
enum tag_aks_group_t |
Options for SMP, DIS, VDIV and SYNC pins.
enum tag_hysteresis_t |
A sensor detection hysteresis value.
This is expressed as a percentage of the sensor detection threshold. HYST_x = hysteresis value is x% of detection threshold value (rounded down). NB: a minimum value of 2 is used.
Example: if detection threshold = 20, then: HYST_50 = 10 (50% of 20) HYST_25 = 5 (25% of 20) HYST_12_5 = 2 (12.5% of 20) HYST_6_25 = 2 (6.25% of 20 = 1, but value is hardlimited to 2)
Enumerator | |
---|---|
HYST_50 | |
HYST_25 | |
HYST_12_5 | |
HYST_6_25 | |
MAX_HYST |
enum tag_qt_pin_options_t |
A sensor recalibration threshold.
This is expressed as a percentage of the sensor detection threshold. RECAL_x = recalibration threshold is x% of detection threshold value (rounded down). NB: a minimum value of 4 is used.
Example: if detection threshold = 40, then: RECAL_100 = 40 (100% of 40) RECAL_50 = 20 (50% of 40) RECAL_25 = 10 (25% of 40) RECAL_12_5 = 5 (12.5% of 40) RECAL_6_25 = 4 (6.25% of 40 = 2, but value is hardlimited to 4)
Enumerator | |
---|---|
RECAL_100 | |
RECAL_50 | |
RECAL_25 | |
RECAL_12_5 | |
RECAL_6_25 | |
MAX_RECAL |
enum tag_resolution_t |
For rotors and sliders, the resolution of the reported angle or position.
RES_x_BIT = rotor/slider reports x-bit values.
Example: if slider resolution is RES_7_BIT, then reported positions are in the range 0..127.
Enumerator | |
---|---|
RES_1_BIT | |
RES_2_BIT | |
RES_3_BIT | |
RES_4_BIT | |
RES_5_BIT | |
RES_6_BIT | |
RES_7_BIT | |
RES_8_BIT | |
MAX_RES |
enum tag_sensor_type_t |
enum tag_touch_acq_mode_t |
Touch library acquisition mode.
enum tag_touch_ret_t |
Touch Library error codes.
enum tag_x_pin_options_t |
enum tag_y_pin_options_t |
touch_ret_t touch_at_get_libinfo | ( | touch_info_t * | p_touch_info | ) |
This API can be used to read back Autonomous Touch configuration and status information in addition to the Touch Library version.
touch_ret_t touch_at_sensor_disable | ( | void | ) |
Stop the Autonomous Touch sensor from doing Touch measurement.
touch_ret_t touch_at_sensor_enable | ( | void(*)(touch_at_status *p_at_status) | touch_at_status_change_interrupt_callback | ) |
Enable the Autonomous Touch sensor to start Touch measurement.
touch_at_status_change_interrupt_callback,: | Autonomous Touch Status Change Callback function. p_at_status: Autonomous Touch status change. |
Referenced by touch_api_init().
touch_ret_t touch_at_sensor_get_config | ( | touch_at_param_t * | p_at_param | ) |
This API is used to read back the register configuration information of the Autonomous Touch sensor.
p_at_param,: | Autonomous Touch sensor configuration paramter updated by the Touch Library. |
touch_ret_t touch_at_sensor_init | ( | touch_config_t * | p_touch_config | ) |
This API is used to initialize the Touch Library with Autonomous Touch pin and register configuration provided by the user.
p_touch_config,: | Pointer to Touch configuration structure. |
Referenced by touch_api_init().
touch_ret_t touch_at_sensor_update_config | ( | touch_at_param_t * | p_at_param | ) |
This API is used to update the register configuration information of the Autonomous Touch sensor.
p_at_param,: | Autonomous Touch sensor configuration paramter input to the Touch Library. |
void touch_deinit | ( | void | ) |
This API can be used to deinitialize the touch library. Once this API is called, both the QMatrix method and Autonomous Touch method acquisition is stopped and the CAT hardware module is disabled.
void touch_event_dispatcher | ( | void | ) |
Touch Library Event Dispatcher. Common to QTouch Group A, QTouch Group B or QMatrix Acquisition methods.
touch_ret_t touch_qm_channel_update_burstlen | ( | channel_t | channel_id, |
touch_bl_t | qm_burst_length | ||
) |
This API can be used to update the burst length of a give input channel.
channel_id,: | The channel id of the Touch sensor for which burst length is to be updated. |
qm_burst_length,: | The burst length value. |
touch_ret_t touch_qm_get_global_param | ( | touch_global_param_t * | p_global_param | ) |
This API can be used to read back the global parameter of QMatrix method.
p_global_param,: | The pointer to readback the QMatrix global sensor configuration. |
touch_ret_t touch_qm_get_libinfo | ( | touch_info_t * | p_touch_info | ) |
This API can be used to get the Touch Library configuration information for QMatrix Touch acquisition method.
p_touch_info,: | Pointer to the Touch info data structure that will be updated by the Touch Library. |
void touch_qm_rs_table_init | ( | void | ) |
This Touch Library ISR must be registered to the Interrupt Controller module when using the GCC Compiler.
This is an extern function of the Touch Library. This function is NOT to be used by the user.
touch_ret_t touch_qm_sensor_config | ( | sensor_type_t | sensor_type, |
channel_t | from_channel, | ||
channel_t | to_channel, | ||
aks_group_t | aks_group, | ||
threshold_t | detect_threshold, | ||
hysteresis_t | detect_hysteresis, | ||
resolution_t | position_resolution, | ||
uint8_t | position_hysteresis, | ||
sensor_id_t * | p_sensor_id | ||
) |
This API can be used to configure a sensor of type key, rotor or slider.
sensor_type,: | can be of type key, rotor or slider. |
from_channel,: | the first channel in the slider sensor. |
to_channel,: | the last channel in the slider sensor. |
aks_group,: | which AKS group (if any) the sensor is in. |
detect_threshold,: | the sensor detection threshold. |
detect_hysteresis,: | the sensor detection hysteresis value. |
position_resolution,: | the resolution of the reported position value. |
position_hysteresis,: | the hysteresis of the reported position value. |
p_sensor_id,: | The sensor id value of the configured sensor is updated by the Touch Library. |
touch_ret_t touch_qm_sensor_get_config | ( | sensor_id_t | sensor_id, |
touch_qm_param_t * | p_touch_sensor_param | ||
) |
This API can be used to read back the sensor configuration parameters information is being seeked.
sensor_id,: | The sensor id for which configuration parameter. |
p_touch_sensor_param,: | The touch sensor parameter structure that will be updated by the Touch Library. |
touch_ret_t touch_qm_sensor_get_delta | ( | sensor_id_t | sensor_id, |
touch_delta_t * | p_delta | ||
) |
This API can be used retrieve the delta value corresponding to a given sensor.
sensor_id,: | The sensor id for which delta value is being seeked. |
p_delta,: | Pointer to the delta variable to be updated by the Touch Library. |
touch_ret_t touch_qm_sensor_update_config | ( | sensor_id_t | sensor_id, |
touch_qm_param_t * | p_touch_sensor_param | ||
) |
This API can be used to set the sensor configuration parameters.
sensor_id,: | The sensor id for which configuration parameter information is being set. |
p_touch_sensor_param,: | The touch sensor parameter structure that will be used by the Touch Library to update. |
touch_ret_t touch_qm_sensors_calibrate | ( | void | ) |
This API is used to calibrate the sensors for the first time before starting a Touch measurement. This API can also be used to force calibration of sensors when any of the Touch sensor parameters are changed during runtime.
touch_ret_t touch_qm_sensors_init_with_rs_table | ( | touch_config_t * | p_touch_config, |
(void) | |||
) |
This API is used to initialize the Touch Library with QMatrix pin, register and sensor configuration provided by the user.
p_touch_config,: | Pointer to Touch configuration structure. |
touch_ret_t touch_qm_sensors_start_acquisition | ( | touch_time_t | current_time_ms, |
touch_qm_dma_t * | p_qm_dma, | ||
touch_acq_mode_t | qm_acq_mode, | ||
void(*)(touch_measure_data_t *p_measure_data) | measure_complete_callback | ||
) |
This API can be used to start a QMatrix Touch measurement.
current_time_ms,: | Current time in millisecond. |
p_qm_dma,: | Pointer to the dma channels to be used for Touch measurement. |
qm_acq_mode,: | Specify whether Raw acquisition mode or Normal acquisition mode is be used. |
measure_complete_callback,: | This callback function is called by the Touch Library once the QMatrix Touch measurement is complete. This callback function provides pointers related to the measured touch data and touch status. p_measure_data: QMatrix sensor status and measured data pointer. |
touch_ret_t touch_qm_update_global_param | ( | touch_global_param_t * | p_global_param | ) |
This API can be used to update the global parameter of QMatrix method.
p_global_param,: | The pointer to QMatrix global sensor configuration. |
touch_ret_t touch_qt_get_global_param | ( | touch_qt_grp_t | touch_qt_grp, |
touch_global_param_t * | p_global_param | ||
) |
This API can be used to read back the global parameter of QTouch method.
touch_qt_grp,: | Choose QTouch Group A or Group B. |
p_global_param,: | The pointer to readback the QTouch Group A or QTouch Group B global sensor configuration. |
touch_ret_t touch_qt_get_libinfo | ( | touch_qt_grp_t | touch_qt_grp, |
touch_info_t * | p_touch_info | ||
) |
This API can be used to get the Touch Library configuration information for QTouch Group A or Group B acquisition method.
touch_qt_grp,: | Choose QTouch Group A or Group B. |
p_touch_info,: | Pointer to the Touch info data structure that will be updated by the Touch Library. |
void touch_qt_rs_table_init | ( | void | ) |
This is an extern function of the Touch Library. This function is NOT to be used by the user.
touch_ret_t touch_qt_sensor_config | ( | touch_qt_grp_t | touch_qt_grp, |
sensor_type_t | sensor_type, | ||
channel_t | from_channel, | ||
channel_t | to_channel, | ||
aks_group_t | aks_group, | ||
threshold_t | detect_threshold, | ||
hysteresis_t | detect_hysteresis, | ||
resolution_t | position_resolution, | ||
sensor_id_t * | p_sensor_id | ||
) |
This API can be used to configure a sensor of type key, rotor or slider.
touch_qt_grp,: | Choose QTouch Group A or Group B. |
sensor_type,: | can be of type key, rotor or slider. |
from_channel,: | the first channel in the slider sensor. |
to_channel,: | the last channel in the slider sensor. |
aks_group,: | which AKS group (if any) the sensor is in. |
detect_threshold,: | the sensor detection threshold. |
detect_hysteresis,: | the sensor detection hysteresis value. |
position_resolution,: | the resolution of the reported position value. |
p_sensor_id,: | The sensor id value of the configured sensor is updated by the Touch Library. |
touch_ret_t touch_qt_sensor_disable | ( | touch_qt_grp_t | touch_qt_grp, |
sensor_id_t | sensor_id | ||
) |
This API can be used disable acquisition on a given Touch Sensor.
touch_qt_grp,: | Choose QTouch Group A or Group B. |
sensor_id,: | The Sensor number for which acquisition is disabled. |
touch_ret_t touch_qt_sensor_get_config | ( | touch_qt_grp_t | touch_qt_grp, |
sensor_id_t | sensor_id, | ||
touch_qt_param_t * | p_touch_sensor_param | ||
) |
This API can be used to read back the sensor configuration parameters.
touch_qt_grp,: | Choose QTouch Group A or Group B. |
sensor_id,: | The sensor id for which configuration parameter information is being seeked. |
p_touch_sensor_param,: | The touch sensor parameter structure that will be updated by the Touch Library. |
touch_ret_t touch_qt_sensor_get_delta | ( | touch_qt_grp_t | touch_qt_grp, |
sensor_id_t | sensor_id, | ||
touch_delta_t * | p_delta | ||
) |
This API can be used retrieve the delta value corresponding to a given sensor.
touch_qt_grp,: | Choose QTouch Group A or Group B. |
sensor_id,: | The sensor id for which delta value is being seeked. |
p_delta,: | Pointer to the delta variable to be updated by the Touch Library. |
touch_ret_t touch_qt_sensor_reenable | ( | touch_qt_grp_t | touch_qt_grp, |
sensor_id_t | sensor_id | ||
) |
This API can be used re-enable acquisition on a disabled Touch Sensor.
touch_qt_grp,: | Choose QTouch Group A or Group B. |
sensor_id,: | The Sensor number for which acquisition is disabled. |
touch_ret_t touch_qt_sensor_update_config | ( | touch_qt_grp_t | touch_qt_grp, |
sensor_id_t | sensor_id, | ||
touch_qt_param_t * | p_touch_sensor_param | ||
) |
This API can be used to set the sensor configuration parameters.
touch_qt_grp,: | Choose QTouch Group A or Group B. |
sensor_id,: | The sensor id for which configuration parameter information is being set. |
p_touch_sensor_param,: | The touch sensor parameter structure that will be used by the Touch Library to update. |
touch_ret_t touch_qt_sensors_calibrate | ( | touch_qt_grp_t | touch_qt_grp | ) |
This API is used to calibrate the sensors for the first time before starting a Touch measurement. This API can also be used to force calibration of sensors when any of the Touch sensor parameters are changed during runtime.
touch_qt_grp,: | Choose QTouch Group A or Group B. |
touch_ret_t touch_qt_sensors_init_with_rs_table | ( | touch_qt_grp_t | touch_qt_grp, |
touch_config_t * | p_touch_config, | ||
(void) | , | ||
(void) | |||
) |
This API is used to initialize the Touch Library with QTouch Group A or QTouch Group B pin, register and sensor configuration provided by the user.
touch_qt_grp,: | Choose QTouch Group A or Group B. |
p_touch_config,: | Pointer to Touch configuration structure. |
touch_ret_t touch_qt_sensors_start_acquisition | ( | touch_qt_grp_t | touch_qt_grp, |
touch_time_t | current_time_ms, | ||
touch_qt_dma_t | qt_dma_ch, | ||
touch_acq_mode_t | qt_acq_mode, | ||
void(*)(touch_measure_data_t *p_measure_data) | measure_complete_callback | ||
) |
This API can be used to start a QTouch Group A or QTouch Group B Touch measurement.
touch_qt_grp,: | Choose QTouch Group A or Group B. |
current_time_ms,: | Current time in millisecond. |
qt_dma_ch,: | The dma channel to be used for Touch measurement. |
qt_acq_mode,: | Specify whether Raw acquisition mode or Normal acquisition mode is be used. |
measure_complete_callback,: | This callback function is called by the Touch Library once the QMatrix Touch measurement is complete. This callback function provides pointers related to the measured touch data and touch status. p_measure_data: QTouch Group A or Group B sensor status and measured data pointer. |
touch_ret_t touch_qt_update_global_param | ( | touch_qt_grp_t | touch_qt_grp, |
touch_global_param_t * | p_global_param | ||
) |
This API can be used to update the global parameter of QTouch method.
touch_qt_grp,: | Choose QTouch Group A or Group B. |
p_global_param,: | The pointer to QTouch Group A or QTouch Group B global sensor configuration. |
void touch_qta_table_init | ( | void | ) |
This is an extern function of the Touch Library. This function is NOT to be used by the user.
void touch_qtb_table_init | ( | void | ) |
This is an extern function of the Touch Library. This function is NOT to be used by the user.