Skip to main content

DmaPeriph

Trait DmaPeriph 

Source
pub trait DmaPeriph<const N: u8> {
    type Word: DmaWord;

    // Required methods
    fn addr(&self) -> u32;
    fn enable_dma(&mut self);
    fn disable_dma(&mut self);
}
Expand description

Everything a channel needs from the peripheral on the other end of it.

Required Associated Types§

Source

type Word: DmaWord

The word type this peripheral transfers, fixing PWIDTH/MWIDTH.

Required Methods§

Source

fn addr(&self) -> u32

Address of the peripheral’s data register.

Source

fn enable_dma(&mut self)

Lets the peripheral raise DMA requests on its channel.

Until this is called the channel is configured but never asked to move anything, so a transfer would sit at its full count forever.

Source

fn disable_dma(&mut self)

Stops the peripheral raising DMA requests.

Called before the peripheral goes back to its owner, so it is handed over in the state it arrived in rather than still driving a dead channel.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl DmaPeriph<0> for Adc

Source§

impl<SCK, MISO, MOSI> DmaPeriph<1> for Spi<Spi0, SCK, MISO, MOSI, Byte>

Source§

impl<SCK, MISO, MOSI> DmaPeriph<1> for Spi<Spi0, SCK, MISO, MOSI, Word>

Source§

impl<SCK, MISO, MOSI> DmaPeriph<2> for Spi<Spi0, SCK, MISO, MOSI, Byte>

Source§

impl<SCK, MISO, MOSI> DmaPeriph<2> for Spi<Spi0, SCK, MISO, MOSI, Word>

Source§

impl<SCK, MISO, MOSI> DmaPeriph<3> for Spi<Spi1, SCK, MISO, MOSI, Byte>

Source§

impl<SCK, MISO, MOSI> DmaPeriph<3> for Spi<Spi1, SCK, MISO, MOSI, Word>

Source§

impl<SCK, MISO, MOSI> DmaPeriph<4> for Spi<Spi1, SCK, MISO, MOSI, Byte>

Source§

impl<SCK, MISO, MOSI> DmaPeriph<4> for Spi<Spi1, SCK, MISO, MOSI, Word>

Source§

impl<TX, RX> DmaPeriph<1> for Usart<Usart0, TX, RX, Byte>

Source§

impl<TX, RX> DmaPeriph<1> for Usart<Usart0, TX, RX, Word>

Source§

impl<TX, RX> DmaPeriph<2> for Usart<Usart0, TX, RX, Byte>

Source§

impl<TX, RX> DmaPeriph<2> for Usart<Usart0, TX, RX, Word>

Source§

impl<TX, RX> DmaPeriph<3> for Usart<Usart1, TX, RX, Byte>

Source§

impl<TX, RX> DmaPeriph<3> for Usart<Usart1, TX, RX, Word>

Source§

impl<TX, RX> DmaPeriph<4> for Usart<Usart1, TX, RX, Byte>

Source§

impl<TX, RX> DmaPeriph<4> for Usart<Usart1, TX, RX, Word>