Pca9702BusTrait

Trait Pca9702BusTrait 

Source
pub trait Pca9702BusTrait {
    type BusError;

    // Required method
    fn read_inputs(&mut self) -> Result<u8, Self::BusError>;
}
Expand description

Trait for the underlying PCA9702 SPI bus. Simpler than e.g. MCP23S17 because PCA9702 is read-only and has no register-based protocol.

Required Associated Types§

Required Methods§

Source

fn read_inputs(&mut self) -> Result<u8, Self::BusError>

Reads 8 bits from the device (which represent the state of inputs [in7..in0])

Implementors§

Source§

impl<SPI> Pca9702BusTrait for Pca9702Bus<SPI>
where SPI: SpiBus,

Source§

type BusError = <SPI as SpiBus>::BusError