pub trait TimerExt: Sized {
    fn counter<const FREQ: u32>(self, clocks: &Clocks) -> Counter<Self, FREQ>;
    fn counter_hz(self, clocks: &Clocks) -> CounterHz<Self>;
    fn delay<const FREQ: u32>(self, clocks: &Clocks) -> Delay<Self, FREQ>;

    fn counter_ms(self, clocks: &Clocks) -> CounterMs<Self> { ... }
    fn counter_us(self, clocks: &Clocks) -> CounterUs<Self> { ... }
    fn delay_ms(self, clocks: &Clocks) -> DelayMs<Self> { ... }
    fn delay_us(self, clocks: &Clocks) -> DelayUs<Self> { ... }
}

Required Methods

Non-blocking Counter with custom fixed precision

Non-blocking Counter with dynamic precision which uses Hertz as Duration units

Blocking Delay with custom fixed precision

Provided Methods

Non-blocking Counter with fixed precision of 1 ms (1 kHz sampling)

Can wait from 2 ms to 65 sec for 16-bit timer and from 2 ms to 49 days for 32-bit timer.

NOTE: don’t use this if your system frequency more than 65 MHz

Non-blocking Counter with fixed precision of 1 μs (1 MHz sampling)

Can wait from 2 μs to 65 ms for 16-bit timer and from 2 μs to 71 min for 32-bit timer.

Blocking Delay with fixed precision of 1 ms (1 kHz sampling)

Can wait from 2 ms to 49 days.

NOTE: don’t use this if your system frequency more than 65 MHz

Blocking Delay with fixed precision of 1 μs (1 MHz sampling)

Can wait from 2 μs to 71 min.

Implementors