mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 12:10:59 +00:00
gpio: Fix IO hold function related problems
1. Fix deep sleep wakeup IOs can not be unhold issue 2. Correct hold related APIs' description 3. Fix gpio_force_hold_all API docs: Add GPIO wakeup source to sleep_modes doc for ESP32C3 and C2
This commit is contained in:
@@ -23,7 +23,12 @@ static inline void rtc_cntl_ll_set_wakeup_timer(uint64_t t)
|
||||
SET_PERI_REG_MASK(RTC_CNTL_SLP_TIMER1_REG, RTC_CNTL_MAIN_TIMER_ALARM_EN_M);
|
||||
}
|
||||
|
||||
static inline uint32_t rtc_cntl_ll_ext1_get_wakeup_pins(void)
|
||||
static inline void rtc_cntl_ll_ext1_clear_wakeup_status(void)
|
||||
{
|
||||
REG_SET_BIT(RTC_CNTL_EXT_WAKEUP1_REG, RTC_CNTL_EXT_WAKEUP1_STATUS_CLR);
|
||||
}
|
||||
|
||||
static inline uint32_t rtc_cntl_ll_ext1_get_wakeup_status(void)
|
||||
{
|
||||
return REG_GET_FIELD(RTC_CNTL_EXT_WAKEUP1_STATUS_REG, RTC_CNTL_EXT_WAKEUP1_STATUS);
|
||||
}
|
||||
@@ -37,7 +42,12 @@ static inline void rtc_cntl_ll_ext1_set_wakeup_pins(uint32_t mask, int mode)
|
||||
|
||||
static inline void rtc_cntl_ll_ext1_clear_wakeup_pins(void)
|
||||
{
|
||||
REG_SET_BIT(RTC_CNTL_EXT_WAKEUP1_REG, RTC_CNTL_EXT_WAKEUP1_STATUS_CLR);
|
||||
CLEAR_PERI_REG_MASK(RTC_CNTL_EXT_WAKEUP1_REG, RTC_CNTL_EXT_WAKEUP1_SEL_M);
|
||||
}
|
||||
|
||||
static inline uint32_t rtc_cntl_ll_ext1_get_wakeup_pins(void)
|
||||
{
|
||||
return REG_GET_FIELD(RTC_CNTL_EXT_WAKEUP1_REG, RTC_CNTL_EXT_WAKEUP1_SEL);
|
||||
}
|
||||
|
||||
static inline void rtc_cntl_ll_ulp_int_clear(void)
|
||||
|
@@ -210,7 +210,7 @@ static inline void rtcio_ll_pulldown_disable(int rtcio_num)
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable force hold function for RTC IO pad.
|
||||
* Enable force hold function on an RTC IO pad.
|
||||
*
|
||||
* Enabling HOLD function will cause the pad to lock current status, such as,
|
||||
* input/output enable, input/output value, function, drive strength values.
|
||||
@@ -225,7 +225,7 @@ static inline void rtcio_ll_force_hold_enable(int rtcio_num)
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable hold function on an RTC IO pad
|
||||
* Disable hold function on an RTC IO pad.
|
||||
*
|
||||
* @note If disable the pad hold, the status of pad maybe changed in sleep mode.
|
||||
* @param rtcio_num The index of rtcio. 0 ~ MAX(rtcio).
|
||||
@@ -236,7 +236,7 @@ static inline void rtcio_ll_force_hold_disable(int rtcio_num)
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable force hold function for RTC IO pad.
|
||||
* Enable force hold function on all RTC IO pads.
|
||||
*
|
||||
* Enabling HOLD function will cause the pad to lock current status, such as,
|
||||
* input/output enable, input/output value, function, drive strength values.
|
||||
@@ -251,7 +251,7 @@ static inline void rtcio_ll_force_hold_all(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable hold function on an RTC IO pad
|
||||
* Disable hold function on all RTC IO pads.
|
||||
*
|
||||
* @note If disable the pad hold, the status of pad maybe changed in sleep mode.
|
||||
* @param rtcio_num The index of rtcio. 0 ~ MAX(rtcio).
|
||||
|
Reference in New Issue
Block a user