diff options
| -rw-r--r-- | lock/nrfm.c | 7 | ||||
| -rw-r--r-- | lock/nrfm.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lock/nrfm.c b/lock/nrfm.c index 112000a..dd83f47 100644 --- a/lock/nrfm.c +++ b/lock/nrfm.c @@ -228,7 +228,10 @@ void radio_listen(void) enable_chip(); } -void radio_sendto(const uint8_t addr[ADDRLEN], const char *msg, uint8_t n) +uint8_t radio_sendto( + const uint8_t addr[ADDRLEN], + const char *msg, + uint8_t n) { char s[4]; int i, imax; @@ -283,9 +286,9 @@ void radio_sendto(const uint8_t addr[ADDRLEN], const char *msg, uint8_t n) uart_write_line("ERROR: sendto() failed: MAX_RT"); } - // restore config, typically rx mode write_reg(0x00, cfg); enable_chip(); + return txds; } uint8_t radio_recv(char *buf, uint8_t n) diff --git a/lock/nrfm.h b/lock/nrfm.h index 22a9b89..5f33e86 100644 --- a/lock/nrfm.h +++ b/lock/nrfm.h @@ -14,6 +14,6 @@ void radio_listen(void); uint8_t radio_recv(char *buf, uint8_t n); -void radio_sendto(const uint8_t addr[ADDRLEN], const char *msg, uint8_t n); +uint8_t radio_sendto(const uint8_t addr[ADDRLEN], const char *msg, uint8_t n); #endif /* NRFM_H */ |
