Interface exposing basic LPC1768 watchdog timer functionality.

Revision:
0:f39b85bbe46f
Child:
1:bb42bb1359b9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/WatchdogTimer.h	Sun Sep 02 14:54:58 2012 +0000
@@ -0,0 +1,37 @@
+#ifndef MBED_WATCHDOG_TIMER_H
+#define MBED_WATCHDOG_TIMER_H
+
+/**
+ * Encapsulation of basic LPC1768 watchdog timer functionality.
+ *
+ * References:
+ *  1) Chapter 28 in the LPC17xx UM.
+ *  2) http://mbed.org/cookbook/WatchDog-Timer
+ */
+class WatchdogTimer
+{
+
+public:
+    /**
+     * WatchDogTimer no-arg constructor.
+     */
+    WatchdogTimer();
+    
+    /**
+     * Enable and activate the watchdog with a given timeout value.
+     *
+     * Note! Once the watchdog has been enabled, there's no way to disable it.
+     *
+     * @param timeout watch time-out value (in seconds) 
+     */    
+    void enable(float timeout);
+    
+    /**
+     * Feed the watchdog to reset the countdown timer.
+     */    
+    void feed();
+
+    static bool causedReset();
+};
+
+#endif
\ No newline at end of file