 |
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Go to the documentation of this file.
49 const unsigned int monitorFrequency = MICROSECOND << 7)
52 m_sleepTime(monitorFrequency) { }
64 register unsigned int delay =
CNT + this->m_sleepTime;
67 delay += this->m_sleepTime;
68 const unsigned int timeSinceTimerReset =
CNT - this->m_timer;
69 if (timeSinceTimerReset > this->m_timeout)
75 const unsigned int m_timeout;
76 const unsigned int m_sleepTime;
77 volatile unsigned int m_timer;
WatchDog(const uint32_t(&stack)[N], const unsigned int timeout, const unsigned int monitorFrequency=MICROSECOND<< 7)
Constructor.
void reset()
Reset the timer.
Helper class for creating easy parallel applications.
Simple WatchDog object for resetting the chip if it stops responding.
void run()
Invoked in the new cog, this method should be the root of the business logic.
#define waitcnt(a)
Wait until system counter reaches a value.
#define CNT
The system clock count.
static void reboot()
Perform hard reboot.
Generic definitions and functions for the Parallax Propeller.