pub struct I2CHw<'a> { /* private fields */ }
Expand description
Abstraction of the I2C hardware
Implementations§
Source§impl<'a> I2CHw<'a>
impl<'a> I2CHw<'a>
pub fn new_i2c0(pm: &'static PowerManager) -> Self
pub fn new_i2c1(pm: &'static PowerManager) -> Self
pub fn new_i2c2(pm: &'static PowerManager) -> Self
pub fn new_i2c3(pm: &'static PowerManager) -> Self
pub fn set_dma(&self, dma: &'static DMAChannel)
pub fn handle_interrupt(&self)
Sourcepub fn handle_slave_interrupt(&self)
pub fn handle_slave_interrupt(&self)
Handle possible interrupt for TWIS module.
Trait Implementations§
Source§impl DMAClient for I2CHw<'_>
impl DMAClient for I2CHw<'_>
fn transfer_done(&self, _pid: DMAPeripheral)
Source§impl<'a> I2CMaster<'a> for I2CHw<'a>
impl<'a> I2CMaster<'a> for I2CHw<'a>
fn set_master_client(&self, client: &'a dyn I2CHwMasterClient)
fn write( &self, addr: u8, data: &'static mut [u8], len: usize, ) -> Result<(), (Error, &'static mut [u8])>
fn read( &self, addr: u8, data: &'static mut [u8], len: usize, ) -> Result<(), (Error, &'static mut [u8])>
fn write_read( &self, addr: u8, data: &'static mut [u8], write_len: usize, read_len: usize, ) -> Result<(), (Error, &'static mut [u8])>
Source§impl<'a> I2CSlave<'a> for I2CHw<'a>
impl<'a> I2CSlave<'a> for I2CHw<'a>
fn set_slave_client(&self, client: &'a dyn I2CHwSlaveClient)
fn enable(&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)
Auto Trait Implementations§
impl<'a> !Freeze for I2CHw<'a>
impl<'a> !RefUnwindSafe for I2CHw<'a>
impl<'a> !Send for I2CHw<'a>
impl<'a> !Sync for I2CHw<'a>
impl<'a> Unpin for I2CHw<'a>
impl<'a> !UnwindSafe for I2CHw<'a>
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