pub struct McycleDelay { /* private fields */ }
Expand description
Machine mode cycle counter (mcycle
) as a delay provider
Implementations§
Source§impl McycleDelay
impl McycleDelay
Sourcepub const fn new(ticks_second: u32) -> McycleDelay
pub const fn new(ticks_second: u32) -> McycleDelay
Constructs the delay provider.
ticks_second
should be the clock speed of the core, in Hertz
Trait Implementations§
Source§impl Clone for McycleDelay
impl Clone for McycleDelay
Source§fn clone(&self) -> McycleDelay
fn clone(&self) -> McycleDelay
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl DelayNs for McycleDelay
impl DelayNs for McycleDelay
Source§fn delay_ns(&mut self, ns: u32)
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 McycleDelay
Auto Trait Implementations§
impl Freeze for McycleDelay
impl RefUnwindSafe for McycleDelay
impl Send for McycleDelay
impl Sync for McycleDelay
impl Unpin for McycleDelay
impl UnwindSafe for McycleDelay
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