embedded_hal_async::delay

Trait DelayNs

Source
pub trait DelayNs {
    // Required method
    async fn delay_ns(&mut self, ns: u32);

    // Provided methods
    async fn delay_us(&mut self, us: u32) { ... }
    async fn delay_ms(&mut self, ms: u32) { ... }
}
Expand description

Delay with up to nanosecond precision.

Required Methods§

Source

async fn delay_ns(&mut self, ns: u32)

Pauses execution for at minimum ns nanoseconds. Pause can be longer if the implementation requires it due to precision/timing issues.

Provided Methods§

Source

async fn delay_us(&mut self, us: u32)

Pauses execution for at minimum us microseconds. Pause can be longer if the implementation requires it due to precision/timing issues.

Source

async fn delay_ms(&mut self, ms: u32)

Pauses execution for at minimum ms milliseconds. Pause can be longer if the implementation requires it due to precision/timing issues.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> DelayNs for &mut T
where T: DelayNs + ?Sized,

Source§

async fn delay_ns(&mut self, ns: u32)

Source§

async fn delay_us(&mut self, us: u32)

Source§

async fn delay_ms(&mut self, ms: u32)

Implementors§