summaryrefslogtreecommitdiffstats
path: root/ding.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 /ding.c
parent058aac02f4428edd90bb288c2188748357550ced (diff)
downloadavr-nrf24l01-driver-081e11b460f71ce99e69604e9ffe16f5d667f84b.tar.gz
Get ding working with breadboard and limit sendto() to 32 bytes.
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;
}