#include "board.h"
#include "gpio.h"
#include "controller.h"
#include "twim.h"
#include "at42qt1060.h"
#include "conf_at42qt1060.h"
#include "cycle_counter.h"
#include <includes.h>
Data Structures | |
struct | at42qt1060_data |
Macros | |
#define | JOYSTICK_KEY_DEBOUNCE_MS 200 |
Functions | |
CPU_INT32U | BSP_INTC_IntReg (CPU_FNCT_VOID handler, CPU_INT32U irq, CPU_INT32U int_level) |
bool | controller_connect (void) |
static void | controller_detect_int_handler (void) |
void | controller_init (U32 fcpu_hz, U32 fhsb_hz, U32 fpbb_hz, U32 fpba_hz) |
Initialization function of the controller interface. More... | |
bool | controller_inquiry (void) |
bool | controller_select (void) |
bool | controller_send (void) |
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... | |
static void | twi_init (U32 fpba_hz) |
Variables | |
t_cpu_time | joystick_key_sensibility_timer |
static U32 | static_fcpu_hz |
struct at42qt1060_data | touch_data |
volatile bool | touch_detect = false |
#define JOYSTICK_KEY_DEBOUNCE_MS 200 |
Referenced by controller_init().
CPU_INT32U BSP_INTC_IntReg | ( | CPU_FNCT_VOID | handler, |
CPU_INT32U | irq, | ||
CPU_INT32U | int_level | ||
) |
Referenced by BSP_Init(), and controller_init().
bool controller_connect | ( | void | ) |
References at42qt1060_data::detect_status, and touch_data.
Referenced by app_engine().
|
static |
References AT42QT1060_DETECT_PIN, gpio_clear_pin_interrupt_flag(), gpio_get_pin_interrupt_flag(), and touch_detect_callback.
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. |
References AT42QT1060_DETECT_PIN, at42qt1060_init(), at42qt1060_register_int(), BSP_INTC_IntReg(), controller_detect_int_handler(), cpu_delay_ms(), cpu_ms_2_cy(), cpu_set_timeout(), delay_ms, Disable_global_interrupt, Enable_global_interrupt, gpio_clear_pin_interrupt_flag(), gpio_enable_pin_interrupt(), GPIO_FALLING_EDGE, JOYSTICK_KEY_DEBOUNCE_MS, static_fcpu_hz, touch_detect_callback, and twi_init().
bool controller_inquiry | ( | void | ) |
References at42qt1060_data::detect_status, and touch_data.
Referenced by app_engine().
bool controller_select | ( | void | ) |
References at42qt1060_data::detect_status, and touch_data.
Referenced by app_engine().
bool controller_send | ( | void | ) |
References at42qt1060_data::detect_status, and touch_data.
Referenced by app_engine().
void controller_task | ( | void | ) |
Refresh the controller.
References AT42QT1060_DETECTION_STATUS, AT42QT1060_INPUT_PORT_STATUS, at42qt1060_read_reg(), controller_key_fct1(), controller_key_fct2(), controller_key_fct3(), controller_key_fct4(), controller_key_fct5(), at42qt1060_data::detect_status, signal_selected_display, touch_data, and touch_detect.
void touch_detect_callback | ( | void | ) |
Callback function for a detect event of the touch sensor device.
References touch_detect.
|
static |
t_cpu_time joystick_key_sensibility_timer |
|
static |
Referenced by controller_init().
struct at42qt1060_data touch_data |