added the implementation of CST816 touch sensor

This commit is contained in:
Bassam 2022-08-07 00:31:06 +03:00
parent 26fe6e7703
commit ed2860239f
7 changed files with 247 additions and 1 deletions

View file

@ -10,6 +10,7 @@ menu "LVGL Touch controller"
default 5 if LV_TOUCH_CONTROLLER_FT81X
default 6 if LV_TOUCH_CONTROLLER_RA8875
default 7 if LV_TOUCH_CONTROLLER_GT911
default 8 if LV_TOUCH_CONTROLLER_CST816
choice
prompt "Select a touch panel controller model."
@ -40,6 +41,9 @@ menu "LVGL Touch controller"
config LV_TOUCH_CONTROLLER_GT911
select LV_I2C_TOUCH
bool "GT911"
config LV_TOUCH_CONTROLLER_CST816
select LV_I2C_TOUCH
bool "CST816"
endchoice
config LV_TOUCH_DRIVER_PROTOCOL_SPI
@ -441,6 +445,38 @@ menu "LVGL Touch controller"
endmenu
menu "Touchpanel Configuration (CST816)"
depends on LV_TOUCH_CONTROLLER_CST816
config LV_TOUCH_X_MAX_CST816
int
prompt "Maximum X coordinate ADC value"
range 0 1023
default 320
config LV_TOUCH_Y_MAX_CST816
int
prompt "Maximum Y coordinate ADC value"
range 0 1023
default 240
config LV_SWAPXY_CST816
bool
prompt "Swap X with Y coordinate."
default y
config LV_INVERT_X_CST816
bool
prompt "Invert X coordinate value."
default y
config LV_INVERT_Y_CST816
bool
prompt "Invert Y coordinate value."
default n
endmenu
menu "Touchpanel Configuration (GT911)"
depends on LV_TOUCH_CONTROLLER_GT911