#[repr(transparent)]pub struct Smctrl(pub u16);Expand description
Control Register.
Tuple Fields§
§0: u16Implementations§
Source§impl Smctrl
impl Smctrl
Sourcepub const fn ldmod(&self) -> bool
pub const fn ldmod(&self) -> bool
Load Mode Select. Raw bit values: false (0) = NextPwmReload: Buffered registers of this submodule are loaded and take effect at the next PWM reload if MCTRL[LDOK] is set.; true (1) = MtctrlLdokSet: Buffered registers of this submodule are loaded and take effect immediately upon MCTRL[LDOK] being set. In this case, it is not necessary to set CTRL[FULL] or CTRL[HALF].
Sourcepub const fn set_ldmod(&mut self, val: bool)
pub const fn set_ldmod(&mut self, val: bool)
Load Mode Select. Raw bit values: false (0) = NextPwmReload: Buffered registers of this submodule are loaded and take effect at the next PWM reload if MCTRL[LDOK] is set.; true (1) = MtctrlLdokSet: Buffered registers of this submodule are loaded and take effect immediately upon MCTRL[LDOK] being set. In this case, it is not necessary to set CTRL[FULL] or CTRL[HALF].
Sourcepub const fn prsc(&self) -> SmctrlPrsc
pub const fn prsc(&self) -> SmctrlPrsc
Prescaler.
Sourcepub const fn set_prsc(&mut self, val: SmctrlPrsc)
pub const fn set_prsc(&mut self, val: SmctrlPrsc)
Prescaler.
Sourcepub const fn compmode(&self) -> bool
pub const fn compmode(&self) -> bool
Compare Mode. Raw bit values: false (0) = EqualTo: The VAL* registers and the PWM counter are compared using an “equal to” method. This means that PWM edges are only produced when the counter is equal to one of the VAL* register values. This implies that a PWM_A output that is high at the end of a period maintains this state until a match with VAL3 clears the output in the following period.; true (1) = EqualToOrGreaterThan: The VAL* registers and the PWM counter are compared using an “equal to or greater than” method. This means that PWM edges are produced when the counter is equal to or greater than one of the VAL* register values. This implies that a PWM_A output that is high at the end of a period could go low at the start of the next period if the starting counter value is greater than (but not necessarily equal to) the new VAL3 value.
Sourcepub const fn set_compmode(&mut self, val: bool)
pub const fn set_compmode(&mut self, val: bool)
Compare Mode. Raw bit values: false (0) = EqualTo: The VAL* registers and the PWM counter are compared using an “equal to” method. This means that PWM edges are only produced when the counter is equal to one of the VAL* register values. This implies that a PWM_A output that is high at the end of a period maintains this state until a match with VAL3 clears the output in the following period.; true (1) = EqualToOrGreaterThan: The VAL* registers and the PWM counter are compared using an “equal to or greater than” method. This means that PWM edges are produced when the counter is equal to or greater than one of the VAL* register values. This implies that a PWM_A output that is high at the end of a period could go low at the start of the next period if the starting counter value is greater than (but not necessarily equal to) the new VAL3 value.
Sourcepub const fn ldfq(&self) -> SmctrlLdfq
pub const fn ldfq(&self) -> SmctrlLdfq
Load Frequency.
Sourcepub const fn set_ldfq(&mut self, val: SmctrlLdfq)
pub const fn set_ldfq(&mut self, val: SmctrlLdfq)
Load Frequency.