summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-12-06 14:49:23 +0100
committerDaniel Friesel <derf@finalrewind.org>2017-12-06 14:49:23 +0100
commit56f2d90751f1c1b2db925da215a14721cf18d483 (patch)
treecfc948d18701b15d31c24d5b611dcc39d18e75e2 /src/arch
parente49ce1e6d726ba7d3e6f80a9608d80cab316df32 (diff)
esp8266: Disable WiFi by default
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/esp8266/arch.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/esp8266/arch.cc b/src/arch/esp8266/arch.cc
index 3542423..0e11f2d 100644
--- a/src/arch/esp8266/arch.cc
+++ b/src/arch/esp8266/arch.cc
@@ -35,6 +35,12 @@ void ICACHE_FLASH_ATTR jump_to_main(void)
os_timer_setfn(&loop_timer, (os_timer_func_t *)jump_to_loop, (void *)0);
os_timer_arm(&loop_timer, 1000, 1);
#endif
+ // Disable Wi-Fi
+ wifi_station_disconnect();
+ wifi_set_opmode_current(NULL_MODE);
+ wifi_fpm_set_sleep_type(MODEM_SLEEP_T);
+ wifi_fpm_open();
+ wifi_fpm_do_sleep(0xFFFFFFF);
main();
}