#[non_exhaustive]pub struct DmaTransferRxCircular<'a, I>where
I: DmaSupportRx,{ /* private fields */ }Expand description
DMA transaction for RX only circular transfers
§Safety
Never use core::mem::forget on an in-progress transfer
Implementations§
Source§impl<'a, I> DmaTransferRxCircular<'a, I>where
I: DmaSupportRx,
impl<'a, I> DmaTransferRxCircular<'a, I>where
I: DmaSupportRx,
Sourcepub fn available(&mut self) -> Result<usize, DmaError>
pub fn available(&mut self) -> Result<usize, DmaError>
Amount of bytes which can be popped.
It’s expected to call this before trying to DmaTransferRxCircular::pop data.
Sourcepub fn pop(&mut self, data: &mut [u8]) -> Result<usize, DmaError>
pub fn pop(&mut self, data: &mut [u8]) -> Result<usize, DmaError>
Get available data.
It’s expected that the amount of available data is checked before by calling DmaTransferRxCircular::available and that the buffer can hold all available data.
Fails with DmaError::BufferTooSmall if the given buffer is too small to hold all available data
Trait Implementations§
Auto Trait Implementations§
impl<'a, I> Freeze for DmaTransferRxCircular<'a, I>
impl<'a, I> RefUnwindSafe for DmaTransferRxCircular<'a, I>where
I: RefUnwindSafe,
impl<'a, I> !Send for DmaTransferRxCircular<'a, I>
impl<'a, I> !Sync for DmaTransferRxCircular<'a, I>
impl<'a, I> Unpin for DmaTransferRxCircular<'a, I>
impl<'a, I> !UnwindSafe for DmaTransferRxCircular<'a, I>
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