Commit 8e008449 authored by Damien George's avatar Damien George
Browse files

stmhal: Fix build issue when MICROPY_PY_THREAD is disabled.

parent 00e71766
......@@ -454,7 +454,9 @@ int main(void) {
#endif
// basic sub-system init
#if MICROPY_PY_THREAD
pyb_thread_init(&pyb_thread_main);
#endif
pendsv_init();
led_init();
#if MICROPY_HW_HAS_SWITCH
......
......@@ -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
}
/******************************************************************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment