QTouch Sensor interface.
Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | GET_SENSOR_STATE(SENSOR_NUMBER) |
Functions | |
bool | check_touch_key_pressed (void) |
static void | config_sensor (void) |
static void | init_timer_isr (void) |
int16_t | qt_get_sensor_delta (uint8_t sensor) |
Get sensor delta values. More... | |
static void | qt_set_parameters (void) |
Passes default parameters from config file to touch library. More... | |
void | touch_init (void) |
Configures touch library and measurement setup. More... | |
static void | touch_timer_callback () |
Variables | |
static volatile uint16_t | current_time_ms_touch = 0 |
Current time, set by timer ISR. More... | |
qt_touch_lib_measure_data_t * | pqt_measure_data = &qt_measure_data |
Output can be observed in the watch window using this pointer. More... | |
qt_touch_lib_config_data_t | qt_config_data |
This configuration data structure parameters if needs to be changed will be changed in the qt_set_parameters function. More... | |
qt_touch_lib_measure_data_t | qt_measure_data |
Touch output - measurement data. More... | |
uint16_t | qt_measurement_period_msec = 25 |
Timer period in msec. More... | |
TOUCH_DATA_T | SNS_array [2][2] |
TOUCH_DATA_T | SNSK_array [2][2] |
static volatile bool | time_to_measure_touch = false |
Flag set by timer ISR when it's time to measure touch. More... | |
#define GET_SENSOR_STATE | ( | SENSOR_NUMBER | ) |
Referenced by check_touch_key_pressed().
bool check_touch_key_pressed | ( | void | ) |
References current_time_ms_touch, GET_SENSOR_STATE, qt_measure_sensors(), QTLIB_BURST_AGAIN, and time_to_measure_touch.
Referenced by keyboard_get_key_state().
|
static |
References CHANNEL_0, HYST_6_25, NO_AKS_GROUP, and qt_enable_key().
Referenced by touch_init().
|
static |
int16_t qt_get_sensor_delta | ( | uint8_t | sensor | ) |
Get sensor delta values.
|
static |
Passes default parameters from config file to touch library.
References DEF_QT_DI, DEF_QT_DRIFT_HOLD_TIME, DEF_QT_MAX_ON_DURATION, DEF_QT_NEG_DRIFT_RATE, DEF_QT_POS_DRIFT_RATE, DEF_QT_POS_RECAL_DELAY, DEF_QT_RECAL_THRESHOLD, tag_qt_touch_lib_config_data_t::qt_di, tag_qt_touch_lib_config_data_t::qt_drift_hold_time, tag_qt_touch_lib_config_data_t::qt_max_on_duration, tag_qt_touch_lib_config_data_t::qt_neg_drift_rate, tag_qt_touch_lib_config_data_t::qt_pos_drift_rate, tag_qt_touch_lib_config_data_t::qt_pos_recal_delay, and tag_qt_touch_lib_config_data_t::qt_recal_threshold.
Referenced by touch_init().
void touch_init | ( | void | ) |
Configures touch library and measurement setup.
References config_sensor(), init_timer_isr(), qt_filter_callback, qt_init_sensing, qt_set_parameters(), SNS_array, and SNSK_array.
Referenced by main().
|
static |
References current_time_ms_touch, qt_measurement_period_msec, and time_to_measure_touch.
Referenced by init_timer_isr().
|
static |
Current time, set by timer ISR.
Referenced by check_touch_key_pressed(), and touch_timer_callback().
qt_touch_lib_measure_data_t* pqt_measure_data = &qt_measure_data |
Output can be observed in the watch window using this pointer.
qt_touch_lib_config_data_t qt_config_data |
This configuration data structure parameters if needs to be changed will be changed in the qt_set_parameters function.
qt_touch_lib_measure_data_t qt_measure_data |
Touch output - measurement data.
uint16_t qt_measurement_period_msec = 25 |
Timer period in msec.
Referenced by init_timer_isr(), and touch_timer_callback().
TOUCH_DATA_T SNS_array[2][2] |
Referenced by touch_init().
TOUCH_DATA_T SNSK_array[2][2] |
Referenced by touch_init().
Flag set by timer ISR when it's time to measure touch.
Referenced by check_touch_key_pressed(), and touch_timer_callback().