MeterLogger
|
Go to the source code of this file.
Macros | |
#define | WATCHDOG_MAX 1 |
#define | MQTT_WATCHDOG_ID 1 |
#define | MQTT_WATCHDOG_TIMEOUT 120 |
#define | NETWORK_RESTART_DELAY 6000 |
Enumerations | |
enum | watchdog_type_t { NOT_ENABLED, REBOOT, REBOOT_VIA_EXT_WD, NETWORK_RESTART } |
Functions | |
ICACHE_FLASH_ATTR void | init_watchdog () |
ICACHE_FLASH_ATTR void | start_watchdog () |
ICACHE_FLASH_ATTR void | stop_watchdog () |
ICACHE_FLASH_ATTR bool | add_watchdog (uint32_t id, watchdog_type_t type, uint32_t timeout) |
ICACHE_FLASH_ATTR bool | remove_watchdog (uint32_t id) |
ICACHE_FLASH_ATTR void | reset_watchdog (uint32_t id) |
#define MQTT_WATCHDOG_ID 1 |
Definition at line 3 of file watchdog.h.
#define MQTT_WATCHDOG_TIMEOUT 120 |
Definition at line 4 of file watchdog.h.
#define NETWORK_RESTART_DELAY 6000 |
Definition at line 6 of file watchdog.h.
Referenced by watchdog_timer_func().
#define WATCHDOG_MAX 1 |
Definition at line 1 of file watchdog.h.
Referenced by add_watchdog(), reset_watchdog(), and watchdog_timer_func().
enum watchdog_type_t |
Enumerator | |
---|---|
NOT_ENABLED | |
REBOOT | |
REBOOT_VIA_EXT_WD | |
NETWORK_RESTART |
Definition at line 8 of file watchdog.h.
ICACHE_FLASH_ATTR bool add_watchdog | ( | uint32_t | id, |
watchdog_type_t | type, | ||
uint32_t | timeout | ||
) |
Definition at line 155 of file watchdog.c.
References get_uptime(), watchdog_t::id, watchdog_t::last_reset, os_printf, watchdog_t::timeout, watchdog_t::type, watchdog_list_len, and WATCHDOG_MAX.
ICACHE_FLASH_ATTR void init_watchdog | ( | ) |
ICACHE_FLASH_ATTR bool remove_watchdog | ( | uint32_t | id | ) |
Definition at line 175 of file watchdog.c.
References watchdog_t::id, NOT_ENABLED, os_printf, watchdog_t::timeout, watchdog_t::type, and watchdog_list_len.
ICACHE_FLASH_ATTR void reset_watchdog | ( | uint32_t | id | ) |
Definition at line 194 of file watchdog.c.
References get_uptime(), watchdog_t::last_reset, os_printf, and WATCHDOG_MAX.
ICACHE_FLASH_ATTR void start_watchdog | ( | ) |
Definition at line 130 of file watchdog.c.
References ext_watchdog_timer, ext_watchdog_timer_func(), gpio16_output_conf(), gpio16_output_set(), NULL, os_printf, os_timer_arm, os_timer_disarm, os_timer_func_t, os_timer_setfn, watchdog_timer, and watchdog_timer_func().
ICACHE_FLASH_ATTR void stop_watchdog | ( | ) |
Definition at line 148 of file watchdog.c.
References ext_watchdog_timer, os_printf, and os_timer_disarm.