This is the QTouch Library for SAM4L devices that consists in one api header file(touch_api_sam4l.h) and one pre-compiled library(libsam4l-qt-gnu.a).
All projects using this library must also provide the required header file(touch_config_sam4l.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 SAM4L. | |
Data Structures | |
struct | tag_sensor_t |
Sensor structure for storing sensor related information. More... | |
struct | tag_touch_at_config_t |
Autonomous Touch configuration input. More... | |
struct | tag_touch_at_pin_t |
Autonomous Touch pin configuration type. More... | |
struct | tag_touch_at_reg_t |
Autonomous Touch register configuration type. More... | |
struct | tag_touch_at_status_t |
Autonomous QTouch status type. More... | |
struct | tag_touch_config_t |
Touch Input Configuration type. More... | |
struct | tag_touch_filter_data_t |
Touch Filter Callback data type. More... | |
struct | tag_touch_global_param_t |
Global sensor configuration info. More... | |
struct | tag_touch_info_t |
Touch library information type. More... | |
struct | tag_touch_measure_data_t |
Touch Measured data type. More... | |
struct | tag_touch_qt_config_t |
QTouch configuration input. More... | |
struct | tag_touch_qt_dma_t |
QTouch dma type. More... | |
struct | tag_touch_qt_param_t |
QTouch sensor configuration type. More... | |
struct | tag_touch_qt_pin_t |
QTouch pin configuration type. More... | |
struct | tag_touch_qt_reg_t |
QTouch register configuration type. More... | |
struct | tag_touch_qt_time_t |
QTouch Library Timing info. More... | |
Macros | |
#define | GET_QT_ROTOR_SLIDER_POSITION(ROTOR_SLIDER_NUMBER) p_qt_measure_data->p_rotor_slider_values[ROTOR_SLIDER_NUMBER] |
#define | GET_QT_SENSOR_STATE(SENSOR_NUMBER) p_qt_measure_data->p_sensor_states[(SENSOR_NUMBER/8)] & (1 << (SENSOR_NUMBER % 8)) |
#define | PRIV_QT_DATA_BLK_SIZE |
QTouch Data block size. More... | |
#define | PRIV_QT_PAD_BYTE_SIZE (36u) |
Size of QTouch Pad bytes. More... | |
#define | PRIV_QT_RS_TABLE_INIT NULL |
Initialize rotor slider table. More... | |
#define | PRIV_QT_SIZE_CHANNEL (25u) |
Size of QTouch Channel. More... | |
#define | PRIV_QT_SIZE_RS (13u) |
Size of QTouch Rotor Slider. More... | |
#define | PRIV_QT_SIZE_SENSOR (8u) |
Size of QTouch Sensor. More... | |
#define | QT_NUM_CHANNELS (QT_NUM_SENSOR_PINS_SELECTED) |
QTouch number of channels. More... | |
Typedefs | |
typedef enum tag_aks_group_t | aks_group_t |
Which AKS group, if any, a sensor is in. More... | |
typedef enum tag_at_status_change_t | at_status_change_t |
Autonomous Touch status change enum. More... | |
typedef uint8_t | channel_t |
Sensor start and end channel type of a Sensor. Channel number starts with value 0. More... | |
typedef enum tag_hysteresis_t | hysteresis_t |
A sensor detection hysteresis value. More... | |
typedef enum tag_qt_discharge_pin_options_t | qt_discharge_pin_options_t |
QTouch Pin options available. More... | |
typedef enum tag_qt_sensor_pin_options_t | qt_sensor_pin_options_t |
QTouch Pin options available. More... | |
typedef enum tag_recal_threshold_t | recal_threshold_t |
A sensor recalibration threshold. More... | |
typedef enum tag_resolution_t | resolution_t |
For rotors and sliders, the resolution of the reported angle or position. More... | |
typedef uint8_t | sensor_id_t |
Sensor number type. More... | |
typedef struct tag_sensor_t | sensor_t |
Sensor structure for storing sensor related information. More... | |
typedef enum tag_sensor_type_t | sensor_type_t |
Sensor types available. More... | |
typedef uint8_t | threshold_t |
An unsigned 8-bit number setting a sensor detection threshold. More... | |
typedef enum tag_touch_acq_mode_t | touch_acq_mode_t |
Touch library acquisition mode. More... | |
typedef uint16_t | touch_acq_status_t |
Status of Touch measurement. More... | |
typedef struct tag_touch_at_config_t | touch_at_config_t |
Autonomous Touch configuration input. More... | |
typedef struct tag_touch_at_pin_t | touch_at_pin_t |
Autonomous Touch pin configuration type. More... | |
typedef struct tag_touch_at_reg_t | touch_at_reg_t |
Autonomous Touch register configuration type. More... | |
typedef struct tag_touch_at_status_t | touch_at_status |
Autonomous QTouch status type. More... | |
typedef uint8_t | touch_bl_t |
QMatrix individual sensor burst length type. More... | |
typedef struct tag_touch_config_t | touch_config_t |
Touch Input Configuration type. More... | |
typedef int16_t | touch_delta_t |
Touch sensor delta value type. More... | |
typedef struct tag_touch_filter_data_t | touch_filter_data_t |
Touch Filter Callback data type. More... | |
typedef struct tag_touch_global_param_t | touch_global_param_t |
Global sensor configuration info. More... | |
typedef struct tag_touch_info_t | touch_info_t |
Touch library information type. More... | |
typedef enum tag_touch_lib_state_t | touch_lib_state_t |
Touch library state. More... | |
typedef struct tag_touch_measure_data_t | touch_measure_data_t |
Touch Measured data type. More... | |
typedef struct tag_touch_qt_config_t | touch_qt_config_t |
QTouch configuration input. More... | |
typedef struct tag_touch_qt_dma_t | touch_qt_dma_t |
QTouch dma type. More... | |
typedef struct tag_touch_qt_param_t | touch_qt_param_t |
QTouch sensor configuration type. More... | |
typedef struct tag_touch_qt_pin_t | touch_qt_pin_t |
QTouch pin configuration type. More... | |
typedef struct tag_touch_qt_reg_t | touch_qt_reg_t |
QTouch register configuration type. More... | |
typedef struct tag_touch_qt_time_t | touch_qt_time_t |
QTouch Library Timing info. More... | |
typedef enum tag_touch_ret_t | touch_ret_t |
Touch Library error codes. More... | |
typedef uint16_t | touch_time_t |
Current time type. More... | |
Variables | |
touch_measure_data_t * | p_qt_measure_data |
QTouch measured data pointer. More... | |
touch_qt_time_t | touch_qt_time |
QTouch Library Timing info. More... | |
QTouch Library Acquisition Status bitfields. | |
#define | TOUCH_NO_ACTIVITY (0x0000u) |
No Touch activity. More... | |
#define | TOUCH_IN_DETECT (0x0001u) |
Atleast one Touch channel is in detect. More... | |
#define | TOUCH_STATUS_CHANGE (0x0002u) |
Change in Touch status of atleast one Touch channel. More... | |
#define | TOUCH_ROTOR_SLIDER_POS_CHANGE (0x0004u) |
Change in Rotor or Slider position of atleast one rotor or slider. More... | |
#define | TOUCH_CHANNEL_REF_CHANGE (0x0008u) |
Change in Reference value of atleast one Touch channel. More... | |
#define | TOUCH_BURST_AGAIN (0x0100u) |
Indicates that reburst is required to resolve Filtering or Calibration state. More... | |
#define | TOUCH_RESOLVE_CAL (0x0200u) |
Indicates that reburst is needed to resolve Calibration. More... | |
#define | TOUCH_RESOLVE_FILTERIN (0x0400u) |
Indicates that reburst is needed to resolve Filtering. More... | |
#define | TOUCH_RESOLVE_DI (0x0800u) |
Indicates that reburst is needed to resolve Detect Integration. More... | |
#define | TOUCH_RESOLVE_POS_RECAL (0x1000u) |
Indicates that reburst is needed to resolve Recalibration. More... | |
QTouch 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 QTouch Library. More... | |
void | touch_sensors_deinit (void) |
This API is used to deinitialize capacitive touch acquisition on QTouch Sensors. More... | |
void | touch_sensors_update_time (void) |
This API is used to update Timing info for QTouch Library. Typical usage of this API is inside a periodic timer ISR. More... | |
touch_ret_t | touch_autonomous_sensor_enable (void) |
This API is used to enable Autonomous QTouch Sensor that can be used to Wakeup the CPU from Deep-Sleep modes. More... | |
void | touch_autonomous_sensor_disable (void) |
This API is used to disable Autonomous QTouch Sensor. More... | |
QTouch API. | |
touch_ret_t | touch_qt_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 QTouch pin, register and sensor configuration provided by the user. More... | |
touch_ret_t | touch_qt_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) |
This API can be used to configure a sensor of type key, rotor or slider. More... | |
touch_ret_t | touch_qt_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_qt_sensors_start_acquisition (touch_time_t current_time_ms, touch_qt_dma_t qt_dma_ch, touch_acq_mode_t qt_acq_mode, void(*measure_complete_callback)(void)) |
This API can be used to start a QTouch measurement. More... | |
touch_ret_t | touch_qt_get_libinfo (touch_info_t *p_touch_info) |
This API can be used to get the Touch Library configuration information for QTouch acquisition method. More... | |
touch_ret_t | touch_qt_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... | |
void | touch_event_dispatcher (void) |
Touch Library Event Dispatcher. More... | |
void | touch_qt_deinit (void) |
This API can be used to deinitialize the touch library. Once this API is called, capacitive touch acquisition is stopped and the CATB hardware module is disabled. Before calling this API, use touch_qt_get_libinfo(&touch_info) and ensure that the library state is TOUCH_STATE_READY. if (touch_info.tlib_state == TOUCH_STATE_READY) { touch_sensors_deinit();}. More... | |
#define | touch_qt_sensors_init(y) touch_qt_sensors_init_with_rs_table( (y), PRIV_QT_RS_TABLE_INIT ); |
touch_ret_t touch_qt_sensors_init( touch_config_t *p_touch_config); More... | |
Autonomous QTouch API. | |
touch_ret_t | touch_at_sensor_enable (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_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 Library internal use functions. | |
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... | |
#define GET_QT_ROTOR_SLIDER_POSITION | ( | ROTOR_SLIDER_NUMBER | ) | p_qt_measure_data->p_rotor_slider_values[ROTOR_SLIDER_NUMBER] |
Referenced by event_qtouch_get_slider_state().
#define GET_QT_SENSOR_STATE | ( | SENSOR_NUMBER | ) | p_qt_measure_data->p_sensor_states[(SENSOR_NUMBER/8)] & (1 << (SENSOR_NUMBER % 8)) |
Referenced by event_qtouch_get_button_state(), event_qtouch_get_slider_state(), and main().
#define PRIV_QT_DATA_BLK_SIZE |
QTouch Data block size.
#define PRIV_QT_PAD_BYTE_SIZE (36u) |
Size of QTouch Pad bytes.
#define PRIV_QT_RS_TABLE_INIT NULL |
Initialize rotor slider table.
#define PRIV_QT_SIZE_CHANNEL (25u) |
Size of QTouch Channel.
#define PRIV_QT_SIZE_RS (13u) |
Size of QTouch Rotor Slider.
#define PRIV_QT_SIZE_SENSOR (8u) |
Size of QTouch Sensor.
#define QT_NUM_CHANNELS (QT_NUM_SENSOR_PINS_SELECTED) |
QTouch number of channels.
#define TOUCH_BURST_AGAIN (0x0100u) |
Indicates that reburst is required to resolve Filtering or Calibration state.
Referenced by touch_qt_measure_complete_callback().
#define TOUCH_CHANNEL_REF_CHANGE (0x0008u) |
Change in Reference value of atleast one Touch channel.
Referenced by touch_sensors_measure().
#define TOUCH_IN_DETECT (0x0001u) |
Atleast one Touch channel is in detect.
#define TOUCH_NO_ACTIVITY (0x0000u) |
No Touch activity.
#define touch_qt_sensors_init | ( | y | ) | touch_qt_sensors_init_with_rs_table( (y), PRIV_QT_RS_TABLE_INIT ); |
touch_ret_t touch_qt_sensors_init( touch_config_t *p_touch_config);
Referenced by touch_sensors_init().
#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 touch_sensors_measure().
#define TOUCH_STATUS_CHANGE (0x0002u) |
Change in Touch status of atleast one Touch channel.
Referenced by touch_sensors_measure().
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_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_discharge_pin_options_t qt_discharge_pin_options_t |
QTouch Pin options available.
typedef enum tag_qt_sensor_pin_options_t qt_sensor_pin_options_t |
QTouch 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_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_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_qt_config_t touch_qt_config_t |
QTouch configuration input.
typedef struct tag_touch_qt_dma_t touch_qt_dma_t |
QTouch dma type.
typedef struct tag_touch_qt_param_t touch_qt_param_t |
QTouch sensor configuration type.
typedef struct tag_touch_qt_pin_t touch_qt_pin_t |
QTouch pin configuration type.
typedef struct tag_touch_qt_reg_t touch_qt_reg_t |
QTouch register configuration type.
typedef struct tag_touch_qt_time_t touch_qt_time_t |
QTouch Library Timing info.
typedef enum tag_touch_ret_t touch_ret_t |
Touch Library error codes.
typedef uint16_t touch_time_t |
Current time type.
enum tag_aks_group_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 |
QTouch Pin options available.
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.
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.
Referenced by touch_autonomous_sensor_disable().
touch_ret_t touch_at_sensor_enable | ( | 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_autonomous_sensor_enable().
void touch_autonomous_sensor_disable | ( | void | ) |
This API is used to disable Autonomous QTouch Sensor.
References touch_at_sensor_disable().
touch_ret_t touch_autonomous_sensor_enable | ( | void | ) |
This API is used to enable Autonomous QTouch Sensor that can be used to Wakeup the CPU from Deep-Sleep modes.
References touch_at_sensor_enable(), and TOUCH_SUCCESS.
void touch_event_dispatcher | ( | void | ) |
Touch Library Event Dispatcher.
Referenced by touch_sensors_measure().
void touch_qt_deinit | ( | void | ) |
This API can be used to deinitialize the touch library. Once this API is called, capacitive touch acquisition is stopped and the CATB hardware module is disabled. Before calling this API, use touch_qt_get_libinfo(&touch_info) and ensure that the library state is TOUCH_STATE_READY. if (touch_info.tlib_state == TOUCH_STATE_READY) { touch_sensors_deinit();}.
Referenced by touch_sensors_deinit().
touch_ret_t touch_qt_get_libinfo | ( | touch_info_t * | p_touch_info | ) |
This API can be used to get the Touch Library configuration information for QTouch acquisition method.
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 | ( | 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.
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_qt_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_qt_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.
Referenced by touch_sensors_init().
touch_ret_t touch_qt_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 QTouch pin, register and sensor configuration provided by the user.
p_touch_config,: | Pointer to Touch configuration structure. |
touch_ret_t touch_qt_sensors_start_acquisition | ( | touch_time_t | current_time_ms, |
touch_qt_dma_t | qt_dma_ch, | ||
touch_acq_mode_t | qt_acq_mode, | ||
void(*)(void) | measure_complete_callback | ||
) |
This API can be used to start a QTouch measurement.
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 sensor status and measured data pointer. |
Referenced by touch_sensors_measure().
void touch_sensors_deinit | ( | void | ) |
This API is used to deinitialize capacitive touch acquisition on QTouch Sensors.
References touch_qt_deinit().
Referenced by app_init_lowpower(), and main().
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 tag_touch_qt_time_t::measurement_period_ms, TOUCH_MEASUREMENT_PERIOD_MS, touch_qt_sensors_calibrate(), touch_qt_sensors_init, touch_sensors_config(), and TOUCH_SUCCESS.
Referenced by event_qtouch_init(), example_qtouch_init(), and main().
touch_ret_t touch_sensors_measure | ( | void | ) |
This API is used to perform a Single Capacitance measurement using the QTouch Library.
References tag_touch_qt_time_t::current_time_ms, tag_touch_qt_dma_t::dma_ch1, tag_touch_qt_dma_t::dma_ch2, tag_touch_qt_time_t::measurement_done_touch, NORMAL_ACQ_MODE, QT_DMA_CHANNEL_0, QT_DMA_CHANNEL_1, tag_touch_qt_time_t::time_to_measure_touch, TOUCH_ACQ_INCOMPLETE, TOUCH_CHANNEL_REF_CHANGE, touch_event_dispatcher(), touch_qt_measure_complete_callback(), touch_qt_sensors_start_acquisition(), TOUCH_ROTOR_SLIDER_POS_CHANGE, TOUCH_STATUS_CHANGE, and TOUCH_SUCCESS.
Referenced by main().
void touch_sensors_update_time | ( | void | ) |
This API is used to update Timing info for QTouch Library. Typical usage of this API is inside a periodic timer ISR.
This API is used to update Timing info for QTouch Library. Typical usage of this API is inside a periodic timer ISR.
References tag_touch_qt_time_t::current_time_ms, tag_touch_qt_time_t::measurement_period_ms, and tag_touch_qt_time_t::time_to_measure_touch.
Referenced by ast_per_callback().
touch_measure_data_t* p_qt_measure_data |
QTouch measured data pointer.
touch_qt_time_t touch_qt_time |
QTouch Library Timing info.