summaryrefslogtreecommitdiff
path: root/stmhal/stm32_it.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-01-31 19:52:50 +1100
committerDamien George <damien.p.george@gmail.com>2017-01-31 19:52:50 +1100
commit8e008449298d95addf6bd56f448b0d100b163399 (patch)
tree6cd5e34f2f130cf01fdfc3665fa7c5a9a41c2fb1 /stmhal/stm32_it.c
parent00e717662449cacdb2bc40988b12831749a7369b (diff)
stmhal: Fix build issue when MICROPY_PY_THREAD is disabled.
Diffstat (limited to 'stmhal/stm32_it.c')
-rw-r--r--stmhal/stm32_it.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stmhal/stm32_it.c b/stmhal/stm32_it.c
index a6503d310..4dddc5e0b 100644
--- a/stmhal/stm32_it.c
+++ b/stmhal/stm32_it.c
@@ -289,10 +289,12 @@ void SysTick_Handler(void) {
dma_idle_handler(uwTick);
}
+ #if MICROPY_PY_THREAD
// signal a thread switch at 4ms=250Hz
if (pyb_thread_enabled && (uwTick & 0x03) == 0x03) {
SCB->ICSR = SCB_ICSR_PENDSVSET_Msk;
}
+ #endif
}
/******************************************************************************/