9#include <freertos/FreeRTOS.h>
10#include <freertos/timers.h>
58 Serial.println(
"Watchdog fired.");
Watchdog class for monitoring and resetting a timer.
Definition: watchdog.h:16
Watchdog(unsigned long timeoutMillis)
Constructor to create a Watchdog instance.
Definition: watchdog.h:22
static void timerCallback(TimerHandle_t xTimer)
Static callback function for the timer expiration event.
Definition: watchdog.h:56
unsigned long get_timeout()
Get the milliseconds of the Timeout.
Definition: watchdog.cpp:33
unsigned long timeoutMillis
The timeout duration in milliseconds.
Definition: watchdog.h:49
TimerHandle_t timer
Timer handle for the watchdog timer.
Definition: watchdog.h:50
void stop()
Stop and release the watchdog timer.
Definition: watchdog.cpp:24
void begin()
Start the watchdog timer.
Definition: watchdog.cpp:8
void resetTimer()
Reset the timer to the initial timeout value. This has to be called within timeoutMillis or else the ...
Definition: watchdog.cpp:3