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.
This commit is contained in:
Paul Sokolovsky
2015-01-16 01:54:40 +02:00
parent 0abb5609b0
commit f12ea7c7ed
4 changed files with 32 additions and 1 deletions

View File

@@ -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) {