Struct embassy_embedded_hal::adapter::BlockingAsync
source · pub struct BlockingAsync<T> { /* private fields */ }
Expand description
Wrapper that implements async traits using blocking implementations.
This allows driver writers to depend on the async traits while still supporting embedded-hal peripheral implementations.
BlockingAsync will implement any async trait that maps to embedded-hal traits implemented for the wrapped driver.
Driver users are then free to choose which implementation that is available to them.
Implementations§
source§impl<T> BlockingAsync<T>
impl<T> BlockingAsync<T>
Trait Implementations§
source§impl<T> ErrorType for BlockingAsync<T>where
T: ErrorType,
impl<T> ErrorType for BlockingAsync<T>where
T: ErrorType,
source§impl<T, E> ErrorType for BlockingAsync<T>
impl<T, E> ErrorType for BlockingAsync<T>
source§impl<T, E> ErrorType for BlockingAsync<T>
impl<T, E> ErrorType for BlockingAsync<T>
source§impl<T, E> I2c for BlockingAsync<T>
impl<T, E> I2c for BlockingAsync<T>
source§async fn write(&mut self, address: u8, write: &[u8]) -> Result<(), Self::Error>
async fn write(&mut self, address: u8, write: &[u8]) -> Result<(), Self::Error>
Writes bytes to slave with address
address
. Read moresource§impl<T> NorFlash for BlockingAsync<T>where
T: NorFlash,
impl<T> NorFlash for BlockingAsync<T>where
T: NorFlash,
source§const WRITE_SIZE: usize = <T as NorFlash>::WRITE_SIZE
const WRITE_SIZE: usize = <T as NorFlash>::WRITE_SIZE
The minumum number of bytes the storage peripheral can write
source§const ERASE_SIZE: usize = <T as NorFlash>::ERASE_SIZE
const ERASE_SIZE: usize = <T as NorFlash>::ERASE_SIZE
The minumum number of bytes the storage peripheral can erase
source§impl<T> ReadNorFlash for BlockingAsync<T>where
T: ReadNorFlash,
impl<T> ReadNorFlash for BlockingAsync<T>where
T: ReadNorFlash,
source§const READ_SIZE: usize = <T as ReadNorFlash>::READ_SIZE
const READ_SIZE: usize = <T as ReadNorFlash>::READ_SIZE
The minumum number of bytes the storage peripheral can read
source§impl<T, E> SpiBus for BlockingAsync<T>
impl<T, E> SpiBus for BlockingAsync<T>
source§async fn flush(&mut self) -> Result<(), Self::Error>
async fn flush(&mut self) -> Result<(), Self::Error>
Wait until all operations have completed and the bus is idle. Read more
source§async fn write(&mut self, data: &[u8]) -> Result<(), Self::Error>
async fn write(&mut self, data: &[u8]) -> Result<(), Self::Error>
Write
words
to the slave, ignoring all the incoming words. Read moresource§async fn read(&mut self, data: &mut [u8]) -> Result<(), Self::Error>
async fn read(&mut self, data: &mut [u8]) -> Result<(), Self::Error>
Read
words
from the slave. Read moreAuto Trait Implementations§
impl<T> RefUnwindSafe for BlockingAsync<T>where
T: RefUnwindSafe,
impl<T> Send for BlockingAsync<T>where
T: Send,
impl<T> Sync for BlockingAsync<T>where
T: Sync,
impl<T> Unpin for BlockingAsync<T>where
T: Unpin,
impl<T> UnwindSafe for BlockingAsync<T>where
T: 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