diff options
author | Josef Gajdusek <atx@atx.name> | 2015-05-17 11:22:26 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-05-26 22:22:08 +0300 |
commit | 967f3230f554cb6d0682eaf1f74878f5f1534f42 (patch) | |
tree | 01b72f8db72f36a02a1c925e11aa08668d70083b | |
parent | 59610c400480891c3c6cd29814fdf67a80ac3b69 (diff) | |
download | micropython-967f3230f554cb6d0682eaf1f74878f5f1534f42.tar.gz micropython-967f3230f554cb6d0682eaf1f74878f5f1534f42.zip |
esp8266: Move initialization to system_init_done_cb
Initializing too early caused some of the API functions (wifi_*) to fail
when called in main.py
-rw-r--r-- | esp8266/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/esp8266/main.c b/esp8266/main.c index 59b415c1d9..95315dae46 100644 --- a/esp8266/main.c +++ b/esp8266/main.c @@ -37,6 +37,7 @@ #include "pyexec.h" #include "gccollect.h" #include MICROPY_HAL_H +#include "user_interface.h" STATIC char heap[16384]; @@ -60,13 +61,17 @@ void soft_reset(void) { pyexec_event_repl_init(); } -void user_init(void) { +void init_done(void) { mp_reset(); mp_hal_stdout_tx_str("\r\n"); pyexec_event_repl_init(); uart_task_init(); } +void user_init(void) { + system_init_done_cb(init_done); +} + mp_lexer_t *mp_lexer_new_from_file(const char *filename) { return NULL; } |