[LR11x0] Use dummy SPI transfer for wakeup
This commit is contained in:
parent
c37015ef94
commit
9bff1582bd
1 changed files with 3 additions and 4 deletions
|
@ -356,10 +356,9 @@ int16_t LR11x0::standby(uint8_t mode, bool wakeup) {
|
||||||
this->mod->setRfSwitchState(Module::MODE_IDLE);
|
this->mod->setRfSwitchState(Module::MODE_IDLE);
|
||||||
|
|
||||||
if(wakeup) {
|
if(wakeup) {
|
||||||
// pull NSS low for a while to wake up
|
// send a NOP command - this pulls the NSS low to exit the sleep mode,
|
||||||
this->mod->hal->digitalWrite(this->mod->getCs(), this->mod->hal->GpioLevelLow);
|
// while preventing interference with possible other SPI transactions
|
||||||
this->mod->hal->delay(1);
|
(void)this->mod->SPIwriteStream(RADIOLIB_LR11X0_CMD_NOP, NULL, 0, false, false);
|
||||||
this->mod->hal->digitalWrite(this->mod->getCs(), this->mod->hal->GpioLevelHigh);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t buff[] = { mode };
|
uint8_t buff[] = { mode };
|
||||||
|
|
Loading…
Add table
Reference in a new issue