![]() |
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Simple WatchDog object for resetting the chip if it stops responding. More...
#include <PropWare/concurrent/watchdog.h>
Inheritance diagram for PropWare::WatchDog:
Collaboration diagram for PropWare::WatchDog:Public Member Functions | |
| template<size_t N> | |
| WatchDog (const uint32_t(&stack)[N], const unsigned int timeout, const unsigned int monitorFrequency=MICROSECOND<< 7) | |
| Constructor. More... | |
| void | reset () |
| Reset the timer. | |
| void | run () |
| Invoked in the new cog, this method should be the root of the business logic. | |
Static Public Member Functions | |
| template<class T > | |
| static int8_t | invoke (T &runnable) |
| Start a new cog running the given object. More... | |
Simple WatchDog object for resetting the chip if it stops responding.
Definition at line 37 of file watchdog.h.
| PropWare::WatchDog::WatchDog | ( | const uint32_t(&) | stack[N], |
| const unsigned int | timeout, | ||
| const unsigned int | monitorFrequency = MICROSECOND << 7 |
||
| ) |
Constructor.
| [in] | stack[] | A small stack for a few variables |
| [in] | timeout | Length of time (in clock ticks) before the Propeller should be reset |
| [in] | monitorFrequency | Length of time to sleep between each check for the timeout (default value of 128us is recommended) |
Definition at line 48 of file watchdog.h.
|
staticinherited |
Start a new cog running the given object.
| [in] | runnable | Object that should be invoked in a new cog |
Definition at line 85 of file runnable.h.
Here is the call graph for this function:
1.8.17