summaryrefslogtreecommitdiff
path: root/stmhal/stm32_it.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-11-24 15:40:59 +0000
committerDamien George <damien.p.george@gmail.com>2015-11-24 15:44:16 +0000
commit22bd23114af166980bad6ff00caaf97fdb1f2cf4 (patch)
tree4be3618d58fdebc611b95ebbb3de77592eb71ae6 /stmhal/stm32_it.c
parent9936aa3f87046c92ec8721a5f5734612e178e8eb (diff)
stmhal: On SysTick IRQ, only process one DMA channel at a time.
This can be generalised if/when more processing is needed by SysTick. Thanks to @chuckbook for the idea.
Diffstat (limited to 'stmhal/stm32_it.c')
-rw-r--r--stmhal/stm32_it.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/stmhal/stm32_it.c b/stmhal/stm32_it.c
index 8a00c1469..aaa1aaca7 100644
--- a/stmhal/stm32_it.c
+++ b/stmhal/stm32_it.c
@@ -269,8 +269,12 @@ void SysTick_Handler(void) {
// work properly.
SysTick->CTRL;
+ // Right now we just have the DMA controllers to process during this
+ // interrupt and we use a custom dispatch handler. If this needs to
+ // be generalised in the future then a dispatch table can be used as
+ // follows: ((void(*)(void))(systick_dispatch[uwTick & 0xf]))();
if (DMA_IDLE_ENABLED() && DMA_IDLE_TICK(uwTick)) {
- dma_idle_handler();
+ dma_idle_handler(uwTick);
}
}