|
|
@@ -70,7 +70,7 @@ void board_init(void)
|
|
|
#endif
|
|
|
|
|
|
// Button
|
|
|
- gpio_pad_select_gpio(BUTTON_PIN);
|
|
|
+ esp_rom_gpio_pad_select_gpio(BUTTON_PIN);
|
|
|
gpio_set_direction(BUTTON_PIN, GPIO_MODE_INPUT);
|
|
|
gpio_set_pull_mode(BUTTON_PIN, BUTTON_STATE_ACTIVE ? GPIO_PULLDOWN_ONLY : GPIO_PULLUP_ONLY);
|
|
|
|
|
|
@@ -98,7 +98,12 @@ 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 ((iopin->pin != GPIO_FUNC_IN_LOW) && (iopin->pin != GPIO_FUNC_IN_HIGH)) {
|
|
|
+#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);
|
|
|
}
|
|
|
}
|