diff -r d0a74a6a9a02 -r 89fc3c57282e components/tft/tftspi.c --- a/components/tft/tftspi.c Mon Jun 24 20:55:35 2024 +0200 +++ b/components/tft/tftspi.c Wed Jun 26 21:48:49 2024 +0200 @@ -15,6 +15,7 @@ #include "freertos/task.h" #include "esp_heap_caps.h" #include "soc/spi_reg.h" +#include "rom/gpio.h" // ==================================================== // ==== Global variables, default values ============== @@ -863,11 +864,11 @@ void TFT_PinsInit() { // Route all used pins to GPIO control - esp_rom_gpio_pad_select_gpio(PIN_NUM_CS); - esp_rom_gpio_pad_select_gpio(PIN_NUM_MISO); - esp_rom_gpio_pad_select_gpio(PIN_NUM_MOSI); - esp_rom_gpio_pad_select_gpio(PIN_NUM_CLK); - esp_rom_gpio_pad_select_gpio(PIN_NUM_DC); + gpio_pad_select_gpio(PIN_NUM_CS); + gpio_pad_select_gpio(PIN_NUM_MISO); + gpio_pad_select_gpio(PIN_NUM_MOSI); + gpio_pad_select_gpio(PIN_NUM_CLK); + gpio_pad_select_gpio(PIN_NUM_DC); gpio_set_direction(PIN_NUM_MISO, GPIO_MODE_INPUT); gpio_set_pull_mode(PIN_NUM_MISO, GPIO_PULLUP_ONLY); @@ -877,17 +878,17 @@ gpio_set_direction(PIN_NUM_DC, GPIO_MODE_OUTPUT); gpio_set_level(PIN_NUM_DC, 0); #if USE_TOUCH - esp_rom_gpio_pad_select_gpio(PIN_NUM_TCS); + gpio_pad_select_gpio(PIN_NUM_TCS); gpio_set_direction(PIN_NUM_TCS, GPIO_MODE_OUTPUT); #endif #if PIN_NUM_BCKL - esp_rom_gpio_pad_select_gpio(PIN_NUM_BCKL); + gpio_pad_select_gpio(PIN_NUM_BCKL); gpio_set_direction(PIN_NUM_BCKL, GPIO_MODE_OUTPUT); gpio_set_level(PIN_NUM_BCKL, PIN_BCKL_OFF); #endif #if PIN_NUM_RST - esp_rom_gpio_pad_select_gpio(PIN_NUM_RST); + gpio_pad_select_gpio(PIN_NUM_RST); gpio_set_direction(PIN_NUM_RST, GPIO_MODE_OUTPUT); gpio_set_level(PIN_NUM_RST, 0); #endif