Statistics: Posted by wawaii — Thu Aug 25, 2016 5:29 pm
Statistics: Posted by ESP_Rubin — Thu Aug 25, 2016 10:40 am
Statistics: Posted by wawaii — Wed Aug 24, 2016 8:06 pm
Code:
void ICACHE_FLASH_ATTR
save_power() {
gpio_pin_wakeup_enable(KEY_SWITCH_NUM, GPIO_PIN_INTR_LOLEVEL);
wifi_station_disconnect();
wifi_set_opmode(NULL_MODE); // set WiFi mode to null mode
wifi_fpm_set_sleep_type(LIGHT_SLEEP_T); // set modem sleep
wifi_fpm_open(); // enable force sleep
wifi_fpm_set_wakeup_cb(wakeup_cb);
wifi_fpm_do_sleep(FPM_SLEEP_MAX_TIME);
}
Statistics: Posted by wawaii — Tue Aug 23, 2016 7:36 pm