![]() |
NEORV32 - Software Framework Documentation
|
Pulse-Width Modulation Controller (PWM) HW driver source file. More...
Functions | |
int | neorv32_pwm_available (void) |
void | neorv32_pwm_setup (int prsc) |
void | neorv32_pwm_disable (void) |
void | neorv32_pwm_enable (void) |
int | neorv32_pmw_get_num_channels (void) |
void | neorv32_pwm_set (int channel, uint8_t dc) |
uint8_t | neorv32_pwm_get (int channel) |
Pulse-Width Modulation Controller (PWM) HW driver source file.
int neorv32_pmw_get_num_channels | ( | void | ) |
Get number of implemented channels.
int neorv32_pwm_available | ( | void | ) |
Check if PWM unit was synthesized.
void neorv32_pwm_disable | ( | void | ) |
Disable pulse width modulation controller.
void neorv32_pwm_enable | ( | void | ) |
Enable pulse width modulation controller.
uint8_t neorv32_pwm_get | ( | int | channel | ) |
Get duty cycle from channel.
[in] | channel | Channel select (0..11). |
void neorv32_pwm_set | ( | int | channel, |
uint8_t | dc | ||
) |
Set duty cycle for channel.
[in] | channel | Channel select (0..11). |
[in] | dc | Duty cycle (8-bit, LSB-aligned). |
void neorv32_pwm_setup | ( | int | prsc | ) |
Enable and configure pulse width modulation controller. The PWM control register bits are listed in NEORV32_PWM_CTRL_enum.
[in] | prsc | Clock prescaler select (0..7). See NEORV32_CLOCK_PRSC_enum. |