Struct ShiftRegister40

Source
pub struct ShiftRegister40<Pin1, Pin2, Pin3>
where Pin1: OutputPin, Pin2: OutputPin, Pin3: OutputPin,
{ /* private fields */ }
Expand description

Serial-in parallel-out shift register

Implementations§

Source§

impl<Pin1, Pin2, Pin3> ShiftRegister40<Pin1, Pin2, Pin3>
where Pin1: OutputPin, Pin2: OutputPin, Pin3: OutputPin,

Source

pub fn new(clock: Pin1, latch: Pin2, data: Pin3) -> Self

Creates a new SIPO shift register from clock, latch, and data output pins

Source

pub fn decompose(&self) -> [ShiftRegisterPin<'_>; 40]

Get embedded-hal output pins to control the shift register outputs

Source

pub fn release(self) -> (Pin1, Pin2, Pin3)

Consume the shift register and return the original clock, latch, and data output pins

Auto Trait Implementations§

§

impl<Pin1, Pin2, Pin3> !Freeze for ShiftRegister40<Pin1, Pin2, Pin3>

§

impl<Pin1, Pin2, Pin3> !RefUnwindSafe for ShiftRegister40<Pin1, Pin2, Pin3>

§

impl<Pin1, Pin2, Pin3> Send for ShiftRegister40<Pin1, Pin2, Pin3>
where Pin1: Send, Pin2: Send, Pin3: Send,

§

impl<Pin1, Pin2, Pin3> !Sync for ShiftRegister40<Pin1, Pin2, Pin3>

§

impl<Pin1, Pin2, Pin3> Unpin for ShiftRegister40<Pin1, Pin2, Pin3>
where Pin1: Unpin, Pin2: Unpin, Pin3: Unpin,

§

impl<Pin1, Pin2, Pin3> UnwindSafe for ShiftRegister40<Pin1, Pin2, Pin3>
where Pin1: UnwindSafe, Pin2: UnwindSafe, Pin3: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.