Struct embassy_embedded_hal::adapter::YieldingAsync
source · pub struct YieldingAsync<T> { /* private fields */ }
Expand description
Wrapper that yields for each operation to the wrapped instance
This can be used in combination with BlockingAsync
Implementations§
source§impl<T> YieldingAsync<T>
impl<T> YieldingAsync<T>
Trait Implementations§
source§impl<T> ErrorType for YieldingAsync<T>where
T: ErrorType,
impl<T> ErrorType for YieldingAsync<T>where
T: ErrorType,
source§impl<T: ErrorType> ErrorType for YieldingAsync<T>
impl<T: ErrorType> ErrorType for YieldingAsync<T>
NOR flash implementations
source§impl<T> ErrorType for YieldingAsync<T>where
T: ErrorType,
impl<T> ErrorType for YieldingAsync<T>where
T: ErrorType,
source§impl<T> I2c for YieldingAsync<T>where
T: I2c,
impl<T> I2c for YieldingAsync<T>where
T: I2c,
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> NorFlash for YieldingAsync<T>
impl<T: NorFlash> NorFlash for YieldingAsync<T>
source§const WRITE_SIZE: usize = T::WRITE_SIZE
const WRITE_SIZE: usize = T::WRITE_SIZE
The minumum number of bytes the storage peripheral can write
source§const ERASE_SIZE: usize = T::ERASE_SIZE
const ERASE_SIZE: usize = T::ERASE_SIZE
The minumum number of bytes the storage peripheral can erase
source§impl<T: ReadNorFlash> ReadNorFlash for YieldingAsync<T>
impl<T: ReadNorFlash> ReadNorFlash for YieldingAsync<T>
source§const READ_SIZE: usize = T::READ_SIZE
const READ_SIZE: usize = T::READ_SIZE
The minumum number of bytes the storage peripheral can read
source§impl<T, Word: 'static + Copy> SpiBus<Word> for YieldingAsync<T>where
T: SpiBus<Word>,
impl<T, Word: 'static + Copy> SpiBus<Word> for YieldingAsync<T>where
T: SpiBus<Word>,
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: &[Word]) -> Result<(), Self::Error>
async fn write(&mut self, data: &[Word]) -> Result<(), Self::Error>
Write
words
to the slave, ignoring all the incoming words. Read moresource§async fn read(&mut self, data: &mut [Word]) -> Result<(), Self::Error>
async fn read(&mut self, data: &mut [Word]) -> Result<(), Self::Error>
Read
words
from the slave. Read moreAuto Trait Implementations§
impl<T> RefUnwindSafe for YieldingAsync<T>where
T: RefUnwindSafe,
impl<T> Send for YieldingAsync<T>where
T: Send,
impl<T> Sync for YieldingAsync<T>where
T: Sync,
impl<T> Unpin for YieldingAsync<T>where
T: Unpin,
impl<T> UnwindSafe for YieldingAsync<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