Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove useless ce() call #987

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions RF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/****************************************************************************/
Expand Down Expand Up @@ -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
}
}

Expand Down