Explorar o código

【修复】多线程功能未开启时,出现的编译错误。

Signed-off-by: armink <armink.ztl@gmail.com>
armink %!s(int64=7) %!d(string=hai) anos
pai
achega
fb91932441
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      lib/utils/mpirq.c

+ 2 - 0
lib/utils/mpirq.c

@@ -78,8 +78,10 @@ void mp_irq_handler(mp_irq_obj_t *self) {
             }
             }
             gc_unlock();
             gc_unlock();
         } else {
         } else {
+#if MICROPY_ENABLE_SCHEDULER
             // Schedule call to user function
             // Schedule call to user function
             mp_sched_schedule(self->handler, self->parent);
             mp_sched_schedule(self->handler, self->parent);
+#endif
         }
         }
     }
     }
 }
 }