summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-12-06 13:18:21 +0100
committerDaniel Friesel <derf@finalrewind.org>2017-12-06 13:18:21 +0100
commit82b779944d2c733d1db7a63a87452d9a5654a554 (patch)
tree96e8794cbd1c5fd479534a2687d817132d18021b /src/arch
parent6bdfa059a45b8b0dffc392e994827467463f0103 (diff)
esp8266: call main() from system_init_done callback
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/esp8266/arch.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/esp8266/arch.cc b/src/arch/esp8266/arch.cc
index e7a26bb..634cf40 100644
--- a/src/arch/esp8266/arch.cc
+++ b/src/arch/esp8266/arch.cc
@@ -14,6 +14,11 @@ extern "C" {
extern int main(void);
+static void ICACHE_FLASH_ATTR jump_to_main(void)
+{
+ main();
+}
+
void Arch::setup(void)
{
}
@@ -24,7 +29,7 @@ void Arch::idle_loop(void)
extern "C" void user_init(void)
{
- main();
+ system_init_done_cb(jump_to_main);
}
Arch arch;