Struct capsules_core::virtualizers::virtual_i2c::SMBusDevice
source · pub struct SMBusDevice<'a, I: I2CMaster<'a>, S: SMBusMaster<'a>> { /* private fields */ }
Implementations§
source§impl<'a, I: I2CMaster<'a>, S: SMBusMaster<'a>> SMBusDevice<'a, I, S>
impl<'a, I: I2CMaster<'a>, S: SMBusMaster<'a>> SMBusDevice<'a, I, S>
pub fn new(mux: &'a MuxI2C<'a, I, S>, addr: u8) -> SMBusDevice<'a, I, S>
pub fn set_client(&'a self, client: &'a dyn I2CClient)
Trait Implementations§
source§impl<'a, I: I2CMaster<'a>, S: SMBusMaster<'a>> I2CClient for SMBusDevice<'a, I, S>
impl<'a, I: I2CMaster<'a>, S: SMBusMaster<'a>> I2CClient for SMBusDevice<'a, I, S>
source§impl<'a, I: I2CMaster<'a>, S: SMBusMaster<'a>> I2CDevice for SMBusDevice<'a, I, S>
impl<'a, I: I2CMaster<'a>, S: SMBusMaster<'a>> I2CDevice for SMBusDevice<'a, I, S>
fn enable(&self)
fn disable(&self)
fn write_read( &self, data: &'static mut [u8], write_len: usize, read_len: usize, ) -> Result<(), (Error, &'static mut [u8])>
fn write( &self, data: &'static mut [u8], len: usize, ) -> Result<(), (Error, &'static mut [u8])>
fn read( &self, buffer: &'static mut [u8], len: usize, ) -> Result<(), (Error, &'static mut [u8])>
source§impl<'a, I: I2CMaster<'a>, S: SMBusMaster<'a>> ListNode<'a, SMBusDevice<'a, I, S>> for SMBusDevice<'a, I, S>
impl<'a, I: I2CMaster<'a>, S: SMBusMaster<'a>> ListNode<'a, SMBusDevice<'a, I, S>> for SMBusDevice<'a, I, S>
fn next(&'a self) -> &'a ListLink<'a, SMBusDevice<'a, I, S>>
source§impl<'a, I: I2CMaster<'a>, S: SMBusMaster<'a>> SMBusDevice for SMBusDevice<'a, I, S>
impl<'a, I: I2CMaster<'a>, S: SMBusMaster<'a>> SMBusDevice for SMBusDevice<'a, I, S>
source§fn smbus_write_read(
&self,
data: &'static mut [u8],
write_len: usize,
read_len: usize,
) -> Result<(), (Error, &'static mut [u8])>
fn smbus_write_read( &self, data: &'static mut [u8], write_len: usize, read_len: usize, ) -> Result<(), (Error, &'static mut [u8])>
Write data then read data to a slave device in an SMBus
compatible way. Read more
Auto Trait Implementations§
impl<'a, I, S> !Freeze for SMBusDevice<'a, I, S>
impl<'a, I, S> !RefUnwindSafe for SMBusDevice<'a, I, S>
impl<'a, I, S> !Send for SMBusDevice<'a, I, S>
impl<'a, I, S> !Sync for SMBusDevice<'a, I, S>
impl<'a, I, S> Unpin for SMBusDevice<'a, I, S>
impl<'a, I, S> !UnwindSafe for SMBusDevice<'a, I, S>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more