summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-04-24 10:39:06 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-04-24 10:39:06 +0800
commitaec8f0623de46993c2d2368ef4d7d3e3ff165c38 (patch)
treee339b9133045ae7d5bc620f7f4b73fe41c9c68a0
parentd617852905decfbf2abb82adea157dd954d46580 (diff)
downloadavr-nrf24l01-driver-aec8f0623de46993c2d2368ef4d7d3e3ff165c38.tar.gz
Make flush_rx() public.
-rw-r--r--nrfm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nrfm.c b/nrfm.c
index 5f0202c..dc53224 100644
--- a/nrfm.c
+++ b/nrfm.c
@@ -150,7 +150,7 @@ static inline void flush_tx(void)
SPI_PORT |= (1 << SPI_SS);
}
-static inline void flush_rx(void)
+void radio_flush_rx(void)
{
SPI_PORT &= ~(1 << SPI_SS);
SPDR = 0b11100010;
@@ -299,7 +299,7 @@ uint8_t radio_recv(char *buf, uint8_t n)
pdlen = rx_pdlen();
if (pdlen == 0) {
- flush_rx();
+ radio_flush_rx();
reset_irqs();
uart_write_line("ERROR: PDLEN = 0, abort read");
return 0;
@@ -310,7 +310,7 @@ uint8_t radio_recv(char *buf, uint8_t n)
uart_write_line(s);
if (pdlen > MAXPDLEN) {
- flush_rx();
+ radio_flush_rx();
reset_irqs();
uart_write_line("ERROR: PDLEN > MAXPDLEN, abort read");
return 0;
@@ -330,7 +330,7 @@ uint8_t radio_recv(char *buf, uint8_t n)
}
SPI_PORT |= (1 << SPI_SS);
- flush_rx();
+ radio_flush_rx();
reset_irqs();
enable_chip();