Microchip® Advanced Software Framework

xmega/services/pwm/example2/example2.c File Reference

PWM example for XMEGA.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>

Functions

int main (void)
 Example 2 main application routine. More...
 
static void pwm_callback_1 (void)
 PWM channel 1 interrupt callback function. More...
 
static void pwm_callback_2 (void)
 PWM channel 2 interrupt callback function. More...
 

Variables

volatile uint8_t duty_cycle_percent_1 = 0
 
volatile uint8_t duty_cycle_percent_2 = 0
 
struct pwm_config pwm_1_cfg
 
struct pwm_config pwm_2_cfg
 

static void pwm_callback_1 ( void  )
static

PWM channel 1 interrupt callback function.

References duty_cycle_percent_1, pwm_1_cfg, and pwm_set_duty_cycle_percent().

Referenced by main().

static void pwm_callback_2 ( void  )
static

PWM channel 2 interrupt callback function.

References duty_cycle_percent_2, pwm_2_cfg, and pwm_set_duty_cycle_percent().

Referenced by main().

volatile uint8_t duty_cycle_percent_1 = 0

Referenced by main(), and pwm_callback_1().

volatile uint8_t duty_cycle_percent_2 = 0

Referenced by main(), and pwm_callback_2().

struct pwm_config pwm_1_cfg

Referenced by main(), and pwm_callback_1().

struct pwm_config pwm_2_cfg

Referenced by main(), and pwm_callback_2().