#3 Start adding L58: Find a way to instantiate existing class or refactor it to C

This commit is contained in:
martinberlin 2021-05-30 19:51:59 +02:00
parent 7d339be14a
commit c9660bd69f
6 changed files with 165 additions and 5 deletions

View file

@ -9,7 +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_L58
choice
prompt "Select a touch panel controller model."
default LV_TOUCH_CONTROLLER_NONE
@ -24,6 +24,12 @@ menu "LVGL Touch controller"
config LV_TOUCH_CONTROLLER_FT6X06
select LV_TOUCH_DRIVER_PROTOCOL_I2C
bool "FT6X06"
config LV_TOUCH_CONTROLLER_L58
# Start only touch without protocol:
select CONFIG_LV_TOUCH_DRIVER_DISPLAY
bool "L58"
config LV_TOUCH_CONTROLLER_STMPE610
select LV_TOUCH_DRIVER_PROTOCOL_SPI
bool "STMPE610"
@ -90,6 +96,37 @@ menu "LVGL Touch controller"
bool "FSPI" if IDF_TARGET_ESP32S2
endchoice
menu "Touchpanel (L58) Lilygo Pin Assignments"
depends on LV_TOUCH_CONTROLLER_L58
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
default 15
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
default 14
help
Configure the I2C touchpanel SCL pin here.
config LV_TOUCH_INT
int "GPIO for Interrupt pin (INT)"
range 0 39 if IDF_TARGET_ESP32
range 0 43 if IDF_TARGET_ESP32S2
default 13
help
Configure the INT Pin (Low on event)
endmenu
menu "Touchpanel (XPT2046) Pin Assignments"
depends on LV_TOUCH_CONTROLLER_XPT2046