[][src]Trait drone_cortex_m::drv::timer::Timer

pub trait Timer: Send {
    type Stop: TimerStop;
    fn sleep(&mut self, duration: u32) -> TimerSleep<Self::Stop>;
fn interval(
        &mut self,
        duration: u32
    ) -> TimerInterval<Self::Stop, Result<NonZeroUsize, TimerOverflow>>;
fn interval_skip(
        &mut self,
        duration: u32
    ) -> TimerInterval<Self::Stop, NonZeroUsize>; }

Generic timer driver.

Associated Types

type Stop: TimerStop

Timer stop handler.

Loading content...

Required methods

Important traits for TimerSleep<'a, T>
fn sleep(&mut self, duration: u32) -> TimerSleep<Self::Stop>

Returns a future that resolves when duration time is elapsed.

fn interval(
    &mut self,
    duration: u32
) -> TimerInterval<Self::Stop, Result<NonZeroUsize, TimerOverflow>>

Returns a stream of pulses that are generated on each duration interval. Fails on overflow.

fn interval_skip(
    &mut self,
    duration: u32
) -> TimerInterval<Self::Stop, NonZeroUsize>

Returns a stream of pulses that are generated on each duration interval. Overflows are ignored.

Loading content...

Implementors

impl<I: IntSysTick> Timer for SysTick<I>[src]

type Stop = Self

Loading content...