summaryrefslogtreecommitdiffstats
path: root/send.c
diff options
context:
space:
mode:
Diffstat (limited to 'send.c')
-rw-r--r--send.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/send.c b/send.c
index fed243c..21ca541 100644
--- a/send.c
+++ b/send.c
@@ -1,5 +1,6 @@
#include <stdint.h>
#include <string.h>
+#include <util/delay.h>
#include "nrfm.h"
#include "uart.h"
@@ -7,15 +8,20 @@
int main(void)
{
const char *s = "hello world!";
+ uint8_t slen = strlen(s);
- uint8_t rxaddr[] = { 194, 178, 82 };
- uint8_t txaddr[] = { 194, 178, 83 };
+ uint8_t rxaddr[ADDRLEN] = { 194, 178, 82 };
+ uint8_t txaddr[ADDRLEN] = { 194, 178, 83 };
uart_init();
radio_init(rxaddr);
radio_print_config();
- radio_sendto(txaddr, s, strlen(s));
+ for (;;) {
+ radio_sendto(txaddr, s, slen);
+ _delay_ms(1000);
+ }
+
return 0;
}