Microchip® Advanced Software Framework

at42qt1060_example.c File Reference
#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().

static void init_sys_clocks ( void  )
static

Initializes the MCU system clocks.

References PASS, pcl_configure_clocks(), and pcl_freq_param.

void print_key_data ( int  key,
const char *  key_name,
struct at42qt1060_data touch_data 
)

Print touch key status to debug output.

Parameters
keyKey index for key data in touch_data.
key_namePointer to key name. Should be less than 7 chars or the table will not be aligned.
touch_dataPointer 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.

Parameters
touch_dataPointer 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.

pcl_freq_param_t pcl_freq_param
static
Initial value:
=
{
.cpu_f = FCPU_HZ,
.pba_f = FPBA_HZ,
.osc0_f = FOSC0,
.osc0_startup = OSC0_STARTUP
}
#define FPBA_HZ
Definition: at42qt1060_example.c:95
#define FCPU_HZ
Definition: at42qt1060_example.c:94
volatile bool touch_detect = false