Browse Source

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

Signed-off-by: armink <armink.ztl@gmail.com>
armink 7 years ago
parent
commit
fb91932441
1 changed files with 2 additions and 0 deletions
  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();
         } else {
+#if MICROPY_ENABLE_SCHEDULER
             // Schedule call to user function
             mp_sched_schedule(self->handler, self->parent);
+#endif
         }
     }
 }