Skip to main content

SysTimerExt

Trait SysTimerExt 

Source
pub trait SysTimerExt: Sized {
    // Required methods
    fn counter_hz(self, clocks: &Clocks) -> SysCounterHz;
    fn counter<const FREQ: u32>(self, clocks: &Clocks) -> SysCounter<FREQ>;
    fn delay(self, clocks: &Clocks) -> SysDelay;

    // Provided method
    fn counter_us(self, clocks: &Clocks) -> SysCounterUs { ... }
}

Required Methods§

Source

fn counter_hz(self, clocks: &Clocks) -> SysCounterHz

Creates timer which takes Hertz as Duration

Source

fn counter<const FREQ: u32>(self, clocks: &Clocks) -> SysCounter<FREQ>

Creates timer with custom precision (core frequency recommended is known)

Source

fn delay(self, clocks: &Clocks) -> SysDelay

Blocking Delay with custom precision

Provided Methods§

Source

fn counter_us(self, clocks: &Clocks) -> 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".

Implementations on Foreign Types§

Source§

impl SysTimerExt for SYST

Source§

fn counter_hz(self, clocks: &Clocks) -> SysCounterHz

Source§

fn counter<const FREQ: u32>(self, clocks: &Clocks) -> SysCounter<FREQ>

Source§

fn delay(self, clocks: &Clocks) -> SysDelay

Implementors§