From 8e9f1f5304fa58d0d0eb58ca7433881fba44f5e6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 9 Apr 2023 05:15:03 -0500 Subject: [PATCH 01/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Begin=20LCD=20pins?= =?UTF-8?q?=20migration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-validate-pins.yml | 3 +++ Marlin/src/inc/Warnings.cpp | 7 +++++++ Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 2 ++ Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 2 ++ Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 2 ++ Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 2 ++ Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 2 ++ 7 files changed, 20 insertions(+) diff --git a/.github/workflows/ci-validate-pins.yml b/.github/workflows/ci-validate-pins.yml index e093eb92c7b9..51781996d78d 100644 --- a/.github/workflows/ci-validate-pins.yml +++ b/.github/workflows/ci-validate-pins.yml @@ -13,6 +13,9 @@ on: #- 2.1.x paths: - 'Marlin/src/pins/*/**' + paths-ignore: + - 'Marlin/src/pins/lcd/**' + push: branches: - bugfix-2.1.x diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index b808909fd752..4e33e91bfaaf 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -880,3 +880,10 @@ #if defined(ARDUINO_ARCH_HC32) && F_CPU == 200000000 #warning "HC32 clock is assumed to be 200MHz. If this isn't the case for your board please submit a report so we can add support." #endif + +/** + * Board and LCD have differently-keyed plugs + */ +#if ALL(HAS_LCD_SELECTED, EXP_REVERSE_KEYED) + #warning "CAUTION! The MOTHERBOARD and LCD have oppositely-keyed EXP plugs." +#endif diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 6a8187d79207..f209232e4758 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -149,6 +149,8 @@ #define EXP2_07_PIN 34 #define EXP2_08_PIN -1 // RESET +#define EXP_REVERSE_KEYED + // // MicroSD card // diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index dbacb0fa26f8..6fd32ee1e98d 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -225,6 +225,8 @@ #define EXP2_06_PIN P0_09 #define EXP2_07_PIN P0_27 +#define EXP_REVERSE_KEYED + // // LCD / Controller // diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index ae4ee3268eb7..dd8a4426db47 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -245,6 +245,8 @@ #define EXP2_07_PIN PE12 #define EXP2_08_PIN -1 +#define EXP_REVERSE_KEYED + // // SD Card // diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index ea82c13fba88..9ca3c57c3fe7 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -294,6 +294,8 @@ #define EXP2_07_PIN PE12 #define EXP2_08_PIN -1 // RESET +#define EXP_REVERSE_KEYED + // // LCD / Controller // diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index d5689c1e71da..e17ee4392e33 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -262,6 +262,8 @@ #define EXP2_07_PIN PG3 #define EXP2_08_PIN -1 // RESET +#define EXP_REVERSE_KEYED + /** ------- * | 0 | DGND-| * 3V3 | 1 2 | DGND-| From 4d366a449ea6daa7f335c8c8e2d290c005f667f1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 9 Apr 2023 20:14:55 -0500 Subject: [PATCH 02/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20LCD=20Adapters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/lcd/adapters.h | 242 +++++++++++++++++++++++++++++++++ Marlin/src/pins/pins_lcd.h | 10 ++ 2 files changed, 252 insertions(+) create mode 100644 Marlin/src/pins/lcd/adapters.h diff --git a/Marlin/src/pins/lcd/adapters.h b/Marlin/src/pins/lcd/adapters.h new file mode 100644 index 000000000000..dc4383da5f48 --- /dev/null +++ b/Marlin/src/pins/lcd/adapters.h @@ -0,0 +1,242 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if ENABLED(LCD_ON_EXP3) + + // Remap "EXP3" to "LCD1" for displays that only have a single 10-pin connector + + #define LCD1_01_PIN EXP3_01_PIN + #define LCD1_02_PIN EXP3_02_PIN + #define LCD1_03_PIN EXP3_03_PIN + #define LCD1_04_PIN EXP3_04_PIN + #define LCD1_05_PIN EXP3_05_PIN + #define LCD1_06_PIN EXP3_06_PIN + #define LCD1_07_PIN EXP3_07_PIN + #define LCD1_08_PIN EXP3_08_PIN + +#elif ENABLED(ADAPTER_MELZI_CREALITY) + + /** Creality "Melzi" LCD single-to-dual adapter + * ------ + * LCD1-1 <= BEEP | 1 2 | ENC => LCD1-2 + * LCD2-3 <= EN1 | 3 4 | RESET => LCD1-4 + * LCD2-5 <= EN2 5 6 | A0 => LCD1-7 + * LCD1-6 <= CS | 7 8 | MOSI => LCD2-6 + * GND | 9 10 | 5V + * ------ + */ + #define LCD1_01_PIN EXP1_01_PIN // BEEPER + #define LCD1_02_PIN EXP1_02_PIN // ENC + #define LCD1_06_PIN EXP1_07_PIN // CS / RS / ST9720 CS + #define LCD1_07_PIN EXP1_06_PIN // A0 / D4 / ST9720 CLK / SCK + + #define LCD2_03_PIN EXP1_03_PIN // EN1 + #define LCD2_05_PIN EXP1_05_PIN // EN2 + #define LCD2_06_PIN EXP1_08_PIN // EN / ST9720 DAT / MOSI + +#elif ENABLED(ADAPTER_MINIPANEL_DUAL) + + // Map old-style MINIPANEL connectors to LCD1/2. + // Contrast with Single-to-mini and Dual-to-mini adapters, + // if such adapters exist for MINIPANEL. + + /** + * SDD MOSI SDSS RESET LCDSS A0 KILL ENC + * 2-7 2-6 2-2 1-6 1-1 2-3 2-5 + * ----------------------------- ----------------------------- + * | 2 4 6 8 10 | 12 14 16 18 20 | + * | 1 3 5 7 9 | 11 13 15 17 19 | + * ----------------------------- ----------------------------- + * 2-2 2-7 1-1 2-3 2-5 + * 5V MISO SCK GND 3V3 BL BEEP EN1 EN2 + */ + + #define LCD1_01_PIN MINI_15 // BEEP + #define LCD1_02_PIN MINI_20 // ENC + #define LCD1_06_PIN MINI_14 // LCDSS + #define LCD1_07_PIN MINI_16 // A0 + #define LCD1_08_PIN MINI_13 // BACKLIGHT + + #define LCD2_02_PIN MINI_05 // SCK + #define LCD2_03_PIN MINI_17 // EN1 + #define LCD2_05_PIN MINI_19 // EN2 + #define LCD2_06_PIN MINI_04 // MOSI + #define LCD2_07_PIN MINI_02 // SD_DETECT + #define LCD2_08_PIN MINI_18 // KILL + +#elif ENABLED(ADAPTER_CREALITY_PIN27) + + // A "Pin 27" Adapter frees EXP1_01_PIN for other uses. This assumes a single EXP plug. + // The generic "ADAPTER_PIN27" below simply frees LCD1_01_PIN after LCD mapping. + #define LCD1_02_PIN EXP1_02_PIN // ENC + #define LCD1_03_PIN EXP1_03_PIN // EN1 + #define LCD1_04_PIN EXP1_04_PIN // RESET + #define LCD1_05_PIN EXP1_05_PIN // EN2 + #define LCD1_06_PIN EXP1_06_PIN // A0 / ST9720 CLK + #define LCD1_07_PIN EXP1_07_PIN // CS / ST9720 CS + #define LCD1_08_PIN EXP1_08_PIN // ST9720 DAT + +#elif ANY(ADAPTER_CREALITY_DUAL, ADAPTER_BTT_DUAL) + + /** Common LCD single-to-dual adapter + * ------ + * LCD1-1 <= SCK | 1 2 | ENC => LCD1-2 + * LCD2-5 <= EN1 | 3 4 | RESET => LCD1-4 + * LCD2-3 <= EN2 5 6 | A0 => LCD1-7 + * LCD1-6 <= CS | 7 8 | MOSI => LCD2-6 + * GND | 9 10 | 5V + * ------ + */ + #define LCD1_02_PIN EXP1_02_PIN // ENC + #define LCD1_04_PIN EXP1_04_PIN // RESET + #define LCD1_06_PIN EXP1_07_PIN // CS + #define LCD1_07_PIN EXP1_06_PIN // A0 + + #define LCD2_02_PIN EXP1_01_PIN // SCK - Soft SPI + #define LCD2_03_PIN EXP1_05_PIN // EN2 + #define LCD2_05_PIN EXP1_03_PIN // EN1 + #define LCD2_06_PIN EXP1_08_PIN // MOSI - Soft SPI + + #define FORCE_SOFT_SPI + +#elif ANY(ADAPTER_TH3D_DUAL, ADAPTER_MKS_DUAL) + + /** + * https://www.th3dstudio.com/product/ezboard-creality-dual-lcd-adapter-board/ + * ------ + * LCD1-1 <= SCK | 1 2 | ENC => LCD1-2 + * LCD2-5 <= EN1 | 3 4 | RESET => LCD1-4 + * LCD2-3 <= EN2 5 6 | A0 => LCD1-7 + * LCD1-6 <= CS | 7 8 | MOSI => LCD2-6 + * GND | 9 10 | 5V + * ------ + */ + #define LCD1_02_PIN EXP1_02_PIN // ENC + #define LCD1_04_PIN EXP1_04_PIN // RESET + #define LCD1_06_PIN EXP1_07_PIN // CS + #define LCD1_07_PIN EXP1_06_PIN // A0 + + #define LCD2_02_PIN EXP1_01_PIN // SCK - Soft SPI + #define LCD2_03_PIN EXP1_05_PIN // EN2 + #define LCD2_05_PIN EXP1_03_PIN // EN1 + #define LCD2_06_PIN EXP1_08_PIN // MOSI - Soft SPI + + #define FORCE_SOFT_SPI + +#endif + +// Provide One-to-One mapping by default + +#define _LCD_SET(N,I) && (LCD##I##_0##N##_PIN == 0) + +#if defined(EXP1_01_PIN) REPEAT2_S(1,9,_LCD_SET,1) + #define LCD1_01_PIN EXP1_01_PIN + #define LCD1_02_PIN EXP1_02_PIN + #define LCD1_03_PIN EXP1_03_PIN + #define LCD1_04_PIN EXP1_04_PIN + #define LCD1_05_PIN EXP1_05_PIN + #define LCD1_06_PIN EXP1_06_PIN + #define LCD1_07_PIN EXP1_07_PIN + #define LCD1_08_PIN EXP1_08_PIN +#endif + +#if defined(EXP2_01_PIN) REPEAT2_S(1,9,_LCD_SET,2) + #define LCD2_01_PIN EXP2_01_PIN + #define LCD2_02_PIN EXP2_02_PIN + #define LCD2_03_PIN EXP2_03_PIN + #define LCD2_04_PIN EXP2_04_PIN + #define LCD2_05_PIN EXP2_05_PIN + #define LCD2_06_PIN EXP2_06_PIN + #define LCD2_07_PIN EXP2_07_PIN + #define LCD2_08_PIN EXP2_08_PIN +#endif + +// Define "LCD3" pins if EXP3 is not remapped to LCD1 +// May not be needed if we just always remap "LCD1" to EXP3 + +#if defined(EXP3_01_PIN) REPEAT2_S(1,9,_LCD_SET,3) + #define LCD3_01_PIN EXP3_01_PIN + #define LCD3_02_PIN EXP3_02_PIN + #define LCD3_03_PIN EXP3_03_PIN + #define LCD3_04_PIN EXP3_04_PIN + #define LCD3_05_PIN EXP3_05_PIN + #define LCD3_06_PIN EXP3_06_PIN + #define LCD3_07_PIN EXP3_07_PIN + #define LCD3_08_PIN EXP3_08_PIN +#endif + +#undef _LCD_SET + +#if ENABLED(ADAPTER_PIN27) + #undef LCD1_01_PIN +#endif + +#ifndef LCD1_01_PIN + #define LCD1_01_PIN -1 +#endif +#ifndef LCD1_02_PIN + #define LCD1_02_PIN -1 +#endif +#ifndef LCD1_03_PIN + #define LCD1_03_PIN -1 +#endif +#ifndef LCD1_04_PIN + #define LCD1_04_PIN -1 +#endif +#ifndef LCD1_05_PIN + #define LCD1_05_PIN -1 +#endif +#ifndef LCD1_06_PIN + #define LCD1_06_PIN -1 +#endif +#ifndef LCD1_07_PIN + #define LCD1_07_PIN -1 +#endif +#ifndef LCD1_08_PIN + #define LCD1_08_PIN -1 +#endif + +#ifndef LCD2_01_PIN + #define LCD2_01_PIN -1 +#endif +#ifndef LCD2_02_PIN + #define LCD2_02_PIN -1 +#endif +#ifndef LCD2_03_PIN + #define LCD2_03_PIN -1 +#endif +#ifndef LCD2_04_PIN + #define LCD2_04_PIN -1 +#endif +#ifndef LCD2_05_PIN + #define LCD2_05_PIN -1 +#endif +#ifndef LCD2_06_PIN + #define LCD2_06_PIN -1 +#endif +#ifndef LCD2_07_PIN + #define LCD2_07_PIN -1 +#endif +#ifndef LCD2_08_PIN + #define LCD2_08_PIN -1 +#endif diff --git a/Marlin/src/pins/pins_lcd.h b/Marlin/src/pins/pins_lcd.h index e5cc88059754..21ad3529f81c 100644 --- a/Marlin/src/pins/pins_lcd.h +++ b/Marlin/src/pins/pins_lcd.h @@ -25,6 +25,16 @@ * pins_lcd.h - Define LCD pins based on the EXP connector / adapter */ +#if defined(LCD_PINS_EN) || defined(DOGLCD_A0) + + // LCD pins were already defined in the board pins file + +#else + + #include "lcd/adapters.h" + +#endif + /** * Certain displays use LCD_PINS_RS as LCD_RESET_PIN */ From c0112308712a2ce2cc75949a631eefdb1d57ee4c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 10 Apr 2023 02:11:02 -0500 Subject: [PATCH 03/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Migrate=20CR10=5FSTO?= =?UTF-8?q?CKDISPLAY?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_LCD.h | 75 ++++++++ Marlin/src/inc/SanityCheck.h | 76 +------- Marlin/src/inc/Warnings.cpp | 7 + Marlin/src/pins/esp32/pins_MRR_ESPE.h | 37 ++-- Marlin/src/pins/lcd/CR10_STOCKDISPLAY.h | 63 +++++++ Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 19 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 16 +- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 17 +- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 18 +- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h | 120 ++++++------- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 18 +- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 164 ++++++++---------- Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h | 17 +- Marlin/src/pins/mega/pins_CNCONTROLS_11.h | 2 +- Marlin/src/pins/native/pins_RAMPS_NATIVE.h | 85 ++++----- Marlin/src/pins/pins_lcd.h | 11 ++ Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 37 ++-- Marlin/src/pins/rambo/pins_EINSY_RETRO.h | 37 ++-- Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h | 19 +- Marlin/src/pins/ramps/pins_RAMPS.h | 27 +-- Marlin/src/pins/ramps/pins_TT_OSCAR.h | 69 +++----- Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 5 +- .../src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h | 52 ++---- Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h | 47 ++--- Marlin/src/pins/samd/pins_MINITRONICS20.h | 47 ++--- Marlin/src/pins/samd/pins_RAMPS_144.h | 27 +-- .../src/pins/sanguino/pins_MELZI_CREALITY.h | 9 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 33 ++-- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 16 +- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 20 +-- .../src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 16 +- .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 9 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 15 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 27 ++- Marlin/src/pins/stm32f1/pins_CREALITY_V521.h | 32 ++-- Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h | 6 +- Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h | 2 +- .../pins/stm32f1/pins_MKS_ROBIN_NANO_common.h | 2 +- .../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 16 +- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 76 ++++---- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 16 +- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 79 ++++----- .../stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h | 20 +-- .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 17 +- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 17 +- .../pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 9 +- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 80 ++++----- Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 80 ++++----- .../src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h | 21 +-- .../pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h | 21 +-- .../pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h | 17 +- .../pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h | 17 +- .../pins/stm32g0/pins_BTT_MANTA_M8P_common.h | 17 +- .../pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 20 +-- .../pins/stm32h7/pins_BTT_SKR_V3_0_common.h | 17 +- 55 files changed, 788 insertions(+), 1051 deletions(-) create mode 100644 Marlin/src/pins/lcd/CR10_STOCKDISPLAY.h diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 573cfb0d3c75..0fccd7a09977 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1912,3 +1912,78 @@ #if ALL(SPI_FLASH, HAS_MEDIA, MARLIN_DEV_MODE) #define SPI_FLASH_BACKUP 1 #endif + +#define LCD_ENABLED_COUNT 0 \ + + ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \ + + ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) \ + + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \ + + (ENABLED(MINIPANEL) && NONE(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \ + + (ENABLED(MKS_MINI_12864) && NONE(MKS_LCD12864A, MKS_LCD12864B)) \ + + (ENABLED(FYSETC_MINI_12864_2_1) && NONE(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864)) \ + + COUNT_ENABLED(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864) \ + + (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \ + + (DISABLED(IS_LEGACY_TFT) && ENABLED(TFT_GENERIC)) \ + + (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \ + + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35, ANYCUBIC_LCD_VYPER) \ + + DGUS_UI_IS(ORIGIN) + DGUS_UI_IS(FYSETC) + DGUS_UI_IS(HIPRECY) + DGUS_UI_IS(MKS) + DGUS_UI_IS(RELOADED) + DGUS_UI_IS(IA_CREALITY) \ + + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \ + + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ + + COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_GENERIC_12864_1_1) \ + + COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \ + + COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \ + + COUNT_ENABLED(MKS_TS35_V2_0, MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35, MKS_ROBIN_TFT43, \ + MKS_ROBIN_TFT_V1_1R, ANET_ET4_TFT28, ANET_ET5_TFT35, BIQU_BX_TFT70, BTT_TFT35_SPI_V1_0) \ + + COUNT_ENABLED(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C) \ + + COUNT_ENABLED(VIKI2, miniVIKI) \ + + ENABLED(WYH_L12864) \ + + COUNT_ENABLED(ZONESTAR_12864LCD, ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) \ + + COUNT_ENABLED(ANET_FULL_GRAPHICS_LCD, CTC_A10S_A13) \ + + ENABLED(AZSMZ_12864) \ + + ENABLED(BQ_LCD_SMART_CONTROLLER) \ + + ENABLED(CARTESIO_UI) \ + + ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \ + + ENABLED(FF_INTERFACEBOARD) \ + + ENABLED(FYSETC_242_OLED_12864) \ + + ENABLED(G3D_PANEL) \ + + ENABLED(LCD_FOR_MELZI) \ + + ENABLED(LCD_I2C_PANELOLU2) \ + + ENABLED(LCD_I2C_VIKI) \ + + ENABLED(LCM1602) \ + + ENABLED(LONGER_LK_TFT28) \ + + ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) \ + + ENABLED(MAKRPANEL) \ + + ENABLED(MALYAN_LCD) \ + + ENABLED(NEXTION_TFT) \ + + ENABLED(MKS_LCD12864A) \ + + ENABLED(MKS_LCD12864B) \ + + ENABLED(OLED_PANEL_TINYBOY2) \ + + ENABLED(OVERLORD_OLED) \ + + ENABLED(PANEL_ONE) \ + + ENABLED(RA_CONTROL_PANEL) \ + + ENABLED(RADDS_DISPLAY) \ + + ENABLED(REPRAPWORLD_GRAPHICAL_LCD) \ + + ENABLED(RIGIDBOT_PANEL) \ + + ENABLED(SAV_3DGLCD) \ + + ENABLED(SAV_3DLCD) \ + + ENABLED(SILVER_GATE_GLCD_CONTROLLER) \ + + ENABLED(TFT_TRONXY_X5SA) \ + + ENABLED(TOUCH_UI_FTDI_EVE) \ + + ENABLED(U8GLIB_SH1106_EINSTART) \ + + ENABLED(ULTI_CONTROLLER) \ + + ENABLED(ULTIMAKERCONTROLLER) \ + + ENABLED(ULTIPANEL) \ + + ENABLED(ULTRA_LCD) \ + + ENABLED(YHCB2004) \ + + ENABLED(ZONESTAR_LCD) \ + + ENABLED(K3D_FULL_GRAPHIC_SMART_CONTROLLER) \ + + ENABLED(K3D_242_OLED_CONTROLLER) + +#if LCD_ENABLED_COUNT > 0 + #define HAS_LCD_SELECTED 1 + #if LCD_ENABLED_COUNT > 1 + #error "Please select only one LCD controller option." + #endif +#endif +#undef LCD_ENABLED_COUNT +#undef IS_U8GLIB_SSD1306 +#undef IS_EXTUI diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index e733f87e4e80..d02eda886029 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2677,79 +2677,6 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #endif #endif -/** - * Make sure only one display is enabled - */ -#if 1 < 0 \ - + ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \ - + ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) \ - + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \ - + (ENABLED(MINIPANEL) && NONE(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \ - + (ENABLED(MKS_MINI_12864) && NONE(MKS_LCD12864A, MKS_LCD12864B)) \ - + (ENABLED(FYSETC_MINI_12864_2_1) && NONE(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864)) \ - + COUNT_ENABLED(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864) \ - + (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \ - + (DISABLED(IS_LEGACY_TFT) && ENABLED(TFT_GENERIC)) \ - + (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \ - + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35, ANYCUBIC_LCD_VYPER) \ - + DGUS_UI_IS(ORIGIN) + DGUS_UI_IS(FYSETC) + DGUS_UI_IS(HIPRECY) + DGUS_UI_IS(MKS) + DGUS_UI_IS(RELOADED) + DGUS_UI_IS(IA_CREALITY) \ - + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \ - + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ - + COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_GENERIC_12864_1_1) \ - + COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \ - + COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \ - + COUNT_ENABLED(MKS_TS35_V2_0, MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35, MKS_ROBIN_TFT43, \ - MKS_ROBIN_TFT_V1_1R, ANET_ET4_TFT28, ANET_ET5_TFT35, BIQU_BX_TFT70, BTT_TFT35_SPI_V1_0) \ - + COUNT_ENABLED(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C) \ - + COUNT_ENABLED(VIKI2, miniVIKI) \ - + ENABLED(WYH_L12864) \ - + COUNT_ENABLED(ZONESTAR_12864LCD, ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) \ - + COUNT_ENABLED(ANET_FULL_GRAPHICS_LCD, CTC_A10S_A13) \ - + ENABLED(AZSMZ_12864) \ - + ENABLED(BQ_LCD_SMART_CONTROLLER) \ - + ENABLED(CARTESIO_UI) \ - + ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \ - + ENABLED(FF_INTERFACEBOARD) \ - + ENABLED(FYSETC_242_OLED_12864) \ - + ENABLED(G3D_PANEL) \ - + ENABLED(LCD_FOR_MELZI) \ - + ENABLED(LCD_I2C_PANELOLU2) \ - + ENABLED(LCD_I2C_VIKI) \ - + ENABLED(LCM1602) \ - + ENABLED(LONGER_LK_TFT28) \ - + ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) \ - + ENABLED(MAKRPANEL) \ - + ENABLED(MALYAN_LCD) \ - + ENABLED(NEXTION_TFT) \ - + ENABLED(MKS_LCD12864A) \ - + ENABLED(MKS_LCD12864B) \ - + ENABLED(OLED_PANEL_TINYBOY2) \ - + ENABLED(OVERLORD_OLED) \ - + ENABLED(PANEL_ONE) \ - + ENABLED(RA_CONTROL_PANEL) \ - + ENABLED(RADDS_DISPLAY) \ - + ENABLED(REPRAPWORLD_GRAPHICAL_LCD) \ - + ENABLED(RIGIDBOT_PANEL) \ - + ENABLED(SAV_3DGLCD) \ - + ENABLED(SAV_3DLCD) \ - + ENABLED(SILVER_GATE_GLCD_CONTROLLER) \ - + ENABLED(TFT_TRONXY_X5SA) \ - + ENABLED(TOUCH_UI_FTDI_EVE) \ - + ENABLED(U8GLIB_SH1106_EINSTART) \ - + ENABLED(ULTI_CONTROLLER) \ - + ENABLED(ULTIMAKERCONTROLLER) \ - + ENABLED(ULTIPANEL) \ - + ENABLED(ULTRA_LCD) \ - + ENABLED(YHCB2004) \ - + ENABLED(ZONESTAR_LCD) \ - + ENABLED(K3D_FULL_GRAPHIC_SMART_CONTROLLER) \ - + ENABLED(K3D_242_OLED_CONTROLLER) - #error "Please select only one LCD controller option." -#endif - -#undef IS_U8GLIB_SSD1306 -#undef IS_EXTUI - /** * Make sure LCD language settings are distinct */ @@ -2772,6 +2699,9 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_5), STRINGIFY(LCD_LANGUAGE_4)), "Error: LCD_LANGUAGE_5 (" STRINGIFY(LCD_LANGUAGE) ") cannot be the same as LCD_LANGUAGE_4."); #endif +/** + * Check TFT Requirements + */ #if ANY(TFT_GENERIC, MKS_TS35_V2_0, MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35, MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R, \ TFT_TRONXY_X5SA, ANYCUBIC_TFT35, ANYCUBIC_TFT35, LONGER_LK_TFT28, ANET_ET4_TFT28, ANET_ET5_TFT35, BIQU_BX_TFT70, BTT_TFT35_SPI_V1_0) #if NONE(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI) diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 4e33e91bfaaf..b269bf6c8548 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -887,3 +887,10 @@ #if ALL(HAS_LCD_SELECTED, EXP_REVERSE_KEYED) #warning "CAUTION! The MOTHERBOARD and LCD have oppositely-keyed EXP plugs." #endif + +/** + * LCD Controller using old pin definition method + */ +#ifdef LCD_MIGRATION_WARNING + #warning "The selected LCD is not yet migrated to the new system." +#endif diff --git a/Marlin/src/pins/esp32/pins_MRR_ESPE.h b/Marlin/src/pins/esp32/pins_MRR_ESPE.h index bcdb8c4faa75..0d21188d5896 100644 --- a/Marlin/src/pins/esp32/pins_MRR_ESPE.h +++ b/Marlin/src/pins/esp32/pins_MRR_ESPE.h @@ -127,33 +127,20 @@ #if HAS_WIRED_LCD - #define LCD_PINS_RS 13 - #define LCD_PINS_EN 17 - #define LCD_PINS_D4 16 - - #if ENABLED(CR10_STOCKDISPLAY) - - #define BEEPER_PIN 151 - - #elif IS_RRD_FG_SC - - #define BEEPER_PIN 151 - - //#define LCD_PINS_D5 150 - //#define LCD_PINS_D6 152 - //#define LCD_PINS_D7 153 - - #else - - #error "Only CR10_STOCKDISPLAY and REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER are currently supported. Comment out this line to continue." - + #define EXP1_01_PIN 151 // BEEPER + #define EXP1_02_PIN 14 // ENC + #define EXP1_03_PIN 0 // EN1 + #define EXP1_04_PIN -1 + #define EXP1_05_PIN 12 // EN2 + #define EXP1_06_PIN 16 // D4 + #define EXP1_07_PIN 13 // RS + #define EXP1_08_PIN 17 // EN + + #if !IS_RRD_FG_SC + #error "Only REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and compatible are currently supported. Comment out this line to continue." #endif - #define BTN_EN1 0 - #define BTN_EN2 12 - #define BTN_ENC 14 - -#endif // HAS_MARLINUI_U8GLIB +#endif // HAS_WIRED_LCD // Hardware serial pins // Add the following to Configuration.h or Configuration_adv.h to assign diff --git a/Marlin/src/pins/lcd/CR10_STOCKDISPLAY.h b/Marlin/src/pins/lcd/CR10_STOCKDISPLAY.h new file mode 100644 index 000000000000..1968106771dc --- /dev/null +++ b/Marlin/src/pins/lcd/CR10_STOCKDISPLAY.h @@ -0,0 +1,63 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * pins/lcd/CR10_STOCKDISPLAY.h + */ + +// IS_RRD_FG_SC +// DOGLCD +// HAS_MARLINUI_U8GLIB > (128x64) +// IS_U8GLIB_ST7920 +// IS_ULTIPANEL +// HAS_WIRED_LCD +// HAS_DISPLAY +// HAS_STATUS_MESSAGE +// IS_NEWPANEL +// HAS_MARLINUI_MENU +// HAS_MANUAL_MOVE_MENU +// IS_RRD_SC + +/** ------ + * BEEPER | 1 2 | ENC + * EN1 | 3 4 | (RESET/KILL) + * EN2 5 6 | LCD_D4 + * LCD_RS | 7 8 | LCD_EN + * GND | 9 10 | 5V + * ------ + */ +#ifndef BEEPER_PIN + #define BEEPER_PIN LCD1_01_PIN +#endif + +#define BTN_ENC LCD1_02_PIN +#define BTN_EN1 LCD1_03_PIN +#define BTN_EN2 LCD1_05_PIN + +#define LCD_PINS_D4 LCD1_06_PIN // ST9720 CLK +#define LCD_PINS_RS LCD1_07_PIN // ST9720 CS +#define LCD_PINS_EN LCD1_08_PIN // ST9720 DAT + +#ifndef KILL_PIN + #define KILL_PIN LCD1_04_PIN +#endif diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index 210df06d3c05..ead50ca1327b 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -226,8 +226,14 @@ #define EXP2_07_PIN P1_31 #define EXP2_08_PIN -1 -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + +#elif HAS_WIRED_LCD + #if ENABLED(CTC_A10S_A13) + #error "CTC_A10S_A13 only applies to the ANET 1.0 board." #elif ENABLED(ANET_FULL_GRAPHICS_LCD) @@ -297,17 +303,6 @@ #define DOGLCD_MOSI EXP1_01_PIN #define LCD_BACKLIGHT_PIN -1 - #elif ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #define BTN_ENC EXP1_02_PIN // (58) open-drain - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - #elif HAS_ADC_BUTTONS #error "ADC BUTTONS do not work unmodified on SKR 1.3, The ADC ports cannot take more than 3.3v." diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 6345001b118b..cb771fe043e1 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -282,7 +282,11 @@ #define EXP2_07_PIN P1_31 #define EXP2_08_PIN -1 // RESET -#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI // RET6 DWIN ENCODER LCD #define BTN_ENC EXP1_05_PIN @@ -362,16 +366,6 @@ #define BEEPER_PIN EXP1_01_PIN - #elif ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #define BTN_ENC EXP1_02_PIN - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - #elif ENABLED(ENDER2_STOCKDISPLAY) /** Creality Ender-2 display pinout diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 38c7cac3d4b7..15786a4cb97f 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -285,21 +285,16 @@ #error "No custom SD drive cable defined for this board." #endif -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) - #define BEEPER_PIN EXP1_01_PIN - #define BTN_ENC EXP1_02_PIN - - #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXP1_07_PIN + // Migrated to pins/lcd - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN +#elif HAS_WIRED_LCD - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN + #define BEEPER_PIN EXP1_01_PIN + #define BTN_ENC EXP1_02_PIN - #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI + #if HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI #define TFT_CS_PIN EXP1_07_PIN #define TFT_DC_PIN EXP1_08_PIN #define TFT_A0_PIN TFT_DC_PIN diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index 14d6178a1a38..773c9772fe3e 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -295,15 +295,15 @@ // Re-Arm J3 pins 1 (P1.31) & 2 (P3.26) are not used. Stock cable will need to have one // 10-pin IDC connector trimmed or replaced with a 12-pin IDC connector to fit J3. - #define BEEPER_PIN P2_11 // J3-3 & AUX-4 - - #define BTN_EN1 P1_23 // J3-5 & AUX-4 - #define BTN_EN2 P0_16 // J3-7 & AUX-4 - #define BTN_ENC P3_25 // J3-4 & AUX-4 - - #define LCD_PINS_RS P0_15 // J3-9 & AUX-4 (CS) - #define LCD_PINS_EN P0_18 // J3-10 & AUX-3 (SID, MOSI) - #define LCD_PINS_D4 P2_06 // J3-8 & AUX-3 (SCK, CLK) + // Migrated to pins/lcd + #define EXP1_01_PIN P2_11 // J3-3 & AUX-4 + #define EXP1_02_PIN P3_25 // J3-4 & AUX-4 + #define EXP1_03_PIN P1_23 // J3-5 & AUX-4 + #define EXP1_04_PIN -1 // J3-5 & AUX-4 + #define EXP1_05_PIN P0_16 // J3-7 & AUX-4 + #define EXP1_06_PIN P2_06 // J3-8 & AUX-3 (SCK, CLK) + #define EXP1_07_PIN P0_15 // J3-9 & AUX-4 (CS) + #define EXP1_08_PIN P0_18 // J3-10 & AUX-3 (SID, MOSI) #elif ENABLED(ZONESTAR_LCD) diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index 5256da2ef22f..1add10ad344c 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -150,80 +150,70 @@ // // Display // -#if HAS_WIRED_LCD - - #if ENABLED(CR10_STOCKDISPLAY) - - // Re-Arm can support Creality stock display without SD card reader and single cable on EXP3. - // Re-Arm J3 pins 1 (p1.31) & 2 (P3.26) are not used. Stock cable will need to have one - // 10-pin IDC connector trimmed or replaced with a 12-pin IDC connector to fit J3. - // Requires REVERSE_ENCODER_DIRECTION in Configuration.h - - #define BEEPER_PIN _EXP2_03 +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + #define EXP1_01_PIN _EXP2_03 + #define EXP1_02_PIN _EXP2_04 + #define EXP1_03_PIN _EXP2_07 + #define EXP1_05_PIN _EXP2_05 + #define EXP1_06_PIN _EXP2_08 + #define EXP1_07_PIN _EXP2_09 + #define EXP1_08_PIN _EXP2_10 + +#elif HAS_WIRED_LCD + + #define BTN_EN1 _EXP2_02 + #define BTN_EN2 _EXP2_04 + #define BTN_ENC _EXP2_03 + + #define SD_DETECT_PIN _EXP2_01 + #define KILL_PIN _EXP1_10 + #define LCD_PINS_RS _EXP2_07 + #define LCD_SDSS _EXP2_07 + #define LCD_BACKLIGHT_PIN _EXP2_07 + #define LCD_PINS_EN _EXP2_10 + #define LCD_PINS_D4 _EXP2_09 + + #define DOGLCD_A0 _EXP2_08 + + #if IS_RRW_KEYPAD + #define SHIFT_OUT_PIN _EXP2_10 + #define SHIFT_CLK_PIN _EXP2_09 + #define SHIFT_LD_PIN _EXP2_01 + #elif !IS_NEWPANEL + //#define SHIFT_OUT_PIN _EXP2_03 + //#define SHIFT_CLK_PIN _EXP2_02 + //#define SHIFT_LD_PIN _EXP2_04 + //#define SHIFT_EN_PIN _EXP1_10 + #endif - #define BTN_EN1 _EXP2_07 - #define BTN_EN2 _EXP2_05 - #define BTN_ENC _EXP2_04 + #if ANY(VIKI2, miniVIKI) + #define BEEPER_PIN P1_30 + #define DOGLCD_CS P0_26 + #define DOGLCD_SCK SD_SCK_PIN + #define DOGLCD_MOSI SD_MOSI_PIN - #define LCD_PINS_RS _EXP2_09 - #define LCD_PINS_EN _EXP2_10 - #define LCD_PINS_D4 _EXP2_08 + #define STAT_LED_BLUE_PIN P0_26 + #define STAT_LED_RED_PIN P1_21 #else - - #define BTN_EN1 _EXP2_02 - #define BTN_EN2 _EXP2_04 - #define BTN_ENC _EXP2_03 - - #define SD_DETECT_PIN _EXP2_01 - #define KILL_PIN _EXP1_10 - #define LCD_PINS_RS _EXP2_07 - #define LCD_SDSS _EXP2_07 - #define LCD_BACKLIGHT_PIN _EXP2_07 - #define LCD_PINS_EN _EXP2_10 - #define LCD_PINS_D4 _EXP2_09 - - #define DOGLCD_A0 _EXP2_08 - - #if IS_RRW_KEYPAD - #define SHIFT_OUT_PIN _EXP2_10 - #define SHIFT_CLK_PIN _EXP2_09 - #define SHIFT_LD_PIN _EXP2_01 - #elif !IS_NEWPANEL - //#define SHIFT_OUT_PIN _EXP2_03 - //#define SHIFT_CLK_PIN _EXP2_02 - //#define SHIFT_LD_PIN _EXP2_04 - //#define SHIFT_EN_PIN _EXP1_10 + #if IS_ULTIPANEL + #define LCD_PINS_D5 P1_17 + #define LCD_PINS_D6 P1_14 + #define LCD_PINS_D7 P1_10 #endif + #define BEEPER_PIN P1_30 + #define DOGLCD_CS _EXP2_07 - #if ANY(VIKI2, miniVIKI) - #define BEEPER_PIN P1_30 - #define DOGLCD_CS P0_26 - #define DOGLCD_SCK SD_SCK_PIN - #define DOGLCD_MOSI SD_MOSI_PIN - - #define STAT_LED_BLUE_PIN P0_26 - #define STAT_LED_RED_PIN P1_21 - - #else - #if IS_ULTIPANEL - #define LCD_PINS_D5 P1_17 - #define LCD_PINS_D6 P1_14 - #define LCD_PINS_D7 P1_10 - #endif - #define BEEPER_PIN P1_30 - #define DOGLCD_CS _EXP2_07 - - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif - + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif - #if ANY(VIKI2, miniVIKI, MINIPANEL) - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - #endif + #endif + #if ANY(VIKI2, miniVIKI, MINIPANEL) + //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index 074ee067a69b..372476284517 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -217,7 +217,11 @@ #define EXP1_07_PIN P0_17 #define EXP1_08_PIN P0_18 -#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI CONTROLLER_WARNING("BTT_SKR_E3_TURBO", "Ender-3 V2 display", " Requires a custom cable with TX = P0_15, RX = P0_16.") @@ -239,18 +243,6 @@ #elif HAS_WIRED_LCD - #if ENABLED(CR10_STOCKDISPLAY) - - #define BEEPER_PIN EXP1_01_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #define BTN_ENC EXP1_02_PIN - - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! CONTROLLER_WARNING("BTT_SKR_E3_TURBO", "ZONESTAR_LCD") 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 aec4240276e7..768a42a83bfb 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -313,125 +313,115 @@ #define SD_DETECT_PIN EXP2_07_PIN -#elif HAS_WIRED_LCD - - #define BEEPER_PIN EXP1_01_PIN - #define BTN_ENC EXP1_02_PIN - - #if ENABLED(CR10_STOCKDISPLAY) +#elif ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXP1_07_PIN + // Migrated to pins/lcd - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN +#elif HAS_WIRED_LCD - #else + #define BEEPER_PIN EXP1_01_PIN - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN - #define LCD_SDSS EXP2_04_PIN + #define LCD_SDSS EXP2_04_PIN - #if ENABLED(MKS_12864OLED_SSD1306) + #if ENABLED(MKS_12864OLED_SSD1306) - #define LCD_PINS_DC EXP1_06_PIN - #define DOGLCD_CS EXP1_04_PIN - #define DOGLCD_A0 LCD_PINS_DC - #define DOGLCD_SCK EXP1_05_PIN - #define DOGLCD_MOSI EXP1_03_PIN + #define LCD_PINS_DC EXP1_06_PIN + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_A0 LCD_PINS_DC + #define DOGLCD_SCK EXP1_05_PIN + #define DOGLCD_MOSI EXP1_03_PIN - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN - #define KILL_PIN -1 // NC + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + #define KILL_PIN -1 // NC - #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI + #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI - #define TFT_CS_PIN EXP1_07_PIN - #define TFT_DC_PIN EXP1_08_PIN - #define TFT_A0_PIN TFT_DC_PIN - #define TFT_MISO_PIN EXP2_01_PIN - #define TFT_BACKLIGHT_PIN EXP1_03_PIN - #define TFT_RESET_PIN EXP1_04_PIN + #define TFT_CS_PIN EXP1_07_PIN + #define TFT_DC_PIN EXP1_08_PIN + #define TFT_A0_PIN TFT_DC_PIN + #define TFT_MISO_PIN EXP2_01_PIN + #define TFT_BACKLIGHT_PIN EXP1_03_PIN + #define TFT_RESET_PIN EXP1_04_PIN - #define LCD_USE_DMA_SPI + #define LCD_USE_DMA_SPI - #define TOUCH_INT_PIN EXP1_06_PIN - #define TOUCH_CS_PIN EXP1_05_PIN - #define TOUCH_BUTTONS_HW_SPI - #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 + #define TOUCH_INT_PIN EXP1_06_PIN + #define TOUCH_CS_PIN EXP1_05_PIN + #define TOUCH_BUTTONS_HW_SPI + #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 - // Disable any LCD related PINs config - #define LCD_PINS_EN -1 - #define LCD_PINS_RS -1 + // Disable any LCD related PINs config + #define LCD_PINS_EN -1 + #define LCD_PINS_RS -1 - #ifndef TFT_BUFFER_WORDS - #define TFT_BUFFER_WORDS 1200 - #endif - #ifndef TFT_QUEUE_SIZE - #define TFT_QUEUE_SIZE 6144 - #endif + #ifndef TFT_BUFFER_WORDS + #define TFT_BUFFER_WORDS 1200 + #endif + #ifndef TFT_QUEUE_SIZE + #define TFT_QUEUE_SIZE 6144 + #endif - #else // !MKS_12864OLED_SSD1306 + #else // !MKS_12864OLED_SSD1306 - #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_EN EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN - #if ENABLED(FYSETC_MINI_12864) + #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_04_PIN - #define DOGLCD_SCK EXP2_02_PIN - #define DOGLCD_MOSI EXP2_06_PIN + #define DOGLCD_CS EXP1_03_PIN + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_SCK EXP2_02_PIN + #define DOGLCD_MOSI EXP2_06_PIN - #define LCD_BACKLIGHT_PIN -1 + #define LCD_BACKLIGHT_PIN -1 - #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems // results in LCD soft SPI mode 3, SD soft SPI mode 0 - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_06_PIN - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_07_PIN - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_08_PIN - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN - #endif - - #else // !FYSETC_MINI_12864 + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS EXP1_06_PIN - #define DOGLCD_A0 EXP1_07_PIN + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN EXP1_06_PIN + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN EXP1_07_PIN #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN EXP1_08_PIN + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN EXP1_06_PIN + #endif - #if IS_ULTIPANEL - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN + #else // !FYSETC_MINI_12864 - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif + #if ENABLED(MKS_MINI_12864) + #define DOGLCD_CS EXP1_06_PIN + #define DOGLCD_A0 EXP1_07_PIN + #endif + #if IS_ULTIPANEL + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif - #endif // !FYSETC_MINI_12864 + #endif - #endif // !MKS_12864OLED_SSD1306 + #endif // !FYSETC_MINI_12864 - #endif // !CR10_STOCKDISPLAY + #endif // !MKS_12864OLED_SSD1306 #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h index 634e50c223af..ca4e2c8773b0 100644 --- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -178,19 +178,8 @@ #define EXP1_08_PIN P0_18 #if ENABLED(CR10_STOCKDISPLAY) - /** ------ - * BEEPER | 1 2 | ENC - * EN1 | 3 4 | KILL - * EN2 5 6 | LCD_D4 - * LCD_RS | 7 8 | LCD_EN - * GND | 9 10 | 5V - * ------ - */ - #define BEEPER_PIN EXP1_01_PIN - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - #define KILL_PIN EXP1_04_PIN + + // Migrated to pins/lcd #elif ENABLED(MKS_MINI_12864) /** ------ @@ -217,7 +206,7 @@ #endif -#if ANY(CR10_STOCKDISPLAY, MKS_MINI_12864) +#if ENABLED(MKS_MINI_12864) #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN #define BTN_ENC EXP1_02_PIN diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h index d2cbc28fb4cc..53ab9e413dad 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h @@ -149,7 +149,7 @@ #if HAS_MARLINUI_U8GLIB #define DOGLCD_A0 26 #define DOGLCD_CS 24 - #define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h + #define DOGLCD_MOSI -1 // Prevent auto-define by pins_lcd.h #define DOGLCD_SCK -1 #endif #endif diff --git a/Marlin/src/pins/native/pins_RAMPS_NATIVE.h b/Marlin/src/pins/native/pins_RAMPS_NATIVE.h index 42b33a094487..ef97a324a038 100644 --- a/Marlin/src/pins/native/pins_RAMPS_NATIVE.h +++ b/Marlin/src/pins/native/pins_RAMPS_NATIVE.h @@ -405,7 +405,14 @@ // LCD / Controller // -#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI) +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + + #define SD_DETECT_PIN EXP2_07_PIN + #define KILL_PIN EXP2_08_PIN + +#elif ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI) #define TFT_CS_PIN 49 #define TFT_DC_PIN 43 @@ -517,52 +524,39 @@ #define LCD_PINS_D6 44 #define LCD_PINS_D7 64 - #else - - #if ENABLED(CR10_STOCKDISPLAY) + #elif ENABLED(ZONESTAR_LCD) - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN + #define LCD_PINS_RS 64 + #define LCD_PINS_EN 44 + #define LCD_PINS_D4 63 + #define LCD_PINS_D5 40 + #define LCD_PINS_D6 42 + #define LCD_PINS_D7 65 - #if !IS_NEWPANEL - #define BEEPER_PIN EXP1_01_PIN - #endif - - #elif ENABLED(ZONESTAR_LCD) - - #define LCD_PINS_RS 64 - #define LCD_PINS_EN 44 - #define LCD_PINS_D4 63 - #define LCD_PINS_D5 40 - #define LCD_PINS_D6 42 - #define LCD_PINS_D7 65 + #else + #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) + #define LCD_PINS_DC EXP1_06_PIN // Set as output on init + #define LCD_PINS_RS EXP1_07_PIN // Pull low for 1s to init + // DOGM SPI LCD Support + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_MOSI EXP1_03_PIN + #define DOGLCD_SCK EXP1_05_PIN + #define DOGLCD_A0 LCD_PINS_DC #else + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #endif - #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) - #define LCD_PINS_DC EXP1_06_PIN // Set as output on init - #define LCD_PINS_RS EXP1_07_PIN // Pull low for 1s to init - // DOGM SPI LCD Support - #define DOGLCD_CS EXP1_04_PIN - #define DOGLCD_MOSI EXP1_03_PIN - #define DOGLCD_SCK EXP1_05_PIN - #define DOGLCD_A0 LCD_PINS_DC - #else - #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_EN EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #endif - - #define LCD_PINS_D7 EXP1_08_PIN - - #if !IS_NEWPANEL - #define BEEPER_PIN EXP2_05_PIN - #endif + #define LCD_PINS_D7 EXP1_08_PIN + #if !IS_NEWPANEL + #define BEEPER_PIN EXP2_05_PIN #endif + #endif // @@ -574,15 +568,10 @@ #define BEEPER_PIN EXP1_01_PIN - #if ENABLED(CR10_STOCKDISPLAY) - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #else - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN - #endif - #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define SD_DETECT_PIN EXP2_07_PIN #define KILL_PIN EXP2_08_PIN diff --git a/Marlin/src/pins/pins_lcd.h b/Marlin/src/pins/pins_lcd.h index 21ad3529f81c..ac2e7bb9d9f9 100644 --- a/Marlin/src/pins/pins_lcd.h +++ b/Marlin/src/pins/pins_lcd.h @@ -33,6 +33,17 @@ #include "lcd/adapters.h" + #if ENABLED(CR10_STOCKDISPLAY) + #include "lcd/CR10_STOCKDISPLAY.h" + #else + + // More displays to come + #if HAS_LCD_SELECTED && !LCD_IS_SERIAL_HOST + #define LCD_MIGRATION_WARNING + #endif + + #endif + #endif /** diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index 8315de6ee30b..e1d8c6305ebc 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -212,28 +212,23 @@ #define KILL_PIN 32 - #if IS_ULTIPANEL || TOUCH_UI_ULTIPANEL - - #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #else - #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_EN EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN - #define BTN_EN1 EXP2_05_PIN - #define BTN_EN2 EXP2_03_PIN - - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif + #if ENABLED(CR10_STOCKDISPLAY) + // Migrated to pins/lcd + + #elif IS_ULTIPANEL || TOUCH_UI_ULTIPANEL + + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif #define BTN_ENC EXP1_02_PIN // P1 diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index 1f5061d4ce15..150510915649 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -172,9 +172,9 @@ // #define EXP1_01_PIN 84 // PH2 #define EXP1_02_PIN 9 // PH6 -#define EXP1_03_PIN 18 // TX1 +#define EXP1_03_PIN 18 // TX1 - 61 on 0.6b? #define EXP1_04_PIN 82 // PD5 -#define EXP1_05_PIN 19 // RX1 +#define EXP1_05_PIN 19 // RX1 - 59 on 0.6b? #define EXP1_06_PIN 70 // PG4 #define EXP1_07_PIN 85 // PH7 #define EXP1_08_PIN 71 // PG3 @@ -205,26 +205,23 @@ #define KILL_PIN 32 - #if ANY(IS_ULTIPANEL, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE) - - #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #else - #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_EN EXP1_03_PIN // On 0.6b, use 61 - #define LCD_PINS_D4 EXP1_05_PIN // On 0.6b, use 59 - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN - #define BTN_EN1 EXP2_05_PIN - #define BTN_EN2 EXP2_03_PIN - #endif + #if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + + #elif ANY(IS_ULTIPANEL, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE) + + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN // On 0.6b, use 61 + #define LCD_PINS_D4 EXP1_05_PIN // On 0.6b, use 59 + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN #define BTN_ENC EXP1_02_PIN // AUX-2 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BEEPER_PIN EXP1_01_PIN // AUX-4 #define SD_DETECT_PIN EXP2_07_PIN diff --git a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h index cb28762adc55..914f81e20a86 100644 --- a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h +++ b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h @@ -139,17 +139,18 @@ * Connected via provided custom cable to: * Aux-1, J21, J17 and Y-Max. */ - #define LCD_PINS_RS 5 - #define LCD_PINS_EN 4 - #define LCD_PINS_D4 6 - #define BTN_EN1 18 - #define BTN_EN2 19 - #define BTN_ENC 15 - #define BEEPER_PIN 11 - #define SDCARD_CONNECTION ONBOARD + // Migrated to pins/lcd + + #define EXP1_01_PIN 11 + #define EXP1_02_PIN 15 + #define EXP1_03_PIN 18 + #define EXP1_05_PIN 19 + #define EXP1_06_PIN 6 + #define EXP1_07_PIN 5 + #define EXP1_08_PIN 4 - #define LCD_PINS_DEFINED + #define SDCARD_CONNECTION ONBOARD #endif // diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 1fc1dac6ad10..0e81e25ccd72 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -605,6 +605,10 @@ // LCD pins already defined by including header +#elif ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + #elif HAS_WIRED_LCD //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 @@ -633,17 +637,7 @@ #else - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #if !IS_NEWPANEL - #define BEEPER_PIN EXP1_01_PIN - #endif - - #elif ENABLED(ZONESTAR_LCD) + #if ENABLED(ZONESTAR_LCD) CONTROLLER_WARNING("RAMPS", "ZONESTAR_LCD", " Plugs into AUX2 but GND and 5V must be swapped.") @@ -706,15 +700,10 @@ #if IS_RRD_SC - #if ENABLED(CR10_STOCKDISPLAY) - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #else - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN - #endif - #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #ifndef SD_DETECT_PIN #define SD_DETECT_PIN EXP2_07_PIN #endif diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index 0c573f25fc39..d256a153c116 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -308,7 +308,13 @@ // LCD / Controller // -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + + //#define KILL_PIN 41 + +#elif HAS_WIRED_LCD // // LCD Display output pins @@ -340,43 +346,27 @@ #else - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS 27 - #define LCD_PINS_EN 29 - #define LCD_PINS_D4 25 - - #if !IS_NEWPANEL - #define BEEPER_PIN 37 - #endif - + #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) + #define LCD_PINS_DC 25 // Set as output on init + #define LCD_PINS_RS 27 // Pull low for 1s to init + // DOGM SPI LCD Support + #define DOGLCD_CS 16 + #define DOGLCD_MOSI 17 + #define DOGLCD_SCK 23 + #define DOGLCD_A0 LCD_PINS_DC #else - - #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) - #define LCD_PINS_DC 25 // Set as output on init - #define LCD_PINS_RS 27 // Pull low for 1s to init - // DOGM SPI LCD Support - #define DOGLCD_CS 16 - #define DOGLCD_MOSI 17 - #define DOGLCD_SCK 23 - #define DOGLCD_A0 LCD_PINS_DC - #else - #define LCD_PINS_RS 16 - #define LCD_PINS_EN 17 - #define LCD_PINS_D4 23 - #define LCD_PINS_D5 25 - #define LCD_PINS_D6 27 - #endif - - #define LCD_PINS_D7 29 - - #if !IS_NEWPANEL - #define BEEPER_PIN 33 - #endif - + #define LCD_PINS_RS 16 + #define LCD_PINS_EN 17 + #define LCD_PINS_D4 23 + #define LCD_PINS_D5 25 + #define LCD_PINS_D6 27 #endif + #define LCD_PINS_D7 29 + #if !IS_NEWPANEL + #define BEEPER_PIN 33 + // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK_PIN 38 @@ -400,15 +390,10 @@ #define BEEPER_PIN 37 - #if ENABLED(CR10_STOCKDISPLAY) - #define BTN_EN1 17 - #define BTN_EN2 23 - #else - #define BTN_EN1 31 - #define BTN_EN2 33 - #endif - #define BTN_ENC 35 + #define BTN_EN1 31 + #define BTN_EN2 33 + #define SD_DETECT_PIN EXP2_07_PIN //#define KILL_PIN 41 diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index 2b9c8fd7eb79..f09e24c23f39 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -166,8 +166,11 @@ // // LCD / Controller // +#if ENABLED(CR10_STOCKDISPLAY) -#if HAS_WIRED_LCD + // Migrated to pins/lcd + +#elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h index 7f4344a3645f..aac497c5fcf2 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -184,21 +184,6 @@ #define EXP2_07_PIN 44 #define EXP2_10_PIN 49 -#if ENABLED(CR10_STOCKDISPLAY) - #define EXP3_01_PIN EXP1_01_PIN - #define EXP3_02_PIN EXP1_02_PIN - #define EXP3_03_PIN EXP1_03_PIN - #define EXP3_04_PIN EXP1_04_PIN - #define EXP3_05_PIN EXP1_05_PIN - #define EXP3_06_PIN EXP1_06_PIN - #define EXP3_07_PIN EXP1_07_PIN - #define EXP3_08_PIN EXP1_08_PIN -#endif - -/************************************/ -/***** Configurations Section ******/ -/************************************/ - /** * This section starts with the pins_RAMPS_144.h as example, after if you need any new * display, you could use normal duponts and connect it with with the scheme showed before. @@ -210,7 +195,11 @@ * - Any Reprap character display like */ -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + +#elif HAS_WIRED_LCD // // LCD Display output pins @@ -250,19 +239,7 @@ #else - #if ENABLED(CR10_STOCKDISPLAY) - - // TO TEST - #define LCD_PINS_RS EXP3_04_PIN - #define LCD_PINS_EN EXP3_03_PIN - #define LCD_PINS_D4 EXP3_05_PIN - - #if !IS_NEWPANEL - // TO TEST - //#define BEEPER_PIN EXP3_05_PIN - #endif - - #elif ENABLED(ZONESTAR_LCD) + #if ENABLED(ZONESTAR_LCD) // TO TEST //#define LCD_PINS_RS 56 // Mega/Due:64 - AGCM4:56 @@ -321,18 +298,11 @@ #define BEEPER_PIN EXP1_01_PIN - #if ENABLED(CR10_STOCKDISPLAY) - // TO TEST - #define BTN_EN1 EXP3_08_PIN - #define BTN_EN2 EXP3_06_PIN - - #else - // Definitions for any standard Display - #define BTN_EN1 EXP2_05_PIN - #define BTN_EN2 EXP2_03_PIN - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif + // Definitions for any standard Display + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif #define BTN_ENC EXP1_02_PIN diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h index fd475ab2220f..d25a145a63d8 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h @@ -236,17 +236,6 @@ #define EXP2_07_PIN 44 #define EXP2_10_PIN 49 -#if ENABLED(CR10_STOCKDISPLAY) - #define EXP3_01_PIN EXP1_01_PIN - #define EXP3_02_PIN EXP1_02_PIN - #define EXP3_03_PIN EXP1_03_PIN - #define EXP3_04_PIN EXP1_04_PIN - #define EXP3_05_PIN EXP1_05_PIN - #define EXP3_06_PIN EXP1_06_PIN - #define EXP3_07_PIN EXP1_07_PIN - #define EXP3_08_PIN EXP1_08_PIN -#endif - /************************************/ /***** Configurations Section ******/ /************************************/ @@ -262,7 +251,11 @@ * - Any Reprap character display like */ -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + +#elif HAS_WIRED_LCD // // LCD Display output pins @@ -303,19 +296,7 @@ #else - #if ENABLED(CR10_STOCKDISPLAY) - - // TO TEST - #define LCD_PINS_RS EXP3_04_PIN - #define LCD_PINS_EN EXP3_03_PIN - #define LCD_PINS_D4 EXP3_05_PIN - - #if !IS_NEWPANEL - // TO TEST - //#define BEEPER_PIN EXP3_05_PIN - #endif - - #elif ENABLED(ZONESTAR_LCD) + #if ENABLED(ZONESTAR_LCD) // TO TEST //#define LCD_PINS_RS 56 // Mega/Due:64 - AGCM4:56 @@ -374,17 +355,11 @@ #define BEEPER_PIN EXP1_01_PIN - #if ENABLED(CR10_STOCKDISPLAY) - // TO TEST - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #else - // Definitions fpr any standard Display - #define BTN_EN1 EXP2_05_PIN - #define BTN_EN2 EXP2_03_PIN - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif + // Definitions for any standard Display + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif #define BTN_ENC EXP1_02_PIN diff --git a/Marlin/src/pins/samd/pins_MINITRONICS20.h b/Marlin/src/pins/samd/pins_MINITRONICS20.h index 2111eb134eeb..7304876d63ed 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -156,17 +156,6 @@ // LCD / Controller // -#if ENABLED(CR10_STOCKDISPLAY) - #define EXP3_01_PIN EXP1_01_PIN - #define EXP3_02_PIN EXP1_02_PIN - #define EXP3_03_PIN EXP1_03_PIN - #define EXP3_04_PIN EXP1_04_PIN - #define EXP3_05_PIN EXP1_05_PIN - #define EXP3_06_PIN EXP1_06_PIN - #define EXP3_07_PIN EXP1_07_PIN - #define EXP3_08_PIN EXP1_08_PIN -#endif - /** * This section is based on pins_RAMPS_144.h. To use a new display, you * could use normal duponts and connect with the scheme shown before. @@ -178,7 +167,11 @@ * - Any Reprap character display like */ -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + +#elif HAS_WIRED_LCD // // LCD Display output pins @@ -206,19 +199,7 @@ #else - #if ENABLED(CR10_STOCKDISPLAY) - - // TO TEST - //#define LCD_PINS_RS EXP3_04_PIN - //#define LCD_PINS_EN EXP3_03_PIN - //#define LCD_PINS_D4 EXP3_05_PIN - - #if !IS_NEWPANEL - // TO TEST - //#define BEEPER_PIN EXP3_05_PIN - #endif - - #elif ENABLED(ZONESTAR_LCD) + #if ENABLED(ZONESTAR_LCD) // TO TEST //#define LCD_PINS_RS 56 // Mega/Due:64 - AGCM4:56 @@ -277,17 +258,11 @@ //#define BEEPER_PIN EXP1_01_PIN - #if ENABLED(CR10_STOCKDISPLAY) - // TO TEST - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #else - // Definitions fpr any standard Display - #define BTN_EN1 EXP2_05_PIN - #define BTN_EN2 EXP2_03_PIN - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif + // Definitions for any standard Display + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif #define BTN_ENC EXP1_02_PIN diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index 6897540f05e8..06cdeedf21e1 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -425,6 +425,10 @@ // LCD pins already defined by including header +#elif ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + #elif HAS_WIRED_LCD //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 @@ -453,17 +457,7 @@ #else - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #if !IS_NEWPANEL - #define BEEPER_PIN EXP1_01_PIN - #endif - - #elif ENABLED(ZONESTAR_LCD) + #if ENABLED(ZONESTAR_LCD) CONTROLLER_WARNING("RAMPS_144", "ZONESTAR_LCD", " Plugs into AUX2 but GND and 5V must be swapped.") @@ -528,15 +522,10 @@ #define BEEPER_PIN EXP1_01_PIN - #if ENABLED(CR10_STOCKDISPLAY) - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #else - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN - #endif - #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #ifndef SD_DETECT_PIN #define SD_DETECT_PIN EXP2_07_PIN #endif diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index ba3c6767b261..61bd707739ab 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -58,9 +58,14 @@ // // LCD / Controller // +#if ENABLED(CR10_STOCKDISPLAY) -#if ANY(MKS_MINI_12864, CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) - #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) + // Migrated to pins/lcd + #define LCD_SDSS 31 // Controller's SD card + #define LCD_PINS_DEFINED + +#elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + #if ENABLED(ENDER2_STOCKDISPLAY) #define LCD_PINS_RS EXP1_07_PIN // ST9720 CS #define LCD_PINS_EN EXP1_08_PIN // ST9720 DAT #define LCD_PINS_D4 EXP1_06_PIN // ST9720 CLK diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index 725a3f9914c0..a5982f8ff0ca 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -118,22 +118,6 @@ #define CONTROLLER_FAN_PIN PC7 -// -// LCD / Controller -// - -#if ENABLED(CR10_STOCKDISPLAY) - #define BTN_ENC PA15 - #define BTN_EN1 PA9 - #define BTN_EN2 PA10 - - #define LCD_PINS_RS PB8 - #define LCD_PINS_EN PB15 - #define LCD_PINS_D4 PB9 - - #define BEEPER_PIN PB5 -#endif - #if HAS_TMC_UART /** * TMC2209 stepper drivers @@ -190,3 +174,20 @@ #ifndef SUICIDE_PIN_STATE #define SUICIDE_PIN_STATE LOW #endif + +// +// LCD / Controller +// +#define EXP3_01_PIN PB5 +#define EXP3_02_PIN PA15 +#define EXP3_03_PIN PA9 +#define EXP3_04_PIN -1 +#define EXP3_05_PIN PA10 +#define EXP3_06_PIN PB9 +#define EXP3_07_PIN PB8 +#define EXP3_08_PIN PB15 + +#if ENABLED(CR10_STOCKDISPLAY) + // Migrated to pins/lcd + #define LCD_ON_EXP3 +#endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index a3794bf448b7..04de296ebd15 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -196,21 +196,13 @@ #define TFT_02 PA3 #define TFT_03 PA2 -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) - #if ENABLED(CR10_STOCKDISPLAY) + // Migrated to pins/lcd - #define BEEPER_PIN EXP1_01_PIN +#elif HAS_WIRED_LCD - #define BTN_ENC EXP1_02_PIN - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! + #if ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! CONTROLLER_WARNING("BTT_SKR_E3_DIP", "ZONESTAR_LCD") diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index a01833db0362..4e61df92758d 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -155,7 +155,11 @@ #define TFT_02 PA3 #define TFT_03 PA2 -#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI CONTROLLER_WARNING("BTT_SKR_MINI_E3_common", "Ender-3 V2 display") @@ -179,19 +183,7 @@ #elif HAS_WIRED_LCD - #if ENABLED(CR10_STOCKDISPLAY) - - #define BEEPER_PIN EXP1_01_PIN - - #define BTN_ENC EXP1_02_PIN - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(LCD_FOR_MELZI) + #if ENABLED(LCD_FOR_MELZI) CONTROLLER_WARNING("BTT_SKR_MINI_E3_common", "LCD for Melzi v4", " Requires a custom cable.") diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index d0bd2944bc03..1bc7bb7b8b1e 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -142,8 +142,11 @@ // // LCD / Controller // +#if ENABLED(CR10_STOCKDISPLAY) -#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI) + // Migrated to pins/lcd + +#elif ANY(TFT_COLOR_UI, TFT_CLASSIC_UI) #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP2_03_PIN @@ -178,16 +181,7 @@ #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif IS_TFTGLCD_PANEL + #if IS_TFTGLCD_PANEL #undef BEEPER_PIN #undef BTN_ENC diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index e8f9cf023581..a0166126d753 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -147,14 +147,7 @@ // #if ENABLED(CR10_STOCKDISPLAY) - #define BEEPER_PIN EXP1_01_PIN - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #define BTN_ENC EXP1_02_PIN - - #define LCD_PINS_RS EXP1_07_PIN // CS -- SOFT SPI for ENDER3 LCD - #define LCD_PINS_D4 EXP1_06_PIN // SCLK - #define LCD_PINS_EN EXP1_08_PIN // DATA MOSI + // Migrated to pins/lcd #endif // Alter timing for graphical display diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index 9ae858f2d08d..bb9662b282bf 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -229,20 +229,17 @@ #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXP3_07_PIN - #define LCD_PINS_EN EXP3_08_PIN - #define LCD_PINS_D4 EXP3_06_PIN + // Migrated to pins/lcd + #define LCD_ON_EXP3 - #define BTN_ENC EXP3_02_PIN - #define BTN_EN1 EXP3_03_PIN - #define BTN_EN2 EXP3_05_PIN - - #ifndef HAS_PIN_27_BOARD - #define BEEPER_PIN EXP3_01_PIN + #ifdef HAS_PIN_27_BOARD + #define BEEPER_PIN -1 #endif #elif ANY(HAS_DWIN_E3V2, IS_DWIN_MARLINUI, DWIN_VET6_CREALITY_LCD) + // Serial controller with click encoder + #define BTN_ENC EXP3_05_PIN #define BTN_EN1 EXP3_08_PIN #define BTN_EN2 EXP3_07_PIN diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h index 21503bd1e0e1..ca4060fe66e4 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h @@ -163,10 +163,10 @@ * ------ */ #define EXP3_01_PIN PC6 - #define EXP3_02_PIN PB2 - #define EXP3_03_PIN PB10 + #define EXP3_02_PIN PB2 // ENC + #define EXP3_03_PIN PB10 // EN1 #define EXP3_04_PIN PE8 - #define EXP3_05_PIN PB14 + #define EXP3_05_PIN PB14 // EN2 #define EXP3_06_PIN PB13 #define EXP3_07_PIN PB12 #define EXP3_08_PIN PB15 @@ -187,10 +187,10 @@ #define EXP3_02_PIN PC5 #define EXP3_03_PIN PB10 #define EXP3_04_PIN -1 - #define EXP3_05_PIN PA6 - #define EXP3_06_PIN PA5 - #define EXP3_07_PIN PA4 - #define EXP3_08_PIN PA7 + #define EXP3_05_PIN PA6 // ENC + #define EXP3_06_PIN PA5 // BEEP + #define EXP3_07_PIN PA4 // EN2 + #define EXP3_08_PIN PA7 // EN1 #endif @@ -199,18 +199,13 @@ #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." #endif - #define LCD_PINS_RS EXP3_07_PIN - #define LCD_PINS_EN EXP3_08_PIN - #define LCD_PINS_D4 EXP3_06_PIN - - #define BTN_ENC EXP3_02_PIN - #define BTN_EN1 EXP3_03_PIN - #define BTN_EN2 EXP3_05_PIN - - #define BEEPER_PIN EXP3_01_PIN + // Migrated to pins/lcd + #define LCD_ON_EXP3 #elif ANY(DWIN_VET6_CREALITY_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI) + // Serial controller with click encoder + // RET6 / VET6 DWIN ENCODER LCD #define BTN_ENC EXP3_05_PIN #define BTN_EN1 EXP3_08_PIN diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h index 2116aad8e9ed..a0c0c1df5822 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h @@ -154,6 +154,9 @@ #define ONBOARD_SDIO #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer +/** + * There are two variants of the EXP connector + */ #if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI) /** @@ -166,11 +169,11 @@ * GND | 9 10 | 5V * ------ */ - #define EXP3_01_PIN PC6 - #define EXP3_02_PIN PB2 - #define EXP3_03_PIN PB10 + #define EXP3_01_PIN PC6 // BEEP + #define EXP3_02_PIN PB2 // ENC + #define EXP3_03_PIN PB10 // EN1 #define EXP3_04_PIN PE8 - #define EXP3_05_PIN PB14 + #define EXP3_05_PIN PB14 // EN2 #define EXP3_06_PIN PB13 #define EXP3_07_PIN PB12 #define EXP3_08_PIN PB15 @@ -191,10 +194,10 @@ #define EXP3_02_PIN PC5 #define EXP3_03_PIN PB10 #define EXP3_04_PIN -1 - #define EXP3_05_PIN PA6 - #define EXP3_06_PIN PA5 - #define EXP3_07_PIN PA4 - #define EXP3_08_PIN PA7 + #define EXP3_05_PIN PA6 // ENC + #define EXP3_06_PIN PA5 // BEEP + #define EXP3_07_PIN PA4 // EN2 + #define EXP3_08_PIN PA7 // EN1 #endif @@ -203,18 +206,13 @@ #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." #endif - #define LCD_PINS_RS EXP3_07_PIN - #define LCD_PINS_EN EXP3_08_PIN - #define LCD_PINS_D4 EXP3_06_PIN - - #define BTN_ENC EXP3_02_PIN - #define BTN_EN1 EXP3_03_PIN - #define BTN_EN2 EXP3_05_PIN - - #define BEEPER_PIN EXP3_01_PIN + // Migrated to pins/lcd + #define LCD_ON_EXP3 #elif ANY(DWIN_VET6_CREALITY_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI) + // Serial controller with click encoder + // RET6 / VET6 DWIN ENCODER LCD #define BTN_ENC EXP3_05_PIN #define BTN_EN1 EXP3_08_PIN diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h index 042966cb3af2..fd041f80eb3d 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h @@ -157,7 +157,11 @@ #define EXP1_07_PIN PB12 #define EXP1_08_PIN PB15 -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + +#elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN #if HAS_MARLINUI_U8GLIB diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index 76e60b422649..7a9872873a85 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -146,7 +146,7 @@ #define TFT_BACKLIGHT_PIN PD12 #define TFT_BACKLIGHT_PWM 150 // Brightness with alt. TIM4 chan 1 (1-255) - #define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h + #define DOGLCD_MOSI -1 // Prevent auto-define by pins_lcd.h #define DOGLCD_SCK -1 // Buffer for Color UI diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h index c280915405f9..7af167c38f40 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h @@ -192,7 +192,7 @@ #define TFT_RESET_PIN PC6 // FSMC_RST #define TFT_BACKLIGHT_PIN PD13 - #define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h + #define DOGLCD_MOSI -1 // Prevent auto-define by pins_lcd.h #define DOGLCD_SCK -1 #define TOUCH_CS_PIN PA7 // SPI2_NSS diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index 2abbf3452bed..1a08b5b0e1ae 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -240,23 +240,17 @@ // // LCD / Controller // +#if ENABLED(CR10_STOCKDISPLAY) -#if HAS_WIRED_LCD + // Migrated to pins/lcd + +#elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN #define SD_DETECT_PIN EXP2_07_PIN - #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(MKS_MINI_12864) + #if ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 1ec7e7516335..3d1211477be2 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -207,9 +207,45 @@ #define EXP1_07_PIN PB1 #define EXP1_08_PIN PE11 -#if HAS_WIRED_LCD - - #if ANY(CR10_STOCKDISPLAY, LCD_FOR_MELZI) +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + +#elif HAS_WIRED_LCD + + #if ENABLED(LCD_FOR_MELZI) + + CONTROLLER_WARNING("BTT_E3_RRF", "LCD_FOR_MELZI") + + /** LCD_FOR_MELZI display pinout + * BTT E3 RRF Display Ribbon + * ------ ------ + * (BEEPER) PE8 | 1 2 | PE9 (BTN_ENC) GND |10 9 | 5V + * (BTN_EN1) PE7 | 3 4 | RESET BEEPER | 8 7 | ESTOP (RESET) + * (BTN_EN2) PB2 5 6 | PE10 (LCD_D4) (BTN_ENC) ENC_BTN | 6 5 | LCD_SCLK (LCD_D4) + * (LCD_RS) PB1 | 7 8 | PE11 (LCD_EN) (BTN_EN2) ENC_A | 4 3 | LCD_DATA (LCD_EN) + * GND | 9 10 | 5V (BTN_EN1) ENC_B | 2 1 | LCD_CS (LCD_RS) + * ------ ------ + * EXP1 LCD + * + * Needs custom cable: + * + * Board Adapter Display Ribbon (coming from display) + * ---------------------------------- + * EXP1-10 ---------- LCD-9 5V + * EXP1-9 ----------- LCD-10 GND + * EXP1-8 ----------- LCD-3 LCD_EN + * EXP1-7 ----------- LCD-1 LCD_RS + * EXP1-6 ----------- LCD-5 LCD_D4 + * EXP1-5 ----------- LCD-4 EN2 + * EXP1-4 ----------- LCD-7 RESET + * EXP1-3 ----------- LCD-2 EN1 + * EXP1-2 ----------- LCD-6 BTN + * EXP1-1 ----------- LCD-8 BEEPER + */ + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING + #error "CAUTION! LCD_FOR_MELZI requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" + #endif #define BEEPER_PIN EXP1_01_PIN @@ -221,40 +257,6 @@ #define LCD_PINS_RS EXP1_07_PIN #define LCD_PINS_EN EXP1_08_PIN - #if ENABLED(LCD_FOR_MELZI) - - CONTROLLER_WARNING("BTT_E3_RRF", "LCD_FOR_MELZI") - - /** LCD_FOR_MELZI display pinout - * - * BTT E3 RRF Display Ribbon - * ------ ------ - * (BEEPER) PE8 | 1 2 | PE9 (BTN_ENC) GND |10 9 | 5V - * (BTN_EN1) PE7 | 3 4 | RESET BEEPER | 8 7 | ESTOP (RESET) - * (BTN_EN2) PB2 5 6 | PE10 (LCD_D4) (BTN_ENC) ENC_BTN | 6 5 | LCD_SCLK (LCD_D4) - * (LCD_RS) PB1 | 7 8 | PE11 (LCD_EN) (BTN_EN2) ENC_A | 4 3 | LCD_DATA (LCD_EN) - * GND | 9 10 | 5V (BTN_EN1) ENC_B | 2 1 | LCD_CS (LCD_RS) - * ------ ------ - * EXP1 LCD - * - * Needs custom cable: - * - * Board Adapter Display Ribbon (coming from display) - * ---------------------------------- - * EXP1-10 ---------- LCD-9 5V - * EXP1-9 ----------- LCD-10 GND - * EXP1-8 ----------- LCD-3 LCD_EN - * EXP1-7 ----------- LCD-1 LCD_RS - * EXP1-6 ----------- LCD-5 LCD_D4 - * EXP1-5 ----------- LCD-4 EN2 - * EXP1-4 ----------- LCD-7 RESET - * EXP1-3 ----------- LCD-2 EN1 - * EXP1-2 ----------- LCD-6 BTN - * EXP1-1 ----------- LCD-8 BEEPER - */ - - #endif - #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! CONTROLLER_WARNING("BTT_E3_RRF", "ZONESTAR_LCD") diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index cd5755539bfc..7e0bb530f614 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -413,8 +413,11 @@ // // LCD / Controller // +#if ENABLED(CR10_STOCKDISPLAY) -#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) + // Migrated to pins/lcd + +#elif ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) #define TFT_CS_PIN EXP2_04_PIN #define TFT_A0_PIN EXP2_07_PIN @@ -435,16 +438,7 @@ #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(MKS_MINI_12864) + #if ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define BTN_EN1 EXP2_03_PIN diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index 1bfc6c5492bb..8e60a09fb2e3 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -449,60 +449,49 @@ #define BTN_EN2 EXP1_07_PIN #define BTN_ENC EXP1_05_PIN -#elif HAS_WIRED_LCD - - #define BEEPER_PIN EXP1_01_PIN - #define BTN_ENC EXP1_02_PIN +#elif ENABLED(CR10_STOCKDISPLAY) - #if ENABLED(CR10_STOCKDISPLAY) + // Migrated to pins/lcd - #define LCD_PINS_RS EXP1_07_PIN +#elif HAS_WIRED_LCD - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN + #define BEEPER_PIN EXP1_01_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_D4 EXP1_05_PIN - #else + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN - #define LCD_PINS_RS EXP1_04_PIN - - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN - - #define LCD_PINS_EN EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN - - #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_04_PIN - //#define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_06_PIN - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_07_PIN - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_08_PIN - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN + #if ENABLED(FYSETC_MINI_12864) + #define DOGLCD_CS EXP1_03_PIN + #define DOGLCD_A0 EXP1_04_PIN + //#define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN EXP1_06_PIN #endif - #endif // !FYSETC_MINI_12864 - - #if IS_ULTIPANEL - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN - - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN EXP1_07_PIN #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN EXP1_08_PIN + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN EXP1_06_PIN + #endif + #endif // !FYSETC_MINI_12864 + + #if IS_ULTIPANEL + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h index b833a8da52cd..c6932245116e 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h @@ -181,7 +181,11 @@ #define EXP1_07_PIN PD2 #define EXP1_08_PIN PC0 -#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** * ------ ------ ------ * (ENT) | 1 2 | (BEEP) |10 9 | |10 9 | @@ -204,19 +208,7 @@ #elif HAS_WIRED_LCD - #if ENABLED(CR10_STOCKDISPLAY) - - #define BEEPER_PIN EXP1_01_PIN - #define BTN_ENC EXP1_02_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! + #if ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! CONTROLLER_WARNING("BTT_SKR_MINI_E3_V3_0_1", "ZONESTAR_LCD") diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index c751f9b04119..0f4b5ee35826 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -434,8 +434,11 @@ // // LCD / Controller // +#if ENABLED(CR10_STOCKDISPLAY) -#if IS_TFTGLCD_PANEL + // Migrated to pins/lcd + +#elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN @@ -446,17 +449,7 @@ #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(MKS_MINI_12864) + #if ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 41514181f5a9..4e4f837f48cb 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -439,8 +439,11 @@ // // LCD / Controller // +#if ENABLED(CR10_STOCKDISPLAY) -#if IS_TFTGLCD_PANEL + // Migrated to pins/lcd + +#elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN @@ -451,17 +454,7 @@ #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(MKS_MINI_12864) + #if ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index 7d7126b640ff..1e411e1d219d 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -191,13 +191,8 @@ #if ENABLED(CR10_STOCKDISPLAY) - #define BEEPER_PIN EXP3_01_PIN - #define BTN_ENC EXP3_02_PIN - #define BTN_EN1 EXP3_03_PIN - #define BTN_EN2 EXP3_05_PIN - #define LCD_PINS_D4 EXP3_06_PIN - #define LCD_PINS_RS EXP3_07_PIN - #define LCD_PINS_EN EXP3_08_PIN + // Migrated to pins/lcd + #define LCD_ON_EXP3 #elif HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 8658191dbe22..ca7775365726 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -238,8 +238,11 @@ // // LCD / Controller // +#if ENABLED(CR10_STOCKDISPLAY) -#if ENABLED(FYSETC_242_OLED_12864) + // Migrated to pins/lcd + +#elif ENABLED(FYSETC_242_OLED_12864) #define BTN_EN1 EXP1_01_PIN #define BTN_EN2 EXP1_08_PIN @@ -263,59 +266,46 @@ #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #else - - #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN - #define LCD_SDSS EXP2_04_PIN + #define LCD_SDSS EXP2_04_PIN - #define LCD_PINS_EN EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN - #if ENABLED(FYSETC_MINI_12864) - // See https://wiki.fysetc.com/Mini12864_Panel - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_04_PIN - #if ENABLED(FYSETC_GENERIC_12864_1_1) - #define LCD_BACKLIGHT_PIN EXP1_07_PIN + #if ENABLED(FYSETC_MINI_12864) + // See https://wiki.fysetc.com/Mini12864_Panel + #define DOGLCD_CS EXP1_03_PIN + #define DOGLCD_A0 EXP1_04_PIN + #if ENABLED(FYSETC_GENERIC_12864_1_1) + #define LCD_BACKLIGHT_PIN EXP1_07_PIN + #endif + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN EXP1_06_PIN #endif - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_06_PIN - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_07_PIN - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_08_PIN - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN EXP1_07_PIN #endif - #endif - - #if IS_ULTIPANEL - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN EXP1_08_PIN #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN EXP1_06_PIN #endif + #endif + #if IS_ULTIPANEL + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h index b20477a15db5..e125fe456c49 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -293,61 +293,51 @@ #define TFTGLCD_CS EXP2_03_PIN #endif -#elif HAS_WIRED_LCD - - #define BEEPER_PIN EXP1_01_PIN - #define BTN_ENC EXP1_02_PIN - - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN +#elif ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN + // Migrated to pins/lcd - #else +#elif HAS_WIRED_LCD - #define LCD_PINS_RS EXP1_04_PIN + #define BEEPER_PIN EXP1_01_PIN - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN - #define LCD_PINS_EN EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN - #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_04_PIN - //#define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_06_PIN - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_07_PIN - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_08_PIN - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN + #if ENABLED(FYSETC_MINI_12864) + #define DOGLCD_CS EXP1_03_PIN + #define DOGLCD_A0 EXP1_04_PIN + //#define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. + #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN EXP1_06_PIN + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN EXP1_07_PIN #endif - #endif // !FYSETC_MINI_12864 - - #if IS_ULTIPANEL - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN EXP1_08_PIN #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN EXP1_06_PIN + #endif + #endif // !FYSETC_MINI_12864 + + #if IS_ULTIPANEL + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif - #endif + #endif // HAS_WIRED_LCD // Alter timing for graphical display diff --git a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h index cec7780b948b..1571c122d03f 100644 --- a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h @@ -228,21 +228,12 @@ #define EXP1_08_PIN PB15 #if ENABLED(CR10_STOCKDISPLAY) - /** ------ - * BEEPER | 1 2 | ENC - * EN1 | 3 4 | RESET - * EN2 | 5 6 LCD_D4 - * LCD_RS | 7 8 | LCD_EN - * GND | 9 10 | 5V - * ------ - */ - #ifdef DISABLE_JTAGSWD - #define BEEPER_PIN EXP1_01_PIN // Not connected in dev board + + // Migrated to pins/lcd + + #ifndef DISABLE_JTAGSWD + #define BEEPER_PIN -1 #endif - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - //#define KILL_PIN -1 #define BOARD_ST7920_DELAY_1 600 #define BOARD_ST7920_DELAY_2 750 @@ -273,7 +264,7 @@ #endif -#if ANY(CR10_STOCKDISPLAY, MKS_MINI_12864) +#if ENABLED(MKS_MINI_12864) #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN #define BTN_ENC EXP1_02_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h index 3489fe5c8fc1..54dfb1088305 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h @@ -235,7 +235,12 @@ #define EXP1_09_PIN -1 #define EXP1_10_PIN -1 -#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI + /** * ------ ------ --- * (PC1) BEEP | 1 2 | | 1 2 | | 1 | (5V) @@ -271,19 +276,7 @@ #elif HAS_WIRED_LCD - #if ENABLED(CR10_STOCKDISPLAY) - - #define BEEPER_PIN EXP1_01_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #define BTN_ENC EXP1_02_PIN - - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! + #if ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! CONTROLLER_WARNING("BTT_MANTA_E3_EZ_V1_0", "ZONESTAR_LCD") diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h index b7c5a8c470f8..30d191967dbd 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h @@ -210,8 +210,11 @@ // // LCD / Controller // +#if ENABLED(CR10_STOCKDISPLAY) -#if IS_TFTGLCD_PANEL + // Migrated to pins/lcd + +#elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN @@ -222,17 +225,7 @@ #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(MKS_MINI_12864) + #if ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h index 8d75638ee578..d30c155502d2 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h @@ -238,8 +238,11 @@ // // LCD / Controller // +#if ENABLED(CR10_STOCKDISPLAY) -#if IS_TFTGLCD_PANEL + // Migrated to pins/lcd + +#elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN @@ -250,17 +253,7 @@ #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(MKS_MINI_12864) + #if ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h index 327c5f1970ca..54cee93806d4 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -288,8 +288,11 @@ // // LCD / Controller // +#if ENABLED(CR10_STOCKDISPLAY) -#if IS_TFTGLCD_PANEL + // Migrated to pins/lcd + +#elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN @@ -300,17 +303,7 @@ #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(MKS_MINI_12864) + #if ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h index 6c724ad1bf53..985d50972a73 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h @@ -187,7 +187,11 @@ #define SPI1_05_PIN PA7 #define SPI1_06_PIN PA6 -#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins/lcd + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** * ------ ------ ------ * (ENT) | 1 2 | (BEEP) |10 9 | |10 9 | @@ -252,19 +256,7 @@ #else - #if ENABLED(CR10_STOCKDISPLAY) - - #define BEEPER_PIN EXP1_01_PIN - #define BTN_ENC EXP1_02_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! + #if ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! CONTROLLER_WARNING("BTT_SKR_MINI_E3_V3_0", "ZONESTAR_LCD") diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h index b67992186315..567a709f2b5f 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h @@ -433,8 +433,11 @@ // // LCD / Controller // +#if ENABLED(CR10_STOCKDISPLAY) -#if IS_TFTGLCD_PANEL + // Migrated to pins/lcd + +#elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN @@ -468,17 +471,7 @@ #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_07_PIN - - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_EN EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(MKS_MINI_12864) + #if ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN From e3a75f72f3d0fed4ead246b9bbd83215b9594071 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 8 Apr 2023 16:15:42 -0500 Subject: [PATCH 04/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Migrate=20ANET=5FFUL?= =?UTF-8?q?L=5FGRAPHICS=5FLCD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/lcd/ANET_FULL_GRAPHICS_LCD.h | 115 +++++++++++ Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 42 +--- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 79 ++------ Marlin/src/pins/pins_lcd.h | 2 + Marlin/src/pins/sanguino/pins_ANET_10.h | 191 ++++++++++++------- 5 files changed, 262 insertions(+), 167 deletions(-) create mode 100644 Marlin/src/pins/lcd/ANET_FULL_GRAPHICS_LCD.h diff --git a/Marlin/src/pins/lcd/ANET_FULL_GRAPHICS_LCD.h b/Marlin/src/pins/lcd/ANET_FULL_GRAPHICS_LCD.h new file mode 100644 index 000000000000..f8c6ec14ae37 --- /dev/null +++ b/Marlin/src/pins/lcd/ANET_FULL_GRAPHICS_LCD.h @@ -0,0 +1,115 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * pins/lcd/ANET_FULL_GRAPHICS_LCD.h + */ + +// IS_RRD_FG_SC +// DOGLCD +// HAS_MARLINUI_U8GLIB > (128x64) +// IS_U8GLIB_ST7920 +// IS_ULTIPANEL +// HAS_WIRED_LCD +// HAS_DISPLAY +// HAS_STATUS_MESSAGE +// IS_NEWPANEL +// HAS_MARLINUI_MENU +// HAS_MANUAL_MOVE_MENU +// IS_RRD_SC + +#if ENABLED(ANET_FULL_GRAPHICS_LCD) + + CONTROLLER_WARNING("ANET_FULL_GRAPHICS_LCD.h", "ANET_FULL_GRAPHICS_LCD") + + /** + * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way. + * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!) + * 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because it is open drain.) + * 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board. + * + * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!! + * + * The ANET_FULL_GRAPHICS_LCD connector plug: + * + * BEFORE AFTER + * ------ ------ + * (BEEPER) | 1 2 | (CLK) (BEEPER) |10 9 | -- + * (BTN_ENC) | 3 4 | -- (BTN_ENC) | 8 7 | (CLK) + * (BTN_EN1) 5 6 | (SID) (BTN_EN1) 6 5 | (SID) + * (BTN_EN2) | 7 8 | (CS) (BTN_EN2) | 4 3 | (CS) + * 5V | 9 10 | GND GND | 2 1 | 5V + * ------ ------ + * LCD LCD + */ + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING + #error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_lcd.h' for details." \ + "(Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" + #endif + + #define BEEPER_PIN LCD1_01_PIN + + #define BTN_ENC LCD1_03_PIN + #define BTN_EN1 LCD1_05_PIN + #define BTN_EN2 LCD1_07_PIN + + #define LCD_PINS_D4 LCD1_04_PIN + #define LCD_PINS_EN LCD1_06_PIN + #define LCD_PINS_RS LCD1_08_PIN + +#else // CTC_A10S_A13 + + /** + * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way. + * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!) + * + * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!! + * + * The CTC_A10S_A13 connector plug: + * + * BEFORE AFTER + * ------ ------ + * (BEEPER) | 1 2 | (CLK) (BEEPER) |10 9 | (CLK) + * (BTN_ENC) | 3 4 | -- (BTN_ENC) | 8 7 | -- + * (BTN_EN1) 5 6 | (SID) (BTN_EN1) 6 5 | (SID) + * (BTN_EN2) | 7 8 | (CS) (BTN_EN2) | 4 3 | (CS) + * 5V | 9 10 | GND GND | 2 1 | 5V + * ------ ------ + * LCD LCD + */ + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING + #error "CAUTION! CTC_A10S_A13 requires wiring modifications. See 'pins_lcd.h' for details." \ + "(Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" + #endif + + #define BEEPER_PIN LCD1_08_PIN + + #define BTN_ENC LCD1_01_PIN + #define BTN_EN1 LCD1_06_PIN + #define BTN_EN2 LCD1_07_PIN + + #define LCD_PINS_EN LCD1_03_PIN + #define LCD_PINS_RS LCD1_04_PIN + #define LCD_PINS_D4 LCD1_05_PIN + +#endif diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index ead50ca1327b..38a18705077f 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -230,45 +230,19 @@ // Migrated to pins/lcd -#elif HAS_WIRED_LCD +#elif ENABLED(ANET_FULL_GRAPHICS_LCD) - #if ENABLED(CTC_A10S_A13) + // Migrated to pins/lcd - #error "CTC_A10S_A13 only applies to the ANET 1.0 board." +#elif ENABLED(CTC_A10S_A13) - #elif ENABLED(ANET_FULL_GRAPHICS_LCD) - - CONTROLLER_WARNING("BTT_SKR_V1_3", "ANET_FULL_GRAPHICS_LCD") - - /** - * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way. - * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!) - * 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because it is open drain.) - * 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board. - * - * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!! - * - * The ANET_FULL_GRAPHICS_LCD connector plug: - * - * BEFORE AFTER - * ------ ------ - * (CLK) | 1 2 | (BEEPER) (BEEPER) |10 9 | -- - * -- | 3 4 | (BTN_ENC) (BTN_ENC) | 8 7 | (CLK) - * (SID) 5 6 | (BTN_EN1) (BTN_EN1) 6 5 | (SID) - * (CS) | 7 8 | (BTN_EN2) (BTN_EN2) | 4 3 | (CS) - * GND | 9 10 | 5V GND | 2 1 | 5V - * ------ ------ - * LCD LCD - */ - - #define LCD_PINS_RS EXP1_08_PIN + #error "CTC_A10S_A13 only applies to the ANET 1.0 board." - #define BTN_EN1 EXP1_05_PIN - #define BTN_EN2 EXP1_07_PIN - #define BTN_ENC EXP1_03_PIN +#elif HAS_WIRED_LCD - #define LCD_PINS_EN EXP1_06_PIN - #define LCD_PINS_D4 EXP1_04_PIN + #if ENABLED(CTC_A10S_A13) + + #error "CTC_A10S_A13 only applies to the ANET 1.0 board." #elif ENABLED(WYH_L12864) diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index cb771fe043e1..eb66c6721077 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -286,6 +286,16 @@ // Migrated to pins/lcd +#elif ENABLED(ANET_FULL_GRAPHICS_LCD) + + // Migrated to pins/lcd + +#elif ENABLED(CTC_A10S_A13) + + CONTROLLER_WARNING("BTT_SKR_V1_4", "CTC_A10S_A13") + + // Migrated to pins/lcd + #elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI // RET6 DWIN ENCODER LCD @@ -299,74 +309,7 @@ #elif HAS_WIRED_LCD - #if ENABLED(CTC_A10S_A13) - CONTROLLER_WARNING("BTT_SKR_V1_4", "CTC_A10S_A13") - - /** - * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way. - * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!) - * - * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!! - * - * The CTC_A10S_A13 connector plug: - * - * BEFORE AFTER - * ------ ------ - * (BEEPER) | 1 2 | (CLK) (BEEPER) |10 9 | (CLK) - * (BTN_ENC) | 3 4 | -- (BTN_ENC) | 8 7 | -- - * (BTN_EN1) 5 6 | (SID) (BTN_EN1) 6 5 | (SID) - * (BTN_EN2) | 7 8 | (CS) (BTN_EN2) | 4 3 | (CS) - * 5V | 9 10 | GND GND | 2 1 | 5V - * ------ ------ - * LCD LCD - */ - - #define LCD_PINS_RS EXP1_04_PIN - - #define BTN_EN1 EXP1_06_PIN - #define BTN_EN2 EXP1_07_PIN - #define BTN_ENC EXP1_01_PIN - - #define LCD_PINS_EN EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN - #define BEEPER_PIN EXP1_08_PIN - - #elif ENABLED(ANET_FULL_GRAPHICS_LCD) - CONTROLLER_WARNING("BTT_SKR_V1_4", "ANET_FULL_GRAPHICS_LCD") - - /** - * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way. - * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!) - * 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because it is open drain.) - * 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board. - * - * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!! - * - * The ANET_FULL_GRAPHICS_LCD connector plug: - * - * BEFORE AFTER - * ------ ------ - * (BEEPER) | 1 2 | (CLK) (BEEPER) |10 9 | -- - * (BTN_ENC) | 3 4 | -- (BTN_ENC) | 8 7 | (CLK) - * (BTN_EN1) 5 6 | (SID) (BTN_EN1) 6 5 | (SID) - * (BTN_EN2) | 7 8 | (CS) (BTN_EN2) | 4 3 | (CS) - * 5V | 9 10 | GND GND | 2 1 | 5V - * ------ ------ - * LCD LCD - */ - - #define LCD_PINS_RS EXP1_08_PIN - - #define BTN_EN1 EXP1_05_PIN - #define BTN_EN2 EXP1_07_PIN - #define BTN_ENC EXP1_03_PIN - - #define LCD_PINS_EN EXP1_06_PIN - #define LCD_PINS_D4 EXP1_04_PIN - - #define BEEPER_PIN EXP1_01_PIN - - #elif ENABLED(ENDER2_STOCKDISPLAY) + #if ENABLED(ENDER2_STOCKDISPLAY) /** Creality Ender-2 display pinout * ------ diff --git a/Marlin/src/pins/pins_lcd.h b/Marlin/src/pins/pins_lcd.h index ac2e7bb9d9f9..929b97dd4a3e 100644 --- a/Marlin/src/pins/pins_lcd.h +++ b/Marlin/src/pins/pins_lcd.h @@ -35,6 +35,8 @@ #if ENABLED(CR10_STOCKDISPLAY) #include "lcd/CR10_STOCKDISPLAY.h" + #elif ANY(ANET_FULL_GRAPHICS_LCD, CTC_A10S_A13) + #include "lcd/ANET_FULL_GRAPHICS_LCD.h" #else // More displays to come diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index 189b5963c160..13ad72a8cdf7 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -109,6 +109,11 @@ #define BOARD_INFO_NAME "Anet 1.0" +// +// Servos +// +#define SERVO0_PIN LCD_03 // BLTouch control + // // Limit Switches // @@ -116,6 +121,10 @@ #define Y_STOP_PIN 19 #define Z_STOP_PIN 20 +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN SERVO0_PIN // Without a BLTouch +#endif + // // Steppers // @@ -157,6 +166,26 @@ #define SDSS 31 #define LED_PIN -1 +// +// Board Connectors +// +#define J3_01 8 +#define J3_02 9 +#define J3_03 6 // MISO +#define J3_05 7 // SCK +#define J3_06 5 // MOSI +#define J3_07 -1 // !RESET +#define J3_09 4 + +#define LCD_03 27 +#define LCD_04 10 +#define LCD_05 28 +#define LCD_06 11 +#define LCD_07 29 +#define LCD_08 16 +#define LCD_09 30 +#define LCD_10 17 + /** * Connector pinouts * @@ -188,7 +217,103 @@ * REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER */ -#if HAS_WIRED_LCD +//#define ADAPTER_ODERWAT +//#define ADAPTER_BENLYE + +#ifdef ADAPTER_ODERWAT + // OderWat's Adapter - https://www.thingiverse.com/thing:2103748 + #define EXP1_01_PIN LCD_05 + #define EXP1_02_PIN LCD_08 + #define EXP1_03_PIN LCD_07 + #define EXP1_04_PIN LCD_09 + #define EXP1_05_PIN LCD_10 + + #define EXP2_01_PIN J3_03 + #define EXP2_02_PIN J3_05 + #define EXP2_03_PIN LCD_04 + #define EXP2_05_PIN LCD_06 + #define EXP2_06_PIN J3_06 + #define EXP2_08_PIN J3_07 +#elif defined(ADAPTER_BENLYE) + // Benlye's Adapter - https://go.aisler.net/benlye/anet-lcd-adapter/pcb + #define J4_JUMPER_ATTACHED + + #define EXP1_01_PIN LCD_10 + #define EXP1_03_PIN LCD_08 + #define EXP1_05_PIN LCD_06 + #define EXP1_06_PIN LCD_05 + #define EXP1_07_PIN LCD_04 + #define EXP1_08_PIN LCD_03 + + #undef SERVO0_PIN + #if ENABLED(J4_JUMPER_ATTACHED) + #define SERVO0_PIN LCD_09 // BLTouch/3D-Touch + #define EXP1_04_PIN LCD_07 // J4 Jumper Attached + #else + #define SERVO0_PIN LCD_07 // BLTouch/3D-Touch + #define EXP1_04_PIN LCD_09 // J4 Jumper Removed + #endif +#endif + +#if ENABLED(ANET_FULL_GRAPHICS_LCD) + /** + * ANET_FULL_GRAPHICS_LCD pinouts + * + * ------ ------ + * GND | 1 2 | 5V - | 1 2 | - + * LCD_RS | 3 4 | BTN_EN2 - | 3 4 | 5V + * LCD_EN 5 6 | BTN_EN1 - 5 6 | - + * SERVO0 | 7 8 | BTN_ENC RESET | 7 8 | GND + * LCD_D4 | 9 10 | BEEPER_PIN - | 9 10 | 3V3 + * ------ ------ + * LCD J3 + */ + #define SERVO0_PIN EXP1_04_PIN // Free for BLTouch/3D-Touch + + #define BEEPER_PIN EXP1_01_PIN + + #define BTN_ENC EXP1_03_PIN + #define BTN_EN1 EXP1_05_PIN + #define BTN_EN2 EXP1_07_PIN + + #define LCD_PINS_RS EXP1_08_PIN + #define LCD_PINS_EN EXP1_06_PIN + #define LCD_PINS_D4 EXP1_02_PIN + + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 63 + #define BOARD_ST7920_DELAY_3 125 + +#elif ENABLED(CTC_A10S_A13) + /** + * CTC_A10S_A13 LCD connector is reversed compared to board pinouts + * + * ------ + * GND | 1 2 | 5V + * BEEPER | 3 4 | EN2 + * EN1 5 6 | LCD_D4 + * LCD_RS | 7 8 | LCD_EN + * SERVO0 | 9 10 | ENC + * ------ + * LCD + */ + #define SERVO0_PIN EXP1_02_PIN // The LCD has a SERVO pin? + + #define BEEPER_PIN EXP1_08_PIN + + #define BTN_ENC EXP1_01_PIN + #define BTN_EN1 EXP1_06_PIN + #define BTN_EN2 EXP1_07_PIN + + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + + #define BOARD_ST7920_DELAY_1 250 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 250 + +#elif HAS_WIRED_LCD #define LCD_SDSS EXP1_06_PIN @@ -204,73 +329,9 @@ #define ADC_KEYPAD_PIN 1 #elif IS_RRD_FG_SC - // Pin definitions for the Anet A6 Full Graphics display and the RepRapDiscount Full Graphics // display using an adapter board. See https://aisler.net/benlye/anet-lcd-adapter/pcb // See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748 - - #if ENABLED(CTC_A10S_A13) - - /** - * CTC_A10S_A13 pinout - * - * ------ - * GND | 1 2 | 5V - * BEEPER | 3 4 | BTN_EN2 - * BTN_EN1 5 6 | LCD_D4 - * LCD_RS | 7 8 | LCD_EN - * SERVO0 | 9 10 | BTN_ENC - * ------ - * LCD - */ - #define SERVO0_PIN EXP1_02_PIN - - #define BEEPER_PIN EXP1_08_PIN - - #define BTN_ENC EXP1_01_PIN - #define BTN_EN1 EXP1_06_PIN - #define BTN_EN2 EXP1_07_PIN - - #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_EN EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN - - #define BOARD_ST7920_DELAY_1 250 - #define BOARD_ST7920_DELAY_2 250 - #define BOARD_ST7920_DELAY_3 250 - - #else - - /** - * ANET_FULL_GRAPHICS_LCD pinouts - * - * ------ ------ - * GND | 1 2 | 5V - | 1 2 | - - * LCD_RS | 3 4 | BTN_EN2 - | 3 4 | 5V - * LCD_EN 5 6 | BTN_EN1 - 5 6 | - - * SERVO0 | 7 8 | BTN_ENC RESET | 7 8 | GND - * LCD_D4 | 9 10 | BEEPER_PIN - | 9 10 | 3V3 - * ------ ------ - * LCD J3 - */ - #define SERVO0_PIN EXP1_04_PIN // Free for BLTouch/3D-Touch - - #define BEEPER_PIN EXP1_01_PIN - - #define BTN_ENC EXP1_03_PIN - #define BTN_EN1 EXP1_05_PIN - #define BTN_EN2 EXP1_07_PIN - - #define LCD_PINS_RS EXP1_08_PIN - #define LCD_PINS_EN EXP1_06_PIN - #define LCD_PINS_D4 EXP1_02_PIN - - #define BOARD_ST7920_DELAY_1 125 - #define BOARD_ST7920_DELAY_2 63 - #define BOARD_ST7920_DELAY_3 125 - - #endif - #endif #else From a96521bb95671dd306bde7449874371757df4a9f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 8 Apr 2023 22:29:35 -0500 Subject: [PATCH 05/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Migrate=20ENDER2=5FS?= =?UTF-8?q?TOCKDISPLAY?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/lcd/ENDER2_STOCKDISPLAY.h | 80 +++++++++++++++++++ Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 24 +----- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 33 ++------ .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 18 ++--- Marlin/src/pins/pins_lcd.h | 2 + .../src/pins/sanguino/pins_MELZI_CREALITY.h | 20 ++--- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 7 +- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 6 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 12 ++- .../stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h | 8 +- .../pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h | 7 +- .../pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 8 +- 12 files changed, 150 insertions(+), 75 deletions(-) create mode 100644 Marlin/src/pins/lcd/ENDER2_STOCKDISPLAY.h diff --git a/Marlin/src/pins/lcd/ENDER2_STOCKDISPLAY.h b/Marlin/src/pins/lcd/ENDER2_STOCKDISPLAY.h new file mode 100644 index 000000000000..c7a6ade9be86 --- /dev/null +++ b/Marlin/src/pins/lcd/ENDER2_STOCKDISPLAY.h @@ -0,0 +1,80 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * pins/lcd/ENDER2_STOCKDISPLAY.h + */ + +// U8GLIB_MINI12864_2X_HAL : u8g_dev_uc1701_mini12864_HAL_2x_sw_spi, u8g_dev_uc1701_mini12864_HAL_2x_hw_spi + +// MINIPANEL +// DOGLCD +// HAS_MARLINUI_U8GLIB > (128x64) +// IS_ULTIPANEL +// HAS_WIRED_LCD +// HAS_DISPLAY +// HAS_STATUS_MESSAGE +// IS_NEWPANEL +// HAS_MARLINUI_MENU +// HAS_MANUAL_MOVE_MENU + +/** + * 1 3 (5) 7 9 + * LCD1: BEEP NC NC LCDA0 GND + * ENC NC LCDCS NC VCC + * 2 4 6 8 10 + * + * 1 3 (5) 7 9 + * LCD2: Date: Sun, 9 Apr 2023 01:07:30 -0500 Subject: [PATCH 06/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Migrate=20MKS=5FMINI?= =?UTF-8?q?=5F12864?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 19 +++-- Marlin/src/pins/lcd/MKS_MINI_12864.h | 80 ++++++++++++++++++ Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 76 +++++++---------- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 9 +- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 36 +++----- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 15 ++-- Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h | 23 +---- Marlin/src/pins/mega/pins_GT2560_REV_A.h | 13 ++- Marlin/src/pins/pins_lcd.h | 2 + Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 11 +-- .../src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h | 74 +++++++---------- Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h | 74 +++++++---------- Marlin/src/pins/samd/pins_MINITRONICS20.h | 83 +++++++------------ Marlin/src/pins/samd/pins_RAMPS_144.h | 59 ++++++------- .../src/pins/sanguino/pins_MELZI_CREALITY.h | 27 +----- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 26 +----- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 16 +--- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 16 +--- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 18 ++-- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 18 ++-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 33 ++------ .../stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h | 16 +--- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 81 ++++++++---------- .../pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 79 ++++++++---------- .../pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h | 15 +--- .../pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h | 82 ++++++++---------- .../pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 16 +--- .../pins/stm32h7/pins_BTT_SKR_V3_0_common.h | 34 ++++---- 28 files changed, 422 insertions(+), 629 deletions(-) create mode 100644 Marlin/src/pins/lcd/MKS_MINI_12864.h diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index f209232e4758..e604d0ff3214 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -163,21 +163,22 @@ #define SD_DETECT_PIN EXP2_07_PIN // IO34 default is SD_DET signal (Jump to SDDET) #define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers -#if HAS_WIRED_LCD +#if ENABLED(MKS_MINI_12864) + + // MKS MINI12864 / LCD12864B. For MKS LCD12864A remove the RPK2 resistor! + + // Migrated to pins/lcd + #define LCD_RESET_PIN -1 + +#elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_BACKLIGHT_PIN -1 - - #if ENABLED(MKS_MINI_12864) - // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) - #define DOGLCD_CS EXP1_06_PIN - #define DOGLCD_A0 EXP1_07_PIN - #define LCD_RESET_PIN -1 - #elif ENABLED(FYSETC_MINI_12864_2_1) + + #if ENABLED(FYSETC_MINI_12864_2_1) // MKS_MINI_12864_V3, BTT_MINI_12864, FYSETC_MINI_12864_2_1, BEEZ_MINI_12864 #define DOGLCD_CS EXP1_03_PIN #define DOGLCD_A0 EXP1_04_PIN diff --git a/Marlin/src/pins/lcd/MKS_MINI_12864.h b/Marlin/src/pins/lcd/MKS_MINI_12864.h new file mode 100644 index 000000000000..5031276616b9 --- /dev/null +++ b/Marlin/src/pins/lcd/MKS_MINI_12864.h @@ -0,0 +1,80 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * pins/lcd/MKS_MINI_12864.h - Define LCD pins based on the EXP connector / adapter + */ + +// MINIPANEL +// DOGLCD +// HAS_MARLINUI_U8GLIB > (128x64) +// IS_ULTIPANEL +// HAS_WIRED_LCD +// HAS_DISPLAY +// HAS_STATUS_MESSAGE +// IS_NEWPANEL +// HAS_MARLINUI_MENU +// HAS_MANUAL_MOVE_MENU + +/** + * MKS_MINI_12864 (or MKS_LCD12864A, MKS_LCD12864B) + * https://reprap.org/wiki/MKS_MINI_12864 + * + * 1 3 (5) 7 9 + * LCD1: BEEP NC NC LCDA0 GND + * ENC NC LCDCS NC VCC + * 2 4 6 8 10 + * + * 1 3 (5) 7 9 + * LCD2: Date: Tue, 18 Apr 2023 16:26:48 -0500 Subject: [PATCH 07/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Migrate=20MINIPANEL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/lcd/MINIPANEL.h | 97 ++++++++++++ Marlin/src/pins/mega/pins_MEGACONTROLLER.h | 21 +-- Marlin/src/pins/pins_lcd.h | 2 + Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 11 +- .../src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h | 27 +--- Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h | 27 +--- Marlin/src/pins/samd/pins_MINITRONICS20.h | 27 +--- Marlin/src/pins/samd/pins_RAMPS_144.h | 146 +++++++++--------- .../src/pins/sanguino/pins_MELZI_CREALITY.h | 4 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 2 +- .../stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h | 2 +- .../pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 2 +- 12 files changed, 199 insertions(+), 169 deletions(-) create mode 100644 Marlin/src/pins/lcd/MINIPANEL.h diff --git a/Marlin/src/pins/lcd/MINIPANEL.h b/Marlin/src/pins/lcd/MINIPANEL.h new file mode 100644 index 000000000000..a837cbb95ddd --- /dev/null +++ b/Marlin/src/pins/lcd/MINIPANEL.h @@ -0,0 +1,97 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * pins/lcd/MINIPANEL.h + * https://reprap.org/wiki/Mini_panel + */ + +// DOGLCD +// HAS_MARLINUI_U8GLIB > (128x64) +// IS_ULTIPANEL +// HAS_WIRED_LCD +// HAS_DISPLAY +// HAS_STATUS_MESSAGE +// IS_NEWPANEL +// HAS_MARLINUI_MENU +// HAS_MANUAL_MOVE_MENU + +/** + * Standard Minipanel has a single 20-pin connector which is mapped onto EXP1/2 + * for controllers that also define 'MINIPANEL', so the real MINIPANEL is just + * mapped onto EXP1/2 as well. + * + * Those Creality and MKS displays may have been using 'MINIPANEL' as a way to + * get more board support "for free" so that association may be removed after + * reviewing the history. + * + * SDD MOSI SDSS RESET LCDSS A0 KILL ENC + * 2-7 2-6 2-2 1-1 2-3 2-5 + * ----------------------------- ----------------------------- + * | 2 4 6 8 10 | 12 14 16 18 20 | + * | 1 3 5 7 9 | 11 13 15 17 19 | + * ----------------------------- ----------------------------- + * 2-2 2-7 1-1 2-3 2-5 + * 5V MISO SCK GND 3V3 BL BEEP EN1 EN2 + * + * LCD1: BEEP -- -- A0 GND + * 1 3 (5) 7 9 + * 2 4 6 8 10 + * ENC -- LCDCS -- VCC + * + * LCD2: Date: Sat, 8 Apr 2023 17:58:48 -0500 Subject: [PATCH 08/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Migrate=20IS=5FRRD?= =?UTF-8?q?=5FFG=5FSC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/lcd/RRD_FG_SC.h | 59 +++++++++++++++++++++++++ Marlin/src/pins/pins_lcd.h | 2 + Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 16 +++---- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 15 +++---- Marlin/src/pins/sanguino/pins_ANET_10.h | 18 -------- 5 files changed, 71 insertions(+), 39 deletions(-) create mode 100644 Marlin/src/pins/lcd/RRD_FG_SC.h diff --git a/Marlin/src/pins/lcd/RRD_FG_SC.h b/Marlin/src/pins/lcd/RRD_FG_SC.h new file mode 100644 index 000000000000..f49469ef8f37 --- /dev/null +++ b/Marlin/src/pins/lcd/RRD_FG_SC.h @@ -0,0 +1,59 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * pins/lcd/RRD_FG_SC.h + */ + +/** + * RepRap Discount Full Graphics Smart Controller + * ------ ------ + * BEEPER | 1 2 | ENC --- | 1 2 | --- + * LCD_EN | 3 4 | LCD_RS EN2 | 3 4 | (SDSS) + * D4 5 6 | D5 EN1 5 6 | --- + * D6 | 7 8 | D7 SD_DET | 7 8 | --- + * GND | 9 10 | 5V GND | 9 10 | 5V + * ------ ------ + * LCD1 LCD2 + */ + +#define BEEPER_PIN LCD1_01_PIN + +#define BTN_ENC LCD1_02_PIN +#define BTN_EN1 LCD2_05_PIN // EN1/2 should be swapped for default encoder direction CW+ +#define BTN_EN2 LCD2_03_PIN + +#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD1_08_PIN // Detect the presence of the encoder +#endif + +#define LCD_PINS_EN LCD1_03_PIN +#define LCD_PINS_RS LCD1_04_PIN +#define LCD_PINS_D4 LCD1_05_PIN + +#ifndef SDSS + #define SDSS LCD2_04_PIN +#endif +#ifndef SD_DETECT_PIN + #define SD_DETECT_PIN LCD2_07_PIN +#endif diff --git a/Marlin/src/pins/pins_lcd.h b/Marlin/src/pins/pins_lcd.h index 614fb7fa11d0..6cc15a68992c 100644 --- a/Marlin/src/pins/pins_lcd.h +++ b/Marlin/src/pins/pins_lcd.h @@ -43,6 +43,8 @@ #include "lcd/MINIPANEL.h" #elif ANY(ANET_FULL_GRAPHICS_LCD, CTC_A10S_A13) #include "lcd/ANET_FULL_GRAPHICS_LCD.h" + #elif IS_RRD_FG_SC + #include "lcd/RRD_FG_SC.h" #else // More displays to come diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index 0ece2aeade5e..f1b10c23d171 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -216,10 +216,13 @@ // // LCD / Controller // +#if IS_RRD_FG_SC -#if HAS_WIRED_LCD + // Migrated to pins/lcd - #if ANY(RADDS_DISPLAY, IS_RRD_SC, IS_RRD_FG_SC) +#elif HAS_WIRED_LCD + + #if ANY(RADDS_DISPLAY, IS_RRD_SC) #define BEEPER_PIN EXP1_01_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN @@ -233,11 +236,6 @@ #define LCD_PINS_RS EXP1_04_PIN #define LCD_PINS_EN EXP1_03_PIN - #elif IS_RRD_FG_SC - - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #elif HAS_U8GLIB_I2C_OLED #define BEEPER_PIN EXP1_01_PIN @@ -288,8 +286,4 @@ #define BTN_ENC EXP1_02_PIN #endif - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif - #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 541a7ceab240..72b0b35a2f08 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -210,9 +210,13 @@ // Migrated to pins/lcd +#elif IS_RRD_FG_SC + + // Migrated to pins/lcd + #elif HAS_WIRED_LCD - #if ANY(RADDS_DISPLAY, IS_RRD_SC, IS_RRD_FG_SC) + #if ANY(RADDS_DISPLAY, IS_RRD_SC) #define BEEPER_PIN EXP1_01_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN @@ -226,11 +230,6 @@ #define LCD_PINS_RS EXP1_04_PIN #define LCD_PINS_EN EXP1_03_PIN - #elif IS_RRD_FG_SC - - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_EN EXP1_08_PIN - #elif HAS_U8GLIB_I2C_OLED #define BEEPER_PIN EXP1_01_PIN @@ -270,8 +269,4 @@ #define BTN_ENC EXP1_02_PIN #endif - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif - #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index 13ad72a8cdf7..2182ad47ceb4 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -342,24 +342,6 @@ #define FIL_RUNOUT_PIN SERVO0_PIN #endif -/** - * ==================================================================== - * =============== Alternative RepRapDiscount Wiring ================== - * ==================================================================== - * - * An alternative wiring scheme for the RepRapDiscount Full Graphics Display is - * published by oderwat on Thingiverse at https://www.thingiverse.com/thing:2103748. - * - * Using that adapter requires changing the pin definition as follows: - * #define SERVO0_PIN 27 // free for BLTouch/3D-Touch - * #define BEEPER_PIN 28 - * #define LCD_PINS_RS 30 - * #define LCD_PINS_EN 29 - * #define LCD_PINS_D4 17 - * - * The BLTouch pin becomes LCD:3 - */ - /** * ==================================================================== * ===================== LCD PINOUTS ================================== From 8d2b78c5c6b8c7ebec90f7438aa263ef6b81d499 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 9 Apr 2023 05:12:57 -0500 Subject: [PATCH 09/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Migrate=20RRD=20SC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 7 +-- Marlin/src/pins/lcd/RRD_SC.h | 52 +++++++++++++++++++ Marlin/src/pins/pins_lcd.h | 2 + Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 11 ++-- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 9 ++-- .../src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h | 31 ++++------- Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h | 27 ++-------- Marlin/src/pins/samd/pins_MINITRONICS20.h | 27 ++-------- Marlin/src/pins/samd/pins_RAMPS_144.h | 29 ++++------- 9 files changed, 94 insertions(+), 101 deletions(-) create mode 100644 Marlin/src/pins/lcd/RRD_SC.h diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index e604d0ff3214..6bf73f0ba0aa 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -191,12 +191,7 @@ #define PAUSE_LCD_FOR_BUSY_SD #endif #else - #define LCD_PINS_D4 EXP1_05_PIN - #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN - #endif + #define LCD_PINS_D4 EXP1_05_PIN #define BOARD_ST7920_DELAY_1 96 #define BOARD_ST7920_DELAY_2 48 #define BOARD_ST7920_DELAY_3 600 diff --git a/Marlin/src/pins/lcd/RRD_SC.h b/Marlin/src/pins/lcd/RRD_SC.h new file mode 100644 index 000000000000..9722b88b6e4c --- /dev/null +++ b/Marlin/src/pins/lcd/RRD_SC.h @@ -0,0 +1,52 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * pins/lcd/RRD_SC.h + */ + +/** ------ ------ + * BEEPER | 1 2 | ENC (MISO) | 1 2 | (SCK) + * LCD_EN | 3 4 | LCD_RS EN1 | 3 4 | (SDSS) + * D4 5 6 | D5 EN2 5 6 | (MOSI) + * D6 | 7 8 | D7 (SD_DET) | 7 8 | (KILL) + * GND | 9 10 | 5V GND | 9 10 | 5V + * ------ ------ + * LCD1 LCD2 + */ +#ifndef BEEPER_PIN + #define BEEPER_PIN LCD1_01_PIN +#endif + +#define LCD_PINS_EN LCD1_03_PIN +#define LCD_PINS_RS LCD1_04_PIN +#define LCD_PINS_D4 LCD1_05_PIN +#define LCD_PINS_D5 LCD1_06_PIN +#define LCD_PINS_D6 LCD1_07_PIN +#define LCD_PINS_D7 LCD1_08_PIN + +#if IS_NEWPANEL + #define BTN_ENC LCD1_02_PIN + #define BTN_EN1 LCD2_03_PIN + #define BTN_EN2 LCD2_05_PIN +#endif diff --git a/Marlin/src/pins/pins_lcd.h b/Marlin/src/pins/pins_lcd.h index 6cc15a68992c..89b84a543d70 100644 --- a/Marlin/src/pins/pins_lcd.h +++ b/Marlin/src/pins/pins_lcd.h @@ -45,6 +45,8 @@ #include "lcd/ANET_FULL_GRAPHICS_LCD.h" #elif IS_RRD_FG_SC #include "lcd/RRD_FG_SC.h" + #elif IS_RRD_SC + #include "lcd/RRD_SC.h" #else // More displays to come diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index f1b10c23d171..299778683d9d 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -220,19 +220,20 @@ // Migrated to pins/lcd +#elif IS_RRD_SC + + // Migrated to pins/lcd + #elif HAS_WIRED_LCD - #if ANY(RADDS_DISPLAY, IS_RRD_SC) + #if ENABLED(RADDS_DISPLAY) + #define BEEPER_PIN EXP1_01_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN #define LCD_PINS_D7 EXP1_08_PIN #define SD_DETECT_PIN EXP2_07_PIN - #endif - - #if ANY(RADDS_DISPLAY, IS_RRD_SC) - #define LCD_PINS_RS EXP1_04_PIN #define LCD_PINS_EN EXP1_03_PIN diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 72b0b35a2f08..b3c0ae296c74 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -214,18 +214,19 @@ // Migrated to pins/lcd +#elif IS_RRD_SC + + // Migrated to pins/lcd + #elif HAS_WIRED_LCD - #if ANY(RADDS_DISPLAY, IS_RRD_SC) + #if ENABLED(RADDS_DISPLAY) #define BEEPER_PIN EXP1_01_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN #define LCD_PINS_D7 EXP1_08_PIN #define SD_DETECT_PIN EXP2_07_PIN - #endif - - #if ANY(RADDS_DISPLAY, IS_RRD_SC) #define LCD_PINS_RS EXP1_04_PIN #define LCD_PINS_EN EXP1_03_PIN diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h index 03aea9deb83f..3063522b113f 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -207,6 +207,14 @@ // Migrated to pins/lcd +#elif IS_RRD_SC + + // Migrated to pins/lcd + + #if ENABLED(BQ_LCD_SMART_CONTROLLER) + //#define LCD_BACKLIGHT_PIN EXP1_08_PIN // TO TEST + #endif + #elif HAS_WIRED_LCD // @@ -302,28 +310,7 @@ // #if IS_NEWPANEL - #if IS_RRD_SC - - #define BEEPER_PIN EXP1_01_PIN - - // Definitions for any standard Display - #define BTN_EN1 EXP2_05_PIN - #define BTN_EN2 EXP2_03_PIN - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif - - #define BTN_ENC EXP1_02_PIN - #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN EXP2_07_PIN - #endif - #define KILL_PIN EXP2_10_PIN - - #if ENABLED(BQ_LCD_SMART_CONTROLLER) - //#define LCD_BACKLIGHT_PIN EXP1_08_PIN // TO TEST - #endif - - #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) // TO TEST //#define BTN_EN1 56 // Mega/Due:64 - AGCM4:56 diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h index fe1f74fa191d..3639ed243946 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h @@ -263,6 +263,10 @@ // Migrated to pins/lcd +#elif IS_RRD_SC + + // Migrated to pins/lcd + #elif HAS_WIRED_LCD // @@ -359,28 +363,7 @@ // #if IS_NEWPANEL - #if IS_RRD_SC - - #define BEEPER_PIN EXP1_01_PIN - - // Definitions for any standard Display - #define BTN_EN1 EXP2_05_PIN - #define BTN_EN2 EXP2_03_PIN - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif - - #define BTN_ENC EXP1_02_PIN - #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN EXP2_07_PIN - #endif - #define KILL_PIN EXP2_10_PIN - - #if ENABLED(BQ_LCD_SMART_CONTROLLER) - //#define LCD_BACKLIGHT_PIN EXP1_08_PIN // TO TEST - #endif - - #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) // TO TEST //#define BTN_EN1 56 // Mega/Due:64 - AGCM4:56 diff --git a/Marlin/src/pins/samd/pins_MINITRONICS20.h b/Marlin/src/pins/samd/pins_MINITRONICS20.h index 83c53f38723d..4c443e1e93a5 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -179,6 +179,10 @@ // Migrated to pins/lcd +#elif IS_RRD_SC + + // Migrated to pins/lcd + #elif HAS_WIRED_LCD // @@ -262,28 +266,7 @@ // #if IS_NEWPANEL - #if IS_RRD_SC - - //#define BEEPER_PIN EXP1_01_PIN - - // Definitions for any standard Display - #define BTN_EN1 EXP2_05_PIN - #define BTN_EN2 EXP2_03_PIN - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif - - #define BTN_ENC EXP1_02_PIN - #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN EXP2_07_PIN - #endif - //#define KILL_PIN EXP2_10_PIN - - #if ENABLED(BQ_LCD_SMART_CONTROLLER) - //#define LCD_BACKLIGHT_PIN EXP1_08_PIN // TO TEST - #endif - - #elif ENABLED(LCD_I2C_PANELOLU2) + #if ENABLED(LCD_I2C_PANELOLU2) // TO TEST //#define BTN_EN1 47 diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index 9a706b2f63d1..09328d887a71 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -454,6 +454,14 @@ // Migrated to pins/lcd +#elif IS_RRD_SC + + // Migrated to pins/lcd + + #if ENABLED(BQ_LCD_SMART_CONTROLLER) + #define LCD_BACKLIGHT_PIN AUX4_08 // A slightly different adapter from RRD SC? + #endif + #elif HAS_WIRED_LCD //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 @@ -543,26 +551,7 @@ // #if IS_NEWPANEL - #if IS_RRD_SC - - #define BEEPER_PIN EXP1_01_PIN - - #define BTN_ENC EXP1_02_PIN - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN - - #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN EXP2_07_PIN - #endif - #ifndef KILL_PIN - #define KILL_PIN EXP2_08_PIN - #endif - - #if ENABLED(BQ_LCD_SMART_CONTROLLER) - #define LCD_BACKLIGHT_PIN AUX4_08 // Probably a slightly different adapter from RRD SC - #endif - - #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #define BTN_EN1 AUX2_05 #define BTN_EN2 AUX2_03 From aa73bde39c491a43fe2bdca91468a4ce02f9b975 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 9 Apr 2023 21:13:17 -0500 Subject: [PATCH 10/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Migrate=20ULTI=5FCON?= =?UTF-8?q?TROLLER?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_LCD.h | 1 - Marlin/src/pins/lcd/ULTI_CONTROLLER.h | 54 +++++++++++++++++++++++++++ Marlin/src/pins/pins_lcd.h | 2 + 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 Marlin/src/pins/lcd/ULTI_CONTROLLER.h diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 0fccd7a09977..5edca7ca89b6 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -753,7 +753,6 @@ #define IS_ULTIPANEL 1 #define U8GLIB_SSD1309 - #define LCD_RESET_PIN LCD_PINS_D6 // This controller need a reset pin #define STD_ENCODER_PULSES_PER_STEP 4 #define STD_ENCODER_STEPS_PER_MENU_ITEM 1 #ifndef PCA9632 diff --git a/Marlin/src/pins/lcd/ULTI_CONTROLLER.h b/Marlin/src/pins/lcd/ULTI_CONTROLLER.h new file mode 100644 index 000000000000..9df8ac48364f --- /dev/null +++ b/Marlin/src/pins/lcd/ULTI_CONTROLLER.h @@ -0,0 +1,54 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * pins/lcd/ULTI_CONTROLLER.h + * http://www.thingiverse.com/thing:15081 + */ + +// IS_ULTIPANEL +// HAS_WIRED_LCD +// HAS_DISPLAY +// HAS_STATUS_MESSAGE +// IS_NEWPANEL +// HAS_MARLINUI_MENU +// HAS_MANUAL_MOVE_MENU + +/** + * 1 3 (5) 7 9 + * LCD1: BEEP LCDE LCD4 LCD6 GND + * ENC LCDRS LCD5 LCD7 VCC + * 2 4 6 8 10 + * + * 1 3 (5) 7 9 + * LCD2: Date: Wed, 13 Dec 2023 19:27:37 -0600 Subject: [PATCH 11/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Migrate=20FYSETC=5FM?= =?UTF-8?q?INI=5F12864=5F2=5F1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: ellensp <530024+ellensp@users.noreply.github.com> --- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 37 ++- Marlin/src/pins/lcd/FYSETC_MINI_12864.h | 119 +++++++++ Marlin/src/pins/lcd/adapters.h | 232 ++++++++++++++++++ Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 55 +---- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 53 +--- Marlin/src/pins/mega/pins_GT2560_REV_A.h | 39 ++- Marlin/src/pins/pins_lcd.h | 2 + Marlin/src/pins/ramps/pins_FYSETC_F6_13.h | 35 +-- Marlin/src/pins/ramps/pins_RUMBA.h | 30 +-- Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 34 +-- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 33 +-- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 31 +-- .../src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h | 47 +--- Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h | 47 +--- Marlin/src/pins/samd/pins_MINITRONICS20.h | 38 +-- Marlin/src/pins/samd/pins_RAMPS_144.h | 43 +--- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 73 +----- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 70 +----- .../src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 61 ++--- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 60 +---- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 28 +-- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 41 +--- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 28 +-- .../pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h | 31 +-- .../pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 6 +- 25 files changed, 546 insertions(+), 727 deletions(-) create mode 100644 Marlin/src/pins/lcd/FYSETC_MINI_12864.h diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 6bf73f0ba0aa..32d49af86f72 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -168,9 +168,21 @@ // MKS MINI12864 / LCD12864B. For MKS LCD12864A remove the RPK2 resistor! // Migrated to pins/lcd - #define LCD_RESET_PIN -1 + #define LCD_RESET_PIN -1 + +#elif ENABLED(FYSETC_MINI_12864_2_1) + + // Migrated to pins/lcd + + #if SD_CONNECTION_IS(ONBOARD) + #define FORCE_SOFT_SPI + #endif + #if ALL(MKS_MINI_12864_V3, HAS_MEDIA) + #define PAUSE_LCD_FOR_BUSY_SD + #endif #elif HAS_WIRED_LCD + #define BEEPER_PIN EXP1_01_PIN #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN @@ -178,22 +190,9 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #if ENABLED(FYSETC_MINI_12864_2_1) - // MKS_MINI_12864_V3, BTT_MINI_12864, FYSETC_MINI_12864_2_1, BEEZ_MINI_12864 - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_04_PIN - #define LCD_RESET_PIN EXP1_05_PIN - #define NEOPIXEL_PIN EXP1_06_PIN - #if SD_CONNECTION_IS(ONBOARD) - #define FORCE_SOFT_SPI - #endif - #if ALL(MKS_MINI_12864_V3, HAS_MEDIA) - #define PAUSE_LCD_FOR_BUSY_SD - #endif - #else - #define LCD_PINS_D4 EXP1_05_PIN - #define BOARD_ST7920_DELAY_1 96 - #define BOARD_ST7920_DELAY_2 48 - #define BOARD_ST7920_DELAY_3 600 - #endif + #define LCD_PINS_D4 EXP1_05_PIN + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 + #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/lcd/FYSETC_MINI_12864.h b/Marlin/src/pins/lcd/FYSETC_MINI_12864.h new file mode 100644 index 000000000000..32a10382b698 --- /dev/null +++ b/Marlin/src/pins/lcd/FYSETC_MINI_12864.h @@ -0,0 +1,119 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * pins/lcd/FYSETC_MINI_12864.h + */ + +/** + * NOTES: + * + * All these are the same with different backlight options. + * + * FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default + * FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) + * FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight + * FYSETC_MINI_12864_2_1 // Type A/B. NeoPixel RGB Backlight + * FYSETC_GENERIC_12864_1_1 // Larger display with basic ON/OFF backlight + * + * NOTE: MKS_MINI_12864_V3 and BTT_MINI_12864_V1 are the same as FYSETC_MINI_12864_2_1 with plugs rotated 180 degrees + * + * Custom adapters are required for these boards: + * pins_BTT_SKR_E3_DIP.h ADAPTER_CUSTOM_E3_DIP_TFT + * pins_BTT_SKR_MINI_E3_common.h ADAPTER_CUSTOM_MINI_E3_TFT + * pins_CREALITY_V4.h ADAPTER_CUSTOM_CREALITY_V4_DEBUG_HEADER + * pins_BTT_SKR_MINI_E3_V3_0.h ADAPTER_CUSTOM_E3_V3_NEO + * ADAPTER_SKR_MINI_SCREEN + */ + +// U8GLIB_MINI12864_2X_HAL : u8g_dev_uc1701_mini12864_HAL_sw_spi, u8g_dev_uc1701_mini12864_HAL_hw_spi + +// FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1 +// FYSETC_MINI_12864 +// DOGLCD +// HAS_MARLINUI_U8GLIB +// IS_ULTIPANEL +// HAS_WIRED_LCD +// HAS_DISPLAY +// HAS_STATUS_MESSAGE +// IS_NEWPANEL +// HAS_MARLINUI_MENU +// HAS_MANUAL_MOVE_MENU +// LED_COLORS_REDUCE_GREEN + +/** + * FYSETC Mini 12864 https://wiki.fysetc.com/Mini12864_Panel/ + * + * EXP1 EXP2 + * + * GND GLED LRST LCS BEEP GND CD EN2 EN1 MISO + * 9 7 5 3 1 9 7 5 3 1 + * 10 8 (6) 4 2 10 8 (6) 4 2 + * VCC BLED RLED LRS ENC SCK RST MOSI SDSS SCK + * (DIN) + * + */ + +#define BEEPER_PIN LCD1_01_PIN + +#define BTN_ENC LCD1_02_PIN +#define BTN_EN1 LCD2_03_PIN +#define BTN_EN2 LCD2_05_PIN + +#define DOGLCD_CS LCD1_03_PIN +#define DOGLCD_A0 LCD1_04_PIN + +#define DOGLCD_MISO LCD2_01_PIN +#define DOGLCD_SCK LCD2_02_PIN +#define DOGLCD_MOSI LCD2_06_PIN + +#define LCD_RESET_PIN LCD1_05_PIN +#define KILL_PIN LCD2_08_PIN + +#if ENABLED(FYSETC_MINI_12864_2_1) + #define LCD_NEOPIXEL_PIN LCD1_06_PIN +#elif ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN LCD1_06_PIN + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN LCD1_07_PIN + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN LCD1_08_PIN + #endif +#elif ENABLED(FYSETC_GENERIC_12864_1_1) + #define LCD_BACKLIGHT_PIN LCD1_07_PIN +#endif + +#if HAS_MEDIA + #ifndef SDSS + #define SDSS LCD2_04_PIN + #endif + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN LCD2_07_PIN + #endif +#endif + +// Default LCD appearance +#define LCD_CONTRAST_INIT 255 diff --git a/Marlin/src/pins/lcd/adapters.h b/Marlin/src/pins/lcd/adapters.h index dc4383da5f48..11d38f6821e5 100644 --- a/Marlin/src/pins/lcd/adapters.h +++ b/Marlin/src/pins/lcd/adapters.h @@ -143,6 +143,238 @@ #define FORCE_SOFT_SPI +#elif ENABLED(ADAPTER_CUSTOM_E3_DIP_TFT) + + /** + * FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 display pinout + * + * Board + * ------ --- + * NEO | 1 2 | ENC | 1 | RST + * EN2 | 3 4 | RESET | 2 | RX2 + * EN1 5 6 | LCD_RS | 3 | TX2 + * A0 | 7 8 | CS | 4 | GND + * GND | 9 10 | 5V | 5 | 5V + * ------ --- + * EXP1 TFT + * Display + * ------ ------ + * 5V |10 9 | GND -- |10 9 | -- + * -- | 8 7 | -- RESET | 8 7 | SD_DET + * NEO | 6 5 LCD_RS MOSI | 6 5 EN2 + * A0 | 4 3 | CS -- | 4 3 | EN1 + * ENC | 2 1 | BEEP SCK | 2 1 | -- + * ------ ------ + * LCD1 LCD2 + * + * Needs custom cable: + * + * EXP1-1 <--> LCD1-6 NEO + * EXP1-2 <--> LCD1-2 ENC + * EXP1-3 <--> LCD2-5 EN2 + * EXP1-4 <--> LCD2-8 RESET + * EXP1-5 <--> LCD2-3 EN1 + * EXP1-6 <--> LCD1-8 LCD_RS + * EXP1-7 <--> LCD1-4 A0 + * EXP1-8 <--> LCD1-3 CS + * TFT-2 <--> LCD2-6 MOSI + * TFT-3 <--> LCD2-2 SCK + */ + + #define LCD1_02_PIN EXP1_02_PIN // ENC + #define LCD1_03_PIN EXP1_08_PIN // CS + #define LCD1_04_PIN EXP1_07_PIN // A0 + #define LCD1_05_PIN EXP1_06_PIN // LCD_RS + #define LCD1_06_PIN EXP1_01_PIN // NEOPIXEL + + #define LCD2_02_PIN TFT_02 // SCK + #define LCD2_03_PIN EXP1_03_PIN // EN1 + #define LCD2_05_PIN EXP1_05_PIN // EN2 + #define LCD2_06_PIN TFT_03 // MOSI + + #define FORCE_SOFT_SPI + +#elif ENABLED(ADAPTER_CUSTOM_MINI_E3_TFT) + + /** + * FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 display pinout + * + * Board + * ------ --- + * A0 | 1 2 | ENC RST | 1 | + * CS | 3 4 | RESET MOSI | 2 | (RX2) + * -- | 5 6 | EN1 SCK | 3 | (TX2) + * NEO | 7 8 | EN2 GND | 4 | + * GND | 9 10 | 5V 5V | 5 | + * ------ --- + * EXP1 TFT + * + * Display + * ------ ------ + * BEEP |10 9 | ENC MISO |10 9 | SCK + * CS | 8 7 | A0 EN1 | 8 7 | SS + * RESET | 6 5 | RED EN2 | 6 5 | MOSI + * GREEN | 4 3 | BLUE CD | 4 3 | RST + * GND | 2 1 | 5V GND | 2 1 | KILL + * ------ ------ + * LCD1 LCD2 + * + * Needs custom cable: + * + * EXP1-10 <--> LCD1-1 5V + * EXP1-9 <--> LCD1-2 GND + * EXP1-8 <--> LCD2-6 EN2 + * EXP1-7 <--> LCD1-5 RED + * EXP1-6 <--> LCD2-8 EN1 + * EXP1-5 n/c + * EXP1-4 <--> LCD1-6 RESET + * EXP1-3 <--> LCD1-8 CS + * EXP1-2 <--> LCD1-9 ENC + * EXP1-1 <--> LCD1-7 A0 + * TFT-2 <--> LCD2-5 MOSI + * TFT-3 <--> LCD2-9 SCK + * + * For backlight configuration see steps 2 (V2.1) and 3 at https://wiki.fysetc.com/Mini12864_Panel/ + */ + #define LCD1_05_PIN EXP1_07_PIN // RED + #define LCD1_06_PIN EXP1_04_PIN // RESET + #define LCD1_07_PIN EXP1_01_PIN // A0 + #define LCD1_08_PIN EXP1_03_PIN // CS + #define LCD1_09_PIN EXP1_02_PIN // ENC + + #define LCD2_05_PIN TFT_02 // MOSI + #define LCD2_06_PIN EXP1_08_PIN // EN2 + #define LCD2_08_PIN EXP1_06_PIN // EN1 + #define LCD2_09_PIN TFT_03 // SCK + + #define FORCE_SOFT_SPI + +#elif ENABLED(ADAPTER_CUSTOM_CREALITY_V4_DEBUG_HEADER) + /** + * Board (RET6 12864 LCD) + * ------ + * EN1 | 1 2 | ENC --- + * CS | 3 4 | LCD_RS | 1 | VCC + * A0 5 6 | EN2 | 2 | NEO + * SCK | 7 8 | MOSI | 3 | -- + * GND | 9 10 | 5V | 4 | GND + * ------ --- + * "EXP3" Debug port + * + * Display + * ------ ------ + * 5V |10 9 | GND -- |10 9 | -- + * -- | 8 7 | -- RESET | 8 7 | -- + * NEO | 6 5 LCD_RS MOSI | 6 5 EN2 + * A0 | 4 3 | CS -- | 4 3 | EN1 + * ENC | 2 1 | -- SCK | 2 1 | -- + * ------ ------ + * LCD1 LCD2 + * + * Needs custom cable. Connect EN2-EN2, LCD_CS-LCD_CS and so on. + * Debug port is just above EXP1. You may need to add pins. + */ + + #define LCD1_02_PIN EXP3_02_PIN // ENC + #define LCD1_03_PIN EXP3_03_PIN // CS + #define LCD1_04_PIN EXP3_05_PIN // A0 + #define LCD1_05_PIN EXP3_04_PIN // RESET + #define LCD1_06_PIN DEBUG_02_PIN // NEOPIXEL + + #define LCD2_02_PIN EXP3_07_PIN // SCK + #define LCD2_03_PIN EXP3_01_PIN // EN1 + #define LCD2_05_PIN EXP3_06_PIN // EN2 + #define LCD2_06_PIN EXP3_08_PIN // MOSI + + #define FORCE_SOFT_SPI + +#elif ENABLED(ADAPTER_SKR_MINI_SCREEN) + + /** + * See https://github.com/VoronDesign/Voron-Hardware/tree/master/SKR-Mini_Screen_Adaptor/SRK%20Mini%20E3%20V3.0 + * + * Board + * ------ ------ + * ENC | 1 2 | NEO 5V | 1 2 | GND + * EN1 | 3 4 | RESET CS | 3 4 | SCK + * EN2 5 6 | LCD_RS MOSI | 5 6 | MISO + * CS | 7 8 | A0 3V3 | 7 8 | GND + * GND | 9 10 | 5V ------ + * ------ SPI + * EXP1 + * + * SKR Mini Screen "Adaptor" + * ------ ------ + * -- | 1 2 | ENC MISO | 1 2 | SCK + * CS | 3 4 | A0 EN1 | 3 4 | -- + * RESET 5 6 | DIN EN2 5 6 | MOSI + * -- | 7 8 | -- -- | 7 8 | -- + * GND | 9 10 | 5V GND | 9 10 | RESET (KILL) + * ------ ------ + * EXP1 EXP2 + */ + + // TODO: Ideally, adapters should provide standard display-agnostic connectors + #if ENABLED(FYSETC_MINI_12864_2_1) + + #define LCD1_02_PIN EXP1_01_PIN // ENC + #define LCD1_03_PIN EXP1_07_PIN // DOGLCD_CS + #define LCD1_04_PIN EXP1_08_PIN // DOGLCD_A0 + #define LCD1_05_PIN EXP1_06_PIN // LCD_RESET_PIN + #define LCD1_06_PIN EXP1_02_PIN // NEOPIXEL_PIN + + #define LCD2_02_PIN SPI1_04_PIN // DOGLCD_SCK + #define LCD2_03_PIN EXP1_03_PIN // EN1 + #define LCD2_05_PIN EXP1_05_PIN // EN2 + #define LCD2_06_PIN SPI1_05_PIN // DOGLCD_MOSI + + #define FORCE_SOFT_SPI + + #else + #error "Only FYSETC_MINI_12864_2_1, MKS_MINI_12864_V3, and BTT_MINI_12864 are supported with ADAPTER_SKR_MINI_SCREEN." + #endif + +#elif ENABLED(ADAPTER_CUSTOM_E3_V3_NEO) + + /** + * Board + * ------ + * EN2 | 1 2 | ENC --- + * CS | 3 4 | RESET | 3 | + * A0 5 6 | EN1 | 2 | (DIN) + * SCK | 7 8 | MOSI | 1 | + * GND | 9 10 | 5V --- + * ------ NeoPixel + * EXP1 + * Display + * ------ ------ + * 5V |10 9 | GND -- |10 9 | -- + * -- | 8 7 | -- RESET | 8 7 | -- + * DIN | 6 5 RESET MOSI | 6 5 EN2 + * A0 | 4 3 | CS -- | 4 3 | EN1 + * ENC | 2 1 | -- SCK | 2 1 | -- + * ------ ------ + * EXP1 EXP2 + * + * Needs custom cable. Connect EN2-EN2, LCD_CS-LCD_CS and so on. + * + * Check the index/notch position twice!!! + * On BTT boards pins from IDC10 connector are numbered in unusual order. + */ + + #define LCD1_02_PIN EXP1_02_PIN // ENC + #define LCD1_03_PIN EXP1_03_PIN // CS + #define LCD1_04_PIN EXP1_05_PIN // A0 + #define LCD1_05_PIN EXP1_04_PIN // LCD_RS + #define LCD1_06_PIN NEOPIXEL_PIN // NEOPIXEL + + #define LCD2_02_PIN EXP1_07_PIN // SCK + #define LCD2_03_PIN EXP1_06_PIN // EN1 + #define LCD2_05_PIN EXP1_01_PIN // EN2 + #define LCD2_06_PIN EXP1_08_PIN // MOSI + + #define FORCE_SOFT_SPI + #endif // Provide One-to-One mapping by default diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index ac094aa20ed5..36af73449022 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -293,6 +293,12 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + + #define FORCE_SOFT_SPI // Use this if Hardware SPI causes display problems. + // Results in LCD Software SPI mode 3, SD Software SPI mode 0. #elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN @@ -358,52 +364,17 @@ #else // !MKS_12864OLED_SSD1306 #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN - #if ENABLED(FYSETC_MINI_12864) - - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_04_PIN - #define DOGLCD_SCK EXP2_02_PIN - #define DOGLCD_MOSI EXP2_06_PIN - - #define LCD_BACKLIGHT_PIN -1 - - #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 - - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_06_PIN - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_07_PIN - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_08_PIN - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN + #if IS_ULTIPANEL + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif - - #else // !FYSETC_MINI_12864 - - #if IS_ULTIPANEL - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN - - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif - - #endif - - #endif // !FYSETC_MINI_12864 + #endif #endif // !MKS_12864OLED_SSD1306 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 d49dedec1104..c8a427c47ec3 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -321,6 +321,12 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + + #define FORCE_SOFT_SPI // Use this if Hardware SPI causes display problems. + // Results in LCD Software SPI mode 3, SD Software SPI mode 0. #elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN @@ -373,50 +379,17 @@ #else // !HAS_SPI_TFT #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN - #if ENABLED(FYSETC_MINI_12864) - - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_04_PIN - #define DOGLCD_SCK EXP2_02_PIN - #define DOGLCD_MOSI EXP2_06_PIN - - #define LCD_BACKLIGHT_PIN -1 - - #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 - - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_06_PIN - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_07_PIN - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_08_PIN - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN + #if IS_ULTIPANEL + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif - - #else // !FYSETC_MINI_12864 - - #if IS_ULTIPANEL - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif - #endif - - #endif // !FYSETC_MINI_12864 + #endif #endif // !HAS_SPI_TFT diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_A.h b/Marlin/src/pins/mega/pins_GT2560_REV_A.h index 28905f361f7b..2d84c3b04014 100644 --- a/Marlin/src/pins/mega/pins_GT2560_REV_A.h +++ b/Marlin/src/pins/mega/pins_GT2560_REV_A.h @@ -145,36 +145,27 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + + // Disconnect EXP2-1 (MISO) and EXP2-2 (SCK), otherwise future firmware upload won't work. + #define LCD_CONTRAST_INIT 220 + #elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN #if IS_NEWPANEL - #if ENABLED(FYSETC_MINI_12864) - // Disconnect EXP2-1 and EXP2-2, otherwise future firmware upload won't work. - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_04_PIN - - #define NEOPIXEL_PIN EXP1_06_PIN - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN - - #define LCD_RESET_PIN EXP1_05_PIN - - #define LCD_CONTRAST_INIT 220 - - #define LCD_BACKLIGHT_PIN -1 - #else - #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_EN EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN - #endif + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN #define BTN_ENC EXP1_02_PIN #define SD_DETECT_PIN EXP2_07_PIN diff --git a/Marlin/src/pins/pins_lcd.h b/Marlin/src/pins/pins_lcd.h index 5454f892ab80..e4ecc853d456 100644 --- a/Marlin/src/pins/pins_lcd.h +++ b/Marlin/src/pins/pins_lcd.h @@ -43,6 +43,8 @@ #include "lcd/MINIPANEL.h" #elif ANY(ANET_FULL_GRAPHICS_LCD, CTC_A10S_A13) #include "lcd/ANET_FULL_GRAPHICS_LCD.h" + #elif ENABLED(FYSETC_MINI_12864) + #include "lcd/FYSETC_MINI_12864.h" #elif ENABLED(ULTI_CONTROLLER) #include "lcd/ULTI_CONTROLLER.h" #elif IS_RRD_FG_SC diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index 59c4c7988421..903597e86f97 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -237,8 +237,11 @@ // // LCD / Controller // +#if ENABLED(FYSETC_MINI_12864) -#if ENABLED(FYSETC_242_OLED_12864) + // Migrated to pins/lcd + +#elif ENABLED(FYSETC_242_OLED_12864) #define BTN_EN1 EXP1_01_PIN #define BTN_EN2 EXP1_08_PIN #define BTN_ENC EXP1_02_PIN @@ -257,35 +260,7 @@ #else #define BEEPER_PIN EXP1_01_PIN - #if ENABLED(FYSETC_MINI_12864) - // - // See https://wiki.fysetc.com/Mini12864_Panel/ - // - #define DOGLCD_A0 EXP1_04_PIN - #define DOGLCD_CS EXP1_03_PIN - - #if ENABLED(FYSETC_GENERIC_12864_1_1) - #define LCD_BACKLIGHT_PIN EXP1_07_PIN - #endif - - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - // Seems to work best if left open. - - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_06_PIN - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_07_PIN - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_08_PIN - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN - #endif - - #elif HAS_MARLINUI_U8GLIB || HAS_MARLINUI_HD44780 + #if HAS_MARLINUI_U8GLIB || HAS_MARLINUI_HD44780 #define LCD_PINS_RS EXP1_04_PIN #define LCD_PINS_EN EXP1_03_PIN diff --git a/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/src/pins/ramps/pins_RUMBA.h index 24cc2bada089..eda4998ff794 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA.h +++ b/Marlin/src/pins/ramps/pins_RUMBA.h @@ -189,8 +189,12 @@ // // LCD / Controller // +#if ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + +#elif ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) -#if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) #define LCD_PINS_DC 38 // Set as output on init #define LCD_PINS_RS 41 // Pull low for 1s to init // DOGM SPI LCD Support @@ -198,30 +202,6 @@ #define DOGLCD_MOSI 42 #define DOGLCD_SCK 18 #define DOGLCD_A0 LCD_PINS_DC -#elif ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS 42 - #define DOGLCD_A0 19 - #define DOGLCD_MOSI 51 - #define DOGLCD_SCK 52 - - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 - - #define LCD_RESET_PIN 18 // Must be high or open for LCD to operate normally. - - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN 41 - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN 38 - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN 40 - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN 38 - #endif #else #define LCD_PINS_RS 19 diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index a2c9ad052244..332bffa17cca 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -174,6 +174,12 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + + //#define FORCE_SOFT_SPI // Use this if Hardware SPI causes display problems. + // Results in LCD Software SPI mode 3, SD Software SPI mode 0. #elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN @@ -187,34 +193,6 @@ #if IS_NEWPANEL #define LCD_PINS_RS EXP1_07_PIN #define LCD_PINS_EN EXP1_08_PIN - #endif - - #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS EXP1_08_PIN - #define DOGLCD_A0 EXP1_07_PIN - #define DOGLCD_SCK EXP2_02_PIN - #define DOGLCD_MOSI EXP2_06_PIN - - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 - - #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. - - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_05_PIN - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_04_PIN - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_03_PIN - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_05_PIN - #endif - - #elif IS_NEWPANEL #define LCD_PINS_D4 EXP1_06_PIN #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_04_PIN diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index 299778683d9d..c57b1dd0767d 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -216,7 +216,13 @@ // // LCD / Controller // -#if IS_RRD_FG_SC +#if ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + + //#define FORCE_SOFT_SPI // Use this if Hardware SPI causes display problems. + // Results in LCD Software SPI mode 3, SD Software SPI mode 0. +#elif IS_RRD_FG_SC // Migrated to pins/lcd @@ -243,31 +249,6 @@ #define LCD_SDSS EXP2_04_PIN #define SD_DETECT_PIN EXP2_07_PIN - #elif ENABLED(FYSETC_MINI_12864) - - #define BEEPER_PIN EXP1_01_PIN - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_04_PIN - - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 - - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_06_PIN // D5 - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_07_PIN // D6 - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_08_PIN // D7 - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN // D5 - #endif - #elif ENABLED(SPARK_FULL_GRAPHICS) // https://sparklab-shop.de/elektronik/40/sparklcd-adapter diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index b3c0ae296c74..8a9ed3233c50 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -218,6 +218,12 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + + //#define FORCE_SOFT_SPI // Use this if Hardware SPI causes display problems. + // Results in LCD Software SPI mode 3, SD Software SPI mode 0. #elif HAS_WIRED_LCD #if ENABLED(RADDS_DISPLAY) @@ -237,31 +243,6 @@ #define LCD_SDSS EXP2_04_PIN #define SD_DETECT_PIN EXP2_07_PIN - #elif ENABLED(FYSETC_MINI_12864) - - #define BEEPER_PIN EXP1_01_PIN - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_04_PIN - - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 - - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_06_PIN // D5 - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_07_PIN // D6 - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_08_PIN // D7 - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN // D5 - #endif - #endif #if IS_NEWPANEL diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h index 3063522b113f..7766b0ee2bb1 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -207,6 +207,10 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + #elif IS_RRD_SC // Migrated to pins/lcd @@ -373,49 +377,6 @@ //#define SD_DETECT_PIN EXP2_10_PIN //#define KILL_PIN EXP1_01_PIN - #elif ENABLED(FYSETC_MINI_12864) - - // TO TEST - //#define BEEPER_PIN EXP1_06_PIN - //#define BTN_ENC EXP1_03_PIN - //#define SD_DETECT_PIN EXP2_10_PIN - - //#ifndef KILL_PIN - // #define KILL_PIN EXP1_01_PIN - //#endif - - // From https://wiki.fysetc.com/Mini12864_Panel/ - - // TO TEST - //#define DOGLCD_A0 16 - //#define DOGLCD_CS 17 - - //#define BTN_EN1 33 - //#define BTN_EN2 31 - - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 - - //#define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. - - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - // TO TEST - //#define RGB_LED_R_PIN 25 - #endif - #ifndef RGB_LED_G_PIN - // TO TEST - //#define RGB_LED_G_PIN 27 - #endif - #ifndef RGB_LED_B_PIN - // TO TEST - //#define RGB_LED_B_PIN 29 - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - // TO TEST - //#define NEOPIXEL_PIN 25 - #endif - #elif ENABLED(ZONESTAR_LCD) // TO TEST diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h index 3639ed243946..5749beea5b9c 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h @@ -263,6 +263,10 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + #elif IS_RRD_SC // Migrated to pins/lcd @@ -426,49 +430,6 @@ //#define SD_DETECT_PIN EXP2_10_PIN //#define KILL_PIN EXP1_01_PIN - #elif ENABLED(FYSETC_MINI_12864) - - // TO TEST - //#define BEEPER_PIN EXP1_06_PIN - //#define BTN_ENC EXP1_03_PIN - //#define SD_DETECT_PIN EXP2_10_PIN - - //#ifndef KILL_PIN - // #define KILL_PIN EXP1_01_PIN - //#endif - - // From https://wiki.fysetc.com/Mini12864_Panel/ - - // TO TEST - //#define DOGLCD_A0 16 - //#define DOGLCD_CS 17 - - //#define BTN_EN1 33 - //#define BTN_EN2 31 - - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 - - //#define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. - - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - // TO TEST - //#define RGB_LED_R_PIN 25 - #endif - #ifndef RGB_LED_G_PIN - // TO TEST - //#define RGB_LED_G_PIN 27 - #endif - #ifndef RGB_LED_B_PIN - // TO TEST - //#define RGB_LED_B_PIN 29 - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - // TO TEST - //#define NEOPIXEL_PIN 25 - #endif - #elif ENABLED(ZONESTAR_LCD) // TO TEST diff --git a/Marlin/src/pins/samd/pins_MINITRONICS20.h b/Marlin/src/pins/samd/pins_MINITRONICS20.h index 4c443e1e93a5..e0b84b04edd1 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -179,6 +179,10 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + #elif IS_RRD_SC // Migrated to pins/lcd @@ -321,40 +325,6 @@ //#define SD_DETECT_PIN EXP2_10_PIN //#define KILL_PIN EXP1_01_PIN - #elif ENABLED(FYSETC_MINI_12864) - - // From https://wiki.fysetc.com/Mini12864_Panel/ - - // TO TEST - //#define DOGLCD_A0 16 - //#define DOGLCD_CS 17 - - //#define BTN_EN1 33 - //#define BTN_EN2 31 - - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 - - //#define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. - - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - // TO TEST - //#define RGB_LED_R_PIN 25 - #endif - #ifndef RGB_LED_G_PIN - // TO TEST - //#define RGB_LED_G_PIN 27 - #endif - #ifndef RGB_LED_B_PIN - // TO TEST - //#define RGB_LED_B_PIN 29 - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - // TO TEST - //#define NEOPIXEL_PIN 25 - #endif - #elif ENABLED(ZONESTAR_LCD) // TO TEST diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index 09328d887a71..b4f3a5cdb641 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -454,6 +454,10 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + #elif IS_RRD_SC // Migrated to pins/lcd @@ -617,45 +621,6 @@ #endif #define KILL_PIN EXP2_08_PIN - #elif ENABLED(FYSETC_MINI_12864) - - #define BEEPER_PIN EXP1_01_PIN - #define BTN_ENC EXP1_02_PIN - #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN EXP2_07_PIN - #endif - - #ifndef KILL_PIN - #define KILL_PIN EXP2_08_PIN - #endif - - // From https://wiki.fysetc.com/Mini12864_Panel/ - - #define DOGLCD_A0 EXP1_04_PIN - #define DOGLCD_CS EXP1_03_PIN - - #define BTN_EN1 EXP2_05_PIN - #define BTN_EN2 EXP2_03_PIN - - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 - - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_06_PIN - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_07_PIN - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_08_PIN - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN - #endif - #elif ENABLED(ZONESTAR_LCD) #define ADC_KEYPAD_PIN 12 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index bef56d05c9a1..7302c1872469 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -205,6 +205,16 @@ // Migrated to pins/lcd #define FORCE_SOFT_SPI +#elif ENABLED(FYSETC_MINI_12864_2_1) + + // Migrated to pins/lcd + + CONTROLLER_WARNING("BTT_SKR_E3_DIP", "FYSETC_MINI_12864_2_1 and clones") + + #if SD_CONNECTION_IS(LCD) + #error "The LCD SD Card is not supported with this configuration." + #endif + #elif HAS_WIRED_LCD #if ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! @@ -219,69 +229,8 @@ #define LCD_PINS_D7 EXP1_01_PIN #define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! - #elif ENABLED(FYSETC_MINI_12864_2_1) - - CONTROLLER_WARNING("BTT_SKR_E3_DIP", "FYSETC_MINI_12864_2_1 and clones") - - #if SD_CONNECTION_IS(LCD) - #error "The LCD SD Card is not supported with this configuration." - #endif - - /** - * FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 display pinout - * - * Board Display - * ------ ------ - * (NEOPIXEL) PA15 | 1 2 | PB6 (BTN_ENC) 5V |10 9 | GND - * (BTN_EN2) PA9 | 3 4 | RESET -- | 8 7 | -- - * (BTN_EN1) PA10 5 6 | PB9 (LCD_RESET) NEOPIXEL | 6 5 LCD RESET - * (LCD_A0) PB8 | 7 8 | PB7 (LCD_CS) LCD_A0 | 4 3 | LCD_CS - * GND | 9 10 | 5V BTN_ENC | 2 1 | BEEP - * ------ ------ - * EXP1 EXP1 - * - * - * --- ------ - * | 1 | RST -- |10 9 | -- - * | 2 | PA3 RX2 RESET_BTN | 8 7 | SD_DETECT - * | 3 | PA2 TX2 LCD_MOSI | 6 5 EN2 - * | 4 | GND -- | 4 3 | EN1 - * | 5 | 5V LCD_SCK | 2 1 | -- - * --- ------ - * TFT EXP2 - - * - * Needs custom cable. - * - * BOARD EXP1 NEOPIXEL <--> LCD EXP1 NEOPIXEL - * BOARD EXP1 BTN_ENC <--> LCD EXP1 BTN_ENC - * BOARD EXP1 BTN_EN2 <--> LCD EXP2 EN2 - * BOARD EXP1 RESET <--> LCD EXP2 RESET_BTN - * BOARD EXP1 BTN_EN1 <--> LCD EXP2 EN1 - * BOARD EXP1 LCD_RESET <--> LCD EXP1 LCD RESET - * BOARD EXP1 LCD_A0 <--> LCD EXP1 LCD_A0 - * BOARD EXP1 LCD_CS <--> LCD EXP1 LCD_CS - * BOARD TFT RX2 <--> LCD EXP2 LCD_MOSI - * BOARD TFT TX2 <--> LCD EXP2 LCD_SCK - */ - - #define NEOPIXEL_PIN EXP1_01_PIN - #define BTN_ENC EXP1_02_PIN - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - #define LCD_RESET_PIN EXP1_06_PIN - #define BEEPER_PIN -1 - #define DOGLCD_A0 EXP1_07_PIN - #define DOGLCD_CS EXP1_08_PIN - - #define DOGLCD_SCK PA2 - #define DOGLCD_MOSI PA3 - - #define LCD_BACKLIGHT_PIN -1 - #define FORCE_SOFT_SPI - #else - #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1 and MKS_LCD12864A/B are currently supported on the BIGTREE_SKR_E3_DIP." + #error "The selected LCD / Controller is not currently supported for BIGTREE_SKR_E3_DIP." #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index 425b180d0f26..ee96f84db7bc 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -163,6 +163,12 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864_2_1) + + // Migrated to pins/lcd + + CONTROLLER_WARNING("BTT_SKR_MINI_E3_common", "FYSETC_MINI_12864_2_1 and clones") + #elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI CONTROLLER_WARNING("BTT_SKR_MINI_E3_common", "Ender-3 V2 display") @@ -267,70 +273,8 @@ #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - - CONTROLLER_WARNING("BTT_SKR_MINI_E3_common", "FYSETC_MINI_12864_2_1 and clones") - - /** - * FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 display pinout - * - * Board Display - * ------ ------ - * PB5 | 1 2 | PB6 or PA15 (BEEP) |10 9 | BTN_ENC - * PA9 | 3 4 | RESET LCD_CS | 8 7 | LCD A0 - * PA10 | 5 6 | PB9 LCD_RST | 6 5 | RED - * PB8 | 7 8 | PB7 or PB15 (GREEN) | 4 3 | (BLUE) - * GND | 9 10 | 5V GND | 2 1 | 5V - * ------ ------ - * EXP1 EXP1 - * - * --- ------ - * RST | 1 | (MISO) |10 9 | SCK - * (RX2) PA3 | 2 | BTN_EN1 | 8 7 | (SS) - * (TX2) PA2 | 3 | BTN_EN2 | 6 5 | MOSI - * GND | 4 | (CD) | 4 3 | (RST) - * 5V | 5 | GND | 2 1 | (KILL) - * --- ------ - * TFT EXP2 - * - * Needs custom cable: - * - * Board Display - * - * EXP1-10 ---------- EXP1-1 5V - * EXP1-9 ----------- EXP1-2 GND - * EXP1-8 ----------- EXP2-6 EN2 - * EXP1-7 ----------- EXP1-5 RED - * EXP1-6 ----------- EXP2-8 EN1 - * EXP1-5 ----------- n/c - * EXP1-4 ----------- EXP1-6 RESET - * EXP1-3 ----------- EXP1-8 LCD_CS - * EXP1-2 ----------- EXP1-9 ENC - * EXP1-1 ----------- EXP1-7 LCD_A0 - * - * TFT-2 ----------- EXP2-5 MOSI - * TFT-3 ----------- EXP2-9 SCK - * - * for backlight configuration see steps 2 (V2.1) and 3 in https://wiki.fysetc.com/Mini12864_Panel/ - */ - - #define LCD_BACKLIGHT_PIN -1 - #define NEOPIXEL_PIN EXP1_07_PIN - #define LCD_CONTRAST_INIT 255 - - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_01_PIN - #define DOGLCD_SCK PA2 - #define DOGLCD_MOSI PA3 - - #define BTN_ENC EXP1_02_PIN - #define BTN_EN1 EXP1_06_PIN - #define BTN_EN2 EXP1_08_PIN - - #define FORCE_SOFT_SPI - #else - #error "Only CR10_STOCKDISPLAY, LCD_FOR_MELZI, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, TFTGLCD_PANEL_(SPI|I2C), FYSETC_MINI_12864_2_1, MKS_MINI_12864_V3, and BTT_MINI_12864 are currently supported on the BIGTREE_SKR_MINI_E3." + #error "The selected LCD / Controller is not currently supported for BIGTREE_SKR_MINI_E3." #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index 1bc7bb7b8b1e..bdb6a94cae7d 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -146,6 +146,10 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + #elif ANY(TFT_COLOR_UI, TFT_CLASSIC_UI) #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN @@ -194,57 +198,22 @@ #else - #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_EN EXP1_03_PIN - - #if ENABLED(FYSETC_MINI_12864) - - #define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN EXP1_05_PIN - #define DOGLCD_A0 EXP1_04_PIN - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_SCK EXP2_02_PIN - #define DOGLCD_MOSI EXP2_06_PIN - - #define FORCE_SOFT_SPI // SPI MODE3 - - #define LED_PIN EXP1_06_PIN // red pwm - //#define LED_PIN EXP1_07_PIN // green - //#define LED_PIN EXP1_08_PIN // blue - - //#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - // #ifndef RGB_LED_R_PIN - // #define RGB_LED_R_PIN EXP1_06_PIN - // #endif - // #ifndef RGB_LED_G_PIN - // #define RGB_LED_G_PIN EXP1_07_PIN - // #endif - // #ifndef RGB_LED_B_PIN - // #define RGB_LED_B_PIN EXP1_08_PIN - // #endif - //#elif ENABLED(FYSETC_MINI_12864_2_1) - // #define NEOPIXEL_PIN EXP1_06_PIN - //#endif - - #else // !FYSETC_MINI_12864 - - #define LCD_PINS_D4 EXP1_05_PIN - #if IS_ULTIPANEL - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN - - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + + #if IS_ULTIPANEL + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif - - #endif // !FYSETC_MINI_12864 + #endif // Alter timing for graphical display #if IS_U8GLIB_ST7920 diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index bb9662b282bf..f3d95137863f 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -236,66 +236,28 @@ #define BEEPER_PIN -1 #endif -#elif ANY(HAS_DWIN_E3V2, IS_DWIN_MARLINUI, DWIN_VET6_CREALITY_LCD) - - // Serial controller with click encoder - - #define BTN_ENC EXP3_05_PIN - #define BTN_EN1 EXP3_08_PIN - #define BTN_EN2 EXP3_07_PIN - - #ifndef BEEPER_PIN - #define BEEPER_PIN EXP3_06_PIN - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) + // Migrated to pins/lcd + #define ADAPTER_CUSTOM_CREALITY_V4_DEBUG_HEADER + CONTROLLER_WARNING("CREALITY_V4", "FYSETC_MINI_12864_2_1 and clones") #if SD_CONNECTION_IS(LCD) #error "The LCD SD Card is not connected with this configuration." #endif - /** - * - * Board (RET6 12864 LCD) Display - * ------ ------ - * (EN1) PC6 | 1 2 | PB2 (BTN_ENC) 5V |10 9 | GND - * (LCD_CS) PB10 | 3 4 | PB11 (LCD RESET) -- | 8 7 | -- - * (LCD_A0) PB14 5 6 | PB13 (EN2) (DIN) | 6 5 (LCD RESET) - * (LCD_SCK)PB12 | 7 8 | PB15 (MOSI) (LCD_A0) | 4 3 | (LCD_CS) - * GND | 9 10 | 5V (BTN_ENC) | 2 1 | -- - * ------ ------ - * EXP1 EXP1 - * - * ------ - * ----- -- |10 9 | -- - * | 1 | VCC (RESET) | 8 7 | -- - * | 2 | PA13 (DIN) (MOSI) | 6 5 (EN2) - * | 3 | PA14 -- | 4 3 | (EN1) - * | 4 | GND (LCD_SCK)| 2 1 | -- - * ----- ------ - * Debug port EXP2 - * - * Needs custom cable. Connect EN2-EN2, LCD_CS-LCD_CS and so on. - * Debug port is just above EXP1. You need to add pins. - * - */ +#elif ANY(HAS_DWIN_E3V2, IS_DWIN_MARLINUI, DWIN_VET6_CREALITY_LCD) - #define BTN_ENC EXP3_02_PIN - #define BTN_EN1 EXP3_01_PIN - #define BTN_EN2 EXP3_06_PIN - #define BEEPER_PIN -1 + // Serial controller with click encoder - #define DOGLCD_CS EXP3_03_PIN - #define DOGLCD_A0 EXP3_05_PIN - #define DOGLCD_SCK EXP3_07_PIN - #define DOGLCD_MOSI EXP3_08_PIN - #define LCD_RESET_PIN EXP3_04_PIN + #define BTN_ENC EXP3_05_PIN + #define BTN_EN1 EXP3_08_PIN + #define BTN_EN2 EXP3_07_PIN - #define FORCE_SOFT_SPI - #define LCD_BACKLIGHT_PIN -1 - #define NEOPIXEL_PIN PA13 + #ifndef BEEPER_PIN + #define BEEPER_PIN EXP3_06_PIN + #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 27fb26db1d72..9922d9eb6f47 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -319,10 +319,18 @@ #define LCD_USE_DMA_SPI -#elif ENABLED(MKS_MINI_12864) // For MKS LCD12864A the RPK2 resistor must be removed +#elif ENABLED(MKS_MINI_12864) // For MKS LCD12864A the RPK2 resistor must be removed // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864_2_1) + + // Migrated to pins/lcd + + #if SD_CONNECTION_IS(ONBOARD) + #define FORCE_SOFT_SPI + #endif + #elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN @@ -347,21 +355,7 @@ #define BEEPER_PIN -1 #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define LCD_PINS_DC EXP1_04_PIN - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 DOGLCD_A0 - #define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN EXP1_05_PIN - #define NEOPIXEL_PIN EXP1_06_PIN - #define DOGLCD_MOSI EXP2_06_PIN - #define DOGLCD_SCK EXP2_02_PIN - #if SD_CONNECTION_IS(ONBOARD) - #define FORCE_SOFT_SPI - #endif - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - - #else // !FYSETC_MINI_12864_2_1 + #else // !IS_TFTGLCD_PANEL #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL @@ -379,7 +373,7 @@ #define BOARD_ST7920_DELAY_2 125 #define BOARD_ST7920_DELAY_3 125 - #endif // !FYSETC_MINI_12864_2_1 + #endif // !IS_TFTGLCD_PANEL #endif // HAS_WIRED_LCD && !HAS_SPI_TFT diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index b10af9679cea..1c8f7f6549db 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -193,6 +193,11 @@ // For MKS LCD12864A the RPK2 resistor must be removed +#elif ENABLED(FYSETC_MINI_12864_2_1) + + // Migrated to pins/lcd + #define FORCE_SOFT_SPI + #elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN @@ -202,35 +207,15 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #elif ENABLED(FYSETC_MINI_12864_2_1) - - #define LCD_PINS_DC EXP1_04_PIN - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 LCD_PINS_DC - #define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN EXP1_05_PIN - #define NEOPIXEL_PIN EXP1_06_PIN - #define DOGLCD_MOSI EXP2_06_PIN - #define DOGLCD_SCK EXP2_02_PIN - #define FORCE_SOFT_SPI - #define SOFTWARE_SPI - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - - #else // !FYSETC_MINI_12864_2_1 - - #define LCD_PINS_D4 EXP1_05_PIN - #if IS_ULTIPANEL - #define LCD_PINS_D5 EXP1_06_PIN - #define LCD_PINS_D6 EXP1_07_PIN - #define LCD_PINS_D7 EXP1_08_PIN - - #if !defined(BTN_ENC_EN) && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif - + #define LCD_PINS_D4 EXP1_05_PIN + #if IS_ULTIPANEL + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + #if !defined(BTN_ENC_EN) && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif - - #endif // !FYSETC_MINI_12864_2_1 + #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index a5f85c0c71c2..20e1ba4a4558 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -347,10 +347,18 @@ #define LCD_USE_DMA_SPI -#elif ENABLED(MKS_MINI_12864) // For MKS LCD12864A the RPK2 resistor must be removed +#elif ENABLED(MKS_MINI_12864) // For MKS LCD12864A the RPK2 resistor must be removed // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864_2_1) + + // Migrated to pins/lcd + + #if SD_CONNECTION_IS(ONBOARD) + #define FORCE_SOFT_SPI + #endif + #elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN @@ -375,21 +383,7 @@ #define BEEPER_PIN -1 #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define LCD_PINS_DC EXP1_04_PIN - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 DOGLCD_A0 - #define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN EXP1_05_PIN - #define NEOPIXEL_PIN EXP1_06_PIN - #define DOGLCD_MOSI EXP2_06_PIN - #define DOGLCD_SCK EXP2_02_PIN - #if SD_CONNECTION_IS(ONBOARD) - #define FORCE_SOFT_SPI - #endif - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - - #else // !FYSETC_MINI_12864_2_1 + #else #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL @@ -409,7 +403,7 @@ #define BOARD_ST7920_DELAY_3 125 #endif - #endif // !FYSETC_MINI_12864_2_1 + #endif #endif // HAS_WIRED_LCD && !HAS_SPI_TFT diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h index 42c7b99c9e51..c98b2b5309c1 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h @@ -218,6 +218,13 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + + #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + // results in LCD soft SPI mode 3, SD soft SPI mode 0 + #elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) @@ -236,30 +243,6 @@ #define LCD_PINS_RS EXP1_04_PIN #define LCD_PINS_D4 EXP1_05_PIN - #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_04_PIN - //#define LCD_BACKLIGHT_PIN -1 - - #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 - - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_06_PIN - #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_07_PIN - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_08_PIN - #endif - #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN - #endif - #endif // !FYSETC_MINI_12864 - #if IS_ULTIPANEL #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h index cdf1e925374c..69f94074d155 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h @@ -220,7 +220,7 @@ #elif HAS_WIRED_LCD - #if ENABLED(SKR_MINI_SCREEN_ADAPTER) + #if ENABLED(ADAPTER_SKR_MINI_SCREEN) /** https://github.com/VoronDesign/Voron-Hardware/tree/master/SKR-Mini_Screen_Adaptor/SRK%20Mini%20E3%20V3.0 * * SKR Mini E3 V3.0 SKR Mini Screen Adaptor @@ -257,7 +257,7 @@ #define LCD_BACKLIGHT_PIN -1 #define NEOPIXEL_PIN EXP1_02_PIN #else - #error "Only FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 are currently supported on the BIGTREE_SKR_MINI_E3 with SKR_MINI_SCREEN_ADAPTER." + #error "Only FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 are currently supported on the BIGTREE_SKR_MINI_E3 with ADAPTER_SKR_MINI_SCREEN." #endif #else @@ -361,7 +361,7 @@ #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BIGTREE_SKR_MINI_E3." #endif - #endif // SKR_MINI_SCREEN_ADAPTER + #endif // ADAPTER_SKR_MINI_SCREEN #endif // HAS_WIRED_LCD From 1157c1711a519099d800e26148ea1c0df5e1bd31 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 14 Dec 2023 14:47:00 -0600 Subject: [PATCH 12/12] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Migrate=20REPRAPWORL?= =?UTF-8?q?D=5FGRAPHICAL=5FLCD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pins/lcd/REPRAPWORLD_GRAPHICAL_LCD.h | 47 +++++++++++++++++++ Marlin/src/pins/pins_lcd.h | 2 + .../src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h | 31 ++++++------ Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h | 31 ++++++------ Marlin/src/pins/samd/pins_MINITRONICS20.h | 24 +++++----- Marlin/src/pins/samd/pins_RAMPS_144.h | 35 +++++++------- Marlin/src/pins/stm32f1/pins_CHITU3D.h | 27 ++++++----- Marlin/src/pins/stm32f1/pins_STM3R_MINI.h | 10 ++-- 8 files changed, 129 insertions(+), 78 deletions(-) create mode 100644 Marlin/src/pins/lcd/REPRAPWORLD_GRAPHICAL_LCD.h diff --git a/Marlin/src/pins/lcd/REPRAPWORLD_GRAPHICAL_LCD.h b/Marlin/src/pins/lcd/REPRAPWORLD_GRAPHICAL_LCD.h new file mode 100644 index 000000000000..f5f435ad7402 --- /dev/null +++ b/Marlin/src/pins/lcd/REPRAPWORLD_GRAPHICAL_LCD.h @@ -0,0 +1,47 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * pins/lcd/REPRAPWORLD_GRAPHICAL_LCD.h + */ + +/** + * https://reprapworld.com/electronics/autonomous-printing/smart-controller-graphical-lcd-12864-lcd/ + * + * RRW GLCD Headers UT 2 4 6 PWR - + + * 1 3 5 + * + * AUX1 1 2 MTICSP 2 4 6 8 10 SDOUT 2 4 6 8 + * 3 4 1 3 5 7 9 1 3 5 7 + * 5 6 + * 7 8 + * KEYPAD 2 4 6 8 10 SPI 2 4 6 8 + * 1 3 5 7 9 1 3 5 7 + */ + +// DOGLCD IS_U8GLIB_ST7920 IS_ULTIPANEL HAS_WIRED_LCD IS_NEWPANEL HAS_MARLINUI_MENU + +// REPRAPWORLD_GRAPHICAL_LCD connects to AUX2 and AUX3 on RAMPS. Other boards vary. +#ifndef LCD_PINS_EN + #error "REPRAPWORLD_GRAPHICAL_LCD connection is not defined for your MOTHERBOARD." +#endif diff --git a/Marlin/src/pins/pins_lcd.h b/Marlin/src/pins/pins_lcd.h index e4ecc853d456..25341d4de559 100644 --- a/Marlin/src/pins/pins_lcd.h +++ b/Marlin/src/pins/pins_lcd.h @@ -47,6 +47,8 @@ #include "lcd/FYSETC_MINI_12864.h" #elif ENABLED(ULTI_CONTROLLER) #include "lcd/ULTI_CONTROLLER.h" + #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + #include "lcd/REPRAPWORLD_GRAPHICAL_LCD.h" #elif IS_RRD_FG_SC #include "lcd/RRD_FG_SC.h" #elif IS_RRD_SC diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h index 7766b0ee2bb1..59a4286b9851 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -211,6 +211,20 @@ // Migrated to pins/lcd +#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + + // TODO: Define an adapter + + //#define BTN_ENC 55 + //#define BTN_EN1 56 // Mega/Due:64 - AGCM4:56 + //#define BTN_EN2 72 // Mega/Due:59 - AGCM4:72 + + //#define LCD_PINS_RS EXP2_10_PIN // CS + //#define LCD_PINS_EN EXP2_06_PIN // MOSI + //#define LCD_PINS_D4 EXP2_02_PIN // SCK + + //#define SD_DETECT_PIN EXP2_05_PIN + #elif IS_RRD_SC // Migrated to pins/lcd @@ -240,13 +254,6 @@ #define NO_SPEAKER #endif - #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - - // TO TEST - //#define LCD_PINS_RS EXP2_10_PIN // CS chip select /SS chip slave select - //#define LCD_PINS_EN EXP2_06_PIN // SID (MOSI) - //#define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock - #elif ALL(IS_NEWPANEL, PANEL_ONE) // TO TEST @@ -314,15 +321,7 @@ // #if IS_NEWPANEL - #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - - // TO TEST - //#define BTN_EN1 56 // Mega/Due:64 - AGCM4:56 - //#define BTN_EN2 72 // Mega/Due:59 - AGCM4:72 - //#define BTN_ENC 55 - //#define SD_DETECT_PIN EXP2_05_PIN - - #elif ENABLED(LCD_I2C_PANELOLU2) + #if ENABLED(LCD_I2C_PANELOLU2) // TO TEST //#define BTN_EN1 47 diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h index 5749beea5b9c..b69b306f42f5 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h @@ -267,6 +267,20 @@ // Migrated to pins/lcd +#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + + // TODO: Define an adapter + + //#define BTN_ENC 55 + //#define BTN_EN1 56 // Mega/Due:64 - AGCM4:56 + //#define BTN_EN2 72 // Mega/Due:59 - AGCM4:72 + + //#define LCD_PINS_RS EXP2_10_PIN // CS + //#define LCD_PINS_EN EXP2_06_PIN // MOSI + //#define LCD_PINS_D4 EXP2_02_PIN // SCK + + //#define SD_DETECT_PIN EXP2_05_PIN + #elif IS_RRD_SC // Migrated to pins/lcd @@ -293,13 +307,6 @@ #define NO_SPEAKER #endif - #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - - // TO TEST - //#define LCD_PINS_RS EXP2_10_PIN // CS chip select /SS chip slave select - //#define LCD_PINS_EN EXP2_06_PIN // SID (MOSI) - //#define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock - #elif ALL(IS_NEWPANEL, PANEL_ONE) // TO TEST @@ -367,15 +374,7 @@ // #if IS_NEWPANEL - #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - - // TO TEST - //#define BTN_EN1 56 // Mega/Due:64 - AGCM4:56 - //#define BTN_EN2 72 // Mega/Due:59 - AGCM4:72 - //#define BTN_ENC 55 - //#define SD_DETECT_PIN EXP2_05_PIN - - #elif ENABLED(LCD_I2C_PANELOLU2) + #if ENABLED(LCD_I2C_PANELOLU2) // TO TEST //#define BTN_EN1 47 diff --git a/Marlin/src/pins/samd/pins_MINITRONICS20.h b/Marlin/src/pins/samd/pins_MINITRONICS20.h index e0b84b04edd1..2f8211225278 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -183,6 +183,18 @@ // Migrated to pins/lcd +#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + + // TODO: Define an adapter + + #define BTN_ENC 23 + #define BTN_EN1 27 + #define BTN_EN2 33 + + #define LCD_PINS_RS 18 // CS + #define LCD_PINS_EN MOSI // MOSI + #define LCD_PINS_D4 SCK // SCK + #elif IS_RRD_SC // Migrated to pins/lcd @@ -193,17 +205,7 @@ // LCD Display output pins // - #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - - #define LCD_PINS_RS 18 // CS chip select /SS chip slave select - #define LCD_PINS_EN MOSI // SID (MOSI) - #define LCD_PINS_D4 SCK // SCK (CLK) clock - - #define BTN_ENC 23 - #define BTN_EN1 27 - #define BTN_EN2 33 - - #elif ALL(IS_NEWPANEL, PANEL_ONE) + #if ALL(IS_NEWPANEL, PANEL_ONE) // TO TEST //#define LCD_PINS_RS EXP1_02_PIN diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index b4f3a5cdb641..25d468500efa 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -458,6 +458,22 @@ // Migrated to pins/lcd +#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + + // TODO: Define an adapter + + #define BTN_ENC AUX2_04 + #define BTN_EN1 AUX2_05 + #define BTN_EN2 AUX2_03 + + #define LCD_PINS_RS EXP2_07_PIN // CS + #define LCD_PINS_EN EXP2_06_PIN // MOSI + #define LCD_PINS_D4 EXP2_02_PIN // SCK + + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN AUX2_08 + #endif + #elif IS_RRD_SC // Migrated to pins/lcd @@ -473,13 +489,7 @@ // // LCD Display output pins // - #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - - #define LCD_PINS_RS EXP2_07_PIN // CS chip select /SS chip slave select - #define LCD_PINS_EN EXP2_06_PIN // SID (MOSI) - #define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock - - #elif ALL(IS_NEWPANEL, PANEL_ONE) + #if ALL(IS_NEWPANEL, PANEL_ONE) #define LCD_PINS_RS AUX2_06 #define LCD_PINS_EN AUX2_08 @@ -555,16 +565,7 @@ // #if IS_NEWPANEL - #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - - #define BTN_EN1 AUX2_05 - #define BTN_EN2 AUX2_03 - #define BTN_ENC AUX2_04 - #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN AUX2_08 - #endif - - #elif ENABLED(LCD_I2C_PANELOLU2) + #if ENABLED(LCD_I2C_PANELOLU2) #define BTN_EN1 AUX4_04 #define BTN_EN2 AUX4_06 diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D.h b/Marlin/src/pins/stm32f1/pins_CHITU3D.h index bdc609c7b580..42f8d1d9076f 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D.h @@ -98,13 +98,21 @@ // // LCD Pins // -#if HAS_WIRED_LCD +#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define LCD_PINS_RS PD1 // 49 // CS chip select /SS chip slave select - #define LCD_PINS_EN PD3 // 51 // SID (MOSI) - #define LCD_PINS_D4 PD4 // 52 // SCK (CLK) clock - #elif ALL(IS_NEWPANEL, PANEL_ONE) + #define BTN_ENC PD15 + #define BTN_EN1 PE0 + #define BTN_EN2 PD11 + + #define LCD_PINS_RS PD1 // CS + #define LCD_PINS_EN PD3 // MOSI + #define LCD_PINS_D4 PD4 // SCK + + #define SD_DETECT_PIN PC10 + +#elif HAS_WIRED_LCD + + #if ALL(IS_NEWPANEL, PANEL_ONE) #define LCD_PINS_RS PB8 #define LCD_PINS_EN PD2 #define LCD_PINS_D4 PB12 @@ -146,13 +154,6 @@ #define LCD_BACKLIGHT_PIN PC7 // 39 #endif - #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - - #define BTN_EN1 PE0 // 64 - #define BTN_EN2 PD11 // 59 - #define BTN_ENC PD15 // 63 - #define SD_DETECT_PIN PC10 // 42 - #elif ENABLED(LCD_I2C_PANELOLU2) #define BTN_EN1 PC15 // 47 diff --git a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h index e5b16460f010..7fd6394fde38 100644 --- a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h @@ -110,10 +110,12 @@ // // LCD Pins // -#if HAS_WIRED_LCD +#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + + // TODO: Define an adapter + +#elif HAS_WIRED_LCD - #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #error "REPRAPWORLD_GRAPHICAL_LCD is not supported." #else #define LCD_PINS_RS PB8 #define LCD_PINS_EN PD2 @@ -138,8 +140,6 @@ #if IS_RRD_SC #error "RRD Smart Controller is not supported." - #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #error "REPRAPWORLD_GRAPHICAL_LCD is not supported." #elif ENABLED(LCD_I2C_PANELOLU2) #error "LCD_I2C_PANELOLU2 is not supported." #elif ENABLED(LCD_I2C_VIKI)