aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2014-02-06 08:32:09 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2014-02-06 08:32:09 -0500
commit113d0de7eb0fea6939d8ac13f3cfc8cdfdd5d447 (patch)
tree540fa7839ba8f515cd71e55b13bd5b1aae625ac9
parent55f51b2bb2e2cf82883ddd1ea39132eb06ea8773 (diff)
parent69a8183a5e3b2ffb3b19d3d8d9c7b0c81c83e808 (diff)
downloadlibrambutan-113d0de7eb0fea6939d8ac13f3cfc8cdfdd5d447.tar.gz
librambutan-113d0de7eb0fea6939d8ac13f3cfc8cdfdd5d447.zip
Merge pull request #83 from wesen/bug/clear-dma-irq-flag-first
always clear ISR DMA bit before even calling handler
-rw-r--r--libmaple/dma_private.h2
1 files changed, 1 insertions, 1 deletions
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