From 0fedd768193ba559bbca296bcaadbc3a8020908c Mon Sep 17 00:00:00 2001 From: ellensp Date: Sat, 26 Sep 2020 12:47:22 +1200 Subject: [PATCH] Fix MKS Robin undefined pins error (#19507) --- Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index 48da17adc..26a0c9260 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -126,12 +126,7 @@ #endif #define LED_PIN PB2 -#ifdef HAS_GRAPHICAL_TFT - #define TFT_RESET_PIN PF6 - #define TFT_BACKLIGHT_PIN PG11 - #define TFT_CS_PIN PG12 // NE4 - #define TFT_RS_PIN PF0 // A0 -#else +#if HAS_FSMC_TFT /** * Note: MKS Robin TFT screens use various TFT controllers * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) @@ -148,10 +143,17 @@ #define LCD_BACKLIGHT_PIN PG11 #define FSMC_CS_PIN PG12 // NE4 #define FSMC_RS_PIN PF0 // A0 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 +#elif HAS_GRAPHICAL_TFT + #define TFT_RESET_PIN PF6 + #define TFT_BACKLIGHT_PIN PG11 + #define TFT_CS_PIN PG12 // NE4 + #define TFT_RS_PIN PF0 // A0 #endif #if NEED_TOUCH_PINS