Watchdog Timer for the K64F. User can set timeout value from 1 to 356 seconds with a one second resolution.

Dependents:   Telliskivi2_2014 mbed-IBooth-ETH TwitterReader

Files at this revision

API Documentation at this revision

Comitter:
loopsva
Date:
Fri Nov 14 17:22:46 2014 +0000
Parent:
0:2a46d40a176e
Commit message:
Added Compiler K64F target flag

Changed in this revision

Watchdog.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 2a46d40a176e -r 70e99b5845fd Watchdog.cpp
--- a/Watchdog.cpp	Mon Oct 20 23:40:26 2014 +0000
+++ b/Watchdog.cpp	Fri Nov 14 17:22:46 2014 +0000
@@ -1,6 +1,8 @@
 #include "mbed.h"
 #include "Watchdog.h"
 
+#if defined(TARGET_K64F)
+
 void Watchdog::kick(int toVal) {  
     const uint32_t K64FWDONESEC = 0x00B80000;   //approx 1 second delay
     if((toVal < 1) || (toVal > 356)) toVal = 356;
@@ -28,4 +30,6 @@
     WDOG_UNLOCK = 0xD928; 
     WDOG_STCTRLH |= 0x0001;
     kick();
-}
\ No newline at end of file
+}
+
+#endif  //(TARGET_K64F)