DmaTxBuffer

Trait DmaTxBuffer 

Source
pub unsafe trait DmaTxBuffer {
    type View;
    type Final;

    // Required methods
    fn prepare(&mut self) -> Preparation;
    fn into_view(self) -> Self::View;
    fn from_view(view: Self::View) -> Self::Final;
}
Expand description

DmaTxBuffer is a DMA descriptor + memory combo that can be used for transmitting data from a DMA channel to a peripheral’s FIFO.

§Safety

The implementing type must keep all its descriptors and the buffers they point to valid while the buffer is being transferred.

Required Associated Types§

Source

type View

A type providing operations that are safe to perform on the buffer whilst the DMA is actively using it.

Source

type Final

The type returned to the user when a transfer finishes.

Some buffers don’t need to be reconstructed.

Required Methods§

Source

fn prepare(&mut self) -> Preparation

Prepares the buffer for an imminent transfer and returns information required to use this buffer.

Note: This operation is idempotent.

Source

fn into_view(self) -> Self::View

This is called before the DMA starts using the buffer.

Source

fn from_view(view: Self::View) -> Self::Final

This is called after the DMA is done using the buffer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl DmaTxBuffer for DmaLoopBuf

Available on crate feature unstable only.
Source§

impl DmaTxBuffer for DmaRxTxBuf

Available on crate feature unstable only.
Source§

impl DmaTxBuffer for DmaTxBuf

Available on crate feature unstable only.
Source§

impl DmaTxBuffer for EmptyBuf

Available on crate feature unstable only.