pub struct STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> { /* private fields */ }
Expand description
The STSPIN220 driver API
Users are not expected to use this API directly, except to create an
instance using STSPIN220::new
. Please check out
Stepper
instead.
Implementations
Trait Implementations
sourceimpl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4, OutputPinError> EnableDirectionControl<DirMode4> for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, ()> where
DirMode4: OutputPin<Error = OutputPinError>,
impl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4, OutputPinError> EnableDirectionControl<DirMode4> for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, ()> where
DirMode4: OutputPin<Error = OutputPinError>,
type WithDirectionControl = STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4>
type WithDirectionControl = STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4>
The type of the driver after direction control has been enabled
sourcefn enable_direction_control(
self,
dir_mode4: DirMode4
) -> <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, ()> as EnableDirectionControl<DirMode4>>::WithDirectionControl
fn enable_direction_control(
self,
dir_mode4: DirMode4
) -> <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, ()> as EnableDirectionControl<DirMode4>>::WithDirectionControl
Enable direction control
sourceimpl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4, OutputPinError> EnableStepControl<StepMode3> for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, (), DirMode4> where
StepMode3: OutputPin<Error = OutputPinError>,
impl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4, OutputPinError> EnableStepControl<StepMode3> for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, (), DirMode4> where
StepMode3: OutputPin<Error = OutputPinError>,
type WithStepControl = STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4>
type WithStepControl = STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4>
The type of the driver after step control has been enabled
sourcefn enable_step_control(
self,
step_mode3: StepMode3
) -> <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, (), DirMode4> as EnableStepControl<StepMode3>>::WithStepControl
fn enable_step_control(
self,
step_mode3: StepMode3
) -> <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, (), DirMode4> as EnableStepControl<StepMode3>>::WithStepControl
Enable step control
sourceimpl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4, OutputPinError> EnableStepModeControl<(StandbyReset, Mode1, Mode2)> for STSPIN220<EnableFault, (), (), (), StepMode3, DirMode4> where
StandbyReset: OutputPin<Error = OutputPinError>,
Mode1: OutputPin<Error = OutputPinError>,
Mode2: OutputPin<Error = OutputPinError>,
StepMode3: OutputPin<Error = OutputPinError>,
DirMode4: OutputPin<Error = OutputPinError>,
impl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4, OutputPinError> EnableStepModeControl<(StandbyReset, Mode1, Mode2)> for STSPIN220<EnableFault, (), (), (), StepMode3, DirMode4> where
StandbyReset: OutputPin<Error = OutputPinError>,
Mode1: OutputPin<Error = OutputPinError>,
Mode2: OutputPin<Error = OutputPinError>,
StepMode3: OutputPin<Error = OutputPinError>,
DirMode4: OutputPin<Error = OutputPinError>,
type WithStepModeControl = STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4>
type WithStepModeControl = STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4>
The type of the driver after microstepping mode control has been enabled
sourcefn enable_step_mode_control(
self,
(StandbyReset, Mode1, Mode2)
) -> <STSPIN220<EnableFault, (), (), (), StepMode3, DirMode4> as EnableStepModeControl<(StandbyReset, Mode1, Mode2)>>::WithStepModeControl
fn enable_step_mode_control(
self,
(StandbyReset, Mode1, Mode2)
) -> <STSPIN220<EnableFault, (), (), (), StepMode3, DirMode4> as EnableStepModeControl<(StandbyReset, Mode1, Mode2)>>::WithStepModeControl
Enable microstepping mode control
sourceimpl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4, OutputPinError> SetDirection for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> where
DirMode4: OutputPin<Error = OutputPinError>,
impl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4, OutputPinError> SetDirection for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> where
DirMode4: OutputPin<Error = OutputPinError>,
sourceconst SETUP_TIME: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(100)
const SETUP_TIME: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(100)
The time that the DIR signal must be held for a change to apply
type Dir = DirMode4
type Dir = DirMode4
The type of the DIR pin
type Error = Infallible
type Error = Infallible
The error that can occur while accessing the DIR pin
sourcefn dir(
&mut self
) -> Result<&mut <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> as SetDirection>::Dir, <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> as SetDirection>::Error>
fn dir(
&mut self
) -> Result<&mut <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> as SetDirection>::Dir, <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> as SetDirection>::Error>
Provides access to the DIR pin
sourceimpl<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>,
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>,
sourceconst SETUP_TIME: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(1000)
const SETUP_TIME: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(1000)
The time the mode signals need to be held before re-enabling the driver
sourceconst HOLD_TIME: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(100000)
const HOLD_TIME: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(100000)
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 = StepMode256
type StepMode = StepMode256
The type that defines the microstepping mode Read more
sourcefn apply_mode_config(
&mut self,
step_mode: <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> as SetStepMode>::StepMode
) -> Result<(), <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> as SetStepMode>::Error>
fn apply_mode_config(
&mut self,
step_mode: <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> as SetStepMode>::StepMode
) -> Result<(), <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> as SetStepMode>::Error>
Apply the new step mode configuration Read more
sourcefn enable_driver(
&mut self
) -> Result<(), <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> as SetStepMode>::Error>
fn enable_driver(
&mut self
) -> Result<(), <STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> as SetStepMode>::Error>
Re-enable the driver after the mode has been set
sourceimpl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4, OutputPinError> Step for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> where
StepMode3: OutputPin<Error = OutputPinError>,
impl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4, OutputPinError> Step for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> where
StepMode3: OutputPin<Error = OutputPinError>,
sourceconst PULSE_LENGTH: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(100)
const PULSE_LENGTH: Duration<u32, 1, 1000000000> = Nanoseconds::from_ticks(100)
The minimum length of a STEP pulse
type Step = StepMode3
type Step = StepMode3
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<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> RefUnwindSafe for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> where
DirMode4: RefUnwindSafe,
EnableFault: RefUnwindSafe,
Mode1: RefUnwindSafe,
Mode2: RefUnwindSafe,
StandbyReset: RefUnwindSafe,
StepMode3: RefUnwindSafe,
impl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> Send for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> where
DirMode4: Send,
EnableFault: Send,
Mode1: Send,
Mode2: Send,
StandbyReset: Send,
StepMode3: Send,
impl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> Sync for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> where
DirMode4: Sync,
EnableFault: Sync,
Mode1: Sync,
Mode2: Sync,
StandbyReset: Sync,
StepMode3: Sync,
impl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> Unpin for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> where
DirMode4: Unpin,
EnableFault: Unpin,
Mode1: Unpin,
Mode2: Unpin,
StandbyReset: Unpin,
StepMode3: Unpin,
impl<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> UnwindSafe for STSPIN220<EnableFault, StandbyReset, Mode1, Mode2, StepMode3, DirMode4> where
DirMode4: UnwindSafe,
EnableFault: UnwindSafe,
Mode1: UnwindSafe,
Mode2: UnwindSafe,
StandbyReset: UnwindSafe,
StepMode3: 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.