mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +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
@@ -860,8 +860,8 @@ static int spi_out_ts_sync_init(void)
|
||||
.intr_type = GPIO_INTR_DISABLE,
|
||||
.mode = GPIO_MODE_OUTPUT,
|
||||
.pin_bit_mask = BIT(SPI_OUT_SYNC_IO_NUM),
|
||||
.pull_down_en = 0,
|
||||
.pull_up_en = 0
|
||||
.pull_down_en = GPIO_PULLDOWN_DISABLE,
|
||||
.pull_up_en = GPIO_PULLUP_DISABLE
|
||||
};
|
||||
if (gpio_config(&io_conf) != ESP_OK) {
|
||||
goto failed;
|
||||
|
||||
Reference in New Issue
Block a user