Struct stepper_driver::MotorDriver [] [src]

pub struct MotorDriver<D, DIR, STEP, CHIP> where
    D: DelayUs<u32>,
    DIR: OutputPin,
    STEP: OutputPin,
    CHIP: Params
{ /* fields omitted */ }

A stepper motor driver generic struct

Methods

impl<D, DIR, STEP, CHIP> MotorDriver<D, DIR, STEP, CHIP> where
    D: DelayUs<u32>,
    DIR: OutputPin,
    STEP: OutputPin,
    CHIP: Params
[src]

[src]

Sets the speed in revolutions per minute (1-200 is a reasonable range)

[src]

Moves the motor steps_to_move steps

[src]

Moves the motor smoothly steps_to_move steps. Increasing speed during the steps_acc and decreasing during steps_dec steps.

[src]

Set the direction

impl<D, DIR, STEP> MotorDriver<D, DIR, STEP, a4988> where
    D: DelayUs<u32>,
    DIR: OutputPin,
    STEP: OutputPin
[src]

[src]

Specialized constructor

impl<D, DIR, STEP> MotorDriver<D, DIR, STEP, drv8825> where
    D: DelayUs<u32>,
    DIR: OutputPin,
    STEP: OutputPin
[src]

[src]

Specialized constructor

impl<D, DIR, STEP> MotorDriver<D, DIR, STEP, drv8834> where
    D: DelayUs<u32>,
    DIR: OutputPin,
    STEP: OutputPin
[src]

[src]

Specialized constructor

impl<D, DIR, STEP> MotorDriver<D, DIR, STEP, drv8880> where
    D: DelayUs<u32>,
    DIR: OutputPin,
    STEP: OutputPin
[src]

[src]

Specialized constructor

Trait Implementations

impl<D: Debug, DIR: Debug, STEP: Debug, CHIP: Debug> Debug for MotorDriver<D, DIR, STEP, CHIP> where
    D: DelayUs<u32>,
    DIR: OutputPin,
    STEP: OutputPin,
    CHIP: Params
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<D, DIR, STEP, CHIP> Send for MotorDriver<D, DIR, STEP, CHIP> where
    CHIP: Send,
    D: Send,
    DIR: Send,
    STEP: Send

impl<D, DIR, STEP, CHIP> Sync for MotorDriver<D, DIR, STEP, CHIP> where
    CHIP: Sync,
    D: Sync,
    DIR: Sync,
    STEP: Sync