summaryrefslogtreecommitdiff
path: root/embassy-stm32
diff options
context:
space:
mode:
authorBob McWhirter <bmcwhirt@redhat.com>2021-07-12 15:48:26 -0400
committerBob McWhirter <bmcwhirt@redhat.com>2021-07-13 10:09:35 -0400
commit2e10ab2e5c330d7b55f5d7f24379ccd48b6a8b1b (patch)
treea1482104e7b22c0220af07608952628d9f5233a1 /embassy-stm32
parentb0b61d99e69980d8c30923148d32c3f7aa50fcc0 (diff)
downloadembassy-2e10ab2e5c330d7b55f5d7f24379ccd48b6a8b1b.zip
Let's count channels per DMA peripheral, shall we now?
Diffstat (limited to 'embassy-stm32')
-rw-r--r--embassy-stm32/src/bdma/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-stm32/src/bdma/mod.rs b/embassy-stm32/src/bdma/mod.rs
index b4da7928..d62feb5b 100644
--- a/embassy-stm32/src/bdma/mod.rs
+++ b/embassy-stm32/src/bdma/mod.rs
@@ -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);