fix issue #781
This commit is contained in:
parent
0b271f95b3
commit
d098d6ada3
@ -109,9 +109,6 @@ void enter_deepsleep(const uint64_t wakeup_sec, gpio_num_t wakeup_gpio) {
|
|||||||
sds011_sleep();
|
sds011_sleep();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// halt interrupts accessing i2c bus
|
|
||||||
mask_user_IRQ();
|
|
||||||
|
|
||||||
// wait a while (max 100 sec) to clear send queues
|
// wait a while (max 100 sec) to clear send queues
|
||||||
ESP_LOGI(TAG, "Waiting until send queues are empty...");
|
ESP_LOGI(TAG, "Waiting until send queues are empty...");
|
||||||
for (i = 100; i > 0; i--) {
|
for (i = 100; i > 0; i--) {
|
||||||
@ -159,6 +156,9 @@ void enter_deepsleep(const uint64_t wakeup_sec, gpio_num_t wakeup_gpio) {
|
|||||||
digitalWrite(EXT_POWER_SW, EXT_POWER_OFF);
|
digitalWrite(EXT_POWER_SW, EXT_POWER_OFF);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// halt interrupts accessing i2c bus
|
||||||
|
mask_user_IRQ();
|
||||||
|
|
||||||
// shutdown i2c bus
|
// shutdown i2c bus
|
||||||
i2c_deinit();
|
i2c_deinit();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user