diff options
author | Daniel Friesel <derf@finalrewind.org> | 2017-12-08 15:07:52 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2017-12-08 15:07:52 +0100 |
commit | dcf84169ae75b11c1656d45dbc6c626d93da6a10 (patch) | |
tree | d78ad84e6aba1f5f13037e40141013f3a3061d54 /src/arch/esp8266/arch.cc | |
parent | 56f2d90751f1c1b2db925da215a14721cf18d483 (diff) |
Add output support (broken on esp8266)
Diffstat (limited to 'src/arch/esp8266/arch.cc')
-rw-r--r-- | src/arch/esp8266/arch.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/esp8266/arch.cc b/src/arch/esp8266/arch.cc index 0e11f2d..f5d1c91 100644 --- a/src/arch/esp8266/arch.cc +++ b/src/arch/esp8266/arch.cc @@ -10,6 +10,8 @@ extern "C" { void ets_timer_arm_new(os_timer_t *ptimer, uint32_t milliseconds, bool repeat_flag, bool us_flag); void ets_timer_disarm(os_timer_t *ptimer); void ets_timer_setfn(os_timer_t *ptimer, os_timer_func_t *pfunction, void *parg); +extern void (*__init_array_start)(); +extern void (*__init_array_end)(); } #define user_procTaskPrio 0 @@ -30,6 +32,9 @@ extern int main(void); void ICACHE_FLASH_ATTR jump_to_main(void) { + for (void (**p)() = &__init_array_start; p != &__init_array_start; p++) { + (*p)(); + } #ifdef WITH_LOOP os_timer_disarm(&loop_timer); os_timer_setfn(&loop_timer, (os_timer_func_t *)jump_to_loop, (void *)0); |