summaryrefslogtreecommitdiff
path: root/firmware/src/os/wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/src/os/wdt.c')
-rw-r--r--firmware/src/os/wdt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/src/os/wdt.c b/firmware/src/os/wdt.c
index 5a3c809..55a0e70 100644
--- a/firmware/src/os/wdt.c
+++ b/firmware/src/os/wdt.c
@@ -21,10 +21,11 @@
#include <AT91SAM7.h>
#include <os/dbgu.h>
+#include <os/system_irq.h>
#define WDT_DEBUG
-static void wdt_irq(void)
+static void wdt_irq(u_int32_t sr)
{
DEBUGPCRF("================> WATCHDOG EXPIRED !!!!!");
}
@@ -36,6 +37,7 @@ void wdt_restart(void)
void wdt_init(void)
{
+ sysirq_register(AT91SAM7_SYSIRQ_WDT, &wdt_irq);
#ifdef WDT_DEBUG
AT91F_WDTSetMode(AT91C_BASE_WDTC, (0xfff << 16) |
AT91C_WDTC_WDDBGHLT | AT91C_WDTC_WDIDLEHLT |
personal git repositories of Harald Welte. Your mileage may vary