Microchip® Advanced Software Framework

pwma.c File Reference

Basic Pulse Width Modulation Controller (PWMA) driver.

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

#include "pwma.h"
#include "compiler.h"


void pwma_config_and_enable (volatile avr32_pwma_t *pwma, unsigned long long int channel_mask, int period_cycles, int duty_cycles)
 Configure and enable the PWMA. More...
bool pwma_config_enable (volatile avr32_pwma_t *pwma, uint32_t pwma_freq_hz, uint32_t gclk_freq_hz, uint16_t spread)
 Configure and enable the PWMA. More...
bool pwma_set_channels_value (volatile avr32_pwma_t *pwma, uint64_t channel_mask, uint16_t duty_cycle)
 Load the duty cycle value to the channels. This function uses Interlinked Single Value Mode where several channels are interlinked to allow multiple channels to be updated simultaneously with the same duty cycle value. More...
bool pwma_set_multiple_values (volatile avr32_pwma_t *pwma, uint32_t channel_mask, uint16_t *channel_duty_cycles)
 Load multiple duty cycle values to multiple channels. This function uses Interlinked Multi Value Mode where 4 channels can be updated simultaneously with 4 different duty cycle values. More...
bool pwma_write_top_value (volatile avr32_pwma_t *pwma, uint16_t top_value)
 Load TOP value. More...