Skip to content

Commit 6061761

Browse files
committed
stopConstCarrier() restore cached TX address
for plus variants only
1 parent 79ea02d commit 6061761

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

RF24.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -2048,6 +2048,11 @@ void RF24::stopConstCarrier()
20482048
powerDown(); // per datasheet recommendation (just to be safe)
20492049
write_register(RF_SETUP, static_cast<uint8_t>(read_register(RF_SETUP) & ~_BV(CONT_WAVE) & ~_BV(PLL_LOCK)));
20502050
ce(LOW);
2051+
flush_tx();
2052+
if (isPVariant()) {
2053+
// restore the cached TX address
2054+
write_register(TX_ADDR, pipe0_writing_address, addr_width);
2055+
}
20512056
}
20522057

20532058
/****************************************************************************/

0 commit comments

Comments
 (0)