feat(gpio): gpio_reset_pin should do IO reservation revoke

Closes https://github.com/espressif/esp-idf/issues/15598
This commit is contained in:
Song Ruo Jing
2025-03-20 14:50:44 +08:00
parent 8f74c54a8a
commit cbf7a66030
2 changed files with 3 additions and 2 deletions

View File

@@ -83,7 +83,7 @@ esp_err_t gpio_output_disable(gpio_num_t gpio_num);
* - ESP_OK Success
* - ESP_ERR_INVALID_ARG GPIO number error
*/
esp_err_t gpio_od_disable(gpio_num_t gpio_num);
esp_err_t gpio_od_enable(gpio_num_t gpio_num);
/**
* @brief Disable open-drain for an IO
@@ -94,7 +94,7 @@ esp_err_t gpio_od_disable(gpio_num_t gpio_num);
* - ESP_OK Success
* - ESP_ERR_INVALID_ARG GPIO number error
*/
esp_err_t gpio_od_enable(gpio_num_t gpio_num);
esp_err_t gpio_od_disable(gpio_num_t gpio_num);
/**
* @brief Configure the pin to be used for analog purpose (such as ADC, touch, etc.)

View File

@@ -468,6 +468,7 @@ esp_err_t gpio_reset_pin(gpio_num_t gpio_num)
}
#endif
gpio_hal_func_sel(gpio_context.gpio_hal, gpio_num, PIN_FUNC_GPIO);
esp_gpio_revoke(BIT64(gpio_num));
return ESP_OK;
}