pub struct DmaChannelConfig {
pub src_peripheral: u8,
pub dst_peripheral: u8,
pub flow_control: FlowControl,
pub src_width: TransferWidth,
pub dst_width: TransferWidth,
pub src_burst: BurstSize,
pub dst_burst: BurstSize,
pub src_inc: bool,
pub dst_inc: bool,
pub transfer_int: bool,
pub error_int: bool,
pub bus_lock: bool,
}Expand description
DMA channel configuration.
Fields§
§src_peripheral: u8Source peripheral select (0-15).
dst_peripheral: u8Destination peripheral select (0-15).
flow_control: FlowControlFlow control mode.
src_width: TransferWidthSource transfer width.
dst_width: TransferWidthDestination transfer width.
src_burst: BurstSizeSource burst size.
dst_burst: BurstSizeDestination burst size.
src_inc: boolIncrement source address after each beat.
dst_inc: boolIncrement destination address after each beat.
transfer_int: boolEnable transfer complete interrupt.
error_int: boolEnable error interrupt.
bus_lock: boolBus lock during transfer.
Implementations§
Source§impl DmaChannelConfig
impl DmaChannelConfig
Sourcepub fn mem_to_peripheral(self, peri: DmaPeripheral) -> Self
pub fn mem_to_peripheral(self, peri: DmaPeripheral) -> Self
Configure this channel for a memory → peripheral transfer to peri:
sets MemToPeripheral flow control, the destination handshaking ID, and
holds the destination address fixed (a peripheral data register).
Sourcepub fn peripheral_to_mem(self, peri: DmaPeripheral) -> Self
pub fn peripheral_to_mem(self, peri: DmaPeripheral) -> Self
Configure this channel for a peripheral → memory transfer from peri:
sets PeripheralToMem flow control, the source handshaking ID, and holds
the source address fixed (a peripheral data register).
Trait Implementations§
Source§impl Clone for DmaChannelConfig
impl Clone for DmaChannelConfig
Source§fn clone(&self) -> DmaChannelConfig
fn clone(&self) -> DmaChannelConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more