summaryrefslogtreecommitdiffstats
path: root/send.c
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-04-03 17:47:16 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-04-03 17:47:16 +0800
commit50ffb4ead7293067144496894822436ba098656a (patch)
treeacbd253eba575022b12d4a419ab2acaa2709a3c4 /send.c
parent589025f2ec686095bdea38d3eafdddd870a10bda (diff)
downloadavr-nrf24l01-driver-50ffb4ead7293067144496894822436ba098656a.tar.gz
wip: rx.
Diffstat (limited to 'send.c')
-rw-r--r--send.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/send.c b/send.c
new file mode 100644
index 0000000..fed243c
--- /dev/null
+++ b/send.c
@@ -0,0 +1,21 @@
+#include <stdint.h>
+#include <string.h>
+
+#include "nrfm.h"
+#include "uart.h"
+
+int main(void)
+{
+ const char *s = "hello world!";
+
+ uint8_t rxaddr[] = { 194, 178, 82 };
+ uint8_t txaddr[] = { 194, 178, 83 };
+
+ uart_init();
+ radio_init(rxaddr);
+ radio_print_config();
+
+ radio_sendto(txaddr, s, strlen(s));
+
+ return 0;
+}