pub struct DbufWrite<'a, 'b, T: Copy, const N: usize> { /* private fields */ }Expand description
Continuous DMA-write typestate handle for double-buffer mode.
The DMA engine writes M0 and M1 alternately. The CPU is the
consumer and may drain the inactive bank through a
BankGuard<Write, _, _>.
Implementations§
Source§impl<'a, 'b, T: Copy, const N: usize> DbufWrite<'a, 'b, T, N>
impl<'a, 'b, T: Copy, const N: usize> DbufWrite<'a, 'b, T, N>
Sourcepub fn m0_dma_addr(&self) -> DmaAddr
pub fn m0_dma_addr(&self) -> DmaAddr
DMA bus address of the M0 bank.
Sourcepub fn m1_dma_addr(&self) -> DmaAddr
pub fn m1_dma_addr(&self) -> DmaAddr
DMA bus address of the M1 bank.
Sourcepub fn bank_guard<'g, C: DcaCache>(
&'g mut self,
ctx: &mut DcaCacheCtx<'_, C>,
current_target: Bank,
) -> BankGuard<'g, Write, T, N>
pub fn bank_guard<'g, C: DcaCache>( &'g mut self, ctx: &mut DcaCacheCtx<'_, C>, current_target: Bank, ) -> BankGuard<'g, Write, T, N>
Acquire a guard over the inactive bank.
Cache op for Write direction: DcaCache::invalidate over
the inactive bank’s full extent so the CPU’s next read of that
bank observes DMA-written data.
Sourcepub fn stop_double_buffer<C: DcaCache>(
self,
ctx: &mut DcaCacheCtx<'_, C>,
) -> DbufCpu<'a, 'b, T, N>
pub fn stop_double_buffer<C: DcaCache>( self, ctx: &mut DcaCacheCtx<'_, C>, ) -> DbufCpu<'a, 'b, T, N>
Stop the double-buffer transfer and transition back to
DbufCpu.
Auto Trait Implementations§
impl<'a, 'b, T, const N: usize> !RefUnwindSafe for DbufWrite<'a, 'b, T, N>
impl<'a, 'b, T, const N: usize> !UnwindSafe for DbufWrite<'a, 'b, T, N>
impl<'a, 'b, T, const N: usize> Freeze for DbufWrite<'a, 'b, T, N>
impl<'a, 'b, T, const N: usize> Send for DbufWrite<'a, 'b, T, N>where
T: Send,
impl<'a, 'b, T, const N: usize> Sync for DbufWrite<'a, 'b, T, N>where
T: Send,
impl<'a, 'b, T, const N: usize> Unpin for DbufWrite<'a, 'b, T, N>
impl<'a, 'b, T, const N: usize> UnsafeUnpin for DbufWrite<'a, 'b, 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