Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
Diff: Watchdog/Watchdog.cpp
- Revision:
- 9:ada056631cac
- Parent:
- 8:ecf68db484af
- Child:
- 10:db13782f05d9
--- a/Watchdog/Watchdog.cpp Fri Oct 10 21:46:52 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-// Simon's Watchdog code from
-// http://mbed.org/forum/mbed/topic/508/
-
-#include "mbed.h"
-
-class Watchdog {
-public:
-// Load timeout value in watchdog timer and enable
- void kick(float s) {
- LPC_WDT->WDCLKSEL = 0x1; // Set CLK src to PCLK
- uint32_t clk = SystemCoreClock / 16; // WD has a fixed /4 prescaler, PCLK default is /4
- LPC_WDT->WDTC = s * (float)clk;
- LPC_WDT->WDMOD = 0x3; // Enabled and Reset
- kick();
- }
-// "kick" or "feed" the dog - reset the watchdog timer
-// by writing this required bit pattern
- void kick() {
- LPC_WDT->WDFEED = 0xAA;
- LPC_WDT->WDFEED = 0x55;
- }
-};
\ No newline at end of file
