fix SPI names for touch

with ESP32-C3 specific auto-dma proper selection
This commit is contained in:
arktrin 2021-12-18 20:54:50 +03:00 committed by C47D
parent c78e9fe169
commit b9377200a6
3 changed files with 40 additions and 39 deletions

View file

@ -195,14 +195,18 @@ bool lvgl_spi_driver_init(int host,
spi_bus_config_t buscfg = { spi_bus_config_t buscfg = {
.miso_io_num = miso_pin, .miso_io_num = miso_pin,
.mosi_io_num = mosi_pin, .mosi_io_num = mosi_pin,
.sclk_io_num = sclk_pin, .sclk_io_num = sclk_pin,
.quadwp_io_num = quadwp_pin, .quadwp_io_num = quadwp_pin,
.quadhd_io_num = quadhd_pin, .quadhd_io_num = quadhd_pin,
.max_transfer_sz = max_transfer_sz .max_transfer_sz = max_transfer_sz
}; };
ESP_LOGI(TAG, "Initializing SPI bus..."); ESP_LOGI(TAG, "Initializing SPI bus...");
#if defined (CONFIG_IDF_TARGET_ESP32C3)
dma_channel = 3;
#endif
esp_err_t ret = spi_bus_initialize(host, &buscfg, (spi_dma_chan_t)dma_channel); esp_err_t ret = spi_bus_initialize(host, &buscfg, (spi_dma_chan_t)dma_channel);
assert(ret == ESP_OK); assert(ret == ESP_OK);

View file

@ -22,7 +22,7 @@ menu "LVGL TFT Display controller"
select LV_TFT_DISPLAY_CONTROLLER_ILI9341 select LV_TFT_DISPLAY_CONTROLLER_ILI9341
select LV_TFT_DISPLAY_PROTOCOL_SPI select LV_TFT_DISPLAY_PROTOCOL_SPI
config LV_PREDEFINED_DISPLAY_M5CORE2 config LV_PREDEFINED_DISPLAY_M5CORE2
bool "M5Core2" bool "M5Core2"
select LV_TFT_DISPLAY_CONTROLLER_ILI9341 select LV_TFT_DISPLAY_CONTROLLER_ILI9341
select LV_TFT_DISPLAY_PROTOCOL_SPI select LV_TFT_DISPLAY_PROTOCOL_SPI
config LV_PREDEFINED_DISPLAY_M5STICK config LV_PREDEFINED_DISPLAY_M5STICK
@ -1008,6 +1008,3 @@ menu "LVGL TFT Display controller"
default 0 default 0
endmenu endmenu

View file

@ -1,28 +1,28 @@
menu "LVGL Touch controller" menu "LVGL Touch controller"
config LV_TOUCH_CONTROLLER config LV_TOUCH_CONTROLLER
int int
default 0 if LV_TOUCH_CONTROLLER_NONE default 0 if LV_TOUCH_CONTROLLER_NONE
default 1 if LV_TOUCH_CONTROLLER_XPT2046 default 1 if LV_TOUCH_CONTROLLER_XPT2046
default 2 if LV_TOUCH_CONTROLLER_FT6X06 default 2 if LV_TOUCH_CONTROLLER_FT6X06
default 3 if LV_TOUCH_CONTROLLER_STMPE610 default 3 if LV_TOUCH_CONTROLLER_STMPE610
default 4 if LV_TOUCH_CONTROLLER_ADCRAW default 4 if LV_TOUCH_CONTROLLER_ADCRAW
default 5 if LV_TOUCH_CONTROLLER_FT81X default 5 if LV_TOUCH_CONTROLLER_FT81X
default 6 if LV_TOUCH_CONTROLLER_RA8875 default 6 if LV_TOUCH_CONTROLLER_RA8875
default 7 if LV_TOUCH_CONTROLLER_GT911 default 7 if LV_TOUCH_CONTROLLER_GT911
choice choice
prompt "Select a touch panel controller model." prompt "Select a touch panel controller model."
default LV_TOUCH_CONTROLLER_NONE default LV_TOUCH_CONTROLLER_NONE
help help
Select the controller for your touch panel. Select the controller for your touch panel.
config LV_TOUCH_CONTROLLER_NONE config LV_TOUCH_CONTROLLER_NONE
bool "None" bool "None"
config LV_TOUCH_CONTROLLER_XPT2046 config LV_TOUCH_CONTROLLER_XPT2046
select LV_TOUCH_DRIVER_PROTOCOL_SPI select LV_TOUCH_DRIVER_PROTOCOL_SPI
bool "XPT2046" bool "XPT2046"
config LV_TOUCH_CONTROLLER_FT6X06 config LV_TOUCH_CONTROLLER_FT6X06
select LV_I2C_TOUCH select LV_I2C_TOUCH
bool "FT6X06" bool "FT6X06"
config LV_TOUCH_CONTROLLER_STMPE610 config LV_TOUCH_CONTROLLER_STMPE610
@ -61,7 +61,7 @@ menu "LVGL Touch controller"
bool bool
help help
Touch controller uses same interface/device as display Touch controller uses same interface/device as display
(Note: Display must be initialized before touch) (Note: Display must be initialized before touch)
choice choice
prompt "Touch Controller SPI Bus." prompt "Touch Controller SPI Bus."
@ -150,10 +150,10 @@ menu "LVGL Touch controller"
default 4095 if LV_PREDEFINED_PINS_38V4 default 4095 if LV_PREDEFINED_PINS_38V4
default 1900 default 1900
config LV_TOUCH_XY_SWAP config LV_TOUCH_XY_SWAP
bool bool
prompt "Swap XY." prompt "Swap XY."
default y default y
config LV_TOUCH_INVERT_X config LV_TOUCH_INVERT_X
bool bool
@ -275,9 +275,9 @@ menu "LVGL Touch controller"
default 3800 default 3800
config LV_TOUCH_XY_SWAP config LV_TOUCH_XY_SWAP
bool bool
prompt "Swap XY." prompt "Swap XY."
default n default n
config LV_TOUCH_INVERT_X config LV_TOUCH_INVERT_X
bool bool
@ -376,25 +376,25 @@ menu "LVGL Touch controller"
config LV_TOUCH_X_MIN config LV_TOUCH_X_MIN
int int
prompt "Minimum X coordinate ADC value" prompt "Minimum X coordinate ADC value"
range 0 1023 range 0 1023
default 0 default 0
config LV_TOUCH_Y_MIN config LV_TOUCH_Y_MIN
int int
prompt "Minimum Y coordinate ADC value" prompt "Minimum Y coordinate ADC value"
range 0 1023 range 0 1023
default 0 default 0
config LV_TOUCH_X_MAX config LV_TOUCH_X_MAX
int int
prompt "Maximum X coordinate ADC value" prompt "Maximum X coordinate ADC value"
range 0 1023 range 0 1023
default 1023 default 1023
config LV_TOUCH_Y_MAX config LV_TOUCH_Y_MAX
int int
prompt "Maximum Y coordinate ADC value" prompt "Maximum Y coordinate ADC value"
range 0 1023 range 0 1023
default 1023 default 1023
config LV_TOUCH_XY_SWAP config LV_TOUCH_XY_SWAP
@ -415,13 +415,13 @@ menu "LVGL Touch controller"
config LV_TOUCH_RA8875_SAMPLE_TIME config LV_TOUCH_RA8875_SAMPLE_TIME
int int
prompt "TP Sample Time Adjusting" prompt "TP Sample Time Adjusting"
range 0 7 range 0 7
default 0 default 0
config LV_TOUCH_RA8875_ADC_CLOCK config LV_TOUCH_RA8875_ADC_CLOCK
int int
prompt "ADC Clock Setting" prompt "ADC Clock Setting"
range 0 7 range 0 7
default 0 default 0
config LV_TOUCH_RA8875_WAKEUP_ENABLE config LV_TOUCH_RA8875_WAKEUP_ENABLE
@ -444,10 +444,10 @@ menu "LVGL Touch controller"
menu "Touchpanel Configuration (GT911)" menu "Touchpanel Configuration (GT911)"
depends on LV_TOUCH_CONTROLLER_GT911 depends on LV_TOUCH_CONTROLLER_GT911
config LV_GT911_SWAPXY config LV_GT911_SWAPXY
bool bool
prompt "Swap X with Y coordinate." prompt "Swap X with Y coordinate."
default y default y
config LV_GT911_INVERT_X config LV_GT911_INVERT_X
bool bool