From 4f74ca6fa8f6b53fc658940460d85e523e7a721c Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Sun, 13 Mar 2016 20:40:07 -0700 Subject: [PATCH] Added watchdog --- src/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 8ef03ee..05abdb6 100644 --- a/src/main.c +++ b/src/main.c @@ -40,6 +40,7 @@ #include #include +#include #include @@ -80,10 +81,15 @@ static void init() { int main() { + wdt_enable(WDTO_250MS); + init(); // main loop - while (1) controller_run(); // single pass through the controller + while (1) { + controller_run(); // single pass through the controller + wdt_reset(); + } return 0; } -- 2.27.0