Struct pcf857x::Pcf8575 [−][src]
pub struct Pcf8575<I2C> { /* fields omitted */ }
Expand description
PCF8575 device driver
Implementations
impl<I2C, E> Pcf8575<I2C> where
I2C: Write<Error = E>,
[src]
impl<I2C, E> Pcf8575<I2C> where
I2C: Write<Error = E>,
[src]impl<I2C, E> Pcf8575<I2C> where
I2C: Read<Error = E> + Write<Error = E>,
[src]
impl<I2C, E> Pcf8575<I2C> where
I2C: Read<Error = E> + Write<Error = E>,
[src]pub fn get(&mut self, mask: PinFlag) -> Result<u16, Error<E>>
[src]
pub fn get(&mut self, mask: PinFlag) -> Result<u16, Error<E>>
[src]Get the status of the selected I/O pins.
The mask of the pins to be read can be created with a combination of
PinFlag::P0
to PinFlag::P17
.
pub fn read_array(
&mut self,
mask: PinFlag,
data: &mut [u8]
) -> Result<(), Error<E>>
[src]
pub fn read_array(
&mut self,
mask: PinFlag,
data: &mut [u8]
) -> Result<(), Error<E>>
[src]Get the status of the selected I/O pins repeatedly and put them in the
provided array.
The mask of the pins to be read can be created with a combination of
PinFlag::P0
to PinFlag::P17
.
The even elements correspond to the status of P0-P7 and the odd ones P10-P17.
The number of elements in the data must be even.
Trait Implementations
Auto Trait Implementations
impl<I2C> !RefUnwindSafe for Pcf8575<I2C>
impl<I2C> Send for Pcf8575<I2C> where
I2C: Send,
I2C: Send,
impl<I2C> !Sync for Pcf8575<I2C>
impl<I2C> Unpin for Pcf8575<I2C> where
I2C: Unpin,
I2C: Unpin,
impl<I2C> UnwindSafe for Pcf8575<I2C> where
I2C: UnwindSafe,
I2C: UnwindSafe,