Indev: Add support for GT911 touch driver by @dastarling

This commit is contained in:
C47D 2021-06-10 22:49:56 -05:00
parent d379a4e851
commit f726311525
4 changed files with 57 additions and 0 deletions

View file

@ -9,6 +9,7 @@ menu "LVGL Touch controller"
default 4 if LV_TOUCH_CONTROLLER_ADCRAW
default 5 if LV_TOUCH_CONTROLLER_FT81X
default 6 if LV_TOUCH_CONTROLLER_RA8875
default 7 if LV_TOUCH_CONTROLLER_GT911
choice
prompt "Select a touch panel controller model."
@ -36,6 +37,9 @@ menu "LVGL Touch controller"
config LV_TOUCH_CONTROLLER_RA8875
select LV_TOUCH_DRIVER_DISPLAY
bool "RA8875"
config LV_TOUCH_CONTROLLER_GT911
select LV_TOUCH_DRIVER_PROTOCOL_I2C
bool "GT911"
endchoice
config LV_TOUCH_DRIVER_PROTOCOL_SPI
@ -498,5 +502,50 @@ menu "LVGL Touch controller"
default y
endmenu
menu "Touchpanel (GT911) Pin Assignments"
depends on LV_TOUCH_CONTROLLER_GT911
config LV_TOUCH_I2C_SDA
int
prompt "GPIO for SDA (I2C)"
range 0 39 if IDF_TARGET_ESP32
range 0 43 if IDF_TARGET_ESP32S2
range 0 21 if IDF_TARGET_ESP32C3
default 2
help
Configure the I2C touchpanel SDA pin here.
config LV_TOUCH_I2C_SCL
int "GPIO for clock signal SCL (I2C)"
range 0 39 if IDF_TARGET_ESP32
range 0 43 if IDF_TARGET_ESP32S2
range 0 21 if IDF_TARGET_ESP32C3
default 3
help
Configure the I2C touchpanel SCL pin here.
endmenu
menu "Touchpanel Configuration (GT911)"
depends on LV_TOUCH_CONTROLLER_GT911
config LV_GT911_SWAPXY
bool
prompt "Swap X with Y coordinate."
default y
config LV_GT911_INVERT_X
bool
prompt "Invert X coordinate value."
default n
config LV_GT911_INVERT_Y
bool
prompt "Invert Y coordinate value."
default y
endmenu
endmenu