LPC1768 and LPC11U24 watchdog timer
Dependents: GSwifi_tsutenkaku barometer-m0 BMAGThrRev
WDT.h
- Committer:
- okini3939
- Date:
- 2016-05-25
- Revision:
- 3:b1efde09d8a7
- Parent:
- 2:f6f05e2eafd0
File content as of revision 3:b1efde09d8a7:
#ifndef _WDT_H_ #define _WDT_H_ #include "mbed.h" // Simon's Watchdog // see: http://mbed.org/forum/mbed/topic/508/ class Watchdog { public: // Load timeout value in watchdog timer and enable void init(float s); // "kick" or "feed" the dog - reset the watchdog timer // by writing this required bit pattern void kick(); int getFlg (); void attach (void (*fptr)(void), float s); template<typename T> void attach (T *object, void (*fptr)(void), float s); void sleep (); void deepSleep (); void powerDown (); private: static FunctionPointer _fptr; static void isr_wdt(void); }; #endif