diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2025-03-16 11:58:41 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2025-03-16 11:58:41 +0800 |
| commit | 6df60e963f8b8abffdeaf26c0b5cfc64331657fb (patch) | |
| tree | 36d8766852b0ce5cd9ef27079ad6cb825e402c13 | |
| parent | ac5d7ff0c3e017d58110c1c8426eb18762139568 (diff) | |
| download | avr-nrf24l01-driver-6df60e963f8b8abffdeaf26c0b5cfc64331657fb.tar.gz | |
Fix snprintf() buflen and enable ack on all pipes.
| -rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 */ |
