pub struct I3c<'d, M: Mode> { /* private fields */ }Expand description
I3C controller driver.
Implementations§
Source§impl<'d, M: Mode> I3c<'d, M>
impl<'d, M: Mode> I3c<'d, M>
Sourcepub fn blocking_read(
&mut self,
address: u8,
read: &mut [u8],
bus_type: BusType,
) -> Result<(), IOError>
pub fn blocking_read( &mut self, address: u8, read: &mut [u8], bus_type: BusType, ) -> Result<(), IOError>
Read from address into buffer blocking caller until done.
Source§impl<'d> I3c<'d, Async>
impl<'d> I3c<'d, Async>
Sourcepub fn new_async<T: Instance>(
peri: Peri<'d, T>,
scl: Peri<'d, impl SclPin<T>>,
sda: Peri<'d, impl SdaPin<T>>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd,
config: Config,
) -> Result<Self, SetupError>
pub fn new_async<T: Instance>( peri: Peri<'d, T>, scl: Peri<'d, impl SclPin<T>>, sda: Peri<'d, impl SdaPin<T>>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, config: Config, ) -> Result<Self, SetupError>
Create a new asynchronous instance of the I3C controller bus driver.
Any external pin will be placed into Disabled state upon Drop.
Source§impl<'d> I3c<'d, Dma<'d>>
impl<'d> I3c<'d, Dma<'d>>
Sourcepub fn new_async_with_dma<T: Instance>(
peri: Peri<'d, T>,
scl: Peri<'d, impl SclPin<T>>,
sda: Peri<'d, impl SdaPin<T>>,
tx_dma: Peri<'d, impl Channel>,
rx_dma: Peri<'d, impl Channel>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd,
config: Config,
) -> Result<Self, SetupError>
pub fn new_async_with_dma<T: Instance>( peri: Peri<'d, T>, scl: Peri<'d, impl SclPin<T>>, sda: Peri<'d, impl SdaPin<T>>, tx_dma: Peri<'d, impl Channel>, rx_dma: Peri<'d, impl Channel>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, config: Config, ) -> Result<Self, SetupError>
Create a new async instance of the I3C Controller bus driver with DMA support.
Any external pin will be placed into Disabled state upon Drop, additionally, the DMA channel is disabled.
Source§impl<'d, M: AsyncMode> I3c<'d, M>where
Self: AsyncEngine,
impl<'d, M: AsyncMode> I3c<'d, M>where
Self: AsyncEngine,
Sourcepub fn async_read<'a>(
&'a mut self,
address: u8,
read: &'a mut [u8],
bus_type: BusType,
) -> impl Future<Output = Result<(), IOError>> + 'a
pub fn async_read<'a>( &'a mut self, address: u8, read: &'a mut [u8], bus_type: BusType, ) -> impl Future<Output = Result<(), IOError>> + 'a
Read from address into buffer asynchronously.
Trait Implementations§
Source§impl<'d, M: Mode> I2c for I3c<'d, M>
impl<'d, M: Mode> I2c for I3c<'d, M>
Source§fn transaction(
&mut self,
address: u8,
operations: &mut [Operation<'_>],
) -> Result<(), Self::Error>
fn transaction( &mut self, address: u8, operations: &mut [Operation<'_>], ) -> Result<(), Self::Error>
Execute the provided operations on the I2C bus. Read more
Source§impl<'d, M: AsyncMode> I2c for I3c<'d, M>where
I3c<'d, M>: AsyncEngine,
impl<'d, M: AsyncMode> I2c for I3c<'d, M>where
I3c<'d, M>: AsyncEngine,
Source§async fn transaction(
&mut self,
address: u8,
operations: &mut [Operation<'_>],
) -> Result<(), Self::Error>
async fn transaction( &mut self, address: u8, operations: &mut [Operation<'_>], ) -> Result<(), Self::Error>
Execute the provided operations on the I2C bus as a single transaction. Read more
Source§impl<'d, M: Mode> SetConfig for I3c<'d, M>
impl<'d, M: Mode> SetConfig for I3c<'d, M>
Source§type ConfigError = SetupError
type ConfigError = SetupError
The error type that can occur if
set_config fails.Source§fn set_config(&mut self, config: &Self::Config) -> Result<(), Self::ConfigError>
fn set_config(&mut self, config: &Self::Config) -> Result<(), Self::ConfigError>
Set the configuration of the driver.
Source§impl<'d, M: Mode> Transactional for I3c<'d, M>
impl<'d, M: Mode> Transactional for I3c<'d, M>
Auto Trait Implementations§
impl<'d, M> Freeze for I3c<'d, M>where
M: Freeze,
impl<'d, M> !RefUnwindSafe for I3c<'d, M>
impl<'d, M> Send for I3c<'d, M>where
M: Send,
impl<'d, M> Sync for I3c<'d, M>where
M: Sync,
impl<'d, M> Unpin for I3c<'d, M>where
M: Unpin,
impl<'d, M> !UnwindSafe for I3c<'d, M>
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