pub struct SystemTimer { /* private fields */ }Implementations§
Source§impl SystemTimer
impl SystemTimer
Sourcepub fn syst_external(syst: SYST, mcu: &Mcu) -> Self
pub fn syst_external(syst: SYST, mcu: &Mcu) -> Self
Initialize SysTick timer and set it frequency to HCLK / 8
pub fn release(self) -> SYST
pub fn waiter_us<I: Interval>( &self, timeout: MicrosDurationU32, interval: I, ) -> TickWaiter<SysTickInstant, I, u32>
Sourcepub fn waiter_ns<I: Interval>(
&self,
timeout: NanosDurationU64,
interval: I,
) -> TickWaiter<SysTickInstant, I, u64>
pub fn waiter_ns<I: Interval>( &self, timeout: NanosDurationU64, interval: I, ) -> TickWaiter<SysTickInstant, I, u64>
It can wait longer with a nanosecond timeout.
Source§impl SystemTimer
impl SystemTimer
Sourcepub fn counter_hz(self) -> SysCounterHz
pub fn counter_hz(self) -> SysCounterHz
Creates SysCounterHz which takes Hertz as Duration
Sourcepub fn counter<const FREQ: u32>(self) -> SysCounter<FREQ>
pub fn counter<const FREQ: u32>(self) -> SysCounter<FREQ>
Creates SysCounter with custom precision (core frequency recommended is known)
Sourcepub fn counter_us(self) -> SysCounterUs
pub fn counter_us(self) -> SysCounterUs
Creates SysCounter 1 microsecond precision
Auto Trait Implementations§
impl Freeze for SystemTimer
impl RefUnwindSafe for SystemTimer
impl Send for SystemTimer
impl !Sync for SystemTimer
impl Unpin for SystemTimer
impl UnwindSafe for SystemTimer
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