Trait max7301::interface::ExpanderInterface[][src]

pub trait ExpanderInterface {
    fn write_register(
        &mut self,
        addr: RegisterAddress,
        value: u8
    ) -> Result<(), ()>;
fn read_register(&mut self, addr: RegisterAddress) -> Result<u8, ()>; }

An interface for the MAX7301 implements this trait, which provides the basic operations for sending pre-encoded register accesses to the chip via the interface.

Required methods

fn write_register(&mut self, addr: RegisterAddress, value: u8) -> Result<(), ()>[src]

Issue a write command to the expander to write value into the register at addr.

fn read_register(&mut self, addr: RegisterAddress) -> Result<u8, ()>[src]

Issue a read command to the expander to fetch the u8 value at register addr.

Loading content...

Implementors

impl<SPI, CS> ExpanderInterface for SpiInterface<SPI, CS> where
    SPI: Write<u8> + Transfer<u8>,
    CS: OutputPin
[src]

Loading content...