capsules_core::i2c_master_slave_combo

Struct I2CMasterSlaveCombo

Source
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>

Source

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>

Source§

fn set_master_client(&self, master_client: &'a dyn I2CHwMasterClient)

Source§

fn enable(&self)

Source§

fn disable(&self)

Source§

fn write_read( &self, addr: u8, data: &'static mut [u8], write_len: usize, read_len: usize, ) -> Result<(), (Error, &'static mut [u8])>

Source§

fn write( &self, addr: u8, data: &'static mut [u8], len: usize, ) -> Result<(), (Error, &'static mut [u8])>

Source§

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>

Source§

fn set_slave_client(&self, slave_client: &'a dyn I2CHwSlaveClient)

Source§

fn enable(&self)

Source§

fn disable(&self)

Source§

fn set_address(&self, addr: u8) -> Result<(), Error>

Source§

fn write_receive( &self, data: &'static mut [u8], max_len: usize, ) -> Result<(), (Error, &'static mut [u8])>

Source§

fn read_send( &self, data: &'static mut [u8], max_len: usize, ) -> Result<(), (Error, &'static mut [u8])>

Source§

fn listen(&self)

Source§

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>

§

impl<'a, M, S> Send for I2CMasterSlaveCombo<'a, M, S>
where M: Sync, S: Sync,

§

impl<'a, M, S> Sync for I2CMasterSlaveCombo<'a, M, S>
where M: Sync, S: Sync,

§

impl<'a, M, S> Unpin for I2CMasterSlaveCombo<'a, M, S>

§

impl<'a, M, S> UnwindSafe for I2CMasterSlaveCombo<'a, M, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.