summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-04-10 11:08:04 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-04-10 11:39:27 +0800
commit081e11b460f71ce99e69604e9ffe16f5d667f84b (patch)
tree28d0dc97985939c80f934bb517032b9567306b7e /util.c
parent058aac02f4428edd90bb288c2188748357550ced (diff)
downloadavr-nrf24l01-driver-081e11b460f71ce99e69604e9ffe16f5d667f84b.tar.gz
Get ding working with breadboard and limit sendto() to 32 bytes.
Diffstat (limited to 'util.c')
-rw-r--r--util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util.c b/util.c
new file mode 100644
index 0000000..ddfdf04
--- /dev/null
+++ b/util.c
@@ -0,0 +1,10 @@
+#include <avr/wdt.h>
+
+#include "util.h"
+
+void wdt_init(void)
+{
+ wdt_reset();
+ WDTCSR |= (1 << WDCE) | (1 << WDE);
+ WDTCSR = (1 << WDE) | (1 << WDP3) | (1 << WDP0);
+}