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, 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> ErrorType for BlockingAsync<T>where
T: ErrorType,
impl<T> ErrorType for BlockingAsync<T>where
T: ErrorType,
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 moreimpl<T> MultiwriteNorFlash for BlockingAsync<T>where
T: MultiwriteNorFlash,
Auto Trait Implementations§
impl<T> Freeze for BlockingAsync<T>where
T: Freeze,
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