summaryrefslogtreecommitdiffstats
path: root/rf_test/radio.c
diff options
context:
space:
mode:
Diffstat (limited to 'rf_test/radio.c')
-rw-r--r--rf_test/radio.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/rf_test/radio.c b/rf_test/radio.c
index 37cfab9..83bd7c2 100644
--- a/rf_test/radio.c
+++ b/rf_test/radio.c
@@ -96,6 +96,15 @@ uint8_t radio_recv(char *buf, uint8_t n)
return read_len;
}
+void radio_listen(void)
+{
+ write_reg(0x01, (read_reg(0x01) & 0xE3) | 0x10);
+ while ((read_reg(0x27) & 0x80))
+ ;
+
+ // todo: go to low power mode
+}
+
void radio_init(const struct radio_cfg *cfg)
{
SPI_DDR |= (1 << SPI_SS) | (1 << SPI_SCK) | (1 << SPI_MOSI);