AVR XMEGA TC Driver Example 3.
Copyright (c) 2010-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) |
Compare/Capture detection interrupt callback function. More... | |
static void | example_ccb_interrupt_callback (void) |
Compare/Capture detection interrupt callback function. More... | |
int | main (void) |
Variables | |
uint16_t | cca_pwm_index |
uint16_t | ccb_pwm_index |
|
static |
Compare/Capture detection interrupt callback function.
This function is called when an interrupt has occurred on a Compare A channel. It increments the CC detection level and thus modify the duty-cycle.
References cca_pwm_index, TC_CCA, and tc_write_cc_buffer().
Referenced by main().
|
static |
Compare/Capture detection interrupt callback function.
This function is called when an interrupt has occurred on a Compare B channel. It decrements the CC detection level and thus modify the duty-cycle.
References ccb_pwm_index, TC_CCB, and tc_write_cc_buffer().
Referenced by main().
int main | ( | void | ) |
References board_init(), cpu_irq_enable, example_cca_interrupt_callback(), example_ccb_interrupt_callback(), pmic_init(), sleepmgr_enter_sleep(), sleepmgr_init(), sysclk_init(), tc_awex_enable_cca_deadtime(), tc_awex_enable_ccb_deadtime(), tc_awex_set_dti_high(), tc_awex_set_dti_low(), tc_awex_set_output_override(), TC_CCA, TC_CCAEN, TC_CCB, 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_resolution(), tc_set_wgm(), TC_WG_DS_T, TC_WG_NORMAL, tc_write_cc(), and tc_write_period().
uint16_t cca_pwm_index |
Referenced by example_cca_interrupt_callback().
uint16_t ccb_pwm_index |
Referenced by example_ccb_interrupt_callback().