[][src]Struct avr_hal_generic::delay::Delay

pub struct Delay<SPEED> { /* fields omitted */ }

A busy-loop delay implementation


let mut delay = delay::Delay::<clock::MHz16>::new();

// Wait 1 second


The delay is not accurate for values above 4095µs because of a loop whose overhead is not accounted for. This will be fixed in a future version.


impl<SPEED> Delay<SPEED>[src]

pub fn new() -> Delay<SPEED>[src]

Trait Implementations

impl<SPEED: Clone> Clone for Delay<SPEED>[src]

impl<SPEED: Copy> Copy for Delay<SPEED>[src]

impl<SPEED: Debug> Debug for Delay<SPEED>[src]

impl<SPEED> DelayMs<u16> for Delay<SPEED> where
    Delay<SPEED>: DelayUs<u32>, 

impl<SPEED> DelayMs<u8> for Delay<SPEED> where
    Delay<SPEED>: DelayMs<u16>, 

impl DelayUs<u16> for Delay<MHz24>[src]

impl DelayUs<u16> for Delay<MHz20>[src]

impl DelayUs<u16> for Delay<MHz16>[src]

impl DelayUs<u16> for Delay<MHz12>[src]

impl DelayUs<u16> for Delay<MHz8>[src]

impl DelayUs<u16> for Delay<MHz1>[src]

impl<SPEED> DelayUs<u32> for Delay<SPEED> where
    Delay<SPEED>: DelayUs<u16>, 

impl<SPEED> DelayUs<u8> for Delay<SPEED> where
    Delay<SPEED>: DelayUs<u16>, 

Auto Trait Implementations

impl<SPEED> Send for Delay<SPEED> where
    SPEED: Send

impl<SPEED> Sync for Delay<SPEED> where
    SPEED: Sync

impl<SPEED> Unpin for Delay<SPEED> where
    SPEED: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.