Display Kconfig: Fix TTGO default SPI bus and display orientation checks

This commit is contained in:
C47D 2022-01-03 20:07:02 -06:00 committed by Carlos Diaz
parent 26272b08f0
commit 1a8a610b05

View file

@ -226,15 +226,15 @@ menu "LVGL TFT Display controller"
config LV_TFT_DISPLAY_X_OFFSET
depends on LV_TFT_DISPLAY_OFFSETS
int "X offset"
default 40 if LV_PREDEFINED_DISPLAY_TTGO && (LV_DISPLAY_ORIENTATION_LANDSCAPE || LV_DISPLAY_ORIENTATION_LANDSCAPE_INVERTED)
default 53 if LV_PREDEFINED_DISPLAY_TTGO && (LV_DISPLAY_ORIENTATION_PORTRAIT || LV_DISPLAY_ORIENTATION_PORTRAIT_INVERTED)
default 40 if LV_PREDEFINED_DISPLAY_TTGO && (DISPLAY_ORIENTATION_LANDSCAPE || DISPLAY_ORIENTATION_LANDSCAPE_INVERTED)
default 53 if LV_PREDEFINED_DISPLAY_TTGO && (DISPLAY_ORIENTATION_PORTRAIT || DISPLAY_ORIENTATION_PORTRAIT_INVERTED)
default 0
config LV_TFT_DISPLAY_Y_OFFSET
depends on LV_TFT_DISPLAY_OFFSETS
int "Y offset"
default 53 if LV_PREDEFINED_DISPLAY_TTGO && (LV_DISPLAY_ORIENTATION_LANDSCAPE || LV_DISPLAY_ORIENTATION_LANDSCAPE_INVERTED)
default 40 if LV_PREDEFINED_DISPLAY_TTGO && (LV_DISPLAY_ORIENTATION_PORTRAIT || LV_DISPLAY_ORIENTATION_PORTRAIT_INVERTED)
default 53 if LV_PREDEFINED_DISPLAY_TTGO && (DISPLAY_ORIENTATION_LANDSCAPE || DISPLAY_ORIENTATION_LANDSCAPE_INVERTED)
default 40 if LV_PREDEFINED_DISPLAY_TTGO && (DISPLAY_ORIENTATION_PORTRAIT || DISPLAY_ORIENTATION_PORTRAIT_INVERTED)
default 0
@ -469,14 +469,15 @@ menu "LVGL TFT Display controller"
choice
prompt "TFT SPI Bus." if LV_TFT_DISPLAY_PROTOCOL_SPI
default LV_TFT_DISPLAY_SPI2_HOST
help
Select the SPI Bus the TFT Display is attached to.
default LV_TFT_DISPLAY_SPI2_HOST if LV_PREDEFINED_DISPLAY_TTGO && !IDF_TARGET_ESP32S2
default LV_TFT_DISPLAY_SPI3_HOST if !LV_PREDEFINED_DISPLAY_TTGO && IDF_TARGET_ESP32S2
config LV_TFT_DISPLAY_SPI2_HOST
bool "SPI2_HOST"
config LV_TFT_DISPLAY_SPI3_HOST
bool "SPI3_HOST"
help
Select the SPI Bus the TFT Display is attached to.
endchoice
choice