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

pub trait Timer: Send {
    type Stop: TimerStop;
    fn sleep(&mut self, duration: u32) -> TimerSleep<'_, Self::Stop>

Notable traits for TimerSleep<'a, T>

impl<'a, T: TimerStop> Future for TimerSleep<'a, T> type Output = ();
;
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[src]

Timer stop handler.

Loading content...

Required methods

fn sleep(&mut self, duration: u32) -> TimerSleep<'_, Self::Stop>

Notable traits for TimerSleep<'a, T>

impl<'a, T: TimerStop> Future for TimerSleep<'a, T> type Output = ();
[src]

Returns a future that resolves when duration time is elapsed.

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

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>
[src]

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

Loading content...

Implementors

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

type Stop = Self

Loading content...