From 5e89cc8ec24a1e5ff82eeee4fdfbd02975eadeeb Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Mon, 9 Sep 2024 04:04:26 -0700 Subject: [PATCH] remove useless `ce()` call (#987) resolves #986 --- RF24.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/RF24.cpp b/RF24.cpp index 92309f0c..da61a651 100644 --- a/RF24.cpp +++ b/RF24.cpp @@ -1308,11 +1308,11 @@ bool RF24::writeBlocking(const void* buf, uint8_t len, uint32_t timeout) void RF24::reUseTX() { + ce(LOW); write_register(NRF_STATUS, _BV(MAX_RT)); //Clear max retry flag read_register(REUSE_TX_PL, (uint8_t*)nullptr, 0); IF_RF24_DEBUG(printf_P("[Reusing payload in TX FIFO]");); - ce(LOW); //Re-Transfer packet - ce(HIGH); + ce(HIGH); //Re-Transfer packet } /****************************************************************************/ @@ -1977,9 +1977,8 @@ void RF24::startConstCarrier(rf24_pa_dbm_e level, uint8_t channel) IF_RF24_DEBUG(printf_P(PSTR("RF_SETUP=%02x\r\n"), read_register(RF_SETUP))); ce(HIGH); if (isPVariant()) { - delay(1); // datasheet says 1 ms is ok in this instance - ce(LOW); - reUseTX(); + delay(1); // datasheet says 1 ms is ok in this instance + reUseTX(); // CE gets toggled here } }