[][src]Trait step_dir::traits::SetStepMode

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

    const SETUP_TIME: Nanoseconds;
    const HOLD_TIME: Nanoseconds;

    fn apply_mode_config(
        &mut self,
        step_mode: Self::StepMode
    ) -> Result<(), Self::Error>;
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

const SETUP_TIME: Nanoseconds[src]

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

const HOLD_TIME: Nanoseconds[src]

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

Loading content...

Required methods

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.

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

Re-enable the driver after the mode has been set

Loading content...

Implementors

impl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4, OutputPinError> SetStepMode for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> where
    StandbyReset: OutputPin<Error = OutputPinError>,
    Mode1: OutputPin<Error = OutputPinError>,
    Mode2: OutputPin<Error = OutputPinError>,
    StepMode3: OutputPin<Error = OutputPinError>,
    DirMode4: OutputPin<Error = OutputPinError>, 
[src]

type Error = OutputPinError

type StepMode = StepMode256

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...