FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
Simple API to use watchdog timer as a clock for events generation. More...
#include <fastarduino/watchdog.h>
Public Member Functions | |
Watchdog (containers::Queue< EVENT > &event_queue) | |
Construct a new watchdog-based clock that will, for each watchdog timeout, add an event to the given event_queue for further processing. More... | |
Public Member Functions inherited from watchdog::WatchdogRTT | |
WatchdogRTT () | |
Construct a new watchdog-based clock that will count elapsed milliseconds since it was started with begin() . More... | |
void | begin (TimeOut timeout=TimeOut::TO_16ms) |
Start the watchdog clock with the given timeout period. More... | |
uint32_t | millis () const |
Get the number of milliseconds that elapsed since begin() was called. More... | |
void | reset () |
Reset current counter to 0. More... | |
void | delay (uint32_t ms) |
Delay program execution for the given amount of milliseconds. More... | |
Public Member Functions inherited from watchdog::WatchdogSignal | |
void | begin (TimeOut timeout=TimeOut::TO_16ms) |
Start the watchdog timer with the given timeout period. More... | |
void | end () |
Stop this watchdog timer. More... | |
Friends | |
struct | isr_handler |
Simple API to use watchdog timer as a clock for events generation.
For this to work correctly, you need to register the proper ISR through REGISTER_WATCHDOG_CLOCK_ISR()
macro first.
EVENT | the events::Event<T> generated |
Definition at line 301 of file watchdog.h.
|
inlineexplicit |
Construct a new watchdog-based clock that will, for each watchdog timeout, add an event to the given event_queue
for further processing.
This clock also counts elapsed milliseconds since it was started with begin()
.
event_queue | the queue to which Event s will be pushed on each watchdog tick |
Definition at line 316 of file watchdog.h.
|
friend |
Definition at line 330 of file watchdog.h.