Skip to main content

StreamPeripheral

Trait StreamPeripheral 

pub trait StreamPeripheral {
    // Required methods
    fn transfer_mode(&self) -> TransferMode;
    fn data_width(&self) -> (Msize, Psize);
    fn channel_id(&self) -> ChannelId;
    fn direction(&self) -> Direction;
    fn address(&self) -> u32;
}
Expand description

Interface required for each Peripheral by the DMA Stream.

The data defined here may vary by Peripheral. It is used by the DMA Stream to correctly configure the DMA.

To implement a new Peripheral, add it to the corresponding enum (Dma1-/Dma2Peripheral) and add its data to the impl of this trait.

Required Methods§

fn transfer_mode(&self) -> TransferMode

fn data_width(&self) -> (Msize, Psize)

fn channel_id(&self) -> ChannelId

fn direction(&self) -> Direction

fn address(&self) -> u32

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§