//The callback wifi_suspended_timer_cb detects when the esp8266 has successfully entered modem_sleep and executes the developer's suspend_cb.
//Since this timer is only used in modem_sleep and will never be active outside of modem_sleep, it is unnecessary to register the cb with SWTIMER_REG_CB.
os_timer_arm(&wifi_suspended_test_timer,1,1);
os_timer_arm(&wifi_suspended_test_timer,1,1);
}
}
else{// This should never happen. if it does, return the value for error reporting
else{// This should never happen. if it does, return the value for error reporting
//the function station_check_connect continues the Smart config process and fires the developers callback upon successful connection to the access point.
//If this function manages to get suspended, I think it would be fine to resume the timer.
os_timer_arm(&smart_timer,STATION_CHECK_TIME,0);// no repeat
os_timer_arm(&smart_timer,STATION_CHECK_TIME,0);// no repeat