mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-21 19:09:13 +00:00
feat(pm): add internal pull-up/downs option for gpio used for deepsleep wakeup
stash
This commit is contained in:
@@ -1531,6 +1531,7 @@ static void gpio_deep_sleep_wakeup_prepare(void)
|
||||
if (((1ULL << gpio_idx) & s_config.gpio_wakeup_mask) == 0) {
|
||||
continue;
|
||||
}
|
||||
#if CONFIG_ESP_SLEEP_GPIO_ENABLE_INTERNAL_RESISTORS
|
||||
if (s_config.gpio_trigger_mode & BIT(gpio_idx)) {
|
||||
ESP_ERROR_CHECK(gpio_pullup_dis(gpio_idx));
|
||||
ESP_ERROR_CHECK(gpio_pulldown_en(gpio_idx));
|
||||
@@ -1538,6 +1539,7 @@ static void gpio_deep_sleep_wakeup_prepare(void)
|
||||
ESP_ERROR_CHECK(gpio_pullup_en(gpio_idx));
|
||||
ESP_ERROR_CHECK(gpio_pulldown_dis(gpio_idx));
|
||||
}
|
||||
#endif
|
||||
ESP_ERROR_CHECK(gpio_hold_en(gpio_idx));
|
||||
}
|
||||
// Clear state from previous wakeup
|
||||
|
||||
Reference in New Issue
Block a user