Trait drv8825::motion_control::DelayToTicks[][src]

pub trait DelayToTicks<Delay> {
    type Ticks;
    type Error;
    pub fn delay_to_ticks(
        &self,
        delay: Delay
    ) -> Result<Self::Ticks, Self::Error>; }

Converts delay values from RampMaker into timer ticks

RampMaker is agnostic over the units used, and the unit of the timer ticks depend on the target platform. This trait allows Stepper to convert between both types. The user must supply an implementation that matches their environment.

The Delay parameter specifies the type of delay value used by RampMaker.

Associated Types

type Ticks[src]

The timer ticks the delay is being converted into

type Error[src]

The error that can happen during conversion

Loading content...

Required methods

pub fn delay_to_ticks(&self, delay: Delay) -> Result<Self::Ticks, Self::Error>[src]

Convert delay value into timer ticks

Loading content...

Implementors

Loading content...