Skip to content

Commit ee743ba

Browse files
authored
Update README.md
1 parent f5c06c5 commit ee743ba

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -285,13 +285,29 @@ because as i mentioned nrf24 does not returns in default values even after power
285285

286286
nrf24_auto_ack_all(auto_ack);
287287
nrf24_en_ack_pld(enable);
288+
nrf24_en_dyn_ack(enable);
288289

289290
//and other configurations as well
290291

291292
uint8_t dataT[PLD_SIZE] = {"Hello"};
292293
nrf24_transmit_no_ack(dataT, sizeof(dataT));
293294

294295

296+
### **4.With ACK_PLD and IRQ**
297+
298+
nrf24_transmit(dataT, sizeof(dataT));
299+
300+
if(irq == 1){
301+
uint8_t stat = nrf24_r_status();
302+
303+
if(stat & (1 << TX_DS)){
304+
nrf24_receive(tx_ack_pld, sizeof(tx_ack_pld));
305+
}else if(stat & (1 << MAX_RT)){
306+
nrf24_flush_tx();
307+
nrf24_clear_rx_dr();
308+
}
309+
irq = 0;
310+
}
295311

296312

297313
## **Receive:**
@@ -327,3 +343,18 @@ because as i mentioned nrf24 does not returns in default values even after power
327343
}
328344

329345

346+
347+
### **3.With ACK_PLD and IRQ**
348+
349+
if(irq == 1){
350+
uint8_t stat = nrf24_r_status();
351+
352+
if(stat & (1 << RX_DR)){
353+
nrf24_receive(dataR, sizeof(dataR));
354+
nrf24_transmit_rx_ack_pld(0, rx_ack_pld, sizeof(rx_ack_pld));
355+
}
356+
irq = 0;
357+
}
358+
359+
360+

0 commit comments

Comments
 (0)