Trait DmaTxBuffer

Source
pub unsafe trait DmaTxBuffer {
    type View;

    // Required methods
    fn prepare(&mut self) -> Preparation;
    fn into_view(self) -> Self::View;
    fn from_view(view: Self::View) -> Self;
}
Available on crate feature unstable only.
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.

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

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§