Atmel Software Framework

xmega/applications/xmega_a3bu_xplained_classb_oven/drv/touch.h File Reference

Touch button driver.

Copyright (C) 2010-2015 Atmel Corporation. All rights reserved.

Functions

void touch_init (void)
 Configure QTouch library and measurement setup. More...
 
bool touch_key_is_pressed (void)
 Check if user is pressing the touch key. More...
 

void touch_init ( void  )

Configure QTouch library and measurement setup.

Configure QTouch library and measurement setup.

Precondition
Interrupts must be enabled in order to trigger regular measurements The touch configuration requires a fixed CPU speed to work properly in this case we need 2 MHz.
bool touch_key_is_pressed ( void  )

Check if user is pressing the touch key.

Return values
trueif key is pressed.
falseif key is not pressed.

References current_time_ms_touch, QDebug_ProcessCommands(), QDebug_SendData(), qt_measure_sensors(), QTLIB_BURST_AGAIN, time_to_measure_touch, and TOUCH_GET_SENSOR_STATE.

Referenced by keyboard_get_key_state(), and main().