mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
zephyr: Run scheduled callbacks at REPL and during mp_hal_delay_ms.
And ctrl-C can now interrupt a time.sleep call. This uses Zephyr's k_poll API to wait efficiently for an event signal, and an optional semaphore. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include "py/runtime.h"
|
||||
#include "py/repl.h"
|
||||
#include "py/gc.h"
|
||||
#include "py/mphal.h"
|
||||
#include "py/stackctrl.h"
|
||||
#include "lib/utils/pyexec.h"
|
||||
#include "lib/mp-readline/readline.h"
|
||||
@@ -123,6 +124,7 @@ int real_main(void) {
|
||||
mp_stack_set_limit(CONFIG_MAIN_STACK_SIZE - 512);
|
||||
|
||||
init_zephyr();
|
||||
mp_hal_init();
|
||||
|
||||
#ifdef TEST
|
||||
static const char *argv[] = {"test"};
|
||||
|
||||
Reference in New Issue
Block a user