From 48929d00ec0cec657293163b82a3d70a9a6823f6 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Sat, 1 Feb 2025 12:53:01 +0800 Subject: wip --- nRF24L01/radio.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nRF24L01/radio.c b/nRF24L01/radio.c index 7393ed8..a9832ef 100644 --- a/nRF24L01/radio.c +++ b/nRF24L01/radio.c @@ -58,6 +58,10 @@ #define NRF24L01_W_TX_PAYLOAD_NOACK 0xB0 #define NRF24L01_NOP 0xFF +#define NRF24L01_EN_RX_DR_IRQ 0xBF +#define NRF24L01_EN_TX_DS_IRQ 0xDF +#define NRF24L01_EN_MAX_RT_IRQ 0xEF + static inline uint8_t read_reg(uint8_t reg) { SPI_PORT &= ~(1 << SPI_SS); @@ -107,5 +111,7 @@ void radio_init(const struct radio_cfg *cfg) _delay_ms(NRF24L01_POWER_ON_RST_DELAY); // disable all interrupts, enable 2-byte CRC. - write_reg(NRF24L01_REG_CONFIG, 0x7C); + write_reg(NRF24L01_REG_CONFIG, !(NRF24L01_EN_RX_DR_IRQ + & NRF24L01_EN_TX_DS_IRQ + & NRF24L01_EN_MAX_RT_IRQ) | ); } -- cgit v1.2.3