pub struct Delay;
Available on crate feature
embedded-hal-async
and riot_module_ztimer_usec
and riot_module_ztimer
only.Expand description
Struct that provides the embedded_hal_async::delay::DelayNs trait
Unlike the Clock structs that can be instantiated for any ZTimer clock, this is clock independent, because the embedded HAL trait offers delay methods that are provided through different global clocks.
§Caveats
RIOT does not provide a general nanosecond clock; nanosecond sleeps are implemented at the microsecond clock, and will pause longer as the trait demands.
Trait Implementations§
Source§impl DelayNs for Delay
Available on riot_module_ztimer_msec
only.
impl DelayNs for Delay
Available on
riot_module_ztimer_msec
only.Source§async fn delay_ns(&mut self, ns: u32)
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.impl Copy for Delay
Auto Trait Implementations§
impl Freeze for Delay
impl RefUnwindSafe for Delay
impl Send for Delay
impl Sync for Delay
impl Unpin for Delay
impl UnwindSafe for Delay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoSwitch for T
impl<T> IntoSwitch for T
Source§fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
Source§fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 0 bytes