#[non_exhaustive]pub struct Config {
pub counter_mode: CounterMode,
pub max_duty: u16,
pub prescaler: Prescaler,
pub sequence_load: SequenceLoad,
pub ch0_drive: OutputDrive,
pub ch1_drive: OutputDrive,
pub ch2_drive: OutputDrive,
pub ch3_drive: OutputDrive,
pub ch0_idle_level: Level,
pub ch1_idle_level: Level,
pub ch2_idle_level: Level,
pub ch3_idle_level: Level,
}Expand description
Configuration for the PWM as a whole.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.counter_mode: CounterModeSelects up mode or up-and-down mode for the counter
max_duty: u16Top value to be compared against buffer values
prescaler: PrescalerConfiguration for PWM_CLK
sequence_load: SequenceLoadHow a sequence is read from RAM and is spread to the compare register
ch0_drive: OutputDriveDrive strength for the channel 0 line.
ch1_drive: OutputDriveDrive strength for the channel 1 line.
ch2_drive: OutputDriveDrive strength for the channel 2 line.
ch3_drive: OutputDriveDrive strength for the channel 3 line.
ch0_idle_level: LevelOutput level for the channel 0 line when PWM if disabled.
ch1_idle_level: LevelOutput level for the channel 1 line when PWM if disabled.
ch2_idle_level: LevelOutput level for the channel 2 line when PWM if disabled.
ch3_idle_level: LevelOutput level for the channel 3 line when PWM if disabled.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more