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);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user