From 4223427127620295686c6d39a8c8eb3ddef27b9b Mon Sep 17 00:00:00 2001 From: jingli Date: Mon, 26 Sep 2022 14:22:17 +0800 Subject: [PATCH] hal/gpio_ll: fix digital gpio can not disable hold during deep sleep --- components/hal/esp32c2/include/hal/gpio_ll.h | 2 +- components/hal/esp32c3/include/hal/gpio_ll.h | 2 +- components/hal/esp32s2/include/hal/gpio_ll.h | 2 +- components/hal/esp32s3/include/hal/gpio_ll.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/hal/esp32c2/include/hal/gpio_ll.h b/components/hal/esp32c2/include/hal/gpio_ll.h index 6a3447e2403c..0f7c6ad4be07 100644 --- a/components/hal/esp32c2/include/hal/gpio_ll.h +++ b/components/hal/esp32c2/include/hal/gpio_ll.h @@ -346,7 +346,7 @@ static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw) */ static inline void gpio_ll_deep_sleep_hold_dis(gpio_dev_t *hw) { - SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_CLR_DG_PAD_AUTOHOLD); + CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); } /** diff --git a/components/hal/esp32c3/include/hal/gpio_ll.h b/components/hal/esp32c3/include/hal/gpio_ll.h index ca6511c6c048..fae5f48ca5cc 100644 --- a/components/hal/esp32c3/include/hal/gpio_ll.h +++ b/components/hal/esp32c3/include/hal/gpio_ll.h @@ -358,7 +358,7 @@ static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw) */ static inline void gpio_ll_deep_sleep_hold_dis(gpio_dev_t *hw) { - SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_CLR_DG_PAD_AUTOHOLD); + CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); } /** diff --git a/components/hal/esp32s2/include/hal/gpio_ll.h b/components/hal/esp32s2/include/hal/gpio_ll.h index da30a4395fb0..89152509bc2b 100644 --- a/components/hal/esp32s2/include/hal/gpio_ll.h +++ b/components/hal/esp32s2/include/hal/gpio_ll.h @@ -368,7 +368,7 @@ static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw) */ static inline void gpio_ll_deep_sleep_hold_dis(gpio_dev_t *hw) { - SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_CLR_DG_PAD_AUTOHOLD); + CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); } /** diff --git a/components/hal/esp32s3/include/hal/gpio_ll.h b/components/hal/esp32s3/include/hal/gpio_ll.h index 10e608881b18..312ddb325af2 100644 --- a/components/hal/esp32s3/include/hal/gpio_ll.h +++ b/components/hal/esp32s3/include/hal/gpio_ll.h @@ -384,7 +384,7 @@ static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw) */ static inline void gpio_ll_deep_sleep_hold_dis(gpio_dev_t *hw) { - SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_CLR_DG_PAD_AUTOHOLD); + CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); } /**