Skip to content

Commit

Permalink
[SX128x] Use dummy SPI transfer for wakeup
Browse files Browse the repository at this point in the history
  • Loading branch information
jgromes committed Dec 27, 2024
1 parent 9bff158 commit ff387e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/SX128x/SX128x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,9 @@ int16_t SX128x::standby(uint8_t mode, bool wakeup) {
this->mod->setRfSwitchState(Module::MODE_IDLE);

if(wakeup) {
// pull NSS low to wake up
this->mod->hal->digitalWrite(this->mod->getCs(), this->mod->hal->GpioLevelLow);
// send a NOP command - this pulls the NSS low to exit the sleep mode,
// while preventing interference with possible other SPI transactions
(void)this->mod->SPIwriteStream(RADIOLIB_SX128X_CMD_NOP, NULL, 0, false, false);
}

uint8_t data[] = { mode };
Expand Down

0 comments on commit ff387e9

Please sign in to comment.