mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +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:
@@ -717,10 +717,10 @@ void gpio_deep_sleep_hold_dis(void)
|
||||
|
||||
#if SOC_GPIO_SUPPORT_FORCE_HOLD
|
||||
|
||||
esp_err_t gpio_force_hold_all()
|
||||
esp_err_t IRAM_ATTR gpio_force_hold_all()
|
||||
{
|
||||
#if SOC_RTCIO_HOLD_SUPPORTED
|
||||
rtc_gpio_force_hold_all();
|
||||
rtc_gpio_force_hold_en_all();
|
||||
#endif
|
||||
portENTER_CRITICAL(&gpio_context.gpio_spinlock);
|
||||
gpio_hal_force_hold_all();
|
||||
@@ -728,14 +728,14 @@ esp_err_t gpio_force_hold_all()
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t gpio_force_unhold_all()
|
||||
esp_err_t IRAM_ATTR gpio_force_unhold_all()
|
||||
{
|
||||
#if SOC_RTCIO_HOLD_SUPPORTED
|
||||
rtc_gpio_force_hold_dis_all();
|
||||
#endif
|
||||
portENTER_CRITICAL(&gpio_context.gpio_spinlock);
|
||||
gpio_hal_force_unhold_all();
|
||||
portEXIT_CRITICAL(&gpio_context.gpio_spinlock);
|
||||
#if SOC_RTCIO_HOLD_SUPPORTED
|
||||
rtc_gpio_force_hold_dis_all();
|
||||
#endif
|
||||
return ESP_OK;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user