Class daisy::PWMHandle::Channel¶
ClassList > daisy > PWMHandle > Channel
Classes¶
Type | Name |
---|---|
struct | Config Configuration struct for an individual channel. |
Public Functions¶
Type | Name |
---|---|
Channel (PWMHandle * owner, uint32_t channel) Private constructor for channel. Do not use. |
|
PWMHandle::Result | DeInit () Deinitialize the channel. Called automatically by PWMHandle::DeInit . |
const Config & | GetConfig () const Returns a const reference to the Config struct. |
PWMHandle::Result | Init (const Channel::Config & config) Initialize the channel. Must be called manually, after PWMHandle::Init __ __ |
PWMHandle::Result | Init () Initialize the channel using all defaults. Must be called manually, after PWMHandle::Init __ __ |
void | Set (float val) Set the duty cycle for the PWM channel. Automatically normalized to the timer's period. |
void | SetRaw (uint32_t raw) Set the duty cycle for the PWM channel. |
Public Functions Documentation¶
function Channel¶
Private constructor for channel. Do not use.
function DeInit¶
Deinitialize the channel. Called automatically by PWMHandle::DeInit .
function GetConfig¶
Returns a const reference to the Config struct.
function Init [½]¶
Initialize the channel. Must be called manually, after PWMHandle::Init __ __
function Init [2/2]¶
Initialize the channel using all defaults. Must be called manually, after PWMHandle::Init __ __
function Set¶
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.
function SetRaw¶
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 external-docs/libDaisy/src/per/pwm.h