pub trait SysTimerInit: Sized {
// Required methods
fn counter_hz(self, mcu: &Mcu) -> SysCounterHz;
fn counter<const FREQ: u32>(self, mcu: &Mcu) -> SysCounter<FREQ>;
fn store_tick_frequency(&mut self, mcu: &Mcu);
// Provided method
fn counter_us(self, mcu: &Mcu) -> SysCounterUs { ... }
}Required Methods§
Sourcefn counter_hz(self, mcu: &Mcu) -> SysCounterHz
fn counter_hz(self, mcu: &Mcu) -> SysCounterHz
Creates timer which takes HertzU32 as Duration
Sourcefn counter<const FREQ: u32>(self, mcu: &Mcu) -> SysCounter<FREQ>
fn counter<const FREQ: u32>(self, mcu: &Mcu) -> SysCounter<FREQ>
Creates timer with custom precision (core frequency recommended is known)
Sourcefn store_tick_frequency(&mut self, mcu: &Mcu)
fn store_tick_frequency(&mut self, mcu: &Mcu)
It’s important for TickInstant
Provided Methods§
Sourcefn counter_us(self, mcu: &Mcu) -> SysCounterUs
fn counter_us(self, mcu: &Mcu) -> SysCounterUs
Creates timer with precision of 1 μs (1 MHz sampling)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.