pub struct TimerConfig(/* private fields */);Expand description
A struct for formatting the timer config used by the FM chip.
Implementations§
Source§impl TimerConfig
impl TimerConfig
Sourcepub fn new() -> TimerConfig
pub fn new() -> TimerConfig
Create a new timer config with CH3 in normal mode and both timers disabled.
Sourcepub fn ch3_special_mode(self, v: bool) -> TimerConfig
pub fn ch3_special_mode(self, v: bool) -> TimerConfig
Configure channel 3 ‘special mode’.
Sourcepub fn enable_timer_a(self, e: bool, r: bool) -> TimerConfig
pub fn enable_timer_a(self, e: bool, r: bool) -> TimerConfig
Enable or disable timer A.
If e is set, the timer is enabled and will count.
If r is set, the timer will set the completed flag when it wraps.
Sourcepub fn enable_timer_b(self, e: bool, r: bool) -> TimerConfig
pub fn enable_timer_b(self, e: bool, r: bool) -> TimerConfig
Enable or disable timer B.
If e is set, the timer is enabled and will count.
If r is set, the timer will set the completed flag when it wraps.
Sourcepub fn reset_timer_a(self, v: bool) -> TimerConfig
pub fn reset_timer_a(self, v: bool) -> TimerConfig
Reset timer A.
Sourcepub fn reset_timer_b(self, v: bool) -> TimerConfig
pub fn reset_timer_b(self, v: bool) -> TimerConfig
Reset timer B.
Trait Implementations§
Source§impl Clone for TimerConfig
impl Clone for TimerConfig
impl Copy for TimerConfig
Auto Trait Implementations§
impl Freeze for TimerConfig
impl RefUnwindSafe for TimerConfig
impl Send for TimerConfig
impl Sync for TimerConfig
impl Unpin for TimerConfig
impl UnsafeUnpin for TimerConfig
impl UnwindSafe for TimerConfig
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