stmhal: Fix build issue when MICROPY_PY_THREAD is disabled.
This commit is contained in:
parent
00e7176624
commit
8e00844929
|
@ -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
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue