Skip to main content

DbufWrite

Struct DbufWrite 

Source
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>

Source

pub fn m0_dma_addr(&self) -> DmaAddr

DMA bus address of the M0 bank.

Source

pub fn m1_dma_addr(&self) -> DmaAddr

DMA bus address of the M1 bank.

Source

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.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.