Application Controller for AT42QT1060 Touch Management.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include "board.h"
#include "gpio.h"
#include "intc.h"
#include "controller.h"
#include "at42qt1060.h"
#include "conf_at42qt1060.h"
#include "delay.h"
Data Structures | |
struct | at42qt1060_data |
Macros | |
#define | JOYSTICK_KEY_DEBOUNCE_MS 200 |
Functions | |
void | controller_init (uint32_t fcpu_hz, uint32_t fhsb_hz, uint32_t fpbb_hz, uint32_t fpba_hz) |
bool | controller_key_fct1 (void) |
bool | controller_key_fct2 (void) |
bool | controller_key_fct3 (void) |
bool | controller_key_fct4 (void) |
bool | controller_key_fct5 (void) |
void | controller_task (void) |
void | touch_detect_callback (void) |
Callback function for a detect event of the touch sensor device. More... | |
Variables | |
t_cpu_time | joystick_key_sensibility_timer |
static uint32_t | static_fcpu_hz |
struct at42qt1060_data | touch_data |
volatile bool | touch_detect = false |
#define JOYSTICK_KEY_DEBOUNCE_MS 200 |
Referenced by controller_init().
void controller_init | ( | uint32_t | fcpu_hz, |
uint32_t | fhsb_hz, | ||
uint32_t | fpbb_hz, | ||
uint32_t | fpba_hz | ||
) |
References at42qt1060_init(), at42qt1060_register_int(), cpu_ms_2_cy(), cpu_set_timeout(), delay_ms, JOYSTICK_KEY_DEBOUNCE_MS, static_fcpu_hz, and touch_detect_callback.
Referenced by main().
bool controller_key_fct1 | ( | void | ) |
References at42qt1060_data::detect_status, and touch_data.
Referenced by state_machine_task().
bool controller_key_fct2 | ( | void | ) |
References at42qt1060_data::detect_status, and touch_data.
Referenced by state_machine_task().
bool controller_key_fct3 | ( | void | ) |
References at42qt1060_data::detect_status, and touch_data.
Referenced by state_machine_task().
bool controller_key_fct4 | ( | void | ) |
References at42qt1060_data::detect_status, and touch_data.
Referenced by state_machine_task().
bool controller_key_fct5 | ( | void | ) |
References at42qt1060_data::detect_status, and touch_data.
Referenced by state_machine_task().
void controller_task | ( | void | ) |
References AT42QT1060_DETECTION_STATUS, AT42QT1060_INPUT_PORT_STATUS, at42qt1060_read_reg(), at42qt1060_data::detect_status, touch_data, and touch_detect.
Referenced by main().
void touch_detect_callback | ( | void | ) |
Callback function for a detect event of the touch sensor device.
t_cpu_time joystick_key_sensibility_timer |
|
static |
Referenced by controller_init().
struct at42qt1060_data touch_data |
Referenced by controller_task().