From d93439fe022e717dd04ec6ca6a9985b10a1cc0b1 Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Thu, 19 Nov 2020 16:47:49 -0300 Subject: [PATCH] Reduce RAM usage for TFT Color UI on SGen-L V2 (#20209) --- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 8 ++++++-- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 7f9efcdb16c4f..502c9375881a3 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -268,8 +268,12 @@ #define LCD_PINS_ENABLE -1 #define LCD_PINS_RS -1 - #define TFT_BUFFER_SIZE 1200 - #define TFT_QUEUE_SIZE 6144 + #ifndef TFT_BUFFER_SIZE + #define TFT_BUFFER_SIZE 1200 + #endif + #ifndef TFT_QUEUE_SIZE + #define TFT_QUEUE_SIZE 6144 + #endif #define BTN_EN1 P3_25 #define BTN_EN2 P3_26 diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index 8d2ce364b2090..6dc0c1e8ff45a 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -251,7 +251,7 @@ * _____ _____ * (BEEPER) 1.31 | · · | 1.30 (BTN_ENC) (MISO) 0.8 | · · | 0.7 (SD_SCK) * (LCD_EN) 0.18 | · · | 0.16 (LCD_RS) (BTN_EN1) 3.25 | · · | 0.28 (SD_CS2) - * (LCD_D4) 0.15 | · · 0.17 (LCD_D5) (BTN_EN2) 3.26 | · · 0.9 (SD_MOSI) + * (LCD_D4) 0.15 | · · | 0.17 (LCD_D5) (BTN_EN2) 3.26 | · · | 0.9 (SD_MOSI) * (LCD_D6) 1.0 | · · | 1.22 (LCD_D7) (SD_DETECT) 0.27 | · · | RST * GND | · · | 5V GND | · · | NC * ----- ----- @@ -318,7 +318,12 @@ #define LCD_PINS_ENABLE -1 #define LCD_PINS_RS -1 - #define TFT_BUFFER_SIZE 2400 + #ifndef TFT_BUFFER_SIZE + #define TFT_BUFFER_SIZE 1200 + #endif + #ifndef TFT_QUEUE_SIZE + #define TFT_QUEUE_SIZE 6144 + #endif #else // !MKS_12864OLED_SSD1306