]> granicus.if.org Git - esp-idf/commit
deep sleep: set pin configuration right before entering deep sleep
authorIvan Grokhotkov <ivan@espressif.com>
Fri, 16 Dec 2016 06:26:05 +0000 (14:26 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Fri, 16 Dec 2016 06:30:27 +0000 (14:30 +0800)
commit370f4b8556ce310b30dc1d23cc49087076a11716
treeaa8d61066ae7e69f89905651b00db7e079f61ef7
parent609d852834653ac458848697d9038159ebd8f8d9
deep sleep: set pin configuration right before entering deep sleep

This change allows setting pin configuration for EXT1 wakeup depending on the state of RTC_PERIPH power domain:
- if peripherals are enabled (due to another wakeup mode, or due to esp_deep_sleep_pd_config call), we can keep internal pullups/pulldowns enabled
- if peripherals are disabled, pullups and pulldowns need to be disabled as well

Also add comments about the purpose of registers being configured.
components/esp32/deep_sleep.c
components/esp32/include/esp_deep_sleep.h