pub struct TimerCtrl(/* private fields */);Expand description
Timer control (TAC).
| Bit | Field | Access | Meaning |
|---|---|---|---|
| 7-3 | — | Unused. | |
| 2 | enable | R/W | Run the timer (TIMA increments). |
| 1-0 | clock | R/W | Input clock that drives TIMA. |
Implementations§
Source§impl TimerCtrl
impl TimerCtrl
Sourcepub const fn clock(&self) -> TimerClock
pub const fn clock(&self) -> TimerClock
Input clock that drives TIMA.
Bits: 0..2
Sourcepub const fn with_clock_checked(self, value: TimerClock) -> Result<Self, ()>
pub const fn with_clock_checked(self, value: TimerClock) -> Result<Self, ()>
Input clock that drives TIMA.
Bits: 0..2
Sourcepub const fn with_clock(self, value: TimerClock) -> Self
pub const fn with_clock(self, value: TimerClock) -> Self
Input clock that drives TIMA.
Bits: 0..2
Sourcepub const fn set_clock(&mut self, value: TimerClock)
pub const fn set_clock(&mut self, value: TimerClock)
Input clock that drives TIMA.
Bits: 0..2
Sourcepub const fn set_clock_checked(&mut self, value: TimerClock) -> Result<(), ()>
pub const fn set_clock_checked(&mut self, value: TimerClock) -> Result<(), ()>
Input clock that drives TIMA.
Bits: 0..2
Sourcepub const fn with_enable_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_enable_checked(self, value: bool) -> Result<Self, ()>
Run the timer (TIMA increments).
Bits: 2..3
Sourcepub const fn with_enable(self, value: bool) -> Self
pub const fn with_enable(self, value: bool) -> Self
Run the timer (TIMA increments).
Bits: 2..3
Sourcepub const fn set_enable(&mut self, value: bool)
pub const fn set_enable(&mut self, value: bool)
Run the timer (TIMA increments).
Bits: 2..3
Trait Implementations§
impl Copy for TimerCtrl
impl Eq for TimerCtrl
impl StructuralPartialEq for TimerCtrl
Auto Trait Implementations§
impl BankSafe for TimerCtrl
impl Freeze for TimerCtrl
impl RefUnwindSafe for TimerCtrl
impl Send for TimerCtrl
impl Sync for TimerCtrl
impl Unpin for TimerCtrl
impl UnsafeUnpin for TimerCtrl
impl UnwindSafe for TimerCtrl
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