From 6df60e963f8b8abffdeaf26c0b5cfc64331657fb Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Sun, 16 Mar 2025 11:58:41 +0800 Subject: Fix snprintf() buflen and enable ack on all pipes. --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 28f87fc..0d4dd8d 100644 --- a/main.c +++ b/main.c @@ -52,7 +52,7 @@ static inline void write_reg(uint8_t reg, uint8_t val) static inline void print_config(void) { - char s[21]; + char s[22]; uint8_t i, rv; uart_write_line("NRF24L01 configuration:"); @@ -79,7 +79,7 @@ void radio_init(void) _delay_ms(100); /* power on reset delay */ write_reg(0x00, 0b00001100); /* use 2-byte CRC */ - write_reg(0x01, 0b00000000); /* disable auto ack on all pipes */ + write_reg(0x01, 0b00111111); /* enable auto ack on all pipes */ write_reg(0x02, 0b00000001); /* enable rx address on pipe 0 */ write_reg(0x03, 0b00000001); /* set address width to 3 bytes */ write_reg(0x04, 0b00000000); /* disable auto retransmission */ -- cgit v1.2.3