diff options
Diffstat (limited to 'os/hal/ports')
-rw-r--r-- | os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h b/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h index 157e9432d..b1ef8a903 100644 --- a/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h +++ b/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h @@ -437,9 +437,9 @@ typedef struct { flags = ((dma)->ISR >> STM32_DMA_ISR_SHIFT(s)) & STM32_DMA_ISR_MASK; \
if (flags & STM32_DMA_ISR_MASK) { \
(dma)->IFCR = flags << STM32_DMA_ISR_SHIFT(s); \
- if (_stm32_dma_isr_redir[s].dma_func) { \
- _stm32_dma_isr_redir[s].dma_func(_stm32_dma_isr_redir[s].dma_param, \
- flags); \
+ if (_stm32_dma_isr_redir[(s) - 1U].dma_func) { \
+ _stm32_dma_isr_redir[(s) - 1U].dma_func(_stm32_dma_isr_redir[(s) - \
+ 1U].dma_param, flags); \
} \
} \
}
|