projects
/
bbctrl-firmware
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1521a6b
)
Added watchdog
author
Joseph Coffland
<joseph@cauldrondevelopment.com>
Mon, 14 Mar 2016 03:40:07 +0000
(20:40 -0700)
committer
Joseph Coffland
<joseph@cauldrondevelopment.com>
Mon, 14 Mar 2016 03:40:07 +0000
(20:40 -0700)
src/main.c
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index 8ef03ee1e48da274a3fe487dd1043d49c6c9a36c..05abdb636cbe66a42b7d1962eabe9b89de140024 100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-40,6
+40,7
@@
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
+#include <avr/wdt.h>
#include <stdio.h>
@@
-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;
}