Microchip® Advanced Software Framework

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

Touch button driver.

Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.

Functions

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

void touch_init ( void  )

Configures touch 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.

Configures touch library and measurement setup.

References config_sensor(), init_timer_isr(), QDebug_Init(), qt_filter_callback, qt_init_sensing, qt_set_parameters(), SNS_array, SNSK_array, touch_config_sensor(), touch_init_timer_isr(), and touch_set_parameters().

Referenced by main().

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().