Struct capsules::virtual_i2c::I2CDevice
[−]
[src]
pub struct I2CDevice<'a> { mux: &'a MuxI2C<'a>, addr: u8, enabled: Cell<bool>, buffer: TakeCell<'static, [u8]>, operation: Cell<Op>, next: ListLink<'a, I2CDevice<'a>>, client: Cell<Option<&'a I2CClient>>, }
Fields
mux: &'a MuxI2C<'a>
addr: u8
enabled: Cell<bool>
buffer: TakeCell<'static, [u8]>
operation: Cell<Op>
next: ListLink<'a, I2CDevice<'a>>
client: Cell<Option<&'a I2CClient>>
Methods
impl<'a> I2CDevice<'a>
[src]
pub const fn new(mux: &'a MuxI2C<'a>, addr: u8) -> I2CDevice<'a>
[src]
pub fn set_client(&'a self, client: &'a I2CClient)
[src]
Trait Implementations
impl<'a> I2CClient for I2CDevice<'a>
[src]
fn command_complete(&self, buffer: &'static mut [u8], error: Error)
[src]
Called when an I2C command completed. The error
denotes whether the command completed successfully or if an error occured. Read more