summaryrefslogtreecommitdiffstats
path: root/nRF24L01
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-02-09 11:03:37 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-02-09 11:03:37 +0800
commite058394ed6e67a2935bc1d06ef256d5aa66f3f54 (patch)
tree488dce7ec4ca3b08b3260c444b62573633f07970 /nRF24L01
parentb4fce69fdcc4ed19aacb239107c391786546d0dc (diff)
downloadsmart-home-e058394ed6e67a2935bc1d06ef256d5aa66f3f54.tar.gz
Set address with to 3 bytes.
Diffstat (limited to 'nRF24L01')
-rw-r--r--nRF24L01/radio.c5
1 files changed, 3 insertions, 2 deletions
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);
}