forked from espressif/esp-idf
change(pm/ext1): replace esp_sleep_clear_ext1_wakeup_io by esp_sleep_disable_ext1_wakeup_io
This commit is contained in:
@@ -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 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
|
* @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.
|
* 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.
|
* @brief Enable ext1 wakeup pins with IO masks.
|
||||||
*
|
*
|
||||||
* This will append selected IOs to the wakeup IOs, it will not reset previously enabled IOs.
|
* 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 specific previously enabled IOs, call esp_sleep_disable_ext1_wakeup_io with the io_mask.
|
||||||
* To reset all the enabled IOs, call esp_sleep_clear_ext1_wakeup_io(0).
|
* To reset all the enabled IOs, call esp_sleep_disable_ext1_wakeup_io(0).
|
||||||
*
|
*
|
||||||
* This function uses external wakeup feature of RTC controller.
|
* This function uses external wakeup feature of RTC controller.
|
||||||
* It will work even if RTC peripherals are shut down during sleep.
|
* 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_OK on success
|
||||||
* - ESP_ERR_INVALID_ARG if any of the selected GPIOs is not an RTC GPIO.
|
* - 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
|
#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
|
* or mode is invalid
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_sleep_enable_ext1_wakeup_with_level_mask(uint64_t io_mask, uint64_t level_mask)
|
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_MODE_PER_PIN
|
||||||
#endif // SOC_PM_SUPPORT_EXT1_WAKEUP
|
#endif // SOC_PM_SUPPORT_EXT1_WAKEUP
|
||||||
|
@@ -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;
|
return ESP_ERR_INVALID_ARG;
|
||||||
}
|
}
|
||||||
// Reset all EXT1 configs
|
// 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);
|
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;
|
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) {
|
if (io_mask == 0) {
|
||||||
s_config.ext1_rtc_gpio_mask = 0;
|
s_config.ext1_rtc_gpio_mask = 0;
|
||||||
|
@@ -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_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
|
.. only:: SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN
|
||||||
|
|
||||||
|
@@ -6,4 +6,4 @@ System
|
|||||||
Power Management
|
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.
|
||||||
|
@@ -250,7 +250,7 @@ RTC 控制器中内嵌定时器,可用于在预定义的时间到达后唤醒
|
|||||||
|
|
||||||
可调用 :cpp:func:`esp_sleep_enable_ext1_wakeup_io` 函数可用于增加 ext1 唤醒 IO 并设置相应的唤醒电平。
|
可调用 :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
|
.. only:: SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user