|
FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
Simple API to handle watchdog signals. More...
#include <fastarduino/watchdog.h>

Public Member Functions | |
| void | begin (TimeOut timeout=TimeOut::TO_16ms) |
Start the watchdog timer with the given timeout period. More... | |
| void | end () |
| Stop this watchdog timer. More... | |
Simple API to handle watchdog signals.
In this mode, the AVR watchdog timer is used to wake up the MCU at a specific timer period, in order to leave a low-power sleep mode, to e.g. perform periodic tasks. With this API, you do not need to register an ISR callback if you do not need one; in this situation you need to register an empty ISR with REGISTER_WATCHDOG_ISR_EMPTY() macro. If you want to register a callback on every watchdog timer tick, then you can use either REGISTER_WATCHDOG_ISR_FUNCTION or REGISTER_WATCHDOG_ISR_METHOD macros.
Definition at line 144 of file watchdog.h.
|
inline |
Start the watchdog timer with the given timeout period.
From now on, watchdog interrupts get generated at timeout period, and the MCU gets awakened at this period too, if sleeping.
| timeout | the watchdog timeout period |
Definition at line 159 of file watchdog.h.
|
inline |
Stop this watchdog timer.
No more watchdog interrupts get triggered.
Definition at line 169 of file watchdog.h.