summaryrefslogtreecommitdiffstats
path: root/ding.c
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-04-09 19:31:30 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-04-09 19:31:30 +0800
commitde096ea780245c8beb748839120e5669fe37d457 (patch)
tree1f8ee90f3a452cfbeb67d18f52fbfbd3cb6d7e21 /ding.c
parente34917da814c2cdb3710553d479df0aed3979e28 (diff)
downloadavr-nrf24l01-driver-de096ea780245c8beb748839120e5669fe37d457.tar.gz
Rename and fix pdlen read.
Diffstat (limited to 'ding.c')
-rw-r--r--ding.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/ding.c b/ding.c
new file mode 100644
index 0000000..5950ddc
--- /dev/null
+++ b/ding.c
@@ -0,0 +1,27 @@
+#include <stdint.h>
+#include <string.h>
+#include <util/delay.h>
+
+#include "nrfm.h"
+#include "uart.h"
+
+int main(void)
+{
+ const char *s = "hello world!";
+ uint8_t slen = strlen(s);
+
+ uint8_t rxaddr[ADDRLEN] = { 194, 178, 82 };
+ uint8_t txaddr[ADDRLEN] = { 194, 178, 83 };
+
+ uart_init();
+ radio_init(rxaddr);
+ radio_print_config();
+
+ for (;;) {
+ radio_sendto(txaddr, s, slen);
+ _delay_ms(2000);
+ }
+
+
+ return 0;
+}