Trait kernel::hil::i2c::I2CHwSlaveClient [] [src]

pub trait I2CHwSlaveClient {
    fn command_complete(
        &self,
        buffer: &'static mut [u8],
        length: u8,
        transmission_type: SlaveTransmissionType
    );
fn read_expected(&self);
fn write_expected(&self); }

Client interface for capsules that use I2CSlave devices.

Required Methods

Called when an I2C command completed.

Called from the I2C slave hardware to say that a Master has sent us a read message, but the driver did not have a buffer containing data setup, and therefore cannot respond. The I2C slave hardware will stretch the clock while waiting for the upper layer capsule to provide data to send to the remote master. Call I2CSlave::read_send() to provide data.

Called from the I2C slave hardware to say that a Master has sent us a write message, but there was no buffer setup to read the bytes into. The HW will stretch the clock while waiting for the user to call I2CSlave::write_receive() with a buffer.

Implementors