[SX128x] Use dummy SPI transfer for wakeup

master
jgromes 2024-12-27 16:25:59 +00:00
rodzic 9bff1582bd
commit ff387e93ad
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -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 };