Microchip® Advanced Software Framework

touch.c File Reference

Functions for interfacing touch.

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

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

Macros

#define GET_SENSOR_STATE(SENSOR_NUMBER)
 
#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)
 Configures touch library and measurement setup. More...
 
bool check_touch_key_pressed (void)
 Checks whether the QTouch key is pressed. More...
 

#define GET_SENSOR_STATE (   SENSOR_NUMBER)
Value:
& (1 << (SENSOR_NUMBER % 8))
uint8_t sensor_states[QT_NUM_SENSOR_STATE_BYTES]
The state (on/off) of the library sensors.
Definition: touch_api.h:860
qt_touch_lib_measure_data_t qt_measure_data
qt_touch_status_t qt_touch_status
state of sensors.
Definition: touch_api.h:899

Referenced by check_touch_key_pressed().

#define TIMER_PERIOD   TICKS_PER_MS * qt_measurement_period_msec

Referenced by init_timer_isr().