pub struct I2CMasterSlaveCombo<'a, M: I2CMaster<'a>, S: I2CSlave<'a>> { /* private fields */ }
Implementations§
Source§impl<'a, M: I2CMaster<'a>, S: I2CSlave<'a>> I2CMasterSlaveCombo<'a, M, S>
impl<'a, M: I2CMaster<'a>, S: I2CSlave<'a>> I2CMasterSlaveCombo<'a, M, S>
pub fn new(i2c_master: &'a M, i2c_slave: &'a S) -> I2CMasterSlaveCombo<'a, M, S>
Trait Implementations§
Source§impl<'a, M: I2CMaster<'a>, S: I2CSlave<'a>> I2CMaster<'a> for I2CMasterSlaveCombo<'a, M, S>
impl<'a, M: I2CMaster<'a>, S: I2CSlave<'a>> I2CMaster<'a> for I2CMasterSlaveCombo<'a, M, S>
fn set_master_client(&self, master_client: &'a dyn I2CHwMasterClient)
fn enable(&self)
fn disable(&self)
fn write_read( &self, addr: u8, data: &'static mut [u8], write_len: usize, read_len: usize, ) -> Result<(), (Error, &'static mut [u8])>
fn write( &self, addr: u8, data: &'static mut [u8], len: usize, ) -> Result<(), (Error, &'static mut [u8])>
fn read( &self, addr: u8, buffer: &'static mut [u8], len: usize, ) -> Result<(), (Error, &'static mut [u8])>
Source§impl<'a, M: I2CMaster<'a>, S: I2CSlave<'a>> I2CSlave<'a> for I2CMasterSlaveCombo<'a, M, S>
impl<'a, M: I2CMaster<'a>, S: I2CSlave<'a>> I2CSlave<'a> for I2CMasterSlaveCombo<'a, M, S>
fn set_slave_client(&self, slave_client: &'a dyn I2CHwSlaveClient)
fn enable(&self)
fn disable(&self)
fn set_address(&self, addr: u8) -> Result<(), Error>
fn write_receive( &self, data: &'static mut [u8], max_len: usize, ) -> Result<(), (Error, &'static mut [u8])>
fn read_send( &self, data: &'static mut [u8], max_len: usize, ) -> Result<(), (Error, &'static mut [u8])>
fn listen(&self)
impl<'a, M: I2CMaster<'a>, S: I2CSlave<'a>> I2CMasterSlave<'a> for I2CMasterSlaveCombo<'a, M, S>
Auto Trait Implementations§
impl<'a, M, S> Freeze for I2CMasterSlaveCombo<'a, M, S>
impl<'a, M, S> RefUnwindSafe for I2CMasterSlaveCombo<'a, M, S>where
M: RefUnwindSafe,
S: RefUnwindSafe,
impl<'a, M, S> Send for I2CMasterSlaveCombo<'a, M, S>
impl<'a, M, S> Sync for I2CMasterSlaveCombo<'a, M, S>
impl<'a, M, S> Unpin for I2CMasterSlaveCombo<'a, M, S>
impl<'a, M, S> UnwindSafe for I2CMasterSlaveCombo<'a, M, S>where
M: RefUnwindSafe,
S: RefUnwindSafe,
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