pub struct McycleDelay { /* private fields */ }
Expand description

Use RISCV machine-mode cycle counter (mcycle) as a delay provider.

This can be used for high resolution delays for device initialization, bit-banging protocols, etc

Implementations

Constructs the delay provider based on core clock frequency freq

Retrieves the cycle count for the current HART

Returns the number of elapsed cycles since previous_cycle_count

Performs a busy-wait loop until the number of cycles cycle_count has elapsed

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Performs a busy-wait loop until the number of milliseconds ms has elapsed

Enumeration of DelayMs errors

Performs a busy-wait loop until the number of microseconds us has elapsed

Enumeration of DelayMs errors

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.