#include <avr32/io.h>
#include "compiler.h"
#include "print_funcs.h"
#include "board.h"
#include "power_clocks_lib.h"
#include "eic.h"
#include "twi.h"
#include "gpio.h"
#include "cycle_counter.h"
#include "flashc.h"
#include "at42qt1060.h"
#include "conf_at42qt1060.h"
#include <stdio.h>
Data Structures | |
struct | at42qt1060_data |
Macros | |
#define | FCPU_HZ 60000000 |
#define | FPBA_HZ 60000000 |
Functions | |
void | get_key_ref_values (struct at42qt1060_data *touch_data) |
void | get_key_signal_values (struct at42qt1060_data *touch_data) |
static void | init_sys_clocks (void) |
Initializes the MCU system clocks. More... | |
int | main (void) |
void | print_key_data (int key, const char *key_name, struct at42qt1060_data *touch_data) |
Print touch key status to debug output. More... | |
void | print_touch_data (struct at42qt1060_data *touch_data) |
Print key touch data to debug output. More... | |
void | touch_detect_callback (void) |
Callback function for a detect event of the touch sensor device. More... | |
static void | twi_init (void) |
Variables | |
volatile bool | touch_detect = false |
System Clock Frequencies | |
static pcl_freq_param_t | pcl_freq_param |
#define FCPU_HZ 60000000 |
Referenced by main().
#define FPBA_HZ 60000000 |
Referenced by main(), and twi_init().
void get_key_ref_values | ( | struct at42qt1060_data * | touch_data | ) |
References AT42QT1060_KEY_0_REF_DATA_LSB, AT42QT1060_KEY_0_REF_DATA_MSB, AT42QT1060_KEY_1_REF_DATA_LSB, AT42QT1060_KEY_1_REF_DATA_MSB, AT42QT1060_KEY_2_REF_DATA_LSB, AT42QT1060_KEY_2_REF_DATA_MSB, AT42QT1060_KEY_3_REF_DATA_LSB, AT42QT1060_KEY_3_REF_DATA_MSB, AT42QT1060_KEY_4_REF_DATA_LSB, AT42QT1060_KEY_4_REF_DATA_MSB, AT42QT1060_KEY_5_REF_DATA_LSB, AT42QT1060_KEY_5_REF_DATA_MSB, at42qt1060_read_reg(), at42qt1060_data::key_ref_value, LSB, and MSB.
Referenced by main().
void get_key_signal_values | ( | struct at42qt1060_data * | touch_data | ) |
References AT42QT1060_KEY_0_SIGNAL_LSB, AT42QT1060_KEY_0_SIGNAL_MSB, AT42QT1060_KEY_1_SIGNAL_LSB, AT42QT1060_KEY_1_SIGNAL_MSB, AT42QT1060_KEY_2_SIGNAL_LSB, AT42QT1060_KEY_2_SIGNAL_MSB, AT42QT1060_KEY_3_SIGNAL_LSB, AT42QT1060_KEY_3_SIGNAL_MSB, AT42QT1060_KEY_4_SIGNAL_LSB, AT42QT1060_KEY_4_SIGNAL_MSB, AT42QT1060_KEY_5_SIGNAL_LSB, AT42QT1060_KEY_5_SIGNAL_MSB, at42qt1060_read_reg(), at42qt1060_data::key_signal, LSB, and MSB.
Referenced by main().
|
static |
Initializes the MCU system clocks.
References PASS, pcl_configure_clocks(), and pcl_freq_param.
int main | ( | void | ) |
References AT42QT1060_DETECTION_STATUS, at42qt1060_init(), AT42QT1060_INPUT_PORT_STATUS, at42qt1060_read_reg(), at42qt1060_register_eic_int(), at42qt1060_register_int(), cpu_delay_ms(), cpu_irq_enable, cpu_is_timeout(), cpu_ms_2_cy(), cpu_set_timeout(), at42qt1060_data::detect_status, FCPU_HZ, FPBA_HZ, get_key_ref_values(), get_key_signal_values(), gpio_set_gpio_pin(), init_dbg_rs232(), init_sys_clocks(), irq_initialize_vectors, print_dbg(), print_touch_data(), touch_detect, touch_detect_callback, and twi_init().
void print_key_data | ( | int | key, |
const char * | key_name, | ||
struct at42qt1060_data * | touch_data | ||
) |
Print touch key status to debug output.
key | Key index for key data in touch_data. |
key_name | Pointer to key name. Should be less than 7 chars or the table will not be aligned. |
touch_data | Pointer to touch data structure. |
References at42qt1060_data::detect_status, at42qt1060_data::key_ref_value, at42qt1060_data::key_signal, print_dbg(), and tmp.
Referenced by print_touch_data().
void print_touch_data | ( | struct at42qt1060_data * | touch_data | ) |
Print key touch data to debug output.
touch_data | Pointer to structure that holds the touch data. |
References print_dbg(), and print_key_data().
Referenced by main().
void touch_detect_callback | ( | void | ) |
Callback function for a detect event of the touch sensor device.
References gpio_tgl_gpio_pin(), and touch_detect.
|
static |
|
static |