Struct capsules::i2c_master_slave_driver::I2CMasterSlaveDriver [] [src]

pub struct I2CMasterSlaveDriver<'a> {
    i2c: &'a I2CMasterSlave,
    listening: Cell<bool>,
    master_action: Cell<MasterAction>,
    master_buffer: TakeCell<'static, [u8]>,
    slave_buffer1: TakeCell<'static, [u8]>,
    slave_buffer2: TakeCell<'static, [u8]>,
    app: MapCell<App>,
}

Fields

Methods

impl<'a> I2CMasterSlaveDriver<'a>
[src]

[src]

Trait Implementations

impl<'a> I2CHwMasterClient for I2CMasterSlaveDriver<'a>
[src]

[src]

Called when an I2C command completed. The error denotes whether the command completed successfully or if an error occured. Read more

impl<'a> I2CHwSlaveClient for I2CMasterSlaveDriver<'a>
[src]

[src]

Called when an I2C command completed.

[src]

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. Read more

[src]

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. Read more

impl<'a> Driver for I2CMasterSlaveDriver<'a>
[src]

[src]

allow lets an application give the driver access to a buffer in the application's memory. This returns ENOSUPPORT if not used. Read more

[src]

subscribe lets an application pass a callback to the driver to be called later. This returns ENOSUPPORT if not used. Read more

[src]

command instructs a driver to perform some action synchronously. This returns ENOSUPPORT if not used. Read more