diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-16 01:54:40 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-16 19:20:17 +0200 |
commit | f12ea7c7ed1ef97ee48c4356dbbc808cc2bdee4a (patch) | |
tree | cfc9cddfdfccfc4129b88bf2c88515c7e7517252 /esp8266/main.c | |
parent | 0abb5609b01c1b59d229bde8a0b3fc1df6dce060 (diff) | |
download | micropython-f12ea7c7ed1ef97ee48c4356dbbc808cc2bdee4a.tar.gz micropython-f12ea7c7ed1ef97ee48c4356dbbc808cc2bdee4a.zip |
esp8266: Implement task-based, event-driven interface with UART.
This enables proper interfacing with underlying OS - MicroPython doesn't
run the main loop, OS does, MicroPython just gets called when some event
takes place.
Diffstat (limited to 'esp8266/main.c')
-rw-r--r-- | esp8266/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/esp8266/main.c b/esp8266/main.c index 68d015a26c..86f306cbef 100644 --- a/esp8266/main.c +++ b/esp8266/main.c @@ -52,6 +52,12 @@ soft_reset: printf("\n"); +#if MICROPY_REPL_EVENT_DRIVEN + pyexec_friendly_repl_init(); + uart_task_init(); + return; + goto soft_reset; +#else for (;;) { if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) { if (pyexec_raw_repl() != 0) { @@ -65,6 +71,7 @@ soft_reset: } goto soft_reset; +#endif } mp_lexer_t *mp_lexer_new_from_file(const char *filename) { |