Trait drv8825::traits::SetStepMode[][src]

pub trait SetStepMode {
    type Error;
    type StepMode: StepMode;

    pub const SETUP_TIME: Nanoseconds<u32>;
    pub const HOLD_TIME: Nanoseconds<u32>;

    pub fn apply_mode_config(
        &mut self,
        step_mode: Self::StepMode
    ) -> Result<(), Self::Error>;
pub fn enable_driver(&mut self) -> Result<(), Self::Error>; }

Implemented by drivers that support controlling the microstepping mode

Associated Types

type Error[src]

The error that can occur while using this trait

type StepMode: StepMode[src]

The type that defines the microstepping mode

This crate includes a number of enums that can be used for this purpose.

Loading content...

Associated Constants

pub const SETUP_TIME: Nanoseconds<u32>[src]

The time the mode signals need to be held before re-enabling the driver

pub const HOLD_TIME: Nanoseconds<u32>[src]

The time the mode signals need to be held after re-enabling the driver

Loading content...

Required methods

pub fn apply_mode_config(
    &mut self,
    step_mode: Self::StepMode
) -> Result<(), Self::Error>
[src]

Apply the new step mode configuration

Typically this puts the driver into reset and sets the mode pins according to the new step mode.

pub fn enable_driver(&mut self) -> Result<(), Self::Error>[src]

Re-enable the driver after the mode has been set

Loading content...

Implementors

impl<'r, T> SetStepMode for RefMut<'r, T> where
    T: SetStepMode
[src]

type Error = <T as SetStepMode>::Error

type StepMode = <T as SetStepMode>::StepMode

impl<Driver, Timer, Profile, Convert> SetStepMode for SoftwareMotionControl<Driver, Timer, Profile, Convert> where
    Driver: SetStepMode,
    Profile: MotionProfile
[src]

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

type StepMode = <Driver as SetStepMode>::StepMode

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

type Error = OutputPinError

type StepMode = StepMode32

Loading content...