From b22c87183f2f3c866101f53ac6cc4c767a995dd0 Mon Sep 17 00:00:00 2001 From: Moritz Bitsch Date: Sat, 21 Oct 2017 13:05:21 +0200 Subject: [PATCH 1/2] Add MKS MINI 12864 support for GT2560 --- .../Geeetech/GT2560/Configuration.h | 2 +- Marlin/pins_GT2560_REV_A.h | 36 +++++++++++++------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h index 1d0c83f21..b7b14ebf0 100644 --- a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h @@ -1735,7 +1735,7 @@ /** * Customize common displays for GT2560 */ -#if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) +#if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) || ENABLED(MKS_MINI_12864) #define SDSUPPORT // Force SD Card support on for these displays #elif ENABLED(ULTRA_LCD) && ENABLED(DOGLCD) // No panel, just graphical LCD? #define LCD_WIDTH 20 // Default is 22. For this Geeetech use 20 diff --git a/Marlin/pins_GT2560_REV_A.h b/Marlin/pins_GT2560_REV_A.h index 0c420cfaa..01e3eb6ff 100644 --- a/Marlin/pins_GT2560_REV_A.h +++ b/Marlin/pins_GT2560_REV_A.h @@ -98,19 +98,33 @@ #if ENABLED(NEWPANEL) - #define LCD_PINS_RS 20 - #define LCD_PINS_ENABLE 17 - #define LCD_PINS_D4 16 - #define LCD_PINS_D5 21 - #define LCD_PINS_D6 5 - #define LCD_PINS_D7 6 + #if ENABLED(MKS_MINI_12864) + #define DOGLCD_A0 5 + #define DOGLCD_CS 21 + + #define BTN_EN1 40 + #define BTN_EN2 42 + #define BTN_ENC 19 + + #define SDSS 53 + #define SD_DETECT_PIN 38 + #else + + #define LCD_PINS_RS 20 + #define LCD_PINS_ENABLE 17 + #define LCD_PINS_D4 16 + #define LCD_PINS_D5 21 + #define LCD_PINS_D6 5 + #define LCD_PINS_D7 6 + + // Buttons are directly attached + #define BTN_EN1 42 + #define BTN_EN2 40 + #define BTN_ENC 19 - // Buttons are directly attached - #define BTN_EN1 42 - #define BTN_EN2 40 - #define BTN_ENC 19 + #define SD_DETECT_PIN 38 - #define SD_DETECT_PIN 38 + #endif #else // !NEWPANEL From 5bed2f351a8a9661668c9de187506352960c00c5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 24 Oct 2017 19:12:40 -0500 Subject: [PATCH 2/2] Fix spacing, use single instances of similar pins --- Marlin/pins_GT2560_REV_A.h | 43 +++++++++++++++----------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/Marlin/pins_GT2560_REV_A.h b/Marlin/pins_GT2560_REV_A.h index 01e3eb6ff..9ce02c412 100644 --- a/Marlin/pins_GT2560_REV_A.h +++ b/Marlin/pins_GT2560_REV_A.h @@ -98,33 +98,24 @@ #if ENABLED(NEWPANEL) - #if ENABLED(MKS_MINI_12864) - #define DOGLCD_A0 5 - #define DOGLCD_CS 21 - - #define BTN_EN1 40 - #define BTN_EN2 42 - #define BTN_ENC 19 - - #define SDSS 53 - #define SD_DETECT_PIN 38 - #else - - #define LCD_PINS_RS 20 + #if ENABLED(MKS_MINI_12864) + #define DOGLCD_A0 5 + #define DOGLCD_CS 21 + #define BTN_EN1 40 + #define BTN_EN2 42 + #else + #define LCD_PINS_RS 20 #define LCD_PINS_ENABLE 17 - #define LCD_PINS_D4 16 - #define LCD_PINS_D5 21 - #define LCD_PINS_D6 5 - #define LCD_PINS_D7 6 - - // Buttons are directly attached - #define BTN_EN1 42 - #define BTN_EN2 40 - #define BTN_ENC 19 - - #define SD_DETECT_PIN 38 - - #endif + #define LCD_PINS_D4 16 + #define LCD_PINS_D5 21 + #define LCD_PINS_D6 5 + #define LCD_PINS_D7 6 + #define BTN_EN1 42 + #define BTN_EN2 40 + #endif + + #define BTN_ENC 19 + #define SD_DETECT_PIN 38 #else // !NEWPANEL