pub struct DeviceWrite<'a, T: Copy, const N: usize> { /* private fields */ }Expand description
One-shot DMA-write typestate handle.
While alive, the CPU MUST NOT access the buffer. Drop or
DeviceWrite::complete returns the buffer to Cpu state with
no exit cache op (the entry-side invalidate already prepared the
cache for the post-transfer CPU read).
Implementations§
Source§impl<'a, T: Copy, const N: usize> DeviceWrite<'a, T, N>
impl<'a, T: Copy, const N: usize> DeviceWrite<'a, T, N>
Sourcepub fn complete(self) -> Cpu<'a, T, N>
pub fn complete(self) -> Cpu<'a, T, N>
Transition back to Cpu state.
Per DCB-00 §5 transition table: no cache op at exit. The entry-side invalidate evicted the buffer’s cache lines, INV-D3 forbids adjacent-line refill from reintroducing stale data during transfer, so the CPU’s first read after this call hits RAM and observes the DMA-written data.
Auto Trait Implementations§
impl<'a, T, const N: usize> !RefUnwindSafe for DeviceWrite<'a, T, N>
impl<'a, T, const N: usize> !UnwindSafe for DeviceWrite<'a, T, N>
impl<'a, T, const N: usize> Freeze for DeviceWrite<'a, T, N>
impl<'a, T, const N: usize> Send for DeviceWrite<'a, T, N>where
T: Send,
impl<'a, T, const N: usize> Sync for DeviceWrite<'a, T, N>where
T: Send,
impl<'a, T, const N: usize> Unpin for DeviceWrite<'a, T, N>
impl<'a, T, const N: usize> UnsafeUnpin for DeviceWrite<'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