@@ -158,6 +158,7 @@ class RF24
158
158
uint8_t status; /* The status byte returned from every SPI transaction */
159
159
uint8_t payload_size; /* Fixed size of payloads */
160
160
uint8_t pipe0_reading_address[5 ]; /* Last address set on pipe 0 for reading. */
161
+ uint8_t pipe0_writing_address[5 ]; /* Last address set on pipe 0 for writing. */
161
162
uint8_t config_reg; /* For storing the value of the NRF_CONFIG register */
162
163
bool _is_p_variant; /* For storing the result of testing the toggleFeatures() affect */
163
164
bool _is_p0_rx; /* For keeping track of pipe 0's usage in user-triggered RX mode. */
@@ -351,9 +352,13 @@ class RF24
351
352
* radio.write(&data, sizeof(data));
352
353
* @endcode
353
354
*
354
- * @note When the ACK payloads feature is enabled, the TX FIFO buffers are
355
+ * @warning When the ACK payloads feature is enabled, the TX FIFO buffers are
355
356
* flushed when calling this function. This is meant to discard any ACK
356
357
* payloads that were not appended to acknowledgment packets.
358
+ *
359
+ * @note For auto-ack purposes, the TX address passed to openWritingPipe() will be restored to
360
+ * RX pipe 0. This still means that `stopListening()` shall be called before
361
+ * calling openWritingPipe() because the TX address is cached in openWritingPipe().
357
362
*/
358
363
void stopListening (void );
359
364
@@ -522,10 +527,13 @@ class RF24
522
527
* @see
523
528
* - setAddressWidth()
524
529
* - startListening()
530
+ * - stopListening()
525
531
*
526
532
* @param address The address to be used for outgoing transmissions (uses
527
533
* pipe 0). Coordinate this address amongst other receiving nodes (the
528
- * pipe numbers don't need to match).
534
+ * pipe numbers don't need to match). This address is cached to ensure proper
535
+ * auto-ack behavior; stopListening() will always restore the latest cached TX
536
+ * address.
529
537
*
530
538
* @remark There is no address length parameter because this function will
531
539
* always write the number of bytes that the radio addresses are configured
0 commit comments