Atmel Software Framework

common/services/usb/class/hid/device/generic/example_hid_qtouch/touch.c File Reference

Functions for interfacing touch.

Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.

#include <asf.h>
#include "touch.h"
#include "QDebug.h"
#include "QDebugTransport.h"


#define TIMER_PERIOD   TICKS_PER_MS * qt_measurement_period_msec

The timing information for timer to fire periodically to measure touch

uint16_t qt_measurement_period_msec = 25u
 Timer period in msec. More...
qt_touch_lib_config_data_t qt_config_data
qt_touch_lib_measure_data_t qt_measure_data
TOUCH_DATA_T SNS_array [2][2]
TOUCH_DATA_T SNSK_array [2][2]
qt_touch_lib_measure_data_tpqt_measure_data = &qt_measure_data
static volatile bool time_to_measure_touch = false
static volatile uint16_t current_time_ms_touch = 0
unsigned int gMsTimeout
int16_t qt_get_sensor_delta (uint8_t sensor)
static void qt_set_parameters (void)
 qt_set_parameters function This will fill the default threshold values in the configuration data structure.But User can change the values of these parameters . More...
static void config_sensor (void)
 Configures the sensors as keys and assigns the channel numbers. More...
static void init_timer_isr (void)
 Configures timer ISR to fire regularly. More...
static void example_cca_interrupt_callback (void)
void touch_init (void)
 Configure QTouch library and measurement setup. More...
bool check_touch_key_pressed (void)
 Checks whether the QTouch key is pressed. More...

& (1 << (SENSOR_NUMBER % 8))
qt_touch_lib_measure_data_t qt_measure_data
QTouch measurement data struct.
qt_touch_status_t qt_touch_status
state of sensors.
Definition: thirdparty/qtouch/generic/include/touch_api.h:899
uint8_t sensor_states[QT_NUM_SENSOR_STATE_BYTES]
The state (on/off) of the library sensors.
Definition: thirdparty/qtouch/generic/include/touch_api.h:860

Referenced by check_touch_key_pressed().