Trait SetDirection

Source
pub trait SetDirection {
    type Dir: OutputPin;
    type Error;

    const SETUP_TIME: Duration<u32, 1, 1000000000>;

    // Required method
    fn dir(&mut self) -> Result<&mut Self::Dir, Self::Error>;
}
Expand description

Implemented by drivers that support controlling the DIR signal

Required Associated Constants§

Source

const SETUP_TIME: Duration<u32, 1, 1000000000>

The time that the DIR signal must be held for a change to apply

Required Associated Types§

Source

type Dir: OutputPin

The type of the DIR pin

Source

type Error

The error that can occur while accessing the DIR pin

Required Methods§

Source

fn dir(&mut self) -> Result<&mut Self::Dir, Self::Error>

Provides access to the DIR pin

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.

Implementors§

Source§

impl<'r, T> SetDirection for RefMut<'r, T>
where T: SetDirection,

Source§

const SETUP_TIME: Duration<u32, 1, 1000000000> = T::SETUP_TIME

Source§

type Dir = <T as SetDirection>::Dir

Source§

type Error = <T as SetDirection>::Error

Source§

impl<Driver, Timer, Profile, Convert, const TIMER_HZ: u32> SetDirection for SoftwareMotionControl<Driver, Timer, Profile, Convert, TIMER_HZ>
where Driver: SetDirection, Profile: MotionProfile,

Source§

const SETUP_TIME: Duration<u32, 1, 1000000000> = Driver::SETUP_TIME

Source§

type Dir = <Driver as SetDirection>::Dir

Source§

type Error = BusyError<<Driver as SetDirection>::Error>

Source§

impl<Reset, Mode0, Mode1, Mode2, Step, Dir, OutputPinError> SetDirection for DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir>
where Dir: OutputPin<Error = OutputPinError>,

Source§

const SETUP_TIME: Duration<u32, 1, 1000000000>

Source§

type Dir = Dir

Source§

type Error = Infallible