Arduino-Scheduler
Portable Collaborative Multi-Tasking Scheduler for Arduino
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Watchdog.h
Go to the documentation of this file.
1
22
#ifndef BLINK_H
23
#define BLINK_H
24
25
template
<
unsigned
int
DEADLINE,
void
(*ALARM)(
unsigned
long
ms)>
26
class
Watchdog
{
27
public
:
28
static
void
setup
()
29
{
30
}
31
static
void
loop
()
32
{
33
unsigned
long
start = millis();
34
yield
();
35
unsigned
long
ms = millis() - start;
36
if
(ms > DEADLINE) ALARM(ms);
37
}
38
};
39
40
#endif
Watchdog::setup
static void setup()
Definition:
Watchdog.h:28
Watchdog::loop
static void loop()
Definition:
Watchdog.h:31
Watchdog
Definition:
Watchdog.h:26
yield
void yield(void)
Definition:
Scheduler.cpp:153
examples
SchedulerWatchdogTemplate
Watchdog.h
Generated on Thu Aug 31 2017 12:52:30 for Arduino-Scheduler by
1.8.11