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 8f231272f6
commit c3e4134b0c
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_OK Success
* - ESP_ERR_INVALID_ARG GPIO number error * - 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 * @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_OK Success
* - ESP_ERR_INVALID_ARG GPIO number error * - 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);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -445,6 +445,7 @@ esp_err_t gpio_reset_pin(gpio_num_t gpio_num)
.intr_type = GPIO_INTR_DISABLE, .intr_type = GPIO_INTR_DISABLE,
}; };
gpio_config(&cfg); gpio_config(&cfg);
esp_gpio_revoke(BIT64(gpio_num));
return ESP_OK; return ESP_OK;
} }