diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2025-04-24 10:39:06 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2025-04-24 10:39:06 +0800 |
| commit | aec8f0623de46993c2d2368ef4d7d3e3ff165c38 (patch) | |
| tree | e339b9133045ae7d5bc620f7f4b73fe41c9c68a0 | |
| parent | d617852905decfbf2abb82adea157dd954d46580 (diff) | |
| download | avr-nrf24l01-driver-aec8f0623de46993c2d2368ef4d7d3e3ff165c38.tar.gz | |
Make flush_rx() public.
| -rw-r--r-- | nrfm.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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(); |
