|
MEGA-1284P Xplained Example Application
|
Functions | |
| void | io_init_terminal_mode (void) |
| Function to setup IO for terminal mode. | |
| void | io_init_demo_mode (void) |
| Function to setup IO for demo mode. | |
| void | power_reduction_enable (void) |
| Function to reduce power consumption. | |
| void | usart1_init (void) |
| Function to setup USART1. | |
| void | adc_init (void) |
| Function to setup ADC. | |
| void | timer1_lightdemo_init (void) |
| Function to setup timer1 for light sensor demo. | |
| void | stop_timer1_lightdemo (void) |
| Function to stop timer1 used in the light sensor demo. | |
| void | timer1_init (void) |
| Function to setup timer1 as a time base for the touch lib. | |
| void | qt_set_parameters (void) |
| Function to set values for touch sensing. | |
| void | touch_init (void) |
| Function to setup touch button. | |
Variables | |
| TOUCH_DATA_T | SNS_array [2][2] |
| TOUCH_DATA_T | SNSK_array [2][2] |
The init driver is used to initialize IO (demo or terminal mode), power reduction features, USART1, ADC, Timer1 (demo or terminal mode) and touch sensing (QTB0)
| void adc_init | ( | void | ) |
Function to setup ADC.
ADC configuration:
| void io_init_demo_mode | ( | void | ) |
Function to setup IO for demo mode.
Configure all I/O as input pull-up enabled to make sure all I/Os have a defined level. Light sensor and NTC sensor (PA6 and PA7): input pull-up disable. Enable pinchange interrupt for SW0:2 used to toggle through operating modes
| void io_init_terminal_mode | ( | void | ) |
Function to setup IO for terminal mode.
Configure all I/O as input pull-up enabled to make sure all I/Os have a defined level except LEDs (PB3:0) which is configured as outputs. Light sensor and NTC sensor (PA6 and PA7): input pull-up disable.
| void power_reduction_enable | ( | void | ) |
Function to reduce power consumption.
This function will turn off clocks to all IO modules except for Timer2 which is used in power-save mode. The function will also shutdown analog modules like the AC and ADC.
| void qt_set_parameters | ( | void | ) |
Function to set values for touch sensing.
The function will fill the default threshold values in the configuration data structure. The user can change the values of these parameters to fit the application.
| void stop_timer1_lightdemo | ( | void | ) |
Function to stop timer1 used in the light sensor demo.
All timer1 registers are set to default state
| void timer1_init | ( | void | ) |
Function to setup timer1 as a time base for the touch lib.
In this mode Timer1 is used to generate PWM signal on the LEDs.
Timer1 configuration:
| void timer1_lightdemo_init | ( | void | ) |
Function to setup timer1 for light sensor demo.
In this mode Timer1 is used to generate PWM signal on the LEDs.
Timer1 configuration:
| void touch_init | ( | void | ) |
Function to setup touch button.
This function will configure touch sensing for the QTB0 touch button. LED1 is used as touch indication. Touch detected: LED1 on, touch not detected: LED1 off.
| void usart1_init | ( | void | ) |
Function to setup USART1.
USART1 is used to communicate with the boardcontroller (AT32UC3256B1).
USART1 configuration:
| TOUCH_DATA_T SNS_array[2][2] |
| TOUCH_DATA_T SNSK_array[2][2] |
1.7.3