AVR XMEGA TC Driver Example 1.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include <conf_example.h>
#include <string.h>
#include <asf.h>
Functions | |
static void | example_cca_interrupt_callback (void) |
Timer Counter Capture/Compare A interrupt callback function. More... | |
static void | example_ccb_interrupt_callback (void) |
Timer Counter Capture/Compare B interrupt callback function. More... | |
static void | example_ovf_interrupt_callback (void) |
Timer Counter Overflow interrupt callback function. More... | |
int | main (void) |
|
static |
Timer Counter Capture/Compare A interrupt callback function.
This function is called when an a capture compare channel A has occurred TIMER_EXAMPLE and toggles PORTA1 GPIO.
References gpio_toggle_pin.
Referenced by main().
|
static |
Timer Counter Capture/Compare B interrupt callback function.
This function is called when an a capture compare channel B has occurred TIMER_EXAMPLE and toggles PORTA2 GPIO.
References gpio_toggle_pin.
Referenced by main().
|
static |
Timer Counter Overflow interrupt callback function.
This function is called when an overflow interrupt has occurred on TIMER_EXAMPLE and toggles PORTA0 GPIO.
References gpio_toggle_pin.
Referenced by main().
int main | ( | void | ) |
References board_init(), cpu_irq_enable, example_cca_interrupt_callback(), example_ccb_interrupt_callback(), example_ovf_interrupt_callback(), pmic_init(), sleepmgr_enter_sleep(), sleepmgr_init(), sysclk_init(), TC_CCA, TC_CCAEN, TC_CCB, TC_CCBEN, tc_enable(), tc_enable_cc_channels(), TC_INT_LVL_LO, tc_set_cca_interrupt_callback(), tc_set_cca_interrupt_level(), tc_set_ccb_interrupt_callback(), tc_set_ccb_interrupt_level(), tc_set_overflow_interrupt_callback(), tc_set_overflow_interrupt_level(), tc_set_resolution(), tc_set_wgm(), TC_WG_NORMAL, tc_write_cc(), and tc_write_period().