pub struct CircWrite<'a, T: Copy, const N: usize> { /* private fields */ }Expand description
Continuous DMA-write typestate handle.
The DMA engine writes the buffer in circular mode. The CPU is the
consumer and may drain the inactive half through a
HalfGuard<Write, _, _> obtained from CircWrite::half_guard.
Implementations§
Source§impl<'a, T: Copy, const N: usize> CircWrite<'a, T, N>
impl<'a, T: Copy, const N: usize> CircWrite<'a, T, N>
Sourcepub fn half_guard<'b, C: DcaCache>(
&'b mut self,
ctx: &mut DcaCacheCtx<'_, C>,
half: Half,
) -> HalfGuard<'b, Write, T, N>
pub fn half_guard<'b, C: DcaCache>( &'b mut self, ctx: &mut DcaCacheCtx<'_, C>, half: Half, ) -> HalfGuard<'b, Write, T, N>
Acquire a guard over the inactive half.
Cache op for Write direction: DcaCache::invalidate
over the inactive half so the CPU’s next read of that half
observes DMA-written data.
Sourcepub fn stop_circular<C: DcaCache>(
self,
ctx: &mut DcaCacheCtx<'_, C>,
) -> Cpu<'a, T, N>
pub fn stop_circular<C: DcaCache>( self, ctx: &mut DcaCacheCtx<'_, C>, ) -> Cpu<'a, T, N>
Stop the circular transfer and transition back to Cpu.
Caller MUST stop the engine before calling. Cache op:
DcaCache::invalidate over the full padded extent so the
CPU’s next read after release observes the final DMA-written
state, not stale cache lines.
Auto Trait Implementations§
impl<'a, T, const N: usize> !RefUnwindSafe for CircWrite<'a, T, N>
impl<'a, T, const N: usize> !UnwindSafe for CircWrite<'a, T, N>
impl<'a, T, const N: usize> Freeze for CircWrite<'a, T, N>
impl<'a, T, const N: usize> Send for CircWrite<'a, T, N>where
T: Send,
impl<'a, T, const N: usize> Sync for CircWrite<'a, T, N>where
T: Send,
impl<'a, T, const N: usize> Unpin for CircWrite<'a, T, N>
impl<'a, T, const N: usize> UnsafeUnpin for CircWrite<'a, T, N>
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