Simple library to manage the WatchDog timer, tested on LPC1768
WatchDogTimer.h@0:3744cb611b63, 2015-01-03 (annotated)
- Committer:
- wyunreal
- Date:
- Sat Jan 03 13:26:51 2015 +0000
- Revision:
- 0:3744cb611b63
Simple library to manage the WatchDog timer
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wyunreal | 0:3744cb611b63 | 1 | /** |
wyunreal | 0:3744cb611b63 | 2 | * Apache License |
wyunreal | 0:3744cb611b63 | 3 | * Version 2.0, January 2004 |
wyunreal | 0:3744cb611b63 | 4 | * http://www.apache.org/licenses/ |
wyunreal | 0:3744cb611b63 | 5 | */ |
wyunreal | 0:3744cb611b63 | 6 | |
wyunreal | 0:3744cb611b63 | 7 | #ifndef WATCH_DOG_TIMER_H |
wyunreal | 0:3744cb611b63 | 8 | #define WATCH_DOG_TIMER_H |
wyunreal | 0:3744cb611b63 | 9 | |
wyunreal | 0:3744cb611b63 | 10 | #include "mbed.h" |
wyunreal | 0:3744cb611b63 | 11 | |
wyunreal | 0:3744cb611b63 | 12 | class WatchDogTimer { |
wyunreal | 0:3744cb611b63 | 13 | public: |
wyunreal | 0:3744cb611b63 | 14 | |
wyunreal | 0:3744cb611b63 | 15 | static const int SYSTEM_RESET_NORMAL = 1; |
wyunreal | 0:3744cb611b63 | 16 | static const int SYSTEM_RESET_WATCH_DOG = 2; |
wyunreal | 0:3744cb611b63 | 17 | |
wyunreal | 0:3744cb611b63 | 18 | WatchDogTimer(float seconds); |
wyunreal | 0:3744cb611b63 | 19 | void feed(); |
wyunreal | 0:3744cb611b63 | 20 | static int systemResetReason(); |
wyunreal | 0:3744cb611b63 | 21 | }; |
wyunreal | 0:3744cb611b63 | 22 | |
wyunreal | 0:3744cb611b63 | 23 | #endif |