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
Diff: Watchdog.cpp
- Revision:
- 1:70e99b5845fd
- Parent:
- 0:2a46d40a176e
--- 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)