Struct cd74hc4067::CD74HC4067[][src]

pub struct CD74HC4067<P, E, State> { /* fields omitted */ }

A structure representing the 4 input pins and pin_enable pin

Implementations

impl<P, E> CD74HC4067<P, E, DisabledState> where
    P: OutputPin,
    P: OutputPin,
    P: OutputPin,
    P: OutputPin,
    E: OutputPin
[src]

pub fn new(
    mut pin_0: P,
    mut pin_1: P,
    mut pin_2: P,
    mut pin_3: P,
    mut pin_enable: E
) -> Result<Self, Error<P, E>>
[src]

Create a new CD74HC4067 structure by passing in 5 GPIOs implementing the OutputPin trait for a, b, c, d Mux is initially disabled, and all select pins are set low, selecting channel 0.

pub fn release(self) -> (P, P, P, P, E)[src]

Release the 5 GPIOs previously occupied

pub fn enable(
    mut self: Self
) -> Result<CD74HC4067<P, E, EnabledState>, Error<P, E>>
[src]

Enable the mux display by pulling pin_enable low If Error::EnablePinError occurs, the struct is dropped.

pub fn set_output_active(&mut self, n: u8) -> Result<(), Error<P, E>>[src]

Enable output n. n must be between 0 and 15 inclusive. If a SelectPinError occurs, the select is left in a possibly unwanted state, but it is disabled here.

impl<P, E> CD74HC4067<P, E, EnabledState> where
    P: OutputPin,
    P: OutputPin,
    P: OutputPin,
    P: OutputPin,
    E: OutputPin
[src]

pub fn disable(
    mut self: Self
) -> Result<CD74HC4067<P, E, DisabledState>, Error<P, E>>
[src]

Disable the mux display by pulling pin_enable high

Auto Trait Implementations

impl<P, E, State> Send for CD74HC4067<P, E, State> where
    E: Send,
    P: Send,
    State: Send
[src]

impl<P, E, State> Sync for CD74HC4067<P, E, State> where
    E: Sync,
    P: Sync,
    State: Sync
[src]

impl<P, E, State> Unpin for CD74HC4067<P, E, State> where
    E: Unpin,
    P: Unpin,
    State: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.