From 69a8183a5e3b2ffb3b19d3d8d9c7b0c81c83e808 Mon Sep 17 00:00:00 2001 From: Manuel Odendahl Date: Thu, 6 Feb 2014 12:53:08 +0100 Subject: always clear ISR DMA bit before even calling handler --- libmaple/dma_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmaple/dma_private.h b/libmaple/dma_private.h index b25ded2..82f5fc1 100644 --- a/libmaple/dma_private.h +++ b/libmaple/dma_private.h @@ -38,10 +38,10 @@ * in the series support files, which need dma_irq_handler().) */ #ifdef DMA_GET_HANDLER static __always_inline void dma_irq_handler(dma_dev *dev, dma_tube tube) { + dma_clear_isr_bits(dev, tube); /* in case handler doesn't */ void (*handler)(void) = DMA_GET_HANDLER(dev, tube); if (handler) { handler(); - dma_clear_isr_bits(dev, tube); /* in case handler doesn't */ } } #endif -- cgit v1.2.3