From de096ea780245c8beb748839120e5669fe37d457 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Wed, 9 Apr 2025 19:31:30 +0800 Subject: Rename and fix pdlen read. --- ding.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 ding.c (limited to 'ding.c') 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 +#include +#include + +#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; +} -- cgit v1.2.3