begin deep sleep support for nrf52

This commit is contained in:
Kevin Hester
2020-10-30 17:05:32 +08:00
parent 47bbde3c60
commit d7368d5a51
13 changed files with 137 additions and 81 deletions

View File

@@ -201,9 +201,20 @@ bool SX1262Interface::isActivelyReceiving()
bool SX1262Interface::sleep()
{
DEBUG_MSG("sx1262 entering sleep mode\n");
setStandby(); // Stop any pending operations
// turn off TCXO if it was powered
// FIXME - this isn't correct
// lora.setTCXO(0);
// put chipset into sleep mode
disableInterrupt();
lora.sleep();
lora.sleep(false); // Note: we do not keep the config, full reinit will be needed
#ifdef SX1262_POWER_EN
digitalWrite(SX1262_POWER_EN, LOW);
#endif
return true;
}