Basic Pulse Width Modulation Controller (PWMA) driver.
Copyright (c) 2009-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | PWMA_CHANNEL_LIMIT 4 |
Functions | |
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... | |
static void | pwma_disable (volatile avr32_pwma_t *pwma) |
Disable a PWMA module. 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... | |
static void | pwma_wait_for_ready (volatile avr32_pwma_t *pwma) |
Wait for PWMA Module to be ready for writing. More... | |
bool | pwma_write_top_value (volatile avr32_pwma_t *pwma, uint16_t top_value) |
Load TOP value. More... | |