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 *p_touch_dma, touch_acq_mode_t qt_acq_mode, void (*measure_complete_callback)( touch_measure_data_t *p_measure_data ))
Arguments |
Type |
Comment |
---|---|---|
touch_qt_grp |
touch_qt_grp_t |
Specify if the operation is to be performed on Group A Sensors or Group B Sensors. |
current_time_ms |
touch_time_t |
Current time in ms |
p_touch_dma |
touch_qt_dma_t* |
DMA channels to be used for transfer to burst length & acquisition count |
qt_acq_mode |
touch_acq_mode_t |
Specify whether Normal acquisition mode or Raw acquisition mode should be done. |
void (*measure_complete_callback)( void ) |
void (*measure_complete_callback)( touch_measure_data_t *p_measure_data) |
QTouch Group A or Group B Measure complete callback function pointer |
This API initiates a capacitive measurement on all enabled QTouch Group A or Group B sensors depending on the touch_qt_grp specified.
When normal acquisition mode is used, once the Touch measurement is completed on all the QTouch sensors, before processing the raw acquisition data (channel_signals), a filter_callback function is optionally called by the Touch Library.
Once the filter_callback is completed, the signal values will be processed by the Touch Library. The measure_complete_callback function is then called with touch data (channel_signals, channel_references, sensor_states, sensors structure) as well as the Touch Status (sensor_states) and Rotor/Slider position (rotor_slider_values).
The touch_event_dispatcher API needs to be called as frequently as possible for the Touch Library to process the raw acquisition data.
When raw data acquisition mode is used, once the raw acquisition data is available from the CAT module for all the sensors, the measure_complete_callback function is immediately called with acquisition data (channel_signals). The channel_references, sensor_states and rotor_slider_values data are not updated by the Touch Library in this mode.
This API will return error if a Touch measurement is already in progress.
One peripheral DMA channels must be provided using p_touch_dma for QTouch operation.