pub struct DRV8825<Enable, Fault, Sleep, Reset, Mode0, Mode1, Mode2, Step, Dir> { /* private fields */ }
Expand description
The DRV8825 driver API
Users are not expected to use this API directly, except to create an
instance using DRV8825::new
. Please check out
Stepper
instead.
Implementations
Trait Implementations
sourceimpl<Reset, Mode0, Mode1, Mode2, Step, Dir, OutputPinError> EnableDirectionControl<Dir> for DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, ()> where
Dir: OutputPin<Error = OutputPinError>,
impl<Reset, Mode0, Mode1, Mode2, Step, Dir, OutputPinError> EnableDirectionControl<Dir> for DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, ()> where
Dir: OutputPin<Error = OutputPinError>,
type WithDirectionControl = DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir>
type WithDirectionControl = DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir>
The type of the driver after direction control has been enabled
sourcefn enable_direction_control(
self,
dir: Dir
) -> <DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, ()> as EnableDirectionControl<Dir>>::WithDirectionControl
fn enable_direction_control(
self,
dir: Dir
) -> <DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, ()> as EnableDirectionControl<Dir>>::WithDirectionControl
Enable direction control
sourceimpl<Reset, Mode0, Mode1, Mode2, Step, Dir, OutputPinError> EnableStepControl<Step> for DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, (), Dir> where
Step: OutputPin<Error = OutputPinError>,
impl<Reset, Mode0, Mode1, Mode2, Step, Dir, OutputPinError> EnableStepControl<Step> for DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, (), Dir> where
Step: OutputPin<Error = OutputPinError>,
type WithStepControl = DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir>
type WithStepControl = DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir>
The type of the driver after step control has been enabled
sourcefn enable_step_control(
self,
step: Step
) -> <DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, (), Dir> as EnableStepControl<Step>>::WithStepControl
fn enable_step_control(
self,
step: Step
) -> <DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, (), Dir> as EnableStepControl<Step>>::WithStepControl
Enable step control
sourceimpl<Reset, Mode0, Mode1, Mode2, Step, Dir, OutputPinError> EnableStepModeControl<(Reset, Mode0, Mode1, Mode2)> for DRV8825<(), (), (), (), (), (), (), Step, Dir> where
Reset: OutputPin<Error = OutputPinError>,
Mode0: OutputPin<Error = OutputPinError>,
Mode1: OutputPin<Error = OutputPinError>,
Mode2: OutputPin<Error = OutputPinError>,
impl<Reset, Mode0, Mode1, Mode2, Step, Dir, OutputPinError> EnableStepModeControl<(Reset, Mode0, Mode1, Mode2)> for DRV8825<(), (), (), (), (), (), (), Step, Dir> where
Reset: OutputPin<Error = OutputPinError>,
Mode0: OutputPin<Error = OutputPinError>,
Mode1: OutputPin<Error = OutputPinError>,
Mode2: OutputPin<Error = OutputPinError>,
type WithStepModeControl = DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir>
type WithStepModeControl = DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir>
The type of the driver after microstepping mode control has been enabled
sourcefn enable_step_mode_control(
self,
(Reset, Mode0, Mode1, Mode2)
) -> <DRV8825<(), (), (), (), (), (), (), Step, Dir> as EnableStepModeControl<(Reset, Mode0, Mode1, Mode2)>>::WithStepModeControl
fn enable_step_mode_control(
self,
(Reset, Mode0, Mode1, Mode2)
) -> <DRV8825<(), (), (), (), (), (), (), Step, Dir> as EnableStepModeControl<(Reset, Mode0, Mode1, Mode2)>>::WithStepModeControl
Enable microstepping mode control
sourceimpl<Reset, Mode0, Mode1, Mode2, Step, Dir, OutputPinError> SetDirection for DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir> where
Dir: OutputPin<Error = OutputPinError>,
impl<Reset, Mode0, Mode1, Mode2, Step, Dir, OutputPinError> SetDirection for DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir> where
Dir: OutputPin<Error = OutputPinError>,
sourceconst SETUP_TIME: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(650)
const SETUP_TIME: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(650)
The time that the DIR signal must be held for a change to apply
type Dir = Dir
type Dir = Dir
The type of the DIR pin
type Error = Infallible
type Error = Infallible
The error that can occur while accessing the DIR pin
sourceimpl<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>,
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>,
sourceconst SETUP_TIME: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(650)
const SETUP_TIME: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(650)
The time the mode signals need to be held before re-enabling the driver
sourceconst HOLD_TIME: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(650)
const HOLD_TIME: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(650)
The time the mode signals need to be held after re-enabling the driver
type Error = OutputPinError
type Error = OutputPinError
The error that can occur while using this trait
type StepMode = StepMode32
type StepMode = StepMode32
The type that defines the microstepping mode Read more
sourcefn apply_mode_config(
&mut self,
step_mode: <DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir> as SetStepMode>::StepMode
) -> Result<(), <DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir> as SetStepMode>::Error>
fn apply_mode_config(
&mut self,
step_mode: <DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir> as SetStepMode>::StepMode
) -> Result<(), <DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir> as SetStepMode>::Error>
Apply the new step mode configuration Read more
sourcefn enable_driver(
&mut self
) -> Result<(), <DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir> as SetStepMode>::Error>
fn enable_driver(
&mut self
) -> Result<(), <DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir> as SetStepMode>::Error>
Re-enable the driver after the mode has been set
sourceimpl<Reset, Mode0, Mode1, Mode2, Step, Dir, OutputPinError> Step for DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir> where
Step: OutputPin<Error = OutputPinError>,
impl<Reset, Mode0, Mode1, Mode2, Step, Dir, OutputPinError> Step for DRV8825<(), (), (), Reset, Mode0, Mode1, Mode2, Step, Dir> where
Step: OutputPin<Error = OutputPinError>,
sourceconst PULSE_LENGTH: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(1900)
const PULSE_LENGTH: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(1900)
The minimum length of a STEP pulse
type Step = Step
type Step = Step
The type of the STEP pin
type Error = Infallible
type Error = Infallible
The error that can occur while accessing the STEP pin
Auto Trait Implementations
impl<Enable, Fault, Sleep, Reset, Mode0, Mode1, Mode2, Step, Dir> RefUnwindSafe for DRV8825<Enable, Fault, Sleep, Reset, Mode0, Mode1, Mode2, Step, Dir> where
Dir: RefUnwindSafe,
Enable: RefUnwindSafe,
Fault: RefUnwindSafe,
Mode0: RefUnwindSafe,
Mode1: RefUnwindSafe,
Mode2: RefUnwindSafe,
Reset: RefUnwindSafe,
Sleep: RefUnwindSafe,
Step: RefUnwindSafe,
impl<Enable, Fault, Sleep, Reset, Mode0, Mode1, Mode2, Step, Dir> Send for DRV8825<Enable, Fault, Sleep, Reset, Mode0, Mode1, Mode2, Step, Dir> where
Dir: Send,
Enable: Send,
Fault: Send,
Mode0: Send,
Mode1: Send,
Mode2: Send,
Reset: Send,
Sleep: Send,
Step: Send,
impl<Enable, Fault, Sleep, Reset, Mode0, Mode1, Mode2, Step, Dir> Sync for DRV8825<Enable, Fault, Sleep, Reset, Mode0, Mode1, Mode2, Step, Dir> where
Dir: Sync,
Enable: Sync,
Fault: Sync,
Mode0: Sync,
Mode1: Sync,
Mode2: Sync,
Reset: Sync,
Sleep: Sync,
Step: Sync,
impl<Enable, Fault, Sleep, Reset, Mode0, Mode1, Mode2, Step, Dir> Unpin for DRV8825<Enable, Fault, Sleep, Reset, Mode0, Mode1, Mode2, Step, Dir> where
Dir: Unpin,
Enable: Unpin,
Fault: Unpin,
Mode0: Unpin,
Mode1: Unpin,
Mode2: Unpin,
Reset: Unpin,
Sleep: Unpin,
Step: Unpin,
impl<Enable, Fault, Sleep, Reset, Mode0, Mode1, Mode2, Step, Dir> UnwindSafe for DRV8825<Enable, Fault, Sleep, Reset, Mode0, Mode1, Mode2, Step, Dir> where
Dir: UnwindSafe,
Enable: UnwindSafe,
Fault: UnwindSafe,
Mode0: UnwindSafe,
Mode1: UnwindSafe,
Mode2: UnwindSafe,
Reset: UnwindSafe,
Sleep: UnwindSafe,
Step: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
sourceimpl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
sourcefn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
sourceimpl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
sourcefn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.