From e058394ed6e67a2935bc1d06ef256d5aa66f3f54 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Sun, 9 Feb 2025 11:03:37 +0800 Subject: Set address with to 3 bytes. --- nRF24L01/radio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nRF24L01/radio.c') diff --git a/nRF24L01/radio.c b/nRF24L01/radio.c index 3dc11f9..8f39403 100644 --- a/nRF24L01/radio.c +++ b/nRF24L01/radio.c @@ -136,13 +136,14 @@ void radio_init(const struct radio_cfg *cfg) conf |= (1 << NRF24L01_MASK_TX_DS); conf |= (1 << NRF24L01_MASK_MAX_RT); conf |= (1 << NRF24L01_CRCO); - write_reg(NRF24L01_REG_CONFIG, conf); // only use data pipe 0 conf = 0; conf &= ~(1 << NRF24L01_ERX_P1); conf |= (1 << NRF24L01_ERX_P0); - write_reg(NRF24L01_REG_EN_RXADDR, conf); + + // set address with to 3 bytes + write_reg(NRF24L01_REG_SETUP_AW, 0x01); } -- cgit v1.2.3