Color UI for MKS SGen-L V2 (#19919)

This commit is contained in:
Victor Oliveira 2020-10-29 02:52:50 -03:00 committed by Scott Lahteine
parent e6092ad146
commit 88e88743b9

View File

@ -299,6 +299,56 @@
#define LCD_PINS_D7 P1_22 #define LCD_PINS_D7 P1_22
#define KILL_PIN -1 // NC #define KILL_PIN -1 // NC
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
#define TFT_CS_PIN P1_00
#define TFT_A0_PIN P1_22
#define TFT_DC_PIN P1_22
#define TFT_MISO_PIN P0_08
#define TFT_BACKLIGHT_PIN P0_18
#define TFT_RESET_PIN P0_16
#define LCD_USE_DMA_SPI
#define TOUCH_INT_PIN P0_17
#define TOUCH_CS_PIN P0_15
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2
// Disable any LCD related PINs config
#define LCD_PINS_ENABLE -1
#define LCD_PINS_RS -1
// XPT2046 Touch Screen calibration
#if ENABLED(TFT_CLASSIC_UI)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -11386
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION 8684
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET 689
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -273
#endif
#elif ENABLED(TFT_COLOR_UI)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -17089
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION 11424
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET 1044
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -365
#endif
#define TFT_BUFFER_SIZE 2400
#endif
#else // !MKS_12864OLED_SSD1306 #else // !MKS_12864OLED_SSD1306
#define LCD_PINS_RS P0_16 #define LCD_PINS_RS P0_16