Merge branch 'master' of https://github.com/jgromes/RadioLib
This commit is contained in:
commit
422dc867e0
3 changed files with 10 additions and 8 deletions
|
@ -356,10 +356,9 @@ int16_t LR11x0::standby(uint8_t mode, bool wakeup) {
|
|||
this->mod->setRfSwitchState(Module::MODE_IDLE);
|
||||
|
||||
if(wakeup) {
|
||||
// pull NSS low for a while to wake up
|
||||
this->mod->hal->digitalWrite(this->mod->getCs(), this->mod->hal->GpioLevelLow);
|
||||
this->mod->hal->delay(1);
|
||||
this->mod->hal->digitalWrite(this->mod->getCs(), this->mod->hal->GpioLevelHigh);
|
||||
// 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_LR11X0_CMD_NOP, NULL, 0, false, false);
|
||||
}
|
||||
|
||||
uint8_t buff[] = { mode };
|
||||
|
|
|
@ -467,8 +467,10 @@ int16_t SX126x::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
|
||||
// see https://github.com/jgromes/RadioLib/discussions/1364
|
||||
(void)this->mod->SPIwriteStream(RADIOLIB_SX126X_CMD_NOP, NULL, 0, false, false);
|
||||
}
|
||||
|
||||
uint8_t data[] = { mode };
|
||||
|
|
|
@ -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 };
|
||||
|
|
Loading…
Add table
Reference in a new issue