#include <pwm.h>
|
| struct | Config |
| | Configuration struct for an individual channel. More...
|
| |
◆ Channel()
| daisy::PWMHandle::Channel::Channel |
( |
PWMHandle * | owner, |
|
|
uint32_t | channel ) |
|
inline |
Private constructor for channel. Do not use.
◆ DeInit()
◆ GetConfig()
| const Config & daisy::PWMHandle::Channel::GetConfig |
( |
| ) |
const |
|
inline |
Returns a const reference to the Config struct.
◆ Init() [1/2]
Initialize the channel using all defaults. Must be called manually, after PWMHandle::Init
◆ Init() [2/2]
◆ Set()
| void daisy::PWMHandle::Channel::Set |
( |
float | val | ) |
|
|
inline |
Set the duty cycle for the PWM channel. Automatically normalized to the timer's period.
- Parameters
-
| val | Relative value, [0.0, 1.0] |
- Note
- May experience rounding errors when period is > 2^24; use SetRaw.
◆ SetRaw()
| void daisy::PWMHandle::Channel::SetRaw |
( |
uint32_t | raw | ) |
|
|
inline |
Set the duty cycle for the PWM channel.
- Parameters
-
| raw | Must be less than or equal to the timer's period |
The documentation for this class was generated from the following file: