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) |
Initialization function of the controller interface. More... | |
bool | controller_key_fct1 (void) |
Local definition for controller Key 1: Right Button (Input+Noise Signal) More... | |
bool | controller_key_fct2 (void) |
Local definition for controller Key 2: Left Button (Input Signal) More... | |
bool | controller_key_fct3 (void) |
Local definition for controller Key 3: Up Button (FPU Signal) More... | |
bool | controller_key_fct4 (void) |
Local definition for controller Key 4: Down Button (FP Signal) More... | |
bool | controller_key_fct5 (void) |
Local definition for controller Key 5: Middle Button (Noise Signal) More... | |
void | controller_task (void) |
Refresh the controller. More... | |
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().
Initialization function of the controller interface.
fcpu_hz | CPU frequency. |
fhsb_hz | HSB frequency. |
fpbb_hz | PBB frequency. |
fpba_hz | PBA frequency. |
Referenced by app_engine(), and main().
bool controller_key_fct1 | ( | void | ) |
Local definition for controller Key 1: Right Button (Input+Noise Signal)
References at42qt1060_data::detect_status, and touch_data.
bool controller_key_fct2 | ( | void | ) |
Local definition for controller Key 2: Left Button (Input Signal)
References at42qt1060_data::detect_status, and touch_data.
bool controller_key_fct3 | ( | void | ) |
Local definition for controller Key 3: Up Button (FPU Signal)
References at42qt1060_data::detect_status, and touch_data.
bool controller_key_fct4 | ( | void | ) |
Local definition for controller Key 4: Down Button (FP Signal)
References at42qt1060_data::detect_status, and touch_data.
bool controller_key_fct5 | ( | void | ) |
Local definition for controller Key 5: Middle Button (Noise Signal)
References at42qt1060_data::detect_status, and touch_data.
void controller_task | ( | void | ) |
Refresh the controller.
References AT42QT1060_DETECTION_STATUS, AT42QT1060_INPUT_PORT_STATUS, at42qt1060_read_reg(), at42qt1060_data::detect_status, touch_data, and touch_detect.
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 |