summaryrefslogtreecommitdiffstats
path: root/lock/nrfm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lock/nrfm.c')
-rw-r--r--lock/nrfm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lock/nrfm.c b/lock/nrfm.c
index 560609c..7630453 100644
--- a/lock/nrfm.c
+++ b/lock/nrfm.c
@@ -152,7 +152,7 @@ static inline void flush_tx(void)
reset_irqs();
}
-static inline void flush_rx(void)
+void radio_flush_rx(void)
{
SPI_PORT &= ~(1 << SPI_SS);
SPDR = 0b11100010;
@@ -304,7 +304,7 @@ uint8_t radio_recv(char *buf, uint8_t n)
pdlen = rx_pdlen();
if (pdlen == 0) {
- flush_rx();
+ radio_flush_rx();
uart_write_line("ERROR: PDLEN = 0, abort read");
return 0;
}
@@ -314,7 +314,7 @@ uint8_t radio_recv(char *buf, uint8_t n)
uart_write_line(s);
if (pdlen > MAXPDLEN) {
- flush_rx();
+ radio_flush_rx();
uart_write_line("ERROR: PDLEN > MAXPDLEN, abort read");
return 0;
}
@@ -333,7 +333,7 @@ uint8_t radio_recv(char *buf, uint8_t n)
}
SPI_PORT |= (1 << SPI_SS);
- flush_rx();
+ radio_flush_rx();
enable_chip();
return readlen - 1;
}