mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 10:42:49 +00:00
begin deep sleep support for nrf52
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user