mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
Merge branch 'fix/make_deepsleep_gpio_wakeup_usable_for_pd_top_lightsleep_v6.0' into 'release/v6.0'
change(esp_hw_support): deepsleep gpio wakeup API renaming to support PD_TOP lightsleep wakeup (v6.0) See merge request espressif/esp-idf!45416
This commit is contained in:
@@ -687,13 +687,13 @@ static inline void gpio_ll_sleep_output_enable(gpio_dev_t *hw, uint32_t gpio_num
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable GPIO deep-sleep wake-up function.
|
||||
* @brief Enable GPIO wake-up on HP periph powerdown sleep function.
|
||||
*
|
||||
* @param hw Peripheral GPIO hardware instance address.
|
||||
* @param gpio_num GPIO number.
|
||||
* @param intr_type GPIO wake-up type. Only GPIO_INTR_LOW_LEVEL or GPIO_INTR_HIGH_LEVEL can be used.
|
||||
*/
|
||||
static inline void gpio_ll_deepsleep_wakeup_enable(gpio_dev_t *hw, uint32_t gpio_num, gpio_int_type_t intr_type)
|
||||
static inline void gpio_ll_wakeup_enable_on_hp_periph_powerdown_sleep(gpio_dev_t *hw, uint32_t gpio_num, gpio_int_type_t intr_type)
|
||||
{
|
||||
HAL_ASSERT(gpio_num <= GPIO_NUM_5 && "gpio larger than 5 does not support deep sleep wake-up function");
|
||||
|
||||
@@ -707,12 +707,12 @@ static inline void gpio_ll_deepsleep_wakeup_enable(gpio_dev_t *hw, uint32_t gpio
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Disable GPIO deep-sleep wake-up function.
|
||||
* @brief Disable GPIO wake-up on HP periph powerdown sleep function.
|
||||
*
|
||||
* @param hw Peripheral GPIO hardware instance address.
|
||||
* @param gpio_num GPIO number
|
||||
*/
|
||||
static inline void gpio_ll_deepsleep_wakeup_disable(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
static inline void gpio_ll_wakeup_disable_on_hp_periph_powerdown_sleep(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
{
|
||||
HAL_ASSERT(gpio_num <= GPIO_NUM_5 && "gpio larger than 5 does not support deep sleep wake-up function");
|
||||
|
||||
@@ -721,13 +721,13 @@ static inline void gpio_ll_deepsleep_wakeup_disable(gpio_dev_t *hw, uint32_t gpi
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the status of whether an IO is used for deep-sleep wake-up.
|
||||
* @brief Get the status of whether an IO is used for HP periph powerdown sleep wake-up.
|
||||
*
|
||||
* @param hw Peripheral GPIO hardware instance address.
|
||||
* @param gpio_num GPIO number
|
||||
* @return True if the pin is enabled to wake up from deep-sleep
|
||||
* @return True if the pin is enabled to wake up from HP periph powerdown sleep.
|
||||
*/
|
||||
static inline bool gpio_ll_deepsleep_wakeup_is_enabled(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
static inline bool gpio_ll_hp_periph_powerdown_sleep_wakeup_is_enabled(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
{
|
||||
HAL_ASSERT(gpio_num <= GPIO_NUM_5 && "gpio larger than 5 does not support deep sleep wake-up function");
|
||||
|
||||
|
||||
@@ -684,13 +684,13 @@ static inline void gpio_ll_sleep_output_enable(gpio_dev_t *hw, uint32_t gpio_num
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable GPIO deep-sleep wake-up function.
|
||||
* @brief Enable GPIO wake-up on HP periph powerdown sleep function.
|
||||
*
|
||||
* @param hw Peripheral GPIO hardware instance address.
|
||||
* @param gpio_num GPIO number.
|
||||
* @param intr_type GPIO wake-up type. Only GPIO_INTR_LOW_LEVEL or GPIO_INTR_HIGH_LEVEL can be used.
|
||||
*/
|
||||
static inline void gpio_ll_deepsleep_wakeup_enable(gpio_dev_t *hw, uint32_t gpio_num, gpio_int_type_t intr_type)
|
||||
static inline void gpio_ll_wakeup_enable_on_hp_periph_powerdown_sleep(gpio_dev_t *hw, uint32_t gpio_num, gpio_int_type_t intr_type)
|
||||
{
|
||||
HAL_ASSERT(gpio_num <= GPIO_NUM_5 && "gpio larger than 5 does not support deep sleep wake-up function");
|
||||
|
||||
@@ -704,12 +704,12 @@ static inline void gpio_ll_deepsleep_wakeup_enable(gpio_dev_t *hw, uint32_t gpio
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Disable GPIO deep-sleep wake-up function.
|
||||
* @brief Disable GPIO wake-up on HP periph powerdown sleep function.
|
||||
*
|
||||
* @param hw Peripheral GPIO hardware instance address.
|
||||
* @param gpio_num GPIO number
|
||||
*/
|
||||
static inline void gpio_ll_deepsleep_wakeup_disable(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
static inline void gpio_ll_wakeup_disable_on_hp_periph_powerdown_sleep(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
{
|
||||
HAL_ASSERT(gpio_num <= GPIO_NUM_5 && "gpio larger than 5 does not support deep sleep wake-up function");
|
||||
|
||||
@@ -718,13 +718,13 @@ static inline void gpio_ll_deepsleep_wakeup_disable(gpio_dev_t *hw, uint32_t gpi
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the status of whether an IO is used for deep-sleep wake-up.
|
||||
* @brief Get the status of whether an IO is used for HP periph powerdown sleep wake-up.
|
||||
*
|
||||
* @param hw Peripheral GPIO hardware instance address.
|
||||
* @param gpio_num GPIO number
|
||||
* @return True if the pin is enabled to wake up from deep-sleep
|
||||
* @return True if the pin is enabled to wake up from HP periph powerdown sleep.
|
||||
*/
|
||||
static inline bool gpio_ll_deepsleep_wakeup_is_enabled(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
static inline bool gpio_ll_hp_periph_powerdown_sleep_wakeup_is_enabled(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
{
|
||||
HAL_ASSERT(gpio_num <= GPIO_NUM_5 && "gpio larger than 5 does not support deep sleep wake-up function");
|
||||
|
||||
|
||||
@@ -728,13 +728,13 @@ static inline void gpio_ll_sleep_output_enable(gpio_dev_t *hw, uint32_t gpio_num
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable GPIO deep-sleep wake-up function.
|
||||
* @brief Enable GPIO wake-up on HP periph powerdown sleep function.
|
||||
*
|
||||
* @param hw Peripheral GPIO hardware instance address.
|
||||
* @param gpio_num GPIO number.
|
||||
* @param intr_type GPIO wake-up type. Only GPIO_INTR_LOW_LEVEL or GPIO_INTR_HIGH_LEVEL can be used.
|
||||
*/
|
||||
static inline void gpio_ll_deepsleep_wakeup_enable(gpio_dev_t *hw, uint32_t gpio_num, gpio_int_type_t intr_type)
|
||||
static inline void gpio_ll_wakeup_enable_on_hp_periph_powerdown_sleep(gpio_dev_t *hw, uint32_t gpio_num, gpio_int_type_t intr_type)
|
||||
{
|
||||
HAL_ASSERT((gpio_num >= GPIO_NUM_7 && gpio_num <= GPIO_NUM_14) &&
|
||||
"only gpio7~14 support deep sleep wake-up function");
|
||||
@@ -756,12 +756,12 @@ static inline void gpio_ll_deepsleep_wakeup_enable(gpio_dev_t *hw, uint32_t gpio
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Disable GPIO deep-sleep wake-up function.
|
||||
* @brief Disable GPIO wake-up on HP periph powerdown sleep function.
|
||||
*
|
||||
* @param hw Peripheral GPIO hardware instance address.
|
||||
* @param gpio_num GPIO number
|
||||
*/
|
||||
static inline void gpio_ll_deepsleep_wakeup_disable(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
static inline void gpio_ll_wakeup_disable_on_hp_periph_powerdown_sleep(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
{
|
||||
HAL_ASSERT((gpio_num >= GPIO_NUM_7 && gpio_num <= GPIO_NUM_14) &&
|
||||
"only gpio7~14 support deep sleep wake-up function");
|
||||
@@ -772,13 +772,13 @@ static inline void gpio_ll_deepsleep_wakeup_disable(gpio_dev_t *hw, uint32_t gpi
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the status of whether an IO is used for deep-sleep wake-up.
|
||||
* @brief Get the status of whether an IO is used for HP periph powerdown sleep wake-up.
|
||||
*
|
||||
* @param hw Peripheral GPIO hardware instance address.
|
||||
* @param gpio_num GPIO number
|
||||
* @return True if the pin is enabled to wake up from deep-sleep
|
||||
* @return True if the pin is enabled to wake up from HP periph powerdown sleep.
|
||||
*/
|
||||
static inline bool gpio_ll_deepsleep_wakeup_is_enabled(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
static inline bool gpio_ll_hp_periph_powerdown_sleep_wakeup_is_enabled(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
{
|
||||
HAL_ASSERT((gpio_num >= GPIO_NUM_7 && gpio_num <= GPIO_NUM_14) &&
|
||||
"only gpio7~14 support deep sleep wake-up function");
|
||||
|
||||
@@ -712,13 +712,13 @@ static inline void gpio_ll_sleep_output_enable(gpio_dev_t *hw, uint32_t gpio_num
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable GPIO deep-sleep wake-up function.
|
||||
* @brief Enable GPIO wake-up on HP periph powerdown sleep function.
|
||||
*
|
||||
* @param hw Peripheral GPIO hardware instance address.
|
||||
* @param gpio_num GPIO number.
|
||||
* @param intr_type GPIO wake-up type. Only GPIO_INTR_LOW_LEVEL or GPIO_INTR_HIGH_LEVEL can be used.
|
||||
*/
|
||||
static inline void gpio_ll_deepsleep_wakeup_enable(gpio_dev_t *hw, uint32_t gpio_num, gpio_int_type_t intr_type)
|
||||
static inline void gpio_ll_wakeup_enable_on_hp_periph_powerdown_sleep(gpio_dev_t *hw, uint32_t gpio_num, gpio_int_type_t intr_type)
|
||||
{
|
||||
HAL_ASSERT((gpio_num >= GPIO_NUM_5 && gpio_num <= GPIO_NUM_11) &&
|
||||
"only gpio5~11 support deep sleep wake-up function");
|
||||
@@ -740,12 +740,12 @@ static inline void gpio_ll_deepsleep_wakeup_enable(gpio_dev_t *hw, uint32_t gpio
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Disable GPIO deep-sleep wake-up function.
|
||||
* @brief Disable GPIO wake-up on HP periph powerdown sleep function.
|
||||
*
|
||||
* @param hw Peripheral GPIO hardware instance address.
|
||||
* @param gpio_num GPIO number
|
||||
*/
|
||||
static inline void gpio_ll_deepsleep_wakeup_disable(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
static inline void gpio_ll_wakeup_disable_on_hp_periph_powerdown_sleep(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
{
|
||||
HAL_ASSERT((gpio_num >= GPIO_NUM_5 && gpio_num <= GPIO_NUM_11) &&
|
||||
"only gpio5~11 support deep sleep wake-up function");
|
||||
@@ -756,13 +756,13 @@ static inline void gpio_ll_deepsleep_wakeup_disable(gpio_dev_t *hw, uint32_t gpi
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the status of whether an IO is used for deep-sleep wake-up.
|
||||
* @brief Get the status of whether an IO is used for HP periph powerdown sleep wake-up.
|
||||
*
|
||||
* @param hw Peripheral GPIO hardware instance address.
|
||||
* @param gpio_num GPIO number
|
||||
* @return True if the pin is enabled to wake up from deep-sleep
|
||||
* @return True if the pin is enabled to wake up from HP periph powerdown sleep.
|
||||
*/
|
||||
static inline bool gpio_ll_deepsleep_wakeup_is_enabled(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
static inline bool gpio_ll_hp_periph_powerdown_sleep_wakeup_is_enabled(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
{
|
||||
HAL_ASSERT((gpio_num >= GPIO_NUM_5 && gpio_num <= GPIO_NUM_11) &&
|
||||
"only gpio5~11 support deep sleep wake-up function");
|
||||
|
||||
@@ -497,34 +497,34 @@ void gpio_hal_matrix_out(gpio_hal_context_t *hal, uint32_t gpio_num, uint32_t si
|
||||
*/
|
||||
#define gpio_hal_sleep_output_enable(hal, gpio_num) gpio_ll_sleep_output_enable((hal)->dev, gpio_num)
|
||||
|
||||
#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT == 0) && SOC_DEEP_SLEEP_SUPPORTED
|
||||
#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT == 0)
|
||||
/**
|
||||
* @brief Enable GPIO deep-sleep wake-up function.
|
||||
* @brief Enable GPIO HP periph powerdown sleep wake-up function.
|
||||
*
|
||||
* @param hal Context of the HAL layer
|
||||
* @param gpio_num GPIO number.
|
||||
* @param intr_type GPIO wake-up type. Only GPIO_INTR_LOW_LEVEL or GPIO_INTR_HIGH_LEVEL can be used.
|
||||
*/
|
||||
#define gpio_hal_deepsleep_wakeup_enable(hal, gpio_num, intr_type) gpio_ll_deepsleep_wakeup_enable((hal)->dev, gpio_num, intr_type)
|
||||
#define gpio_hal_wakeup_enable_on_hp_periph_powerdown_sleep(hal, gpio_num, intr_type) gpio_ll_wakeup_enable_on_hp_periph_powerdown_sleep((hal)->dev, gpio_num, intr_type)
|
||||
|
||||
/**
|
||||
* @brief Disable GPIO deep-sleep wake-up function.
|
||||
* @brief Disable GPIO HP periph powerdown sleep wake-up function.
|
||||
*
|
||||
* @param hal Context of the HAL layer
|
||||
* @param gpio_num GPIO number
|
||||
*/
|
||||
#define gpio_hal_deepsleep_wakeup_disable(hal, gpio_num) gpio_ll_deepsleep_wakeup_disable((hal)->dev, gpio_num)
|
||||
#define gpio_hal_wakeup_disable_on_hp_periph_powerdown_sleep(hal, gpio_num) gpio_ll_wakeup_disable_on_hp_periph_powerdown_sleep((hal)->dev, gpio_num)
|
||||
|
||||
/**
|
||||
* @brief Get the status of whether an IO is used for deep-sleep wake-up.
|
||||
* @brief Get the status of whether an IO is used for HP periph powerdown sleep wake-up.
|
||||
*
|
||||
* @param hal Context of the HAL layer
|
||||
* @param gpio_num GPIO number
|
||||
*
|
||||
* @return True if the pin is enabled to wake up from deep-sleep
|
||||
* @return True if the pin is enabled to wake up from HP periph powerdown sleep
|
||||
*/
|
||||
#define gpio_hal_deepsleep_wakeup_is_enabled(hal, gpio_num) gpio_ll_deepsleep_wakeup_is_enabled((hal)->dev, gpio_num)
|
||||
#endif //SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT == 0) && SOC_DEEP_SLEEP_SUPPORTED
|
||||
#define gpio_hal_wakeup_is_enabled_on_hp_periph_powerdown_sleep(hal, gpio_num) gpio_ll_hp_periph_powerdown_sleep_wakeup_is_enabled((hal)->dev, gpio_num)
|
||||
#endif //SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT == 0)
|
||||
|
||||
#if SOC_GPIO_SUPPORT_PIN_HYS_FILTER
|
||||
/**
|
||||
|
||||
@@ -312,11 +312,11 @@ void rtcio_hal_isolate(int rtc_num);
|
||||
|
||||
#endif //SOC_RTCIO_PIN_COUNT > 0
|
||||
|
||||
#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0)
|
||||
#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0)
|
||||
|
||||
#define gpio_hal_deepsleep_wakeup_enable(hal, gpio_num, intr_type) rtcio_hal_wakeup_enable(rtc_io_num_map[gpio_num], intr_type)
|
||||
#define gpio_hal_deepsleep_wakeup_disable(hal, gpio_num) rtcio_hal_wakeup_disable(rtc_io_num_map[gpio_num])
|
||||
#define gpio_hal_deepsleep_wakeup_is_enabled(hal, gpio_num) rtcio_hal_wakeup_is_enabled(rtc_io_num_map[gpio_num])
|
||||
#define gpio_hal_wakeup_enable_on_hp_periph_powerdown_sleep(hal, gpio_num, intr_type) rtcio_hal_wakeup_enable(rtc_io_num_map[gpio_num], intr_type)
|
||||
#define gpio_hal_wakeup_disable_on_hp_periph_powerdown_sleep(hal, gpio_num) rtcio_hal_wakeup_disable(rtc_io_num_map[gpio_num])
|
||||
#define gpio_hal_wakeup_is_enabled_on_hp_periph_powerdown_sleep(hal, gpio_num) rtcio_hal_wakeup_is_enabled(rtc_io_num_map[gpio_num])
|
||||
#define rtc_hal_gpio_get_wakeup_status() rtcio_hal_get_interrupt_status()
|
||||
#define rtc_hal_gpio_clear_wakeup_status() rtcio_hal_clear_interrupt_status()
|
||||
|
||||
@@ -341,7 +341,7 @@ void rtcio_hal_isolate(int rtc_num);
|
||||
*/
|
||||
#define rtcio_hal_clear_interrupt_status() rtcio_ll_clear_interrupt_status()
|
||||
|
||||
#endif //SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0)
|
||||
#endif //SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user