summaryrefslogtreecommitdiffstats
path: root/ding.c
diff options
context:
space:
mode:
Diffstat (limited to 'ding.c')
-rw-r--r--ding.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ding.c b/ding.c
index 5950ddc..34ff38c 100644
--- a/ding.c
+++ b/ding.c
@@ -1,9 +1,12 @@
#include <stdint.h>
#include <string.h>
+
+#include <avr/wdt.h>
#include <util/delay.h>
#include "nrfm.h"
#include "uart.h"
+#include "util.h"
int main(void)
{
@@ -13,15 +16,16 @@ int main(void)
uint8_t rxaddr[ADDRLEN] = { 194, 178, 82 };
uint8_t txaddr[ADDRLEN] = { 194, 178, 83 };
+ wdt_init();
uart_init();
radio_init(rxaddr);
radio_print_config();
for (;;) {
radio_sendto(txaddr, s, slen);
+ wdt_reset();
_delay_ms(2000);
}
-
return 0;
}