mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
refactor: Use enum values for gpio pull up/down fields
Ensure that enum values are used When assigning `pull_up_en` and `pull_down_en` fields of `gpio_config_t`. Helps avoid `invalid conversion` errors when building those code snippets in C++.
This commit is contained in:
committed by
Song Ruo Jing
parent
dd73346503
commit
5454499877
@@ -521,8 +521,8 @@ static esp_err_t s_isp_io_init(isp_dvp_controller_t *dvp_ctlr, const esp_cam_ctl
|
||||
gpio_config_t gpio_conf = {
|
||||
.intr_type = GPIO_INTR_DISABLE,
|
||||
.mode = GPIO_MODE_INPUT,
|
||||
.pull_down_en = false,
|
||||
.pull_up_en = true,
|
||||
.pull_down_en = GPIO_PULLDOWN_DISABLE,
|
||||
.pull_up_en = GPIO_PULLUP_ENABLE,
|
||||
};
|
||||
|
||||
if (ctlr_config->pclk_io >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user