Let's count channels per DMA peripheral, shall we now?

This commit is contained in:
Bob McWhirter
2021-07-12 15:48:26 -04:00
parent b0b61d99e6
commit 2e10ab2e5c
2 changed files with 24 additions and 3 deletions

View File

@ -152,7 +152,7 @@ unsafe fn on_irq() {
pac::$dma.ifcr().write_value(isr);
let dman = <crate::peripherals::$dma as sealed::Dma>::num() as usize;
for chn in 0..7 {
for chn in 0..crate::pac::dma_channels_count!($dma) {
let n = dman * 8 + chn;
if isr.teif(chn) {
STATE.ch_status[n].store(CH_STATUS_ERROR, Ordering::Relaxed);