Struct stm32_hal2::dma::Dma2Ch1
source · pub struct Dma2Ch1 {}
Expand description
Experimental/WIP channel-based DMA struct.
Implementations§
source§impl Dma2Ch1
impl Dma2Ch1
sourcepub fn new() -> Self
pub fn new() -> Self
Initialize a DMA peripheral, including enabling and resetting its RCC peripheral clock. Note that the clock may have already been enabled by a different channel’s constructor.
sourcepub fn cfg_channel(
&mut self,
periph_addr: u32,
mem_addr: u32,
num_data: u32,
direction: Direction,
periph_size: DataSize,
mem_size: DataSize,
cfg: ChannelCfg
)
pub fn cfg_channel( &mut self, periph_addr: u32, mem_addr: u32, num_data: u32, 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. Note that this fn has been (perhaps) depreciated by the standalone fn.
sourcepub fn enable_interrupt(&mut self, interrupt: DmaInterrupt)
pub fn enable_interrupt(&mut self, interrupt: DmaInterrupt)
Enable a specific type of interrupt.
sourcepub fn clear_interrupt(&mut self, interrupt: DmaInterrupt)
pub fn clear_interrupt(&mut self, interrupt: DmaInterrupt)
Clear an interrupt flag.
Auto Trait Implementations§
impl RefUnwindSafe for Dma2Ch1
impl Send for Dma2Ch1
impl Sync for Dma2Ch1
impl Unpin for Dma2Ch1
impl UnwindSafe for Dma2Ch1
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more