app irq off before sleep
This commit is contained in:
parent
28d30493fd
commit
93315e142c
@ -91,6 +91,19 @@ void enter_deepsleep(const uint64_t wakeup_sec = 60,
|
|||||||
// stop further enqueuing of senddata
|
// stop further enqueuing of senddata
|
||||||
sendTimer.detach();
|
sendTimer.detach();
|
||||||
|
|
||||||
|
// shutdown MQTT safely
|
||||||
|
#ifdef HAS_MQTT
|
||||||
|
// to come
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// shutdown SPI safely
|
||||||
|
#ifdef HAS_SPI
|
||||||
|
// to come
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// halt interrupts accessing i2c bus
|
||||||
|
mask_user_IRQ();
|
||||||
|
|
||||||
// switch off radio
|
// switch off radio
|
||||||
#if (BLECOUNTER)
|
#if (BLECOUNTER)
|
||||||
stop_BLEscan();
|
stop_BLEscan();
|
||||||
@ -127,19 +140,6 @@ void enter_deepsleep(const uint64_t wakeup_sec = 60,
|
|||||||
SaveLMICToRTC(wakeup_sec);
|
SaveLMICToRTC(wakeup_sec);
|
||||||
#endif // (HAS_LORA)
|
#endif // (HAS_LORA)
|
||||||
|
|
||||||
// shutdown MQTT safely
|
|
||||||
#ifdef HAS_MQTT
|
|
||||||
// to come
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// shutdown SPI safely
|
|
||||||
#ifdef HAS_SPI
|
|
||||||
// to come
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// halt interrupts accessing i2c bus
|
|
||||||
mask_user_IRQ();
|
|
||||||
|
|
||||||
// switch off display
|
// switch off display
|
||||||
#ifdef HAS_DISPLAY
|
#ifdef HAS_DISPLAY
|
||||||
dp_shutdown();
|
dp_shutdown();
|
||||||
|
Loading…
Reference in New Issue
Block a user