Microchip® Advanced Software Framework

tc_example3.c File Reference

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 void example_cca_interrupt_callback ( void  )
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 void example_ccb_interrupt_callback ( void  )
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().

uint16_t cca_pwm_index
uint16_t ccb_pwm_index