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
This commit is contained in:
parent
59610c4004
commit
967f3230f5
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user