#[non_exhaustive]pub struct DmaTransferTxCircular<'a, I>where
I: DmaSupportTx,{ /* private fields */ }
Available on crate feature
unstable
only.Expand description
DMA transaction for TX only circular transfers
§Safety
Never use [core::mem::forget] on an in-progress transfer
Implementations§
Source§impl<'a, I> DmaTransferTxCircular<'a, I>where
I: DmaSupportTx,
impl<'a, I> DmaTransferTxCircular<'a, I>where
I: DmaSupportTx,
Sourcepub fn push_with(
&mut self,
f: impl FnOnce(&mut [u8]) -> usize,
) -> Result<usize, DmaError>
pub fn push_with( &mut self, f: impl FnOnce(&mut [u8]) -> usize, ) -> Result<usize, DmaError>
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.