summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-03-09 15:39:36 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-03-09 15:39:36 +0800
commita2c2f99af832084dc1916db74a7175e2e489e3e1 (patch)
tree39f382efcfcaedab7f937eb97a86291753d0105c
parent39cceb3a9f1fd309a6960bcb95ce85dbac25748b (diff)
downloadavr-nrf24l01-driver-a2c2f99af832084dc1916db74a7175e2e489e3e1.tar.gz
Address width.
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index 5115a99..53e8233 100644
--- a/main.c
+++ b/main.c
@@ -56,8 +56,9 @@ void radio_init(void)
_delay_ms(NRF_RST_DELAY_MS);
- // Change the default 1-byte CRC code to 2-byte CRC code
- write_reg(0x00, 0b00001100);
+ write_reg(0x00, 0b00001100); /* use 2-byte CRC code */
+ write_reg(0x03, 0b00000001); /* set address width to 3 bytes */
+ write_reg(0x04, 0b00000000); /* disable automatic retransmission */
}
int main(void)