41 os_printf(
"scanner still running - rescheduling reccont\n");
67 os_printf(
"watchdog restarted wifi and started wifi scanner\n");
80 (watchdog_list[i].last_reset) &&
81 ((int32_t)watchdog_list[i].last_reset < (int32_t)(uptime - watchdog_list[i].timeout))) {
83 os_printf(
"watchdog timeout, id: %d\n", watchdog_list[i].
id);
85 switch (watchdog_list[i].type) {
102 os_printf(
"stopped wifi and wifi scanner\n");
109 os_printf(
"scheduled wifi for restart...\n");
126 memset(watchdog_list, 0x00,
sizeof(watchdog_list));
169 os_printf(
"watchdog error, cant add more\n");
178 os_printf(
"remove watchdog, id: %d\n",
id);
188 os_printf(
"watchdog error, cant remove %d\n",
id);
198 os_printf(
"reset watchdog, id: %d\n",
id);
201 if (watchdog_list[i].
id ==
id) {
void ICACHE_FLASH_ATTR wifi_start_scan()
ICACHE_FLASH_ATTR void led_pattern_b(void)
void ICACHE_FLASH_ATTR wifi_stop_scan()
ICACHE_FLASH_ATTR static void wifi_reconnect_timer_func(void *arg)
bool wifi_set_opmode_current(uint8 opmode)
volatile uint32_t timeout
ICACHE_FLASH_ATTR static void watchdog_timer_func(void *arg)
ICACHE_FLASH_ATTR static void ext_watchdog_timer_func(void *arg)
volatile watchdog_type_t type
ICACHE_FLASH_ATTR void stop_watchdog()
volatile uint32_t last_reset
#define ICACHE_FLASH_ATTR
void ICACHE_FLASH_ATTR gpio16_output_conf(void)
void ICACHE_FLASH_ATTR set_my_auto_connect(bool enabled)
ICACHE_FLASH_ATTR uint32_t get_uptime(void)
uint8 wifi_get_opmode(void)
volatile uint8_t watchdog_list_len
ICACHE_FLASH_ATTR void reset_watchdog(uint32_t id)
#define NETWORK_RESTART_DELAY
ICACHE_FLASH_ATTR bool remove_watchdog(uint32_t id)
void ICACHE_FLASH_ATTR gpio16_output_set(uint8 value)
void system_restart(void)
bool ICACHE_FLASH_ATTR wifi_scan_is_running()
static os_timer_t watchdog_timer
static os_timer_t ext_watchdog_timer
uint8 ICACHE_FLASH_ATTR gpio16_input_get(void)
ICACHE_FLASH_ATTR void start_watchdog()
watchdog_t watchdog_list[WATCHDOG_MAX]
bool wifi_station_disconnect(void)
#define os_timer_arm(a, b, c)
ICACHE_FLASH_ATTR void led_stop_pattern(void)
ICACHE_FLASH_ATTR bool add_watchdog(uint32_t id, watchdog_type_t type, uint32_t timeout)
ICACHE_FLASH_ATTR void init_watchdog()
bool wifi_station_connect(void)
static os_timer_t wifi_reconnect_timer