Trait stm32f1xx_hal::timer::SysTimerExt
source · pub trait SysTimerExt: Sized {
fn counter_hz(self, clocks: &Clocks) -> SysCounterHz;
fn counter<const FREQ: u32>(self, clocks: &Clocks) -> SysCounter<FREQ>;
fn delay(self, clocks: &Clocks) -> SysDelay;
fn counter_us(self, clocks: &Clocks) -> SysCounterUs { ... }
}
Required Methods§
sourcefn counter_hz(self, clocks: &Clocks) -> SysCounterHz
fn counter_hz(self, clocks: &Clocks) -> SysCounterHz
Creates timer which takes Hertz as Duration
sourcefn counter<const FREQ: u32>(self, clocks: &Clocks) -> SysCounter<FREQ>
fn counter<const FREQ: u32>(self, clocks: &Clocks) -> SysCounter<FREQ>
Creates timer with custom precision (core frequency recommended is known)
Provided Methods§
sourcefn counter_us(self, clocks: &Clocks) -> SysCounterUs
fn counter_us(self, clocks: &Clocks) -> SysCounterUs
Creates timer with precision of 1 μs (1 MHz sampling)