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:
Darian Leung
2025-08-07 11:45:11 +08:00
committed by Song Ruo Jing
parent dd73346503
commit 5454499877
29 changed files with 81 additions and 81 deletions
@@ -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;