Struct uln2003::ULN2003

source ·
pub struct ULN2003<P1: OutputPin, P2: OutputPin, P3: OutputPin, P4: OutputPin> { /* private fields */ }
Expand description

Struct representing a Stepper motor with the 4 driver pins

Implementations§

source§

impl<P1: OutputPin, P2: OutputPin, P3: OutputPin, P4: OutputPin> ULN2003<P1, P2, P3, P4>

source

pub fn new(in1: P1, in2: P2, in3: P3, in4: P4) -> Self

Create a new StepperMotor from the 4 pins connected to te uln2003 driver

Trait Implementations§

source§

impl<P1: OutputPin, P2: OutputPin, P3: OutputPin, P4: OutputPin> StepperMotor for ULN2003<P1, P2, P3, P4>

source§

fn step(&mut self) -> Result<(), StepError>

Do a single step
source§

fn set_direction(&mut self, dir: Direction)

Set the stepping direction

Auto Trait Implementations§

§

impl<P1, P2, P3, P4> RefUnwindSafe for ULN2003<P1, P2, P3, P4>where P1: RefUnwindSafe, P2: RefUnwindSafe, P3: RefUnwindSafe, P4: RefUnwindSafe,

§

impl<P1, P2, P3, P4> Send for ULN2003<P1, P2, P3, P4>where P1: Send, P2: Send, P3: Send, P4: Send,

§

impl<P1, P2, P3, P4> Sync for ULN2003<P1, P2, P3, P4>where P1: Sync, P2: Sync, P3: Sync, P4: Sync,

§

impl<P1, P2, P3, P4> Unpin for ULN2003<P1, P2, P3, P4>where P1: Unpin, P2: Unpin, P3: Unpin, P4: Unpin,

§

impl<P1, P2, P3, P4> UnwindSafe for ULN2003<P1, P2, P3, P4>where P1: UnwindSafe, P2: UnwindSafe, P3: UnwindSafe, P4: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.