mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
Revert "fix(gpio): Revert the fix for RTCIO config should be written if LPIO clk exists"
This reverts commit 22c48ff2b7.
This commit is contained in:
@@ -457,9 +457,6 @@ esp_err_t gpio_config_as_analog(gpio_num_t gpio_num)
|
||||
#if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
|
||||
if (rtc_gpio_is_valid_gpio(gpio_num)) {
|
||||
rtc_gpio_deinit(gpio_num);
|
||||
rtc_gpio_set_direction(gpio_num, RTC_GPIO_MODE_DISABLED);
|
||||
rtc_gpio_pullup_dis(gpio_num);
|
||||
rtc_gpio_pulldown_dis(gpio_num);
|
||||
}
|
||||
#endif
|
||||
return ESP_OK;
|
||||
|
||||
@@ -64,12 +64,19 @@ esp_err_t rtc_gpio_deinit(gpio_num_t gpio_num)
|
||||
{
|
||||
ESP_RETURN_ON_FALSE(rtc_gpio_is_valid_gpio(gpio_num), ESP_ERR_INVALID_ARG, RTCIO_TAG, "RTCIO number error");
|
||||
RTCIO_ENTER_CRITICAL();
|
||||
// Select GPIO as Digital GPIO
|
||||
rtcio_hal_function_select(rtc_io_number_get(gpio_num), RTCIO_LL_FUNC_DIGITAL);
|
||||
// TODO: IDF-14951 Turning off the lp io clock might affect other lp peripherals. Temporary disabled.
|
||||
#if SOC_LP_IO_CLOCK_IS_INDEPENDENT && !CONFIG_IDF_TARGET_ESP32H4
|
||||
io_mux_force_disable_lp_io_clock(gpio_num);
|
||||
if (io_mux_is_lp_io_in_use(gpio_num)) {
|
||||
// Select GPIO as Digital GPIO
|
||||
rtcio_hal_function_select(rtc_io_number_get(gpio_num), RTCIO_LL_FUNC_DIGITAL);
|
||||
#if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
|
||||
// Disable any configuration of the RTC IO that may affect the GPIO behavior
|
||||
rtc_gpio_set_direction(gpio_num, RTC_GPIO_MODE_DISABLED);
|
||||
rtc_gpio_pullup_dis(gpio_num);
|
||||
rtc_gpio_pulldown_dis(gpio_num);
|
||||
#endif
|
||||
#if SOC_LP_IO_CLOCK_IS_INDEPENDENT
|
||||
io_mux_force_disable_lp_io_clock(gpio_num);
|
||||
#endif
|
||||
}
|
||||
RTCIO_EXIT_CRITICAL();
|
||||
|
||||
return ESP_OK;
|
||||
|
||||
Reference in New Issue
Block a user