11.07.2015 Views

Atmel QTouch Library User Guide

Atmel QTouch Library User Guide

Atmel QTouch Library User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

current_time_ms touch_time_t Current time in msp_touch_dma touch_qm_dma_t* DMA channels to beused for transfer to burstlength & acquisitioncountqm_acq_mode touch_acq_mode_t Specify whether Normalacquisition mode orRaw acquisition modeshould be done.void(*measure_complete_callback)(void )void(*measure_complete_callback)(touch_measure_data_t*p_measure_data)QMatrix Measurecomplete callbackfunction pointer• This API initiates a capacitive measurement on all enabled QMatrix sensors.• When normal acquisition mode is used, once the Touch measurement is completed on allthe QMatrix sensors, before processing the raw acquisition data (channel_signals), afilter_callback function is optionally called by the Touch <strong>Library</strong>.• Once the filter_callback is completed, the signal values will be processed by the Touch<strong>Library</strong>. The measure_complete_callback function is then called with touch data(channel_signals, channel_references, sensor_states, sensors structure) as well as theTouch Status (sensor_states) and Rotor/Slider position (rotor_slider_values).• The touch_event_dispatcher API needs to be called as frequently as possible for theTouch <strong>Library</strong> to process the raw acquisition data.• When raw data acquisition mode is used, once the raw acquisition data is available fromthe CAT module for all the sensors, the measure_complete_callback function isimmediately called with acquisition data (channel_signals). The channel_references,sensor_states and rotor_slider_values data are not updated by the Touch <strong>Library</strong> in thismode.• This API will return error if a Touch measurement is already in progress.• Two peripheral DMA channels must be provided using p_touch_dma for QMatrixoperation.touch_qm_get_libinfotouch_ret_t touch_qm_get_libinfo( touch_info_t *p_touch_info)Arguments Type Commentp_touch_info_t* <strong>User</strong> passes the memory address at which the library informationtouch_infois to be stored by the library.• The touch_info_t structure is filled by the library with information like number of QMatrixchannels, number of QMatrix sensors, number of QMatrix rotors/slider, CAT hardwareversion, and library version.• The QMatrix number of channels, sensors and rotors/slider indicate the total number ofchannels, sensors and rotor/slider in use irrespective of Touch measured being disabled1588207K-AT42-09/11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!