#[non_exhaustive]pub struct Channel<Dm, CH>where
    Dm: DriverMode,
    CH: DmaChannel,{
    pub rx: ChannelRx<Dm, CH::Rx>,
    pub tx: ChannelTx<Dm, CH::Tx>,
}Expand description
DMA Channel
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rx: ChannelRx<Dm, CH::Rx>RX half of the channel
tx: ChannelTx<Dm, CH::Tx>TX half of the channel
Implementations§
Source§impl<CH: DmaChannel, Dm: DriverMode> Channel<Dm, CH>
 
impl<CH: DmaChannel, Dm: DriverMode> Channel<Dm, CH>
Sourcepub fn runtime_ensure_compatible<P: DmaEligible>(&self, _peripheral: &P)
 
pub fn runtime_ensure_compatible<P: DmaEligible>(&self, _peripheral: &P)
Asserts that the channel is compatible with the given peripheral.
Source§impl<CH> Channel<Blocking, CH>where
    CH: DmaChannel,
 
impl<CH> Channel<Blocking, CH>where
    CH: DmaChannel,
Sourcepub fn new(channel: CH) -> Self
 Available on crate feature unstable only.
pub fn new(channel: CH) -> Self
unstable only.Creates a new DMA channel driver.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
 Available on crate feature unstable only.
pub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
unstable only.Sets the interrupt handler for RX and TX interrupts.
Interrupts are not enabled at the peripheral level here.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn listen(&mut self, interrupts: impl Into<EnumSet<DmaInterrupt>>)
 
pub fn listen(&mut self, interrupts: impl Into<EnumSet<DmaInterrupt>>)
Listen for the given interrupts
Sourcepub fn unlisten(&mut self, interrupts: impl Into<EnumSet<DmaInterrupt>>)
 
pub fn unlisten(&mut self, interrupts: impl Into<EnumSet<DmaInterrupt>>)
Unlisten the given interrupts
Sourcepub fn interrupts(&mut self) -> EnumSet<DmaInterrupt>
 
pub fn interrupts(&mut self) -> EnumSet<DmaInterrupt>
Gets asserted interrupts
Sourcepub fn clear_interrupts(&mut self, interrupts: impl Into<EnumSet<DmaInterrupt>>)
 
pub fn clear_interrupts(&mut self, interrupts: impl Into<EnumSet<DmaInterrupt>>)
Resets asserted interrupts
Sourcepub fn set_priority(&mut self, priority: DmaPriority)
 
pub fn set_priority(&mut self, priority: DmaPriority)
Configure the channel priorities.
Sourcepub fn into_async(self) -> Channel<Async, CH>
 
pub fn into_async(self) -> Channel<Async, CH>
Converts a blocking channel to an async channel.
Source§impl<CH> Channel<Async, CH>where
    CH: DmaChannel,
 
impl<CH> Channel<Async, CH>where
    CH: DmaChannel,
Sourcepub fn into_blocking(self) -> Channel<Blocking, CH>
 
pub fn into_blocking(self) -> Channel<Blocking, CH>
Converts an async channel to a blocking channel.