forked from espressif/esp-idf
feat(gpio): gpio_reset_pin should do IO reservation revoke
Closes https://github.com/espressif/esp-idf/issues/15598
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Configure the pin to be used for analog purpose (such as ADC, touch, etc.)
|
* @brief Configure the pin to be used for analog purpose (such as ADC, touch, etc.)
|
||||||
|
@@ -468,6 +468,7 @@ esp_err_t gpio_reset_pin(gpio_num_t gpio_num)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
gpio_hal_func_sel(gpio_context.gpio_hal, gpio_num, PIN_FUNC_GPIO);
|
gpio_hal_func_sel(gpio_context.gpio_hal, gpio_num, PIN_FUNC_GPIO);
|
||||||
|
esp_gpio_revoke(BIT64(gpio_num));
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user