From e39db81ca33db92f04012503cbc3270c2585c7dd Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 12 Jun 2016 12:49:26 +0200 Subject: [PATCH] Added a hook to user_init in core_esp8266_main.c to be able to do very early things, like disabling wifi see: https://github.com/esp8266/Arduino/issues/2111#issuecomment-224251391 --- cores/esp8266/core_esp8266_main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cores/esp8266/core_esp8266_main.cpp b/cores/esp8266/core_esp8266_main.cpp index 0c1eb02bfe..d04c2e71ee 100644 --- a/cores/esp8266/core_esp8266_main.cpp +++ b/cores/esp8266/core_esp8266_main.cpp @@ -134,6 +134,7 @@ void init_done() { esp_schedule(); } +extern void early_init(); extern "C" void user_init(void) { struct rst_info *rtc_info_ptr = system_get_rst_info(); @@ -152,4 +153,7 @@ extern "C" void user_init(void) { LOOP_QUEUE_SIZE); system_init_done_cb(&init_done); + + // early init stuff from user sketch + early_init(); }