pub struct I2sWriteDmaTransferAsync<'d, BUFFER> { /* private fields */ }
Available on crate feature
unstable
only.Expand description
An in-progress async circular DMA write transfer.
Implementations§
Source§impl<BUFFER> I2sWriteDmaTransferAsync<'_, BUFFER>
impl<BUFFER> I2sWriteDmaTransferAsync<'_, BUFFER>
Sourcepub async fn available(&mut self) -> Result<usize, Error>
pub async fn available(&mut self) -> Result<usize, Error>
How many bytes can be pushed into the DMA transaction. Will wait for more than 0 bytes available.
Sourcepub async fn push(&mut self, data: &[u8]) -> Result<usize, Error>
pub async fn push(&mut self, data: &[u8]) -> Result<usize, Error>
Push bytes into the DMA transaction.
Sourcepub async fn push_with(
&mut self,
f: impl FnOnce(&mut [u8]) -> usize,
) -> Result<usize, Error>
pub async fn push_with( &mut self, f: impl FnOnce(&mut [u8]) -> usize, ) -> Result<usize, Error>
Push bytes into the DMA buffer via the given closure. The closure must return the actual number of bytes written. The closure might get called with a slice which is smaller than the total available buffer. Only useful for circular DMA transfers