diff options
| author | hathach <[email protected]> | 2022-01-16 13:12:27 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-01-16 13:12:27 +0700 |
| commit | e635c16de089953e305e94cba8524cb6f3aeae6f (patch) | |
| tree | de0408a469818667828f1a36355ece7a069d16d7 | |
| parent | 76987fb35724a3547d6abbbcef04485a906cf6e5 (diff) | |
fix esp ci build with IDF version 5
| -rw-r--r-- | hw/bsp/esp32s2/boards/esp32s2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/bsp/esp32s2/boards/esp32s2.c b/hw/bsp/esp32s2/boards/esp32s2.c index 358c0c803..77754908e 100644 --- a/hw/bsp/esp32s2/boards/esp32s2.c +++ b/hw/bsp/esp32s2/boards/esp32s2.c @@ -98,7 +98,11 @@ static void configure_pins(usb_hal_context_t *usb) esp_rom_gpio_connect_out_signal(iopin->pin, iopin->func, false, false); } else { esp_rom_gpio_connect_in_signal(iopin->pin, iopin->func, false); +#if ESP_IDF_VERSION_MAJOR > 4 + if ((iopin->pin != GPIO_MATRIX_CONST_ZERO_INPUT) && (iopin->pin != GPIO_MATRIX_CONST_ONE_INPUT)) { +#else if ((iopin->pin != GPIO_FUNC_IN_LOW) && (iopin->pin != GPIO_FUNC_IN_HIGH)) { +#endif gpio_ll_input_enable(&GPIO, iopin->pin); } } |
