pub unsafe trait DmaRxBuffer {
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
DmaRxBuffer is a DMA descriptor + memory combo that can be used for receiving data from a peripheral’s FIFO to a DMA channel.
Note: Implementations of this trait may only support having a single EOF bit which resides in the last descriptor. There will be a separate trait in future to support multiple EOFs.
§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§
Required Methods§
Sourcefn prepare(&mut self) -> Preparation
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.
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.