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.

qt_reset_sensing()qt_enable_xxx()qt_init_sensing()qt_set_parameters()init_timer_isr()The host application (optionally) calls “qt_reset_sensing( )”to reset all channels and touch sensing parameters to theirdefault states. This step is only required if the host wants todynamically reconfigure the library at runtimeThe host application calls “qt_enable_key( )”, “qt_enable_rotor( )”and/or “qt_enable_slider()” as required to configure the touchsensorsThe host application calls qt_init_sensing() to calibrate all theconfigured channels and prepare the sensors for capacitivemeasurementThe host application qt_set_parameters() to initialize the thresholdparameters for the library. If the user needs to change the thresholds,edit the global data structure qt_config_data prior to calling this APIThe host application initializes the timer module required forcapacitive measurementqt_measure_sensors()The host application periodically calls“qt_measure_sensors( )” to make capacitive measurements.YesTime-critical hostapplication codePart of host applicationwhich cannot wait till multiplemeasurements are complete (shouldbe as minimal as possible)IsQTLIB_BURST_AGAIN=1NoCheck if multiple measurements are needed or not:To resolve calibrationTo resolve DITo resolve positive recalibrationTo compensate for driftcheck qt_touch_statusNon-Time critical host application codecheck the global status variable “qt_touch_status” to see if anysensors are in detect, and the angle or position of any enabledrotors or slidersHost application which can be executed afterthe completion of multiple measurementsfor all the channelsFigure 5-6: Sequence of operations to add Touch capability368207K-AT42-09/11

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

Saved successfully!

Ooh no, something went wrong!