Struct stm32_hal2::dma::Dma1Ch2
source · pub struct Dma1Ch2 {}
Expand description
Experimental/WIP channel-based DMA struct.
Implementations§
source§impl Dma1Ch2
impl Dma1Ch2
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 Freeze for Dma1Ch2
impl RefUnwindSafe for Dma1Ch2
impl Send for Dma1Ch2
impl Sync for Dma1Ch2
impl Unpin for Dma1Ch2
impl UnwindSafe for Dma1Ch2
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