Trait kernel::hil::i2c::I2CSlave

source ·
pub trait I2CSlave<'a> {
    // Required methods
    fn set_slave_client(&self, slave_client: &'a dyn I2CHwSlaveClient);
    fn enable(&self);
    fn disable(&self);
    fn set_address(&self, addr: u8) -> Result<(), Error>;
    fn write_receive(
        &self,
        data: &'static mut [u8],
        max_len: usize,
    ) -> Result<(), (Error, &'static mut [u8])>;
    fn read_send(
        &self,
        data: &'static mut [u8],
        max_len: usize,
    ) -> Result<(), (Error, &'static mut [u8])>;
    fn listen(&self);
}
Expand description

Interface for an I2C Slave hardware driver.

Required Methods§

source

fn set_slave_client(&self, slave_client: &'a dyn I2CHwSlaveClient)

source

fn enable(&self)

source

fn disable(&self)

source

fn set_address(&self, addr: u8) -> Result<(), Error>

source

fn write_receive( &self, data: &'static mut [u8], max_len: usize, ) -> Result<(), (Error, &'static mut [u8])>

source

fn read_send( &self, data: &'static mut [u8], max_len: usize, ) -> Result<(), (Error, &'static mut [u8])>

source

fn listen(&self)

Implementors§