So in order to save power during deep-sleep, I've added the rtc_gpio_isolate(PIN_A) API like this:
Code: Select all
rtc_gpio_isolate(PIN_A);
esp_sleep_enable_ext0_wakeup(BUTTON_GPIO, 1);
esp_sleep_enable_timer_wakeup(wakeup_time_sec * 1000000);
esp_deep_sleep_start();