pub struct I2c<I2C> { /* private fields */ }Expand description
An I2C driver for the PIC32.
Contains primitives transmit(), receive(), rstart(), stop() that can
be called one after another to build a complex I2C transaction. A
Transaction must be started with transmit() and concluded with stop()
Implementations§
Trait Implementations§
Source§impl I2c for I2c<I2C1>
impl I2c for I2c<I2C1>
Source§fn transaction(
&mut self,
address: SevenBitAddress,
operations: &mut [Operation<'_>],
) -> Result<(), Self::Error>
fn transaction( &mut self, address: SevenBitAddress, operations: &mut [Operation<'_>], ) -> Result<(), Self::Error>
Execute the provided operations on the I2C bus. Read more
Source§impl I2c for I2c<I2C2>
impl I2c for I2c<I2C2>
Source§fn transaction(
&mut self,
address: SevenBitAddress,
operations: &mut [Operation<'_>],
) -> Result<(), Self::Error>
fn transaction( &mut self, address: SevenBitAddress, operations: &mut [Operation<'_>], ) -> Result<(), Self::Error>
Execute the provided operations on the I2C bus. Read more
Source§impl Ops for I2c<I2C1>
impl Ops for I2c<I2C1>
Source§fn transmit(&mut self, data: &[u8]) -> Result<(), Error>
fn transmit(&mut self, data: &[u8]) -> Result<(), Error>
Transmit data over the bus. Generate a START condition if called
first during a transaction.
Source§impl Ops for I2c<I2C2>
impl Ops for I2c<I2C2>
Source§fn transmit(&mut self, data: &[u8]) -> Result<(), Error>
fn transmit(&mut self, data: &[u8]) -> Result<(), Error>
Transmit data over the bus. Generate a START condition if called
first during a transaction.
Auto Trait Implementations§
impl<I2C> Freeze for I2c<I2C>where
I2C: Freeze,
impl<I2C> RefUnwindSafe for I2c<I2C>where
I2C: RefUnwindSafe,
impl<I2C> Send for I2c<I2C>where
I2C: Send,
impl<I2C> Sync for I2c<I2C>where
I2C: Sync,
impl<I2C> Unpin for I2c<I2C>where
I2C: Unpin,
impl<I2C> UnsafeUnpin for I2c<I2C>where
I2C: UnsafeUnpin,
impl<I2C> UnwindSafe for I2c<I2C>where
I2C: UnwindSafe,
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