#[repr(transparent)]pub struct Sm3ctrl(pub u16);Expand description
Control Register.
Tuple Fields§
§0: u16Implementations§
Source§impl Sm3ctrl
impl Sm3ctrl
Sourcepub const fn dblen(&self) -> bool
pub const fn dblen(&self) -> bool
Double Switching Enable. Raw bit values: false (0) = Disabled: Double switching disabled.; true (1) = Enabled: Double switching enabled.
Sourcepub const fn set_dblen(&mut self, val: bool)
pub const fn set_dblen(&mut self, val: bool)
Double Switching Enable. Raw bit values: false (0) = Disabled: Double switching disabled.; true (1) = Enabled: Double switching enabled.
Sourcepub const fn dblx(&self) -> bool
pub const fn dblx(&self) -> bool
PWM_X Double Switching Enable. Raw bit values: false (0) = Disabled: PWM_X double pulse disabled.; true (1) = Enabled: PWM_X double pulse enabled.
Sourcepub const fn set_dblx(&mut self, val: bool)
pub const fn set_dblx(&mut self, val: bool)
PWM_X Double Switching Enable. Raw bit values: false (0) = Disabled: PWM_X double pulse disabled.; true (1) = Enabled: PWM_X double pulse enabled.
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 split(&self) -> bool
pub const fn split(&self) -> bool
Split the DBLPWM signal to PWM_A and PWM_B. Raw bit values: false (0) = Disabled: DBLPWM is not split. PWM_A and PWM_B each have double pulses.; true (1) = Enabled: DBLPWM is split to PWM_A and PWM_B.
Sourcepub const fn set_split(&mut self, val: bool)
pub const fn set_split(&mut self, val: bool)
Split the DBLPWM signal to PWM_A and PWM_B. Raw bit values: false (0) = Disabled: DBLPWM is not split. PWM_A and PWM_B each have double pulses.; true (1) = Enabled: DBLPWM is split to PWM_A and PWM_B.
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 full(&self) -> bool
pub const fn full(&self) -> bool
Full Cycle Reload. Raw bit values: false (0) = Disabled: Full-cycle reloads disabled.; true (1) = Enabled: Full-cycle reloads enabled.
Sourcepub const fn set_full(&mut self, val: bool)
pub const fn set_full(&mut self, val: bool)
Full Cycle Reload. Raw bit values: false (0) = Disabled: Full-cycle reloads disabled.; true (1) = Enabled: Full-cycle reloads enabled.
Sourcepub const fn half(&self) -> bool
pub const fn half(&self) -> bool
Half Cycle Reload. Raw bit values: false (0) = Disabled: Half-cycle reloads disabled.; true (1) = Enabled: Half-cycle reloads enabled.
Sourcepub const fn set_half(&mut self, val: bool)
pub const fn set_half(&mut self, val: bool)
Half Cycle Reload. Raw bit values: false (0) = Disabled: Half-cycle reloads disabled.; true (1) = Enabled: Half-cycle reloads enabled.
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.