diff --git a/Marlin/src/HAL/AVR/fastio/fastio_1280.h b/Marlin/src/HAL/AVR/fastio/fastio_1280.h index e6ecbabb800fb..6f074cf91124f 100644 --- a/Marlin/src/HAL/AVR/fastio/fastio_1280.h +++ b/Marlin/src/HAL/AVR/fastio/fastio_1280.h @@ -27,6 +27,7 @@ * Hardware Pin : 02 03 06 07 01 05 15 16 17 18 23 24 25 26 64 63 13 12 46 45 44 43 78 77 76 75 74 73 72 71 60 59 58 57 56 55 54 53 50 70 52 51 42 41 40 39 38 37 36 35 22 21 20 19 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 | 04 08 09 10 11 14 27 28 29 30 31 32 33 34 47 48 49 61 62 65 66 67 68 69 79 80 81 98 99 100 * Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx * Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx + * Analog Input : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 * * Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA * AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index bfef46c9459b0..55fcac417e8ac 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -375,7 +375,22 @@ // LCDs and Controllers // ////////////////////////// -#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI) +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + + #define EXP1_01_PIN 37 + #define EXP1_02_PIN 35 + #define EXP1_03_PIN 17 + #define EXP1_05_PIN 23 + #define EXP1_06_PIN 25 + #define EXP1_07_PIN 27 + #define EXP1_08_PIN 29 + + #define SD_DETECT_PIN 49 + #define KILL_PIN 41 + +#elif ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI) #define TFT_A0_PIN 43 #define TFT_CS_PIN 49 @@ -486,60 +501,37 @@ #define LCD_PINS_D6 44 #define LCD_PINS_D7 64 - #else - - #if ENABLED(CR10_STOCKDISPLAY) + #elif ENABLED(ZONESTAR_LCD) - #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 29 - #define LCD_PINS_D4 25 + #define LCD_PINS_RS 64 + #define LCD_PINS_ENABLE 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 37 - #endif - - #elif ENABLED(ZONESTAR_LCD) - - #define LCD_PINS_RS 64 - #define LCD_PINS_ENABLE 44 - #define LCD_PINS_D4 63 - #define LCD_PINS_D5 40 - #define LCD_PINS_D6 42 - #define LCD_PINS_D7 65 + #else + #if EITHER(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 EITHER(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_ENABLE 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_ENABLE 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 - // Buttons attached to a shift register - // Not wired yet - //#define SHIFT_CLK_PIN 38 - //#define SHIFT_LD_PIN 42 - //#define SHIFT_OUT_PIN 40 - //#define SHIFT_EN_PIN 17 + #define BEEPER_PIN 33 #endif #endif @@ -553,15 +545,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 49 #define KILL_PIN 41 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 aafc8d3f9fe5c..6cf32e7dd5e41 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -217,7 +217,11 @@ #define EXP2_07_PIN P1_31 #define EXP2_08_PIN -1 -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif HAS_WIRED_LCD #if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING) #error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING only applies to the ANET 1.0 board." @@ -291,17 +295,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_ENABLE 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 b4fafbf7a4ce8..cfe2fb61ded01 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -273,7 +273,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.h + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI // RET6 DWIN ENCODER LCD #define BTN_ENC EXP1_05_PIN @@ -357,16 +361,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_ENABLE 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 155d53c7803f0..1858eed37a026 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -276,21 +276,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.h - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN +#elif HAS_WIRED_LCD - #define LCD_PINS_ENABLE 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_A0_PIN EXP1_08_PIN #define TFT_DC_PIN EXP1_08_PIN diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index b9edef8678db3..67418f1bbd653 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -290,14 +290,13 @@ #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 + // 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 P2_11 // J3-3 & AUX-4 - #define BTN_EN1 P0_16 // J3-7 & AUX-4 - #define BTN_EN2 P1_23 // J3-5 & 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) diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h index 9dfb80772fb25..5899cb0f503ae 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h @@ -108,7 +108,6 @@ // // Display // - #if EITHER(VIKI2, miniVIKI) #define BEEPER_PIN P1_31 #define DOGLCD_A0 P2_06 diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index 2d96194db58c8..77e22fb92c072 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -33,7 +33,7 @@ #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Azteeg X5 MINI" #endif -#define BOARD_WEBSITE_URL "tiny.cc/x5_mini" +#define BOARD_WEBSITE_URL "panucatt.com" // // LED @@ -56,11 +56,11 @@ #define Z_STOP_PIN P1_28 #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN P2_04 + #define FIL_RUNOUT_PIN _EXP1_09 #endif #ifndef FILWIDTH_PIN - #define FILWIDTH_PIN P0_25_A2 // Analog Input (P0_25) + #define FILWIDTH_PIN _EXP1_04 // Analog Input (P0_25) #endif // @@ -109,84 +109,114 @@ #endif #define FAN1_PIN P1_25 +// +// Headers V1.1 - V3.0 +// +//#define _EXP1_01 -1 // GND +#define _EXP1_02 P1_03 +//#define _EXP1_03 -1 // 3.3V +#define _EXP1_04 P0_25_A2 +#define _EXP1_05 P0_27 // SDA0 +#define _EXP1_06 P4_29 +#define _EXP1_07 P0_28 // SCL0 +#define _EXP1_08 P2_08 +#define _EXP1_09 P2_04 +#define _EXP1_10 P1_22 + +#define _EXP2_01 P1_31 +#define _EXP2_02 P3_26 +#define _EXP2_03 P2_11 +#define _EXP2_04 P3_25 +#define _EXP2_05 P1_23 +#define _EXP2_06 P0_17 +#define _EXP2_07 P0_16 +#define _EXP2_08 P2_06 +#define _EXP2_09 P0_15 +#define _EXP2_10 P0_18 + +// +// Only V2.0 +// +//#define _J7_01 -1 // 3.3V +//#define _J7_02 -1 // GND +#define _J7_03 P1_16 +#define _J7_04 P1_17 +#define _J7_05 P1_15 +#define _J7_06 P0_14 +#define _J7_07 P1_09 +#define _J7_08 P1_10 +#define _J7_09 P1_08 +#define _J7_10 P1_04 +#define _J7_11 P1_00 +#define _J7_12 P1_01 + // // 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 P2_11 // J3-3 & AUX-4 +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + #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_ENABLE _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 P0_16 // J3-7 & AUX-4 - #define BTN_EN2 P1_23 // J3-5 & AUX-4 - #define BTN_ENC P3_25 // J3-4 & AUX-4 + #if EITHER(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 P0_15 // J3-9 & AUX-4 (CS) - #define LCD_PINS_ENABLE P0_18 // J3-10 & AUX-3 (SID, MOSI) - #define LCD_PINS_D4 P2_06 // J3-8 & AUX-3 (SCK, CLK) + #define STAT_LED_BLUE_PIN P0_26 + #define STAT_LED_RED_PIN P1_21 #else - - #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4 - #define BTN_EN2 P3_25 // (33) J3-4 & AUX-4 - #define BTN_ENC P2_11 // (35) J3-3 & AUX-4 - - #define SD_DETECT_PIN P1_31 // (49) not 5V tolerant J3-1 & AUX-3 - #define KILL_PIN P1_22 // (41) J5-4 & AUX-4 - #define LCD_PINS_RS P0_16 // (16) J3-7 & AUX-4 - #define LCD_SDSS P0_16 // (16) J3-7 & AUX-4 - #define LCD_BACKLIGHT_PIN P0_16 // (16) J3-7 & AUX-4 - only used on DOGLCD controllers - #define LCD_PINS_ENABLE P0_18 // (51) (MOSI) J3-10 & AUX-3 - #define LCD_PINS_D4 P0_15 // (52) (SCK) J3-9 & AUX-3 - - #define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2 - - #if IS_RRW_KEYPAD - #define SHIFT_OUT_PIN P0_18 // (51) (MOSI) J3-10 & AUX-3 - #define SHIFT_CLK_PIN P0_15 // (52) (SCK) J3-9 & AUX-3 - #define SHIFT_LD_PIN P1_31 // (49) not 5V tolerant J3-1 & AUX-3 - #elif !IS_NEWPANEL - //#define SHIFT_OUT_PIN P2_11 // (35) J3-3 & AUX-4 - //#define SHIFT_CLK_PIN P3_26 // (31) J3-2 & AUX-4 - //#define SHIFT_LD_PIN P3_25 // (33) J3-4 & AUX-4 - //#define SHIFT_EN_PIN P1_22 // (41) J5-4 & AUX-4 + #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 EITHER(VIKI2, miniVIKI) - #define BEEPER_PIN P1_30 // (37) may change if cable changes - #define DOGLCD_CS P0_26 // (63) J5-3 & AUX-2 - #define DOGLCD_SCK SD_SCK_PIN - #define DOGLCD_MOSI SD_MOSI_PIN - - #define STAT_LED_BLUE_PIN P0_26 // (63) may change if cable changes - #define STAT_LED_RED_PIN P1_21 // ( 6) may change if cable changes - - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - #else - #if IS_ULTIPANEL - #define LCD_PINS_D5 P1_17 // (71) ENET_MDIO - #define LCD_PINS_D6 P1_14 // (73) ENET_RX_ER - #define LCD_PINS_D7 P1_10 // (75) ENET_RXD1 - #endif - #define BEEPER_PIN P1_30 // (37) not 5V tolerant - #define DOGLCD_CS P0_16 // (16) - - #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 ENABLED(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 @@ -199,10 +229,10 @@ #endif #if SD_CONNECTION_IS(LCD) - #define SD_SCK_PIN P0_15 - #define SD_MISO_PIN P0_17 - #define SD_MOSI_PIN P0_18 - #define SD_SS_PIN P1_23 + #define SD_SCK_PIN _EXP2_09 + #define SD_MISO_PIN _EXP2_06 + #define SD_MOSI_PIN _EXP2_10 + #define SD_SS_PIN _EXP2_05 #elif SD_CONNECTION_IS(ONBOARD) #undef SD_DETECT_PIN #define SD_SCK_PIN P0_07 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 f8187babd3c13..f634d545805cd 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -205,7 +205,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.h + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! Ender-3 V2 display requires a custom cable with TX = P0_15, RX = P0_16. See 'pins_BTT_SKR_E3_TURBO.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif @@ -228,18 +232,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_ENABLE 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! #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING 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 f49aae0c45f34..4b902e6a978b0 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -304,125 +304,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.h - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_ENABLE 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_ENABLE -1 - #define LCD_PINS_RS -1 + // Disable any LCD related PINs config + #define LCD_PINS_ENABLE -1 + #define LCD_PINS_RS -1 - #ifndef TFT_BUFFER_SIZE - #define TFT_BUFFER_SIZE 1200 - #endif - #ifndef TFT_QUEUE_SIZE - #define TFT_QUEUE_SIZE 6144 - #endif + #ifndef TFT_BUFFER_SIZE + #define TFT_BUFFER_SIZE 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_ENABLE EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_ENABLE 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 EITHER(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 EITHER(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 8ad3cd28214e3..6afa6881f29f2 100644 --- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -175,18 +175,9 @@ #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_ENABLE EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN + + // Migrated to pins_lcd.h + #define KILL_PIN EXP1_04_PIN #elif ENABLED(MKS_MINI_12864) @@ -214,7 +205,7 @@ #endif -#if EITHER(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/pins.h b/Marlin/src/pins/pins.h index 124c940422c84..c9db3236fdb32 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -940,6 +940,11 @@ #endif +// +// LCD / Controller Pins based on EXP ports +// +#include "pins_lcd.h" + // // Post-process pins according to configured settings // diff --git a/Marlin/src/pins/pins_lcd.h b/Marlin/src/pins/pins_lcd.h new file mode 100644 index 0000000000000..03850cb2e66d6 --- /dev/null +++ b/Marlin/src/pins/pins_lcd.h @@ -0,0 +1,75 @@ +/** + * 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.h - Define LCD pins based on the EXP connector / adapter + */ + +#ifdef LCD_PINS_DEFINED + + // Allow a pins file to override all LCD pins + +#elif ENABLED(CR10_STOCKDISPLAY) && !defined(LCD_PINS_RS) + /** ------ + * BEEPER | 1 2 | ENC + * EN1 | 3 4 | (RESET/KILL) + * EN2 5 6 | LCD_D4 + * LCD_RS | 7 8 | LCD_EN + * GND | 9 10 | 5V + * ------ + */ + #ifdef LCD_ON_EXP3 + + #ifndef BEEPER_PIN + #define BEEPER_PIN EXP3_01_PIN + #endif + + #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_ENABLE EXP3_08_PIN + + #else + + #ifndef BEEPER_PIN + #define BEEPER_PIN EXP1_01_PIN + #endif + + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN + + #define LCD_PINS_D4 EXP1_06_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + + #endif + +#else + + // More displays to come + +#endif diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index be1af14bb18d1..190e3c7c3e7aa 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -207,28 +207,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_ENABLE 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_ENABLE 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.h + + #elif IS_ULTIPANEL || TOUCH_UI_ULTIPANEL + + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_ENABLE 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 315a17ee03006..8e7fb30154ec3 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -167,6 +167,36 @@ #define E_MUX2_PIN 78 // 84 in MK2 Firmware, with BEEPER as 78 #endif +// +// EXP Headers +// +#define EXP1_01_PIN 84 // PH2 +#define EXP1_02_PIN 9 // PH6 +#define EXP1_03_PIN 18 // TX1 +#define EXP1_04_PIN 82 // PD5 +#define EXP1_05_PIN 19 // RX1 +#define EXP1_06_PIN 70 // PG4 +#define EXP1_07_PIN 85 // PH7 +#define EXP1_08_PIN 71 // PG3 + +#define EXP2_01_PIN 50 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 72 // PJ2 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 14 // TX3 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 15 // RX3 +#define EXP2_08_PIN -1 // RESET + +#define EXP3_01_PIN 62 // PK0 (A8) +#define EXP3_02_PIN 76 // PJ5 +#define EXP3_03_PIN 20 // SDA +#define EXP3_04_PIN -1 // GND +#define EXP3_05_PIN 21 // SCL +#define EXP3_06_PIN 16 // RX2 +#define EXP3_07_PIN -1 // GND +#define EXP3_08_PIN 17 // TX2 + // // LCD / Controller // @@ -174,29 +204,26 @@ #define KILL_PIN 32 - #if ANY(IS_ULTIPANEL, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE) - - #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS 85 - #define LCD_PINS_ENABLE 71 - #define LCD_PINS_D4 70 - #define BTN_EN1 18 - #define BTN_EN2 19 - #else - #define LCD_PINS_RS 82 - #define LCD_PINS_ENABLE 18 // On 0.6b, use 61 - #define LCD_PINS_D4 19 // On 0.6b, use 59 - #define LCD_PINS_D5 70 - #define LCD_PINS_D6 85 - #define LCD_PINS_D7 71 - #define BTN_EN1 14 - #define BTN_EN2 72 - #endif + #if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + + #elif ANY(IS_ULTIPANEL, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE) + + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_ENABLE 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 + #define BTN_ENC EXP1_02_PIN // AUX-2 - #define BTN_ENC 9 // AUX-2 - #define BEEPER_PIN 84 // AUX-4 + #define BEEPER_PIN EXP1_01_PIN // AUX-4 - #define SD_DETECT_PIN 15 + #define SD_DETECT_PIN EXP2_07_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder diff --git a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h index d9759153c334d..b8ecac093b104 100644 --- a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h +++ b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h @@ -128,28 +128,29 @@ // ------------------ ---------------- --------------- ------------- #if BOTH(CR10_STOCKDISPLAY, LONGER_LK5) - /** CR-10 Stock Display - * ------ - * GND | 9 10 | 5V - * LCD_PINS_RS D5 | 7 8 | D4 LCD_PINS_ENABLE - * BTN_EN2 D19 | 5 6 D6 LCD_PINS_D4 - * BTN_EN1 D18 | 3 4 | GND - * BEEPER_PIN D11 | 1 2 | D15 BTN_ENC - * ------ + /** CR-10 Stock Display + * ------ + * BEEPER D11 | 1 2 | D15 ENC + * EN1 D18 | 3 4 | GND + * EN2 D19 5 6 | D6 LCD_D4 + * LCD_RS D5 | 7 8 | D4 LCD_ENABLE + * GND | 9 10 | 5V + * ------ * Connected via provided custom cable to: * Aux-1, J21, J17 and Y-Max. */ - #define LCD_PINS_RS 5 - #define LCD_PINS_ENABLE 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.h + + #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 58b9b786487ea..82d74886cb354 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -142,18 +142,18 @@ // // Steppers // -#define X_STEP_PIN 54 -#define X_DIR_PIN 55 +#define X_STEP_PIN 54 // (A0) +#define X_DIR_PIN 55 // (A1) #define X_ENABLE_PIN 38 #ifndef X_CS_PIN - #define X_CS_PIN 53 + #define X_CS_PIN AUX3_06 #endif #define Y_STEP_PIN 60 #define Y_DIR_PIN 61 -#define Y_ENABLE_PIN 56 +#define Y_ENABLE_PIN 56 // (A2) #ifndef Y_CS_PIN - #define Y_CS_PIN 49 + #define Y_CS_PIN AUX3_02 #endif #ifndef Z_STEP_PIN @@ -166,7 +166,7 @@ #define Z_ENABLE_PIN 62 #endif #ifndef Z_CS_PIN - #define Z_CS_PIN 40 + #define Z_CS_PIN AUX2_06 #endif #ifndef E0_STEP_PIN @@ -179,7 +179,7 @@ #define E0_ENABLE_PIN 24 #endif #ifndef E0_CS_PIN - #define E0_CS_PIN 42 + #define E0_CS_PIN AUX2_08 #endif #ifndef E1_STEP_PIN @@ -192,7 +192,7 @@ #define E1_ENABLE_PIN 30 #endif #ifndef E1_CS_PIN - #define E1_CS_PIN 44 + #define E1_CS_PIN AUX2_07 #endif // @@ -212,7 +212,7 @@ // SPI for MAX Thermocouple // #ifndef TEMP_0_CS_PIN - #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN AUX2_09 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN) #endif // @@ -273,12 +273,12 @@ // Misc. Functions // #ifndef SDSS - #define SDSS AUX3_06_PIN + #define SDSS AUX3_06 #endif #define LED_PIN 13 #ifndef FILWIDTH_PIN - #define FILWIDTH_PIN 5 // Analog Input on AUX2 + #define FILWIDTH_PIN 5 // (A5) Analog Input AUX2_03 #endif // RAMPS 1.4 DIO 4 on the servos connector @@ -294,7 +294,7 @@ #if NUM_SERVOS <= 1 // Prefer the servo connector #define CASE_LIGHT_PIN 6 // Hardware PWM #elif HAS_FREE_AUX2_PINS - #define CASE_LIGHT_PIN 44 // Hardware PWM + #define CASE_LIGHT_PIN AUX2_07 // Hardware PWM #endif #endif @@ -309,9 +309,9 @@ #endif #define SPINDLE_DIR_PIN 5 #elif HAS_FREE_AUX2_PINS - #define SPINDLE_LASER_ENA_PIN 40 // Pullup or pulldown! - #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM - #define SPINDLE_DIR_PIN 65 + #define SPINDLE_LASER_ENA_PIN AUX2_06 // Pullup or pulldown! + #define SPINDLE_LASER_PWM_PIN AUX2_07 // Hardware PWM + #define SPINDLE_DIR_PIN AUX2_10 #else #error "No auto-assignable Spindle/Laser pins available." #endif @@ -321,13 +321,13 @@ // TMC software SPI // #ifndef TMC_SPI_MOSI - #define TMC_SPI_MOSI 66 + #define TMC_SPI_MOSI AUX2_09 #endif #ifndef TMC_SPI_MISO - #define TMC_SPI_MISO 44 + #define TMC_SPI_MISO AUX2_07 #endif #ifndef TMC_SPI_SCK - #define TMC_SPI_SCK 64 + #define TMC_SPI_SCK AUX2_05 #endif #if HAS_TMC_UART @@ -353,10 +353,10 @@ //#define E4_HARDWARE_SERIAL Serial1 #ifndef X_SERIAL_TX_PIN - #define X_SERIAL_TX_PIN 40 + #define X_SERIAL_TX_PIN AUX2_06 #endif #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN 63 + #define X_SERIAL_RX_PIN AUX2_04 #endif #ifndef X2_SERIAL_TX_PIN #define X2_SERIAL_TX_PIN -1 @@ -366,10 +366,10 @@ #endif #ifndef Y_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN 59 + #define Y_SERIAL_TX_PIN AUX2_03 #endif #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN 64 + #define Y_SERIAL_RX_PIN AUX2_05 #endif #ifndef Y2_SERIAL_TX_PIN #define Y2_SERIAL_TX_PIN -1 @@ -379,10 +379,10 @@ #endif #ifndef Z_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN 42 + #define Z_SERIAL_TX_PIN AUX2_08 #endif #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN 65 + #define Z_SERIAL_RX_PIN AUX2_10 #endif #ifndef Z2_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN -1 @@ -392,10 +392,10 @@ #endif #ifndef E0_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN 44 + #define E0_SERIAL_TX_PIN AUX2_07 #endif #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN 66 + #define E0_SERIAL_RX_PIN AUX2_09 #endif #ifndef E1_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN -1 @@ -446,13 +446,13 @@ // #if HAS_PRUSA_MMU1 #ifndef E_MUX0_PIN - #define E_MUX0_PIN 40 // Z_CS_PIN + #define E_MUX0_PIN AUX2_06 // Z_CS_PIN #endif #ifndef E_MUX1_PIN - #define E_MUX1_PIN 42 // E0_CS_PIN + #define E_MUX1_PIN AUX2_08 // E0_CS_PIN #endif #ifndef E_MUX2_PIN - #define E_MUX2_PIN 44 // E1_CS_PIN + #define E_MUX2_PIN AUX2_07 // E1_CS_PIN #endif #endif @@ -462,10 +462,10 @@ // 1 3 5 7 // 5V GND A3 A4 // -#define AUX1_05_PIN 57 // (A3) -#define AUX1_06_PIN 2 -#define AUX1_07_PIN 58 // (A4) -#define AUX1_08_PIN 1 +#define AUX1_05 57 // (A3) +#define AUX1_06 2 +#define AUX1_07 58 // (A4) +#define AUX1_08 1 // // AUX2 GND A9 D40 D42 A11 @@ -473,14 +473,14 @@ // 1 3 5 7 9 // VCC A5 A10 D44 A12 // -#define AUX2_03_PIN 59 // (A5) -#define AUX2_04_PIN 63 // (A9) -#define AUX2_05_PIN 64 // (A10) -#define AUX2_06_PIN 40 -#define AUX2_07_PIN 44 -#define AUX2_08_PIN 42 -#define AUX2_09_PIN 66 // (A12) -#define AUX2_10_PIN 65 // (A11) +#define AUX2_03 59 // (A5) +#define AUX2_04 63 // (A9) +#define AUX2_05 64 // (A10) +#define AUX2_06 40 +#define AUX2_07 44 +#define AUX2_08 42 +#define AUX2_09 66 // (A12) +#define AUX2_10 65 // (A11) // // AUX3 GND D52 D50 5V @@ -488,31 +488,31 @@ // 8 6 4 2 // NC D53 D51 D49 // -#define AUX3_02_PIN 49 -#define AUX3_03_PIN 50 -#define AUX3_04_PIN 51 -#define AUX3_05_PIN 52 -#define AUX3_06_PIN 53 +#define AUX3_02 49 +#define AUX3_03 50 +#define AUX3_04 51 +#define AUX3_05 52 +#define AUX3_06 53 // // AUX4 5V GND D32 D47 D45 D43 D41 D39 D37 D35 D33 D31 D29 D27 D25 D23 D17 D16 // -#define AUX4_03_PIN 32 -#define AUX4_04_PIN 47 -#define AUX4_05_PIN 45 -#define AUX4_06_PIN 43 -#define AUX4_07_PIN 41 -#define AUX4_08_PIN 39 -#define AUX4_09_PIN 37 -#define AUX4_10_PIN 35 -#define AUX4_11_PIN 33 -#define AUX4_12_PIN 31 -#define AUX4_13_PIN 29 -#define AUX4_14_PIN 27 -#define AUX4_15_PIN 25 -#define AUX4_16_PIN 23 -#define AUX4_17_PIN 17 -#define AUX4_18_PIN 16 +#define AUX4_03 32 +#define AUX4_04 47 +#define AUX4_05 45 +#define AUX4_06 43 +#define AUX4_07 41 +#define AUX4_08 39 +#define AUX4_09 37 +#define AUX4_10 35 +#define AUX4_11 33 +#define AUX4_12 31 +#define AUX4_13 29 +#define AUX4_14 27 +#define AUX4_15 25 +#define AUX4_16 23 +#define AUX4_17 17 +#define AUX4_18 16 /** * LCD adapters come in different variants. The socket keys can be @@ -520,18 +520,18 @@ */ #ifndef EXP1_08_PIN - #define EXP1_03_PIN AUX4_17_PIN - #define EXP1_04_PIN AUX4_18_PIN - #define EXP1_05_PIN AUX4_16_PIN - #define EXP1_06_PIN AUX4_15_PIN - #define EXP1_07_PIN AUX4_14_PIN - #define EXP1_08_PIN AUX4_13_PIN + #define EXP1_03_PIN AUX4_17 + #define EXP1_04_PIN AUX4_18 + #define EXP1_05_PIN AUX4_16 + #define EXP1_06_PIN AUX4_15 + #define EXP1_07_PIN AUX4_14 + #define EXP1_08_PIN AUX4_13 - #define EXP2_01_PIN AUX3_03_PIN - #define EXP2_02_PIN AUX3_05_PIN - #define EXP2_04_PIN AUX3_06_PIN - #define EXP2_06_PIN AUX3_04_PIN - #define EXP2_07_PIN AUX3_02_PIN + #define EXP2_01_PIN AUX3_03 + #define EXP2_02_PIN AUX3_05 + #define EXP2_04_PIN AUX3_06 + #define EXP2_06_PIN AUX3_04 + #define EXP2_07_PIN AUX3_02 #if ENABLED(G3D_PANEL) /** Gadgets3D Smart Adapter @@ -544,12 +544,12 @@ * ------ ------ * EXP1 EXP2 */ - #define EXP1_01_PIN AUX4_11_PIN - #define EXP1_02_PIN AUX4_12_PIN + #define EXP1_01_PIN AUX4_11 + #define EXP1_02_PIN AUX4_12 - #define EXP2_03_PIN AUX4_10_PIN - #define EXP2_05_PIN AUX4_09_PIN - #define EXP2_08_PIN AUX4_07_PIN + #define EXP2_03_PIN AUX4_10 + #define EXP2_05_PIN AUX4_09 + #define EXP2_08_PIN AUX4_07 #else @@ -563,17 +563,17 @@ * ------ ------ * EXP1 EXP2 */ - #define EXP1_01_PIN AUX4_09_PIN - #define EXP1_02_PIN AUX4_10_PIN + #define EXP1_01_PIN AUX4_09 + #define EXP1_02_PIN AUX4_10 #if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) - #define EXP2_03_PIN AUX4_11_PIN - #define EXP2_05_PIN AUX4_12_PIN + #define EXP2_03_PIN AUX4_11 + #define EXP2_05_PIN AUX4_12 #define EXP2_08_PIN -1 // RESET #else - #define EXP2_03_PIN AUX4_12_PIN - #define EXP2_05_PIN AUX4_11_PIN - #define EXP2_08_PIN AUX4_07_PIN + #define EXP2_03_PIN AUX4_12 + #define EXP2_05_PIN AUX4_11 + #define EXP2_08_PIN AUX4_07 #endif #endif @@ -584,7 +584,11 @@ // LCDs and Controllers // ////////////////////////// -#if HAS_WIRED_LCD && DISABLED(LCD_PINS_DEFINED) +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif HAS_WIRED_LCD && DISABLED(LCD_PINS_DEFINED) //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 @@ -599,12 +603,12 @@ #elif BOTH(IS_NEWPANEL, PANEL_ONE) - #define LCD_PINS_RS AUX2_06_PIN - #define LCD_PINS_ENABLE AUX2_08_PIN - #define LCD_PINS_D4 AUX2_10_PIN - #define LCD_PINS_D5 AUX2_09_PIN - #define LCD_PINS_D6 AUX2_07_PIN - #define LCD_PINS_D7 AUX2_05_PIN + #define LCD_PINS_RS AUX2_06 + #define LCD_PINS_ENABLE AUX2_08 + #define LCD_PINS_D4 AUX2_10 + #define LCD_PINS_D5 AUX2_09 + #define LCD_PINS_D6 AUX2_07 + #define LCD_PINS_D7 AUX2_05 #elif ENABLED(TFTGLCD_PANEL_SPI) @@ -612,28 +616,18 @@ #else - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE 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) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! ZONESTAR_LCD on RAMPS requires wiring modifications. It plugs into AUX2 but GND and 5V need to be swapped. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif - #define LCD_PINS_RS AUX2_05_PIN - #define LCD_PINS_ENABLE AUX2_07_PIN - #define LCD_PINS_D4 AUX2_04_PIN - #define LCD_PINS_D5 AUX2_06_PIN - #define LCD_PINS_D6 AUX2_08_PIN - #define LCD_PINS_D7 AUX2_10_PIN + #define LCD_PINS_RS AUX2_05 + #define LCD_PINS_ENABLE AUX2_07 + #define LCD_PINS_D4 AUX2_04 + #define LCD_PINS_D5 AUX2_06 + #define LCD_PINS_D6 AUX2_08 + #define LCD_PINS_D7 AUX2_10 #elif ENABLED(AZSMZ_12864) @@ -669,8 +663,8 @@ // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK_PIN 38 - //#define SHIFT_LD_PIN AUX2_08_PIN - //#define SHIFT_OUT_PIN AUX2_06_PIN + //#define SHIFT_LD_PIN AUX2_08 + //#define SHIFT_OUT_PIN AUX2_06 //#define SHIFT_EN_PIN EXP1_03_PIN #endif @@ -689,15 +683,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 @@ -706,30 +695,30 @@ #endif #if ENABLED(BQ_LCD_SMART_CONTROLLER) - #define LCD_BACKLIGHT_PIN AUX4_08_PIN + #define LCD_BACKLIGHT_PIN AUX4_08 #endif #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define BTN_EN1 AUX2_05_PIN - #define BTN_EN2 AUX2_03_PIN - #define BTN_ENC AUX2_04_PIN + #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_PIN + #define SD_DETECT_PIN AUX2_08 #endif #elif ENABLED(LCD_I2C_PANELOLU2) - #define BTN_EN1 AUX4_04_PIN - #define BTN_EN2 AUX4_06_PIN - #define BTN_ENC AUX4_03_PIN + #define BTN_EN1 AUX4_04 + #define BTN_EN2 AUX4_06 + #define BTN_ENC AUX4_03 #define LCD_SDSS SDSS #define KILL_PIN EXP2_08_PIN #elif ENABLED(LCD_I2C_VIKI) - #define BTN_EN1 AUX2_06_PIN // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains AUX2-06 and AUX2-08. - #define BTN_EN2 AUX2_08_PIN + #define BTN_EN1 AUX2_06 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains AUX2-06 and AUX2-08. + #define BTN_EN2 AUX2_08 #define BTN_ENC -1 #define LCD_SDSS SDSS @@ -739,17 +728,17 @@ #elif EITHER(VIKI2, miniVIKI) - #define DOGLCD_CS AUX4_05_PIN - #define DOGLCD_A0 AUX2_07_PIN + #define DOGLCD_CS AUX4_05 + #define DOGLCD_A0 AUX2_07 #define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 #define BEEPER_PIN EXP2_05_PIN - #define STAT_LED_RED_PIN AUX4_03_PIN + #define STAT_LED_RED_PIN AUX4_03 #define STAT_LED_BLUE_PIN EXP1_02_PIN #define BTN_EN1 22 #define BTN_EN2 7 - #define BTN_ENC AUX4_08_PIN + #define BTN_ENC AUX4_08 #ifndef SD_DETECT_PIN #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board @@ -830,20 +819,20 @@ #elif ENABLED(MINIPANEL) - #define BEEPER_PIN AUX2_08_PIN - #define LCD_BACKLIGHT_PIN AUX2_10_PIN + #define BEEPER_PIN AUX2_08 + #define LCD_BACKLIGHT_PIN AUX2_10 - #define DOGLCD_A0 AUX2_07_PIN - #define DOGLCD_CS AUX2_09_PIN + #define DOGLCD_A0 AUX2_07 + #define DOGLCD_CS AUX2_09 - #define BTN_EN1 AUX2_06_PIN - #define BTN_EN2 AUX2_04_PIN - #define BTN_ENC AUX2_03_PIN + #define BTN_EN1 AUX2_06 + #define BTN_EN2 AUX2_04 + #define BTN_ENC AUX2_03 #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN AUX3_02_PIN + #define SD_DETECT_PIN AUX3_02 #endif - #define KILL_PIN AUX2_05_PIN + #define KILL_PIN AUX2_05 #elif ENABLED(ZONESTAR_LCD) @@ -877,9 +866,9 @@ #define BEEPER_PIN EXP2_05_PIN #if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2 - #define BTN_EN1 AUX2_03_PIN - #define BTN_EN2 AUX2_04_PIN - #define BTN_ENC AUX3_02_PIN + #define BTN_EN1 AUX2_03 + #define BTN_EN2 AUX2_04 + #define BTN_ENC AUX3_02 #else #define BTN_EN1 EXP1_01_PIN #define BTN_EN2 EXP1_02_PIN @@ -892,17 +881,17 @@ #endif // HAS_WIRED_LCD && !LCD_PINS_DEFINED #if IS_RRW_KEYPAD && !HAS_ADC_BUTTONS - #define SHIFT_OUT_PIN AUX2_06_PIN - #define SHIFT_CLK_PIN AUX2_07_PIN - #define SHIFT_LD_PIN AUX2_08_PIN + #define SHIFT_OUT_PIN AUX2_06 + #define SHIFT_CLK_PIN AUX2_07 + #define SHIFT_LD_PIN AUX2_08 #ifndef BTN_EN1 - #define BTN_EN1 AUX2_05_PIN + #define BTN_EN1 AUX2_05 #endif #ifndef BTN_EN2 - #define BTN_EN2 AUX2_03_PIN + #define BTN_EN2 AUX2_03 #endif #ifndef BTN_ENC - #define BTN_ENC AUX2_04_PIN + #define BTN_ENC AUX2_04 #endif #endif diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index 5150ad55b637c..2a93940edc279 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -268,7 +268,21 @@ // LCDs and Controllers // ////////////////////////// -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + + #define EXP1_01_PIN 37 + #define EXP1_02_PIN 35 + #define EXP1_03_PIN 17 + #define EXP1_05_PIN 23 + #define EXP1_06_PIN 25 + #define EXP1_07_PIN 27 + #define EXP1_08_PIN 29 + + //#define KILL_PIN 41 + +#elif HAS_WIRED_LCD // // LCD Display output pins @@ -300,43 +314,27 @@ #else - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 29 - #define LCD_PINS_D4 25 - - #if !IS_NEWPANEL - #define BEEPER_PIN 37 - #endif - + #if EITHER(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 EITHER(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_ENABLE 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_ENABLE 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 @@ -360,15 +358,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 49 //#define KILL_PIN 41 diff --git a/Marlin/src/pins/sam/pins_RAMPS_DUO.h b/Marlin/src/pins/sam/pins_RAMPS_DUO.h index 5b2b2f0b66151..04a4b69ae1597 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_DUO.h +++ b/Marlin/src/pins/sam/pins_RAMPS_DUO.h @@ -45,21 +45,16 @@ #define BOARD_INFO_NAME "RAMPS Duo" -#define ALLOW_SAM3X8E -#include "../ramps/pins_RAMPS.h" - // // Temperature Sensors // -#undef TEMP_0_PIN #define TEMP_0_PIN 9 // Analog Input - -#undef TEMP_1_PIN #define TEMP_1_PIN 11 // Analog Input - -#undef TEMP_BED_PIN #define TEMP_BED_PIN 10 // Analog Input +#define ALLOW_SAM3X8E +#include "../ramps/pins_RAMPS.h" + // SPI for MAX Thermocouple #undef TEMP_0_CS_PIN #if DISABLED(SDSUPPORT) diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index 75d758439c57c..d512ad8413e47 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -164,13 +164,19 @@ // // LCD / Controller // -#if HAS_WIRED_LCD - // ramps-fd lcd adaptor +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif HAS_WIRED_LCD + // RAMPS-FD LCD adapter #define BEEPER_PIN EXP1_01_PIN - #define BTN_EN1 EXP2_05_PIN - #define BTN_EN2 EXP2_03_PIN + #define BTN_ENC EXP1_02_PIN + #define BTN_EN2 EXP2_03_PIN + #define BTN_EN1 EXP2_05_PIN + #define SD_DETECT_PIN EXP2_07_PIN #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 662cccacfcb7d..d0e1f7aaca34e 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -130,25 +130,25 @@ * 5B | . . | 5V * ------ * - *- Special mapping of EXP1 to EXP3 to work with Ender displays. + *- Special mapping of EXP1 to work with Ender displays. * - * Enable CR10_STOCKDISPLAY in Configuration.h and connect EXP1 to the display EXP3 with this mapping. * ------ - * VCC | 1 2 | GND - * LCDDE | 3 4 | LCDRS - * LCDD4 | 5 6 BTN_EN2 - * RESET | 7 8 | BTN_EN1 - * BTN_ENCODER | 9 10 | BEEPER + * BEEPER | 1 2 | ENC + * EN1 | 3 4 | RESET + * EN2 5 6 | LCD_D4 + * LCD_RS | 7 8 | LCD_EN + * GND | 9 10 | 5V * ------ + * EXP1 * *- Digital pinout reference of the Bricolemon for advanced users/configurations. * * ------ ------ - * VCC | 1 2 | GND D49 | 1 2 | GND - * D39 | 3 4 | D38 RST | 3 4 | D44 - * D37 | 5 6 D36 D51 | 5 6 D42 - * D34 | 7 8 | D35 D53 | 7 8 | D43 - * D40 | 9 10 | D41 D52 | 9 10 | D50 + * D41 | 1 2 | D40 D50 | 1 2 | D52 + * D35 | 3 4 | D34 D43 | 3 4 | D53 + * D36 5 6 | D37 D42 5 6 | D51 + * D38 | 7 8 | D39 D44 | 7 8 | RST + * GND | 9 10 | VCC GND | 9 10 | D49 * ------ ------ * EXP1 EXP2 * @@ -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.h + +#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_ENABLE 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 b70db129a7a35..2f58276d8d4fe 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h @@ -182,25 +182,25 @@ * 5B | . . | 5V * ------ * - *- Special mapping of EXP1 to EXP3 to work with Ender displays. + *- Special mapping of EXP1 to work with Ender displays. * - * Enable CR10_STOCKDISPLAY in Configuration.h and connect EXP1 to the display EXP3 with this mapping. * ------ - * VCC | 1 2 | GND - * LCDDE | 3 4 | LCDRS - * LCDD4 | 5 6 BTN_EN2 - * RESET | 7 8 | BTN_EN1 - * BTN_ENCODER | 9 10 | BEEPER + * BEEPER | 1 2 | ENC + * EN1 | 3 4 | RESET + * EN2 5 6 | LCD_D4 + * LCD_RS | 7 8 | LCD_EN + * GND | 9 10 | 5V * ------ + * EXP1 * *- Digital pinout reference of the Bricolemon for advanced users/configurations. * * ------ ------ - * VCC | 1 2 | GND D49 | 1 2 | GND - * D39 | 3 4 | D38 RST | 3 4 | D44 - * D37 | 5 6 D36 D51 | 5 6 D42 - * D34 | 7 8 | D35 D53 | 7 8 | D43 - * D40 | 9 10 | D41 D52 | 9 10 | D50 + * D41 | 1 2 | D40 D50 | 1 2 | D52 + * D35 | 3 4 | D34 D43 | 3 4 | D53 + * D36 5 6 | D37 D42 5 6 | D51 + * D38 | 7 8 | D39 D44 | 7 8 | RST + * GND | 9 10 | VCC GND | 9 10 | D49 * ------ ------ * EXP1 EXP2 * @@ -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.h + +#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_ENABLE 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 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 #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 d2a2a27d7ce80..91e5042dfd653 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -155,21 +155,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 - -/************************************/ -/***** Configurations Section ******/ -/************************************/ - /** * This sections 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. @@ -181,7 +166,11 @@ * - Any Reprap character display like */ -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif HAS_WIRED_LCD // // LCD Display output pins @@ -209,19 +198,7 @@ #else - #if ENABLED(CR10_STOCKDISPLAY) - - // TO TEST - //#define LCD_PINS_RS EXP3_04_PIN - //#define LCD_PINS_ENABLE 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 @@ -280,17 +257,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 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 #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 ed10c4d284de5..3f2331076ef82 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -260,79 +260,204 @@ #define SDSS 53 #endif +// +// AUX1 5V GND D2 D1 +// 2 4 6 8 +// 1 3 5 7 +// 5V GND A3 A4 +// +#define AUX1_05 57 // (A3) +#define AUX1_06 2 +#define AUX1_07 58 // (A4) +#define AUX1_08 1 + +// +// AUX2 GND A9 D40 D42 A11 +// 2 4 6 8 10 +// 1 3 5 7 9 +// VCC A5 A10 D44 A12 +// +#define AUX2_03 59 // (A5) +#define AUX2_04 63 // (A9) +#define AUX2_05 64 // (A10) +#define AUX2_06 40 +#define AUX2_07 44 +#define AUX2_08 42 +#define AUX2_09 66 // (A12) +#define AUX2_10 65 // (A11) + +// +// AUX3 GND D52 D50 5V +// 7 5 3 1 +// 8 6 4 2 +// NC D53 D51 D49 +// +#define AUX3_02 49 +#define AUX3_03 50 +#define AUX3_04 51 +#define AUX3_05 52 +#define AUX3_06 53 + +// +// AUX4 5V GND D32 D47 D45 D43 D41 D39 D37 D35 D33 D31 D29 D27 D25 D23 D17 D16 +// +#define AUX4_03 32 +#define AUX4_04 47 +#define AUX4_05 45 +#define AUX4_06 43 +#define AUX4_07 41 +#define AUX4_08 39 +#define AUX4_09 37 +#define AUX4_10 35 +#define AUX4_11 33 +#define AUX4_12 31 +#define AUX4_13 29 +#define AUX4_14 27 +#define AUX4_15 25 +#define AUX4_16 23 +#define AUX4_17 17 +#define AUX4_18 16 + +/** + * LCD adapters come in different variants. + */ +#ifndef EXP1_08_PIN + + #define EXP1_03_PIN AUX4_17 + #define EXP1_04_PIN AUX4_18 + #define EXP1_05_PIN AUX4_16 + #define EXP1_06_PIN AUX4_15 + #define EXP1_07_PIN AUX4_14 + #define EXP1_08_PIN AUX4_13 + + #define EXP2_01_PIN AUX3_03 + #define EXP2_02_PIN AUX3_05 + #define EXP2_04_PIN AUX3_06 + #define EXP2_06_PIN AUX3_04 + #define EXP2_07_PIN AUX3_02 + + #if ENABLED(G3D_PANEL) + /** Gadgets3D Smart Adapter + * ------ ------ + * 4-11 | 1 2 | 4-12 (MISO) 3-03 | 1 2 | 3-05 (SCK) + * 4-17 | 3 4 | 4-18 4-10 | 3 4 | 3-06 + * 4-16 5 6 | 4-15 4-09 5 6 | 3-04 (MOSI) + * 4-14 | 7 8 | 4-13 3-02 | 7 8 | 4-07 + * (GND) 4-02 | 9 10 | 4-01 (5V) -- | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ + #define EXP1_01_PIN AUX4_11 + #define EXP1_02_PIN AUX4_12 + + #define EXP2_03_PIN AUX4_10 + #define EXP2_05_PIN AUX4_09 + #define EXP2_08_PIN AUX4_07 + + #else + + /** Smart Adapter (c) RRD + * ------ ------ + * 4-09 | 1 2 | 4-10 (MISO) 3-03 | 1 2 | 3-05 (SCK) + * 4-17 | 3 4 | 4-18 4-12 | 3 4 | 3-06 + * 4-16 5 6 | 4-15 4-11 5 6 | 3-04 (MOSI) + * 4-14 | 7 8 | 4-13 3-02 | 7 8 | 4-07 + * (GND) 3-07 | 9 10 | 3-01 (5V) (GND) 3-07 | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ + #define EXP1_01_PIN AUX4_09 + #define EXP1_02_PIN AUX4_10 + + #if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) + #define EXP2_03_PIN AUX4_11 + #define EXP2_05_PIN AUX4_12 + #define EXP2_08_PIN -1 // RESET + #else + #define EXP2_03_PIN AUX4_12 + #define EXP2_05_PIN AUX4_11 + #define EXP2_08_PIN AUX4_07 + #endif + + #endif + +#endif + ////////////////////////// // LCDs and Controllers // ////////////////////////// -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif HAS_WIRED_LCD && DISABLED(LCD_PINS_DEFINED) + + //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 // // LCD Display output pins // #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - // TO TEST - //#define LCD_PINS_RS 49 // CS chip select /SS chip slave select - //#define LCD_PINS_ENABLE 51 // SID (MOSI) - //#define LCD_PINS_D4 52 // SCK (CLK) clock + #define LCD_PINS_RS EXP2_07_PIN // CS chip select /SS chip slave select + #define LCD_PINS_ENABLE EXP2_06_PIN // SID (MOSI) + #define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock #elif BOTH(IS_NEWPANEL, PANEL_ONE) - // TO TEST - //#define LCD_PINS_RS 40 - //#define LCD_PINS_ENABLE 42 - //#define LCD_PINS_D4 57 // Mega/Due:65 - AGCM4:57 - //#define LCD_PINS_D5 58 // Mega/Due:66 - AGCM4:58 - //#define LCD_PINS_D6 44 - //#define LCD_PINS_D7 56 // Mega/Due:64 - AGCM4:56 + #define LCD_PINS_RS AUX2_06 + #define LCD_PINS_ENABLE AUX2_08 + #define LCD_PINS_D4 AUX2_10 + #define LCD_PINS_D5 AUX2_09 + #define LCD_PINS_D6 AUX2_07 + #define LCD_PINS_D7 AUX2_05 - #else + #elif ENABLED(TFTGLCD_PANEL_SPI) - #if ENABLED(CR10_STOCKDISPLAY) + #define TFTGLCD_CS EXP2_05_PIN - // TO TEST - //#define LCD_PINS_RS 27 - //#define LCD_PINS_ENABLE 29 - //#define LCD_PINS_D4 25 + #else - #if !IS_NEWPANEL - // TO TEST - //#define BEEPER_PIN 37 + #if ENABLED(ZONESTAR_LCD) + + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING + #error "CAUTION! ZONESTAR_LCD on RAMPS requires wiring modifications. It plugs into AUX2 but GND and 5V need to be swapped. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif - #elif ENABLED(ZONESTAR_LCD) + #define LCD_PINS_RS AUX2_05 + #define LCD_PINS_ENABLE AUX2_07 + #define LCD_PINS_D4 AUX2_04 + #define LCD_PINS_D5 AUX2_06 + #define LCD_PINS_D6 AUX2_08 + #define LCD_PINS_D7 AUX2_10 + + #elif ENABLED(AZSMZ_12864) - // TO TEST - //#define LCD_PINS_RS 56 // Mega/Due:64 - AGCM4:56 - //#define LCD_PINS_ENABLE 44 - //#define LCD_PINS_D4 55 // Mega/Due:63 - AGCM4:55 - //#define LCD_PINS_D5 40 - //#define LCD_PINS_D6 42 - //#define LCD_PINS_D7 57 // Mega/Due:65 - AGCM4:57 + // Pins only defined for RAMPS_SMART currently #else #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) - // TO TEST - //#define LCD_PINS_DC 25 // Set as output on init - //#define LCD_PINS_RS 27 // Pull low for 1s to init + #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 16 - //#define DOGLCD_MOSI 17 - //#define DOGLCD_SCK 23 - //#define DOGLCD_A0 LCD_PINS_DC + #define DOGLCD_A0 LCD_PINS_DC + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_MOSI EXP1_03_PIN + #define DOGLCD_SCK EXP1_05_PIN #else - #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 - #define LCD_PINS_D4 23 - #define LCD_PINS_D5 25 - #define LCD_PINS_D6 27 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_ENABLE 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 29 + #define LCD_PINS_D7 EXP1_08_PIN #if !IS_NEWPANEL - #define BEEPER_PIN 33 + #define BEEPER_PIN EXP2_05_PIN #endif #endif @@ -341,13 +466,17 @@ // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK_PIN 38 - //#define SHIFT_LD_PIN 42 - //#define SHIFT_OUT_PIN 40 - //#define SHIFT_EN_PIN 17 + //#define SHIFT_LD_PIN AUX2_08 + //#define SHIFT_OUT_PIN AUX2_06 + //#define SHIFT_EN_PIN EXP1_03_PIN #endif #endif + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + // // LCD Display input pins // @@ -355,215 +484,265 @@ #if IS_RRD_SC - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN - #if ENABLED(CR10_STOCKDISPLAY) - // TO TEST - //#define BTN_EN1 17 - //#define BTN_EN2 23 - #else - #define BTN_EN1 31 - #define BTN_EN2 33 - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif - #endif + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN - #define BTN_ENC 35 #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_07_PIN + #endif + #ifndef KILL_PIN + #define KILL_PIN EXP2_08_PIN #endif - #define KILL_PIN 41 #if ENABLED(BQ_LCD_SMART_CONTROLLER) - //#define LCD_BACKLIGHT_PIN 39 // TO TEST + #define LCD_BACKLIGHT_PIN AUX4_08 #endif #elif 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 42 + #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) - // TO TEST - //#define BTN_EN1 47 - //#define BTN_EN2 43 - //#define BTN_ENC 32 - //#define LCD_SDSS SDSS - //#define KILL_PIN 41 + #define BTN_EN1 AUX4_04 + #define BTN_EN2 AUX4_06 + #define BTN_ENC AUX4_03 + #define LCD_SDSS SDSS + #define KILL_PIN EXP2_08_PIN #elif ENABLED(LCD_I2C_VIKI) - // TO TEST - //#define BTN_EN1 40 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42. - //#define BTN_EN2 42 - //#define BTN_ENC -1 + #define BTN_EN1 AUX2_06 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains AUX2-06 and AUX2-08. + #define BTN_EN2 AUX2_08 + #define BTN_ENC -1 - //#define LCD_SDSS SDSS - //#define SD_DETECT_PIN 49 + #define LCD_SDSS SDSS + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif #elif EITHER(VIKI2, miniVIKI) - // TO TEST - //#define DOGLCD_CS 45 - //#define DOGLCD_A0 44 - - //#define BEEPER_PIN 33 - //#define STAT_LED_RED_PIN 32 - //#define STAT_LED_BLUE_PIN 35 + #define DOGLCD_CS AUX4_05 + #define DOGLCD_A0 AUX2_07 + #define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - //#define BTN_EN1 22 - //#define BTN_EN2 7 - //#define BTN_ENC 39 + #define BEEPER_PIN EXP2_05_PIN + #define STAT_LED_RED_PIN AUX4_03 + #define STAT_LED_BLUE_PIN EXP1_02_PIN - //#define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board - //#define KILL_PIN 31 + #define BTN_EN1 22 + #define BTN_EN2 7 + #define BTN_ENC AUX4_08 - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board + #endif + #define KILL_PIN EXP2_03_PIN #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - // TO TEST - //#define DOGLCD_CS 29 - //#define DOGLCD_A0 27 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN - //#define BEEPER_PIN 23 - //#define LCD_BACKLIGHT_PIN 33 + #define BEEPER_PIN EXP1_05_PIN + #define LCD_BACKLIGHT_PIN EXP2_05_PIN - //#define BTN_EN1 35 - //#define BTN_EN2 37 - //#define BTN_ENC 31 + #define BTN_EN1 EXP1_02_PIN + #define BTN_EN2 EXP1_01_PIN + #define BTN_ENC EXP2_03_PIN - //#define LCD_SDSS SDSS - //#define SD_DETECT_PIN 49 - //#define KILL_PIN 41 + #define LCD_SDSS SDSS + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif + #define KILL_PIN EXP2_08_PIN #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864) - // TO TEST - //#define BEEPER_PIN 37 - //#define BTN_ENC 35 - //#define SD_DETECT_PIN 49 + #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 41 - //#endif + #ifndef KILL_PIN + #define KILL_PIN EXP2_08_PIN + #endif #if ENABLED(MKS_MINI_12864) - // TO TEST - //#define DOGLCD_A0 27 - //#define DOGLCD_CS 25 + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_06_PIN // not connected to a pin - //#define LCD_BACKLIGHT_PIN 57 // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57) - - //#define BTN_EN1 31 - //#define BTN_EN2 33 + #define LCD_BACKLIGHT_PIN -1 // 65 (MKS mini12864 can't adjust backlight by software!) - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN #elif ENABLED(FYSETC_MINI_12864) - // From https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 + // From https://wiki.fysetc.com/Mini12864_Panel/ - // TO TEST - //#define DOGLCD_A0 16 - //#define DOGLCD_CS 17 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_03_PIN - //#define BTN_EN1 33 - //#define BTN_EN2 31 + #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 23 // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - // TO TEST - //#define RGB_LED_R_PIN 25 + #define RGB_LED_R_PIN EXP1_06_PIN #endif #ifndef RGB_LED_G_PIN - // TO TEST - //#define RGB_LED_G_PIN 27 + #define RGB_LED_G_PIN EXP1_07_PIN #endif #ifndef RGB_LED_B_PIN - // TO TEST - //#define RGB_LED_B_PIN 29 + #define RGB_LED_B_PIN EXP1_08_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - // TO TEST - //#define NEOPIXEL_PIN 25 + #define NEOPIXEL_PIN EXP1_06_PIN #endif #endif #elif ENABLED(MINIPANEL) - // TO TEST - //#define BEEPER_PIN 42 - // not connected to a pin - //#define LCD_BACKLIGHT_PIN 57 // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57) - - //#define DOGLCD_A0 44 - //#define DOGLCD_CS 58 // Mega/Due:66 - AGCM4:58 + #define BEEPER_PIN AUX2_08 + #define LCD_BACKLIGHT_PIN AUX2_10 - //#define BTN_EN1 40 - //#define BTN_EN2 55 // Mega/Due:63 - AGCM4:55 - //#define BTN_ENC 72 // Mega/Due:59 - AGCM4:72 + #define DOGLCD_A0 AUX2_07 + #define DOGLCD_CS AUX2_09 - //#define SD_DETECT_PIN 49 - //#define KILL_PIN 56 // Mega/Due:64 - AGCM4:56 + #define BTN_EN1 AUX2_06 + #define BTN_EN2 AUX2_04 + #define BTN_ENC AUX2_03 - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN AUX3_02 + #endif + #define KILL_PIN AUX2_05 #elif ENABLED(ZONESTAR_LCD) - // TO TEST - //#define ADC_KEYPAD_PIN 12 + #define ADC_KEYPAD_PIN 12 #elif ENABLED(AZSMZ_12864) - // TO TEST + // Pins only defined for RAMPS_SMART currently - #else + #elif ENABLED(G3D_PANEL) - // Beeper on AUX-4 - //#define BEEPER_PIN 33 - - // Buttons are directly attached to AUX-2 - #if IS_RRW_KEYPAD - // TO TEST - //#define SHIFT_OUT_PIN 40 - //#define SHIFT_CLK_PIN 44 - //#define SHIFT_LD_PIN 42 - //#define BTN_EN1 56 // Mega/Due:64 - AGCM4:56 - //#define BTN_EN2 72 // Mega/Due:59 - AGCM4:72 - //#define BTN_ENC 55 // Mega/Due:63 - AGCM4:55 - #elif ENABLED(PANEL_ONE) - // TO TEST - //#define BTN_EN1 72 // AUX2 PIN 3 (Mega/Due:59 - AGCM4:72) - //#define BTN_EN2 55 // AUX2 PIN 4 (Mega/Due:63 - AGCM4:55) - //#define BTN_ENC 49 // AUX3 PIN 7 - #else - // TO TEST - //#define BTN_EN1 37 - //#define BTN_EN2 35 - //#define BTN_ENC 31 + #define BEEPER_PIN EXP1_01_PIN + + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN #endif + #define KILL_PIN EXP2_08_PIN + + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN + #define BTN_ENC EXP1_02_PIN + + #elif IS_TFTGLCD_PANEL + + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif + + #else - #if ENABLED(G3D_PANEL) - // TO TEST - //#define SD_DETECT_PIN 49 - //#define KILL_PIN 41 + #define BEEPER_PIN EXP2_05_PIN + + #if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2 + #define BTN_EN1 AUX2_03 + #define BTN_EN2 AUX2_04 + #define BTN_ENC AUX3_02 + #else + #define BTN_EN1 EXP1_01_PIN + #define BTN_EN2 EXP1_02_PIN + #define BTN_ENC EXP2_03_PIN #endif #endif #endif // IS_NEWPANEL -#endif // HAS_WIRED_LCD +#endif // HAS_WIRED_LCD && !LCD_PINS_DEFINED + +#if IS_RRW_KEYPAD && !HAS_ADC_BUTTONS + #define SHIFT_OUT_PIN AUX2_06 + #define SHIFT_CLK_PIN AUX2_07 + #define SHIFT_LD_PIN AUX2_08 + #ifndef BTN_EN1 + #define BTN_EN1 AUX2_05 + #endif + #ifndef BTN_EN2 + #define BTN_EN2 AUX2_03 + #endif + #ifndef BTN_ENC + #define BTN_ENC AUX2_04 + #endif +#endif + +#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) + + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING + #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" + #endif + + /** + * FYSETC TFT-81050 display pinout + * + * Board Display + * ------ ------ + * (MISO) 50 | 1 2 | 52 (SCK) 5V |10 9 | GND + * (LCD_CS) 33 | 3 4 | 53 (SD_CS) RESET | 8 7 | (SD_DET) + * 31 5 6 | 51 (MOSI) (MOSI) 6 5 | (LCD_CS) + * (SD_DET) 49 | 7 8 | RESET (SD_CS) | 4 3 | (MOD_RESET) + * GND | 9 10 | -- (SCK) | 2 1 | (MISO) + * ------ ------ + * EXP2 EXP1 + * + * Needs custom cable: + * + * Board Adapter Display + * ---------------------------------- + * EXP2-1 <--diode--- EXP1-1 MISO + * EXP2-2 ----------- EXP1-2 SCK + * EXP2-4 ----------- EXP1-3 MOD_RST + * EXP2-4 ----------- EXP1-4 SD_CS + * EXP2-3 ----------- EXP1-5 LCD_CS + * EXP2-6 ----------- EXP1-6 MOSI + * EXP2-7 ----------- EXP1-7 SD DET + * EXP2-8 ----------- EXP1-8 RESET + * EXP2-1 ----------- EXP1-9 MISO->GND + * EXP1-10 ---------- EXP1-10 5V + * + * NOTE: The MISO pin should not get a 5V signal. + * To fix, insert a 1N4148 diode in the MISO line. + */ + + #define BEEPER_PIN EXP1_01_PIN + + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif + + #define CLCD_MOD_RESET EXP2_05_PIN + #define CLCD_SPI_CS EXP2_03_PIN + +#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index 00dc0613f27f0..a1284f4422477 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -120,16 +120,17 @@ // // 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_ENABLE PB15 - #define LCD_PINS_D4 PB9 +#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 - #define BEEPER_PIN PB5 +#if ENABLED(CR10_STOCKDISPLAY) + #define LCD_ON_EXP3 #endif #if HAS_TMC_UART 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 8fb194c27f064..2e1e62909f7f6 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -173,21 +173,13 @@ #define EXP1_07_PIN PB8 #define EXP1_08_PIN PB7 -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) - #if ENABLED(CR10_STOCKDISPLAY) + // Migrated to pins_lcd.h - #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_ENABLE 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! #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_DIP.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" 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 9d85e211f7630..c18ad22865e12 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 @@ -135,7 +135,11 @@ #define EXP1_06_PIN PB9 #define EXP1_07_PIN PB8 -#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** * ------ ------ ------ * (ENT) | 1 2 | (BEEP) |10 9 | |10 9 | @@ -160,19 +164,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_ENABLE EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #elif ENABLED(LCD_FOR_MELZI) + #if ENABLED(LCD_FOR_MELZI) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! LCD for Melzi v4 display requires a custom cable. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" 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 c45e7fb282d38..7987bcd242aeb 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,7 +139,11 @@ // // LCD / Controller // -#if EITHER(TFT_COLOR_UI, TFT_CLASSIC_UI) +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif EITHER(TFT_COLOR_UI, TFT_CLASSIC_UI) #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP2_03_PIN @@ -174,16 +178,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_ENABLE 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 a75825658c9b0..b677765066e81 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -144,14 +144,7 @@ // LCD / Controller // #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_ENABLE EXP1_08_PIN // DATA MOSI + // Migrated to pins_lcd.h #endif // Alter timing for graphical display diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h index 9bc10a26bc165..86b1aa7700aaf 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h @@ -155,7 +155,11 @@ #define EXP1_07_PIN PB12 #define EXP1_08_PIN PB15 -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN #if HAS_MARLINUI_U8GLIB 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 fdd56b5c9ea33..8c58efe03478a 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -236,22 +236,17 @@ // // LCDs and Controllers // -#if HAS_WIRED_LCD +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#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_ENABLE 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_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index a21eaefee829c..ff9896a5fc491 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -392,7 +392,11 @@ // // LCDs and Controllers // -#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#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 @@ -413,16 +417,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_ENABLE 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 78766b5c98b08..84943ad8f07fd 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -451,63 +451,53 @@ #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.h - #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_ENABLE EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN + #define LCD_PINS_ENABLE 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_ENABLE 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 EITHER(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 EITHER(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 + #endif // HAS_WIRED_LCD // Alter timing for graphical display 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 d3a04b9d0715a..8c47e6a64a7de 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 @@ -170,7 +170,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.h + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** * ------ ------ ------ * (ENT) | 1 2 | (BEEP) |10 9 | |10 9 | @@ -193,19 +197,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_ENABLE 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! #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" 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 0cdd34aaeec12..57472c1343e9b 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -424,7 +424,11 @@ // // LCDs and Controllers // -#if IS_TFTGLCD_PANEL +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN @@ -435,17 +439,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_ENABLE 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 95b20c105d222..3c27a9451b633 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 @@ -438,7 +438,11 @@ // // LCDs and Controllers // -#if IS_TFTGLCD_PANEL +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN @@ -449,17 +453,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_ENABLE 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 a7b7c079c3f74..4eda90f5af4fa 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -149,93 +149,94 @@ * GND | 9 10 | 5V GND | 9 10 | 5V * ------ ------ * EXP2 EXP1 + * + * ------ + * (BEEPER) PC9 | 1 2 | PC12 (BTN_ENC) + * (BTN_EN1) PC10 | 3 4 | PB14 (LCD_D5/MISO) + * (BTN_EN2) PC11 5 6 | PB13 (LCD_D4/SCK) + * (LCD_RS) PB12 | 7 8 | PB15 (LCD_EN/MOSI) + * GND | 9 10 | 5V + * ------ + * EXP3 */ -/** - * ------ - * 5V | 1 2 | GND - * (LCD_EN/MOSI) PB15 | 3 4 | PB12 (LCD_RS) - * (LCD_D4/SCK) PB13 5 6 | PC11 (BTN_EN2) - * (LCD_D5/MISO) PB14 | 7 8 | PC10 (BTN_EN1) - * (BTN_ENC) PC12 | 9 10 | PC9 (BEEPER) - * ------ - * EXP3 - */ - -#define EXP1_01_PIN PC9 -#define EXP1_02_PIN PC12 -#define EXP1_03_PIN PB15 -#define EXP1_04_PIN PB12 -#define EXP1_05_PIN PB13 -#define EXP1_06_PIN PB14 -#define EXP1_07_PIN PB6 -#define EXP1_08_PIN PB7 - -#define EXP2_01_PIN PA6 -#define EXP2_02_PIN PA5 -#define EXP2_03_PIN PC10 -#define EXP2_04_PIN PA4 -#define EXP2_05_PIN PC11 -#define EXP2_06_PIN PA7 -#define EXP2_07_PIN PC3 -#define EXP2_08_PIN -1 - -#if HAS_WIRED_LCD - - #define BEEPER_PIN EXP1_01_PIN - #define BTN_ENC EXP1_02_PIN - - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_04_PIN - - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN - - #define LCD_PINS_ENABLE EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN - - #elif ENABLED(MKS_MINI_12864) - - #define DOGLCD_A0 EXP1_07_PIN - #define DOGLCD_CS EXP1_06_PIN - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN +#define EXP1_01_PIN PA6 +#define EXP1_02_PIN PA5 +#define EXP1_03_PIN PC10 +#define EXP1_04_PIN PA4 +#define EXP1_05_PIN PC11 +#define EXP1_06_PIN PA7 +#define EXP1_07_PIN PC3 +#define EXP1_08_PIN -1 + +#define EXP2_01_PIN PC9 +#define EXP2_02_PIN PC12 +#define EXP2_03_PIN PB15 +#define EXP2_04_PIN PB12 +#define EXP2_05_PIN PB13 +#define EXP2_06_PIN PB14 +#define EXP2_07_PIN PB6 +#define EXP2_08_PIN PB7 + +#define EXP3_01_PIN PC9 +#define EXP3_02_PIN PC12 +#define EXP3_03_PIN PC10 +#define EXP3_04_PIN PB14 +#define EXP3_05_PIN PC11 +#define EXP3_06_PIN PB13 +#define EXP3_07_PIN PB12 +#define EXP3_08_PIN PB15 + +#if ENABLED(CR10_STOCKDISPLAY) + + #define LCD_ON_EXP3 + +#elif HAS_WIRED_LCD + + #define BEEPER_PIN EXP2_01_PIN + #define BTN_ENC EXP2_02_PIN + + #if ENABLED(MKS_MINI_12864) + + #define DOGLCD_A0 EXP2_07_PIN + #define DOGLCD_CS EXP2_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_RS EXP2_04_PIN - #define BTN_EN1 EXP2_05_PIN - #define BTN_EN2 EXP2_03_PIN + #define BTN_EN1 EXP1_05_PIN + #define BTN_EN2 EXP1_03_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_ENABLE EXP2_03_PIN + #define LCD_PINS_D4 EXP2_05_PIN #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS EXP1_03_PIN - #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP2_03_PIN + #define DOGLCD_A0 EXP2_04_PIN //#define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP2_05_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXP1_06_PIN + #define RGB_LED_R_PIN EXP2_06_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXP1_07_PIN + #define RGB_LED_G_PIN EXP2_07_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXP1_08_PIN + #define RGB_LED_B_PIN EXP2_08_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXP1_06_PIN + #define NEOPIXEL_PIN EXP2_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 + #define LCD_PINS_D5 EXP2_06_PIN + #define LCD_PINS_D6 EXP2_07_PIN + #define LCD_PINS_D7 EXP2_08_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -255,7 +256,7 @@ #endif #if ENABLED(TOUCH_UI_FTDI_EVE) - #define BEEPER_PIN EXP1_01_PIN - #define CLCD_MOD_RESET EXP2_03_PIN - #define CLCD_SPI_CS EXP2_05_PIN + #define BEEPER_PIN EXP2_01_PIN + #define CLCD_MOD_RESET EXP1_03_PIN + #define CLCD_SPI_CS EXP1_05_PIN #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 49aab671c5985..c89c66453a36a 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -238,7 +238,11 @@ // // LCD / Controller // -#if ENABLED(FYSETC_242_OLED_12864) +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif ENABLED(FYSETC_242_OLED_12864) #define BTN_EN1 EXP1_01_PIN #define BTN_EN2 EXP1_08_PIN @@ -262,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_ENABLE 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_ENABLE EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_ENABLE 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 EITHER(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 EITHER(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 b03fc5419e013..3e65b53fba6d8 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -295,61 +295,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_ENABLE EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN + // Migrated to pins_lcd.h - #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_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN - #define LCD_PINS_ENABLE 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 EITHER(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 EITHER(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 b2fec3b8341d8..e818a52f80864 100644 --- a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h @@ -221,21 +221,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.h + + #ifndef DISABLE_JTAGSWD + #define BEEPER_PIN -1 #endif - #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE 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 @@ -266,7 +257,7 @@ #endif -#if EITHER(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 57e257a7ba146..a15faa1af1843 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 @@ -234,7 +234,11 @@ #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.h + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! Ender-3 V2 display requires a custom cable with TX = PA0, RX = PC2. See 'pins_BTT_MANTA_E3_EZ_V1_0.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif @@ -257,19 +261,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_ENABLE 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! #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_MANTA_E3_EZ_V1_0.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h index 276c951143923..14978a2e227a9 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h @@ -209,7 +209,11 @@ // // LCDs and Controllers // -#if IS_TFTGLCD_PANEL +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN @@ -220,17 +224,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_ENABLE 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 737330d351079..47bbab49d3e03 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 @@ -237,7 +237,11 @@ // // LCDs and Controllers // -#if IS_TFTGLCD_PANEL +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN @@ -248,17 +252,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_ENABLE 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 2c778f8732390..3e103e209e5ce 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -301,7 +301,11 @@ // // LCDs and Controllers // -#if IS_TFTGLCD_PANEL +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN @@ -312,17 +316,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_ENABLE 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 9be2357043c1d..99bd169b518ce 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 @@ -162,7 +162,11 @@ #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.h + +#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** * ------ ------ ------ * (ENT) | 1 2 | (BEEP) |10 9 | |10 9 | @@ -196,7 +200,7 @@ * CS | 3 4 | SCK (EN1) PA10 | 3 4 | -- * MOSI | 5 6 | MISO (EN2) PA9 5 6 | MOSI * 3V3 | 7 8 | GND -- | 7 8 | -- - * ------ GND | 9 10| RESET (Kill) + * ------ GND | 9 10 | RESET (Kill) * SPI ------ * EXP2 * @@ -205,7 +209,7 @@ * PA9 | 3 4 | RESET (LCD CS) PB8 | 3 4 | PD6 (LCD_A0) * PA10 5 6 | PB9 (RESET) PB9 5 6 | PA15 (DIN) * PB8 | 7 8 | PD6 -- | 7 8 | -- - * GND | 9 10| 5V GND | 9 10| 5V + * GND | 9 10 | 5V GND | 9 10 | 5V * ------ ------ * EXP1 EXP1 */ @@ -229,19 +233,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_ENABLE 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! #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h index cc2dab0e16e5c..d508ed7baab8b 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -418,69 +418,59 @@ #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) +#elif ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXP1_07_PIN + // Migrated to pins_lcd.h - #define BTN_EN1 EXP1_03_PIN - #define BTN_EN2 EXP1_05_PIN - - #define LCD_PINS_ENABLE EXP1_08_PIN - #define LCD_PINS_D4 EXP1_06_PIN - - #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_ENABLE EXP1_03_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_D4 EXP1_05_PIN - #define LCD_PINS_ENABLE 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 DOGLCD_SCK EXP2_02_PIN - #define DOGLCD_MOSI EXP2_06_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 SOFTWARE_SPI - #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + #define SOFTWARE_SPI + #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_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. - #if EITHER(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 + //#define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. + #if EITHER(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 + #endif // HAS_WIRED_LCD // Alter timing for graphical display 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 97ac32479e112..82eacafe967a7 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 @@ -427,7 +427,11 @@ // // LCDs and Controllers // -#if IS_TFTGLCD_PANEL +#if ENABLED(CR10_STOCKDISPLAY) + + // Migrated to pins_lcd.h + +#elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN @@ -438,17 +442,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_ENABLE 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