Struct capsules_extra::bus::I2CMasterBus
source · pub struct I2CMasterBus<'a, I: I2CDevice> { /* private fields */ }
Implementations§
source§impl<'a, I: I2CDevice> I2CMasterBus<'a, I>
impl<'a, I: I2CDevice> I2CMasterBus<'a, I>
pub fn new(i2c: &'a I, addr_buffer: &'static mut [u8]) -> I2CMasterBus<'a, I>
Trait Implementations§
source§impl<'a, A: BusAddr, I: I2CDevice> Bus<'a, A> for I2CMasterBus<'a, I>
impl<'a, A: BusAddr, I: I2CDevice> Bus<'a, A> for I2CMasterBus<'a, I>
source§fn write(
&self,
data_width: DataWidth,
buffer: &'static mut [u8],
len: usize,
) -> Result<(), (ErrorCode, &'static mut [u8])>
fn write( &self, data_width: DataWidth, buffer: &'static mut [u8], len: usize, ) -> Result<(), (ErrorCode, &'static mut [u8])>
Write data items to the previously set address Read more
source§fn read(
&self,
data_width: DataWidth,
buffer: &'static mut [u8],
len: usize,
) -> Result<(), (ErrorCode, &'static mut [u8])>
fn read( &self, data_width: DataWidth, buffer: &'static mut [u8], len: usize, ) -> Result<(), (ErrorCode, &'static mut [u8])>
Read data items from the previously set address Read more
fn set_client(&self, client: &'a dyn Client)
Auto Trait Implementations§
impl<'a, I> !Freeze for I2CMasterBus<'a, I>
impl<'a, I> !RefUnwindSafe for I2CMasterBus<'a, I>
impl<'a, I> !Send for I2CMasterBus<'a, I>
impl<'a, I> !Sync for I2CMasterBus<'a, I>
impl<'a, I> Unpin for I2CMasterBus<'a, I>
impl<'a, I> !UnwindSafe for I2CMasterBus<'a, I>
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