From e6a1b1f1b33d0c519f3e356e4fbd076aeb643b85 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 13 Dec 2023 19:27:37 -0600 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Migrate=20FYSETC=5FMINI=5F?= =?UTF-8?q?12864=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 | 120 +++++++++ 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 +-- .../src/pins/stm32f4/pins_FYSETC_S6_common.h | 29 +-- .../pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h | 31 +-- .../pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 6 +- 26 files changed, 552 insertions(+), 751 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 52a10dd0011a..b841cf1f10af 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -171,9 +171,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 @@ -181,22 +193,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..02b78e6c9d9d --- /dev/null +++ b/Marlin/src/pins/lcd/FYSETC_MINI_12864.h @@ -0,0 +1,120 @@ +/** + * 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 + * See https://wiki.fysetc.com/Mini12864_Panel + */ + +/** + * 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 6ee56ae8ebc2..0dc13c0b2dbb 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -312,6 +312,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 @@ -364,50 +370,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 856a027b8e11..ee03aaa5052a 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -186,6 +186,10 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + #elif IS_RRD_SC // Migrated to pins/lcd @@ -328,40 +332,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 77049dcc4303..bafe1025e2dd 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -430,6 +430,10 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd + #elif IS_RRD_SC // Migrated to pins/lcd @@ -593,45 +597,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 552453f5dbc2..49937437799f 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -198,6 +198,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! @@ -212,69 +222,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 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 0b9a51a3ea7a..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 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 495b682c1550..c76012335292 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 @@ -139,6 +139,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 @@ -187,57 +191,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 b831090b7989..67fdf6babd16 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -256,66 +256,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 240687e55085..52bf14dd930d 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -322,10 +322,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 @@ -350,21 +358,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 @@ -382,7 +376,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 8c65bb6ba17a..68ea7f3f25d0 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -186,6 +186,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 @@ -195,35 +200,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 8661db85e52f..4a9627cb05a2 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -343,10 +343,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 @@ -371,21 +379,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 @@ -405,7 +399,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/stm32f4/pins_FYSETC_S6_common.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6_common.h index a3027a27416b..e65cf9909f1a 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6_common.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6_common.h @@ -186,7 +186,7 @@ #define SD_MOSI_PIN EXP2_06_PIN #define SDSS EXP2_04_PIN -#define SD_DETECT_PIN EXP2_07_PIN +#define SD_DETECT_PIN EXP2_07_PIN // LCD // // LCD / Controller @@ -195,6 +195,10 @@ // Migrated to pins/lcd +#elif ENABLED(FYSETC_MINI_12864) + + // Migrated to pins/lcd... + #elif ENABLED(FYSETC_242_OLED_12864) #define BTN_EN1 EXP1_01_PIN @@ -229,29 +233,6 @@ #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 - #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 - #endif - #endif - #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_MANTA_M4P_V2_1.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h index 11dbcd959c5b..08847b2cdc11 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 @@ -211,6 +211,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) @@ -229,30 +236,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 f9b369d72734..a964d4ec7b7a 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 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 SKR Mini E3." #endif - #endif // SKR_MINI_SCREEN_ADAPTER + #endif // ADAPTER_SKR_MINI_SCREEN #endif // HAS_WIRED_LCD