This is the QTouch Library for SAM0 devices that consists in one api header file(touch_api_SAMD.h) and one pre-compiled library(libsamd-qt-gcc.a).
All projects using this library must also provide the required header file(touch_config_samd.h) used to configure the library.
For more information on the Qtouch Library, check www.atmel.com/qtouchlib.
Modules | |
Related Project(s) | |
In this section you can find all the projects related to the QTouch Library for SAM0. | |
Data Structures | |
struct | tag_sensor_t |
struct | tag_touch_config_t |
struct | tag_touch_filter_data_t |
struct | tag_touch_global_param_t |
struct | tag_touch_info_t |
struct | tag_touch_measure_data_t |
struct | tag_touch_mutlcap_acq_param_t |
Mutual capacitance sensor acquisition parameter type. More... | |
struct | tag_touch_mutlcap_config_t |
struct | tag_touch_mutlcap_param_t |
struct | tag_touch_selfcap_acq_param_t |
Self capacitance sensor acquisition parameter type. More... | |
struct | tag_touch_selfcap_config_t |
struct | tag_touch_selfcap_param_t |
struct | tag_touch_time_t |
Touch Helper API. | |
touch_ret_t | touch_sensors_init (void) |
This API is used to initialize and configure the Touch Library. More... | |
touch_ret_t | touch_sensors_measure (void) |
This API is used to perform a Single Capacitance measurement using the Touch Library. More... | |
void | touch_sensors_update_time (void) |
This API is used to update Timing info for Touch Library. Typical usage of this API is inside a periodic timer ISR. More... | |
Touch API. | |
touch_ret_t | touch_mutlcap_sensors_init_with_rs_table (touch_config_t *p_touch_config, void(*rs_table_init)(void)) |
This API is used to initialize the Touch Library with Mutual cap method pin, register and sensor configuration provided by the user. More... | |
touch_ret_t | touch_selfcap_sensors_init_with_rs_table (touch_config_t *p_touch_config, void(*rs_table_init)(void)) |
This API is used to initialize the Touch Library with Self cap method pin, register and sensor configuration provided by the user. More... | |
touch_ret_t | touch_mutlcap_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_selfcap_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, sensor_id_t *p_sensor_id) |
touch_ret_t | touch_mutlcap_sensors_calibrate (auto_tune_type_t) |
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_selfcap_sensors_calibrate (auto_tune_type_t) |
touch_ret_t | touch_selfcap_sensors_measure (touch_current_time_t current_time_ms, touch_acq_mode_t selfcap_acq_mode, void(*measure_complete_callback)(void)) |
This API can be used to start a Touch measurement. More... | |
touch_ret_t | touch_mutlcap_sensors_measure (touch_current_time_t current_time_ms, touch_acq_mode_t mutlcap_acq_mode, void(*measure_complete_callback)(void)) |
touch_ret_t | touch_mutlcap_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... | |
touch_ret_t | touch_selfcap_sensor_get_delta (sensor_id_t sensor_id, touch_delta_t *p_delta) |
touch_ret_t | touch_mutlcap_sensor_update_config (sensor_id_t sensor_id, touch_mutlcap_param_t *p_touch_sensor_param) |
This API can be used to set the sensor configuration parameters. More... | |
touch_ret_t | touch_selfcap_sensor_update_config (sensor_id_t sensor_id, touch_selfcap_param_t *p_touch_sensor_param) |
touch_ret_t | touch_mutlcap_sensor_get_config (sensor_id_t sensor_id, touch_mutlcap_param_t *p_touch_sensor_param) |
This API can be used to read back the sensor configuration parameters. More... | |
touch_ret_t | touch_selfcap_sensor_get_config (sensor_id_t sensor_id, touch_selfcap_param_t *p_touch_sensor_param) |
touch_ret_t | touch_mutlcap_sensor_update_acq_config (touch_mutlcap_acq_param_t *p_touch_mutlcap_acq_param) |
This API can be used to set the sensor configuration parameters. More... | |
touch_ret_t | touch_selfcap_sensor_update_acq_config (touch_selfcap_acq_param_t *p_touch_selfcap_acq_param) |
touch_ret_t | touch_mutlcap_sensor_get_acq_config (touch_mutlcap_acq_param_t *p_touch_mutlcap_acq_param) |
This API can be used to read back the sensor configuration parameters. More... | |
touch_ret_t | touch_selfcap_sensor_get_acq_config (touch_selfcap_acq_param_t *p_touch_selfcap_acq_param) |
touch_ret_t | touch_mutlcap_update_global_param (touch_global_param_t *p_global_param) |
This API can be used to update the global parameter. More... | |
touch_ret_t | touch_selfcap_update_global_param (touch_global_param_t *p_global_param) |
touch_ret_t | touch_mutlcap_get_global_param (touch_global_param_t *p_global_param) |
This API can be used to read back the global parameter. More... | |
touch_ret_t | touch_selfcap_get_global_param (touch_global_param_t *p_global_param) |
touch_ret_t | touch_mutlcap_sensor_disable (sensor_id_t sensor_id) |
This API can be used to disable any sensor. More... | |
touch_ret_t | touch_selfcap_sensor_disable (sensor_id_t sensor_id) |
touch_ret_t | touch_mutlcap_sensor_reenable (sensor_id_t sensor_id) |
This API can be used to reenable a disabled sensor. More... | |
touch_ret_t | touch_selfcap_sensor_reenable (sensor_id_t sensor_id) |
touch_ret_t | touch_mutlcap_get_libinfo (touch_info_t *p_touch_info) |
This API can be used to get the Touch Library configuration. More... | |
touch_ret_t | touch_selfcap_get_libinfo (touch_info_t *p_touch_info) |
#define | touch_mutlcap_sensors_init(y) |
touch_ret_t touch_mutlcap_sensors_init( touch_config_t *p_touch_config); More... | |
#define | touch_selfcap_sensors_init(y) |
touch_ret_t touch_selfcap_sensors_init( touch_config_t *p_touch_config); More... | |
Touch Library internal use functions. | |
void | touch_mutlcap_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_selfcap_rs_table_init (void) |
#define GET_MUTLCAP_ROTOR_SLIDER_POSITION | ( | ROTOR_SLIDER_NUMBER | ) |
#define GET_MUTLCAP_SENSOR_STATE | ( | SENSOR_NUMBER | ) |
#define GET_SELFCAP_ROTOR_SLIDER_POSITION | ( | ROTOR_SLIDER_NUMBER | ) |
#define GET_SELFCAP_SENSOR_STATE | ( | SENSOR_NUMBER | ) |
#define TOUCH_BURST_AGAIN |
Referenced by touch_mutlcap_measure_complete_callback(), and touch_selfcap_measure_complete_callback().
#define TOUCH_CHANNEL_REF_CHANGE |
Referenced by touch_mutlcap_measure_complete_callback(), and touch_selfcap_measure_complete_callback().
#define TOUCH_IN_DETECT |
#define TOUCH_MAX_POS_HYST (7u) |
Max position hysteresis allowed.
#define touch_mutlcap_sensors_init | ( | y | ) |
touch_ret_t touch_mutlcap_sensors_init( touch_config_t *p_touch_config);
Referenced by touch_sensors_init().
#define TOUCH_NO_ACTIVITY (0x0000u) /* !< No Touch activity. */ |
#define TOUCH_RESOLVE_CAL |
#define TOUCH_RESOLVE_DI |
#define TOUCH_RESOLVE_FILTERIN |
#define TOUCH_RESOLVE_POS_RECAL |
#define TOUCH_ROTOR_SLIDER_POS_CHANGE |
Referenced by touch_mutlcap_measure_complete_callback(), and touch_selfcap_measure_complete_callback().
#define touch_selfcap_sensors_init | ( | y | ) |
touch_ret_t touch_selfcap_sensors_init( touch_config_t *p_touch_config);
Referenced by touch_sensors_init().
#define TOUCH_STATUS_CHANGE |
Referenced by touch_mutlcap_measure_complete_callback(), and touch_selfcap_measure_complete_callback().
#define X | ( | n | ) | (uint16_t)(1u << n) |
Calculate X line bit position.
Referenced by MD4ProcessBlock(), and MD5ProcessBlock().
#define Y | ( | n | ) | (uint16_t)(1u << n) |
Calculate Y line bit position.
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_auto_os_t auto_os_t |
typedef enum tag_auto_tune_type_t auto_tune_type_t |
typedef enum tag_channel_t channel_t |
typedef enum tag_filter_level_t filter_level_t |
typedef enum tag_freq_hop_sel_t freq_hop_sel_t |
PTC acquisition frequency delay setting.
The PTC acquisition frequency is dependent on the Generic clock input to PTC and PTC clock prescaler setting. This delay setting inserts "n" PTC clock cycles between consecutive measurements on a given sensor, thereby changing the PTC acquisition frequency. FREQ_HOP_SEL_1 setting inserts 1 PTC clock cycle between consecutive measurements. FREQ_HOP_SEL_14 setting inserts 14 PTC clock cycles. Hence, higher delay setting will increase the total time taken for capacitance measurement on a given sensor as compared to a lower delay setting.
A desired setting can be used to avoid noise around the same frequency as the acquisition frequency.
typedef enum tag_freq_mode_sel_t freq_mode_sel_t |
PTC frequency mode setting.
Example: if Generic clock input to PTC = 4MHz, then: FREQ_MODE_NONE No Frequency hopping FREQ_MODE_HOP Frequency hopping is enabled. FREQ_MODE_SPREAD pread spectrum mode with median filter disabled. FREQ_MODE_SPREAD_MEDIAN Spread spectrum mode with median filter enabled.
typedef enum tag_gain_t gain_t |
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_prsc_div_sel_t prsc_div_sel_t |
PTC clock prescale setting.
Refer touch_configure_ptc_clock() API in touch.c Example: if Generic clock input to PTC = 4MHz, then: PRSC_DIV_SEL_1 sets PTC Clock to 4MHz PRSC_DIV_SEL_2 sets PTC Clock to 2MHz PRSC_DIV_SEL_4 sets PTC Clock to 1MHz PRSC_DIV_SEL_8 sets PTC Clock to 500KHz
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 enum tag_rsel_val_t rsel_val_t |
PTC series resistor setting.
For Mutual cap mode, this series resistor is switched internally on the Y-pin. For Self cap mode, thes series resistor is switched internally on the Sensor pin.
Example: RSEL_VAL_0 sets internal series resistor to 0ohms. RSEL_VAL_20 sets internal series resistor to 20Kohms. RSEL_VAL_50 sets internal series resistor to 50Kohms. RSEL_VAL_100 sets internal series resistor to 100Kohms.
typedef uint8_t sensor_id_t |
typedef struct tag_sensor_t sensor_t |
typedef enum tag_sensor_type_t sensor_type_t |
typedef uint8_t threshold_t |
typedef enum tag_touch_acq_mode_t touch_acq_mode_t |
typedef uint16_t touch_acq_status_t |
typedef struct tag_touch_config_t touch_config_t |
typedef uint16_t touch_current_time_t |
typedef int16_t touch_delta_t |
typedef struct tag_touch_filter_data_t touch_filter_data_t |
typedef struct tag_touch_global_param_t touch_global_param_t |
typedef struct tag_touch_info_t touch_info_t |
typedef enum tag_touch_lib_state_t touch_lib_state_t |
typedef struct tag_touch_measure_data_t touch_measure_data_t |
typedef struct tag_touch_mutlcap_acq_param_t touch_mutlcap_acq_param_t |
Mutual capacitance sensor acquisition parameter type.
typedef struct tag_touch_mutlcap_config_t touch_mutlcap_config_t |
typedef struct tag_touch_mutlcap_param_t touch_mutlcap_param_t |
typedef enum tag_touch_ret_t touch_ret_t |
typedef struct tag_touch_selfcap_acq_param_t touch_selfcap_acq_param_t |
Self capacitance sensor acquisition parameter type.
typedef struct tag_touch_selfcap_config_t touch_selfcap_config_t |
typedef struct tag_touch_selfcap_param_t touch_selfcap_param_t |
typedef struct tag_touch_time_t touch_time_t |
enum tag_aks_group_t |
enum tag_auto_os_t |
enum tag_auto_tune_type_t |
enum tag_channel_t |
enum tag_filter_level_t |
enum tag_freq_hop_sel_t |
PTC acquisition frequency delay setting.
The PTC acquisition frequency is dependent on the Generic clock input to PTC and PTC clock prescaler setting. This delay setting inserts "n" PTC clock cycles between consecutive measurements on a given sensor, thereby changing the PTC acquisition frequency. FREQ_HOP_SEL_1 setting inserts 1 PTC clock cycle between consecutive measurements. FREQ_HOP_SEL_14 setting inserts 14 PTC clock cycles. Hence, higher delay setting will increase the total time taken for capacitance measurement on a given sensor as compared to a lower delay setting.
A desired setting can be used to avoid noise around the same frequency as the acquisition frequency.
enum tag_freq_mode_sel_t |
PTC frequency mode setting.
Example: if Generic clock input to PTC = 4MHz, then: FREQ_MODE_NONE No Frequency hopping FREQ_MODE_HOP Frequency hopping is enabled. FREQ_MODE_SPREAD pread spectrum mode with median filter disabled. FREQ_MODE_SPREAD_MEDIAN Spread spectrum mode with median filter enabled.
Enumerator | |
---|---|
FREQ_MODE_NONE | |
FREQ_MODE_HOP | |
FREQ_MODE_SPREAD | |
FREQ_MODE_SPREAD_MEDIAN |
enum tag_gain_t |
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_prsc_div_sel_t |
PTC clock prescale setting.
Refer touch_configure_ptc_clock() API in touch.c Example: if Generic clock input to PTC = 4MHz, then: PRSC_DIV_SEL_1 sets PTC Clock to 4MHz PRSC_DIV_SEL_2 sets PTC Clock to 2MHz PRSC_DIV_SEL_4 sets PTC Clock to 1MHz PRSC_DIV_SEL_8 sets PTC Clock to 500KHz
Enumerator | |
---|---|
PRSC_DIV_SEL_1 | |
PRSC_DIV_SEL_2 | |
PRSC_DIV_SEL_4 | |
PRSC_DIV_SEL_8 |
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_rsel_val_t |
PTC series resistor setting.
For Mutual cap mode, this series resistor is switched internally on the Y-pin. For Self cap mode, thes series resistor is switched internally on the Sensor pin.
Example: RSEL_VAL_0 sets internal series resistor to 0ohms. RSEL_VAL_20 sets internal series resistor to 20Kohms. RSEL_VAL_50 sets internal series resistor to 50Kohms. RSEL_VAL_100 sets internal series resistor to 100Kohms.
Enumerator | |
---|---|
RSEL_VAL_0 | |
RSEL_VAL_20 | |
RSEL_VAL_50 | |
RSEL_VAL_100 |
enum tag_sensor_type_t |
enum tag_touch_acq_mode_t |
enum tag_touch_ret_t |
touch_ret_t touch_mutlcap_get_global_param | ( | touch_global_param_t * | p_global_param | ) |
This API can be used to read back the global parameter.
p_global_param,: | The pointer to global sensor configuration. |
touch_ret_t touch_mutlcap_get_libinfo | ( | touch_info_t * | p_touch_info | ) |
This API can be used to get the Touch Library configuration.
p_touch_info,: | Pointer to the Touch info data structure that will be updated by the Touch Library. |
void touch_mutlcap_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_mutlcap_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. |
p_sensor_id,: | The sensor id value of the configured sensor is updated by the Touch Library. |
Referenced by touch_sensors_config().
touch_ret_t touch_mutlcap_sensor_disable | ( | sensor_id_t | sensor_id | ) |
This API can be used to disable any sensor.
p_global_param,: | Sensor number which needs to be disabled |
touch_ret_t touch_mutlcap_sensor_get_acq_config | ( | touch_mutlcap_acq_param_t * | p_touch_mutlcap_acq_param | ) |
This API can be used to read back the sensor configuration parameters.
p_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 updated by the Touch Library. |
touch_ret_t touch_mutlcap_sensor_get_config | ( | sensor_id_t | sensor_id, |
touch_mutlcap_param_t * | p_touch_sensor_param | ||
) |
This API can be used to read back the sensor configuration parameters.
p_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 updated by the Touch Library. |
touch_ret_t touch_mutlcap_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_mutlcap_sensor_reenable | ( | sensor_id_t | sensor_id | ) |
This API can be used to reenable a disabled sensor.
p_global_param,: | Sensor number which needs to be reenabled |
touch_ret_t touch_mutlcap_sensor_update_acq_config | ( | touch_mutlcap_acq_param_t * | p_touch_mutlcap_acq_param | ) |
This API can be used to set the sensor configuration parameters.
p_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_mutlcap_sensor_update_config | ( | sensor_id_t | sensor_id, |
touch_mutlcap_param_t * | p_touch_sensor_param | ||
) |
This API can be used to set the sensor configuration parameters.
p_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_mutlcap_sensors_calibrate | ( | auto_tune_type_t | ) |
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.
Referenced by touch_sensors_init().
touch_ret_t touch_mutlcap_sensors_init_with_rs_table | ( | touch_config_t * | p_touch_config, |
void(*)(void) | rs_table_init | ||
) |
This API is used to initialize the Touch Library with Mutual cap method pin, register and sensor configuration provided by the user.
p_touch_config,: | Pointer to Touch configuration structure. |
touch_ret_t touch_mutlcap_sensors_measure | ( | touch_current_time_t | current_time_ms, |
touch_acq_mode_t | mutlcap_acq_mode, | ||
void(*)(void) | measure_complete_callback | ||
) |
Referenced by touch_sensors_measure().
touch_ret_t touch_mutlcap_update_global_param | ( | touch_global_param_t * | p_global_param | ) |
This API can be used to update the global parameter.
p_global_param,: | The pointer to global sensor configuration. |
touch_ret_t touch_selfcap_get_global_param | ( | touch_global_param_t * | p_global_param | ) |
touch_ret_t touch_selfcap_get_libinfo | ( | touch_info_t * | p_touch_info | ) |
void touch_selfcap_rs_table_init | ( | void | ) |
touch_ret_t touch_selfcap_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, | ||
sensor_id_t * | p_sensor_id | ||
) |
Referenced by touch_sensors_config().
touch_ret_t touch_selfcap_sensor_disable | ( | sensor_id_t | sensor_id | ) |
touch_ret_t touch_selfcap_sensor_get_acq_config | ( | touch_selfcap_acq_param_t * | p_touch_selfcap_acq_param | ) |
touch_ret_t touch_selfcap_sensor_get_config | ( | sensor_id_t | sensor_id, |
touch_selfcap_param_t * | p_touch_sensor_param | ||
) |
touch_ret_t touch_selfcap_sensor_get_delta | ( | sensor_id_t | sensor_id, |
touch_delta_t * | p_delta | ||
) |
touch_ret_t touch_selfcap_sensor_reenable | ( | sensor_id_t | sensor_id | ) |
touch_ret_t touch_selfcap_sensor_update_acq_config | ( | touch_selfcap_acq_param_t * | p_touch_selfcap_acq_param | ) |
touch_ret_t touch_selfcap_sensor_update_config | ( | sensor_id_t | sensor_id, |
touch_selfcap_param_t * | p_touch_sensor_param | ||
) |
touch_ret_t touch_selfcap_sensors_calibrate | ( | auto_tune_type_t | ) |
Referenced by touch_sensors_init().
touch_ret_t touch_selfcap_sensors_init_with_rs_table | ( | touch_config_t * | p_touch_config, |
void(*)(void) | rs_table_init | ||
) |
This API is used to initialize the Touch Library with Self cap method pin, register and sensor configuration provided by the user.
p_touch_config,: | Pointer to Touch configuration structure. |
touch_ret_t touch_selfcap_sensors_measure | ( | touch_current_time_t | current_time_ms, |
touch_acq_mode_t | selfcap_acq_mode, | ||
void(*)(void) | measure_complete_callback | ||
) |
This API can be used to start a Touch measurement.
current_time_ms,: | Current time in millisecond. |
Referenced by touch_sensors_measure().
touch_ret_t touch_selfcap_update_global_param | ( | touch_global_param_t * | p_global_param | ) |
touch_ret_t touch_sensors_init | ( | void | ) |
This API is used to initialize and configure the Touch Library.
This API is used to initialize and configure the Touch Library.
References AUTO_TUNE_RSEL, tag_touch_time_t::measurement_period_ms, touch_configure_ptc_clock(), touch_mutlcap_sensors_calibrate(), touch_mutlcap_sensors_init, touch_selfcap_sensors_calibrate(), touch_selfcap_sensors_init, touch_sensors_config(), and TOUCH_SUCCESS.
Referenced by demo_start(), and main().
touch_ret_t touch_sensors_measure | ( | void | ) |
This API is used to perform a Single Capacitance measurement using the Touch Library.
References tag_touch_time_t::current_time_ms, NORMAL_ACQ_MODE, tag_touch_time_t::time_to_measure_touch, TOUCH_ACQ_INCOMPLETE, touch_mutlcap_measure_complete_callback(), touch_mutlcap_sensors_measure(), touch_selfcap_measure_complete_callback(), touch_selfcap_sensors_measure(), and TOUCH_SUCCESS.
Referenced by demo_start(), and main().
void touch_sensors_update_time | ( | void | ) |
This API is used to update Timing info for Touch Library. Typical usage of this API is inside a periodic timer ISR.
touch_acq_status_t tag_touch_measure_data_t::acq_status |
Referenced by touch_mutlcap_measure_complete_callback(), and touch_selfcap_measure_complete_callback().
aks_group_t tag_touch_selfcap_param_t::aks_group |
aks_group_t tag_touch_mutlcap_param_t::aks_group |
uint8_t tag_touch_global_param_t::atch_drift_rate |
uint8_t tag_touch_global_param_t::atch_recal_delay |
uint16_t tag_touch_selfcap_config_t::buffer_size |
uint16_t tag_touch_mutlcap_config_t::buffer_size |
uint8_t tag_touch_global_param_t::cal_seq_1_count |
uint8_t tag_touch_global_param_t::cal_seq_2_count |
volatile uint16_t tag_touch_time_t::current_time_ms |
Referenced by rtc_overflow_callback(), and touch_sensors_measure().
hysteresis_t tag_touch_selfcap_param_t::detect_hysteresis |
hysteresis_t tag_touch_mutlcap_param_t::detect_hysteresis |
threshold_t tag_touch_selfcap_param_t::detect_threshold |
threshold_t tag_touch_mutlcap_param_t::detect_threshold |
uint8_t tag_touch_global_param_t::di |
uint8_t tag_touch_global_param_t::drift_hold_time |
void(* tag_touch_selfcap_config_t::filter_callback)(touch_filter_data_t *p_filter_data) |
void(* tag_touch_mutlcap_config_t::filter_callback)(touch_filter_data_t *p_filter_data) |
uint8_t tag_sensor_t::from_channel |
uint16_t tag_touch_info_t::fw_version |
uint8_t tag_sensor_t::general_counter |
touch_global_param_t tag_touch_selfcap_config_t::global_param |
touch_global_param_t tag_touch_mutlcap_config_t::global_param |
uint8_t tag_sensor_t::index |
uint8_t tag_touch_info_t::max_channels_per_rotor_slider |
uint8_t tag_touch_global_param_t::max_on_duration |
volatile uint8_t tag_touch_measure_data_t::measurement_done_touch |
Referenced by demo_start(), main(), touch_mutlcap_measure_complete_callback(), and touch_selfcap_measure_complete_callback().
uint16_t tag_touch_time_t::measurement_period_ms |
Referenced by rtc_overflow_callback(), and touch_sensors_init().
uint8_t tag_touch_mutlcap_config_t::mutl_quick_reburst_enable |
auto_os_t tag_touch_mutlcap_acq_param_t::mutlcap_auto_os |
auto oversampling
filter_level_t tag_touch_mutlcap_acq_param_t::mutlcap_filter_level |
filter level
prsc_div_sel_t tag_touch_mutlcap_acq_param_t::mutlcap_ptc_prsc |
PTC clock prescale value.
prsc_div_sel_t tag_touch_mutlcap_acq_param_t::mutlcap_ptc_prsc_cc_cal |
PTC clock prescale value during CC cal.
rsel_val_t tag_touch_mutlcap_acq_param_t::mutlcap_resistor_value |
PTC series resistor value.
rsel_val_t tag_touch_mutlcap_acq_param_t::mutlcap_resistor_value_cc_cal |
PTC series resistor value during CC cal.
uint8_t tag_sensor_t::ndil_counter |
uint16_t tag_touch_measure_data_t::num_channel_references |
uint16_t tag_touch_filter_data_t::num_channel_signals |
uint16_t tag_touch_measure_data_t::num_channel_signals |
uint16_t tag_touch_selfcap_config_t::num_channels |
uint16_t tag_touch_mutlcap_config_t::num_channels |
uint16_t tag_touch_info_t::num_channels_in_use |
uint8_t tag_touch_measure_data_t::num_rotor_slider_values |
uint8_t tag_touch_selfcap_config_t::num_rotors_and_sliders |
uint8_t tag_touch_mutlcap_config_t::num_rotors_and_sliders |
uint8_t tag_touch_info_t::num_rotors_sliders_in_use |
uint8_t tag_touch_measure_data_t::num_sensor_states |
uint16_t tag_touch_measure_data_t::num_sensors |
uint16_t tag_touch_selfcap_config_t::num_sensors |
uint16_t tag_touch_mutlcap_config_t::num_sensors |
uint16_t tag_touch_info_t::num_sensors_in_use |
uint16_t* tag_touch_measure_data_t::p_cc_calibration_vals |
uint16_t* tag_touch_measure_data_t::p_channel_references |
uint16_t* tag_touch_filter_data_t::p_channel_signals |
uint16_t* tag_touch_measure_data_t::p_channel_signals |
uint8_t* tag_touch_selfcap_config_t::p_data_blk |
uint8_t* tag_touch_mutlcap_config_t::p_data_blk |
touch_mutlcap_config_t* tag_touch_config_t::p_mutlcap_config |
gain_t* tag_touch_mutlcap_acq_param_t::p_mutlcap_gain_per_node |
pointer to gain per node
freq_hop_sel_t* tag_touch_mutlcap_acq_param_t::p_mutlcap_hop_freqs |
pointer to acquisition frequency settings
touch_measure_data_t* p_mutlcap_measure_data |
Mutual Cap sensors measured data pointer.
Note: This pointer is initialized by the QTouch library once the touch_mutlcap_sensors_init API is called.
Referenced by demo_start(), and main().
uint16_t* tag_touch_mutlcap_config_t::p_mutlcap_xy_nodes |
uint8_t* tag_touch_measure_data_t::p_rotor_slider_values |
touch_selfcap_config_t* tag_touch_config_t::p_selfcap_config |
gain_t* tag_touch_selfcap_acq_param_t::p_selfcap_gain_per_node |
pointer to gain per node
freq_hop_sel_t* tag_touch_selfcap_acq_param_t::p_selfcap_hop_freqs |
pointer to hop frequency options
touch_measure_data_t* p_selfcap_measure_data |
Self Cap sensors measured data pointer.
Note: This pointer is initialized by the QTouch library once the touch_selfcap_sensors_init API is called.
Referenced by main().
uint16_t* tag_touch_selfcap_config_t::p_selfcap_y_nodes |
uint8_t* tag_touch_measure_data_t::p_sensor_states |
sensor_t* tag_touch_measure_data_t::p_sensors |
uint8_t tag_touch_mutlcap_param_t::position_hysteresis |
resolution_t tag_touch_selfcap_param_t::position_resolution |
resolution_t tag_touch_mutlcap_param_t::position_resolution |
uint8_t tag_touch_config_t::ptc_isr_lvl |
PTC ISR priority level.
recal_threshold_t tag_touch_global_param_t::recal_threshold |
uint8_t tag_touch_selfcap_config_t::self_quick_reburst_enable |
auto_os_t tag_touch_selfcap_acq_param_t::selfcap_auto_os |
auto oversampling
filter_level_t tag_touch_selfcap_acq_param_t::selfcap_filter_level |
filter level
prsc_div_sel_t tag_touch_selfcap_acq_param_t::selfcap_ptc_prsc |
PTC clock prescale value.
prsc_div_sel_t tag_touch_selfcap_acq_param_t::selfcap_ptc_prsc_cc_cal |
PTC clock prescale value during CC cal.
rsel_val_t tag_touch_selfcap_acq_param_t::selfcap_resistor_value |
PTC sense resistor value.
rsel_val_t tag_touch_selfcap_acq_param_t::selfcap_resistor_value_cc_cal |
PTC sense resistor value during CC cal.
uint8_t tag_sensor_t::state |
uint8_t tag_touch_global_param_t::tch_drift_rate |
uint8_t tag_sensor_t::threshold |
volatile uint8_t tag_touch_time_t::time_to_measure_touch |
Referenced by rtc_overflow_callback(), and touch_sensors_measure().
touch_lib_state_t tag_touch_info_t::tlib_state |
uint8_t tag_sensor_t::to_channel |
touch_mutlcap_acq_param_t tag_touch_mutlcap_config_t::touch_mutlcap_acq_param |
sensor acquisition param info.
freq_mode_sel_t tag_touch_mutlcap_acq_param_t::touch_mutlcap_freq_mode |
setup acquisition frequency mode
touch_selfcap_acq_param_t tag_touch_selfcap_config_t::touch_selfcap_acq_param |
sensor acquisition param info.
freq_mode_sel_t tag_touch_selfcap_acq_param_t::touch_selfcap_freq_mode |
enable/disable noise counter-measures
touch_time_t touch_time |
Referenced by rtc_overflow_callback().
uint8_t tag_sensor_t::type_aks_pos_hyst |