stm32: Refactor DMA interrupts
Previously, every dma interrupt handler called the same `on_irq` function which had to check the state of every dma channel. Now, each dma interrupt handler only calls an `on_irq` method for its corresponding channel or channels.
This commit is contained in:
@ -88,6 +88,11 @@ pub(crate) mod sealed {
|
||||
|
||||
/// Sets the waker that is called when this channel stops (either completed or manually stopped)
|
||||
fn set_waker(&mut self, waker: &Waker);
|
||||
|
||||
/// This is called when this channel triggers an interrupt.
|
||||
/// Note: Because some channels share an interrupt, this function might be
|
||||
/// called for a channel that didn't trigger an interrupt.
|
||||
fn on_irq();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user