File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -285,13 +285,29 @@ because as i mentioned nrf24 does not returns in default values even after power
285
285
286
286
nrf24_auto_ack_all(auto_ack);
287
287
nrf24_en_ack_pld(enable);
288
+ nrf24_en_dyn_ack(enable);
288
289
289
290
//and other configurations as well
290
291
291
292
uint8_t dataT[PLD_SIZE] = {"Hello"};
292
293
nrf24_transmit_no_ack(dataT, sizeof(dataT));
293
294
294
295
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
+ }
295
311
296
312
297
313
## ** Receive:**
@@ -327,3 +343,18 @@ because as i mentioned nrf24 does not returns in default values even after power
327
343
}
328
344
329
345
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
+
You can’t perform that action at this time.
0 commit comments