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§
Required Methods§
Sourcefn enable_dma(&mut self)
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.
Sourcefn disable_dma(&mut self)
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".