Struct cd74hc4067::CD74HC4067 [−][src]
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]
P: OutputPin,
P: OutputPin,
P: OutputPin,
P: OutputPin,
E: OutputPin,
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]
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>>
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]
mut self: Self
) -> Result<CD74HC4067<P, E, EnabledState>, Error<P, E>>
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]
P: OutputPin,
P: OutputPin,
P: OutputPin,
P: OutputPin,
E: OutputPin,
pub fn disable(
mut self: Self
) -> Result<CD74HC4067<P, E, DisabledState>, Error<P, E>>
[src]
mut self: Self
) -> Result<CD74HC4067<P, E, DisabledState>, Error<P, E>>
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]
E: Send,
P: Send,
State: Send,
impl<P, E, State> Sync for CD74HC4067<P, E, State> where
E: Sync,
P: Sync,
State: Sync,
[src]
E: Sync,
P: Sync,
State: Sync,
impl<P, E, State> Unpin for CD74HC4067<P, E, State> where
E: Unpin,
P: Unpin,
State: Unpin,
[src]
E: Unpin,
P: Unpin,
State: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,