diff --git a/components/esp_hw_support/include/esp_sleep.h b/components/esp_hw_support/include/esp_sleep.h index 6fb1df4cba..29c2af96d8 100644 --- a/components/esp_hw_support/include/esp_sleep.h +++ b/components/esp_hw_support/include/esp_sleep.h @@ -269,7 +269,7 @@ esp_err_t esp_sleep_enable_ext0_wakeup(gpio_num_t gpio_num, int level); * * @note Call this func will reset the previous ext1 configuration. * - * @note This function will be deprecated in release/v6.0. Please switch to use `esp_sleep_enable_ext1_wakeup_io` and `esp_sleep_clear_ext1_wakeup_io` + * @note This function will be deprecated in release/v6.0. Please switch to use `esp_sleep_enable_ext1_wakeup_io` and `esp_sleep_disable_ext1_wakeup_io` * * @param io_mask Bit mask of GPIO numbers which will cause wakeup. Only GPIOs * which have RTC functionality can be used in this bit map. @@ -297,8 +297,8 @@ esp_err_t esp_sleep_enable_ext1_wakeup(uint64_t io_mask, esp_sleep_ext1_wakeup_m * @brief Enable ext1 wakeup pins with IO masks. * * This will append selected IOs to the wakeup IOs, it will not reset previously enabled IOs. - * To reset specific previously enabled IOs, call esp_sleep_clear_ext1_wakeup_io with the io_mask. - * To reset all the enabled IOs, call esp_sleep_clear_ext1_wakeup_io(0). + * To reset specific previously enabled IOs, call esp_sleep_disable_ext1_wakeup_io with the io_mask. + * To reset all the enabled IOs, call esp_sleep_disable_ext1_wakeup_io(0). * * This function uses external wakeup feature of RTC controller. * It will work even if RTC peripherals are shut down during sleep. @@ -360,7 +360,7 @@ esp_err_t esp_sleep_enable_ext1_wakeup_io(uint64_t io_mask, esp_sleep_ext1_wakeu * - ESP_OK on success * - ESP_ERR_INVALID_ARG if any of the selected GPIOs is not an RTC GPIO. */ -esp_err_t esp_sleep_clear_ext1_wakeup_io(uint64_t io_mask); +esp_err_t esp_sleep_disable_ext1_wakeup_io(uint64_t io_mask); #if SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN /** @@ -401,7 +401,7 @@ esp_err_t esp_sleep_clear_ext1_wakeup_io(uint64_t io_mask); * or mode is invalid */ esp_err_t esp_sleep_enable_ext1_wakeup_with_level_mask(uint64_t io_mask, uint64_t level_mask) -__attribute__((deprecated("please use 'esp_sleep_enable_ext1_wakeup_io' and 'esp_sleep_clear_ext1_wakeup_io' instead"))); +__attribute__((deprecated("please use 'esp_sleep_enable_ext1_wakeup_io' and 'esp_sleep_disable_ext1_wakeup_io' instead"))); #endif // SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN #endif // SOC_PM_SUPPORT_EXT1_WAKEUP diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index 5ab78ab228..cefe36448c 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -1483,7 +1483,7 @@ esp_err_t esp_sleep_enable_ext1_wakeup(uint64_t io_mask, esp_sleep_ext1_wakeup_m return ESP_ERR_INVALID_ARG; } // Reset all EXT1 configs - esp_sleep_clear_ext1_wakeup_io(0); + esp_sleep_disable_ext1_wakeup_io(0); return esp_sleep_enable_ext1_wakeup_io(io_mask, level_mode); } @@ -1533,7 +1533,7 @@ esp_err_t esp_sleep_enable_ext1_wakeup_io(uint64_t io_mask, esp_sleep_ext1_wakeu return ESP_OK; } -esp_err_t esp_sleep_clear_ext1_wakeup_io(uint64_t io_mask) +esp_err_t esp_sleep_disable_ext1_wakeup_io(uint64_t io_mask) { if (io_mask == 0) { s_config.ext1_rtc_gpio_mask = 0; diff --git a/docs/en/api-reference/system/sleep_modes.rst b/docs/en/api-reference/system/sleep_modes.rst index 8030cf20df..b6a4603923 100644 --- a/docs/en/api-reference/system/sleep_modes.rst +++ b/docs/en/api-reference/system/sleep_modes.rst @@ -250,7 +250,7 @@ RTC peripherals or RTC memories do not need to be powered on during sleep in thi :cpp:func:`esp_sleep_enable_ext1_wakeup_io` function can be used to append ext1 wakeup IO and set corresponding wakeup level. - :cpp:func:`esp_sleep_clear_ext1_wakeup_io` function can be used to remove ext1 wakeup IO. + :cpp:func:`esp_sleep_disable_ext1_wakeup_io` function can be used to remove ext1 wakeup IO. .. only:: SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN diff --git a/docs/en/migration-guides/release-5.x/5.3/system.rst b/docs/en/migration-guides/release-5.x/5.3/system.rst index 0747e0e77b..32c4f08b69 100644 --- a/docs/en/migration-guides/release-5.x/5.3/system.rst +++ b/docs/en/migration-guides/release-5.x/5.3/system.rst @@ -6,4 +6,4 @@ System Power Management ----------------------- -* ``esp_sleep_enable_ext1_wakeup_with_level_mask`` is deprecated, use ``esp_sleep_enable_ext1_wakeup_io`` and ``esp_sleep_clear_ext1_wakeup_io`` instead. +* ``esp_sleep_enable_ext1_wakeup_with_level_mask`` is deprecated, use ``esp_sleep_enable_ext1_wakeup_io`` and ``esp_sleep_disable_ext1_wakeup_io`` instead. diff --git a/docs/zh_CN/api-reference/system/sleep_modes.rst b/docs/zh_CN/api-reference/system/sleep_modes.rst index bca4d8dcb3..36ae29930e 100644 --- a/docs/zh_CN/api-reference/system/sleep_modes.rst +++ b/docs/zh_CN/api-reference/system/sleep_modes.rst @@ -250,7 +250,7 @@ RTC 控制器中内嵌定时器,可用于在预定义的时间到达后唤醒 可调用 :cpp:func:`esp_sleep_enable_ext1_wakeup_io` 函数可用于增加 ext1 唤醒 IO 并设置相应的唤醒电平。 - 可调用 :cpp:func:`esp_sleep_clear_ext1_wakeup_io` 函数可用于移除 ext1 唤醒 IO。 + 可调用 :cpp:func:`esp_sleep_disable_ext1_wakeup_io` 函数可用于移除 ext1 唤醒 IO。 .. only:: SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN