summaryrefslogtreecommitdiff
path: root/core/cortex-m/watchdog.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/cortex-m/watchdog.c')
-rw-r--r--core/cortex-m/watchdog.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/cortex-m/watchdog.c b/core/cortex-m/watchdog.c
new file mode 100644
index 0000000000..e0a58953fb
--- /dev/null
+++ b/core/cortex-m/watchdog.c
@@ -0,0 +1,19 @@
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Watchdog common code */
+
+#include "timer.h"
+#include "watchdog.h"
+
+
+/* Low priority task to reload the watchdog */
+void watchdog_task(void)
+{
+ while (1) {
+ usleep(WATCHDOG_RELOAD_MS * 1000);
+ watchdog_reload();
+ }
+}