Struct stm32_hal2::dma::Dma [−][src]
pub struct Dma<D> {
pub regs: D,
}
Expand description
Represents a Direct Memory Access (DMA) peripheral.
Fields
regs: D
Implementations
Initialize a DMA peripheral, including enabling and resetting its RCC peripheral clock.
pub fn cfg_channel(
&mut self,
channel: DmaChannel,
periph_addr: u32,
mem_addr: u32,
num_data: u16,
direction: Direction,
periph_size: DataSize,
mem_size: DataSize,
cfg: ChannelCfg
)
pub fn cfg_channel(
&mut self,
channel: DmaChannel,
periph_addr: u32,
mem_addr: u32,
num_data: u16,
direction: Direction,
periph_size: DataSize,
mem_size: DataSize,
cfg: ChannelCfg
)
Configure a DMA channel. See L4 RM 0394, section 11.4.4. Sets the Transfer Complete interrupt.
Stop DMA.
Select which peripheral on a given channel we’re using. See L44 RM, Table 41.
Enable a specific type of interrupt. Note that the TransferComplete
interrupt
is enabled automatically, by the cfg_channel
method.