diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index a0cf5fe46bda..b03ff8a9f533 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -103,7 +103,23 @@ #elif ENABLED(YHCB2004) - LCD_CLASS lcd(YHCB2004_CLK, 20, 4, YHCB2004_MOSI, YHCB2004_MISO); // CLK, cols, rows, MOSI, MISO + #ifndef YHCB2004_SS_PIN + #define YHCB2004_SS_PIN SS + #endif + #ifndef YHCB2004_SCK_PIN + #define YHCB2004_SCK_PIN SCK + #endif + #ifndef YHCB2004_MOSI_PIN + #define YHCB2004_MOSI_PIN MOSI + #endif + #ifndef YHCB2004_MISO_PIN + #define YHCB2004_MISO_PIN MISO + #endif + #if !PINS_EXIST(YHCB2004_SS, YHCB2004_SCK, YHCB2004_MOSI, YHCB2004_MISO) + #error "YHCB2004 display requires YHCB2004_SS_PIN, YHCB2004_SCK_PIN, YHCB2004_MOSI_PIN, and YHCB2004_MISO_PIN." + #endif + + LCD_CLASS lcd(YHCB2004_SS_PIN, 20, 4, YHCB2004_SCK_PIN, YHCB2004_MOSI_PIN, YHCB2004_MISO_PIN); // SS, cols, rows, SCK, MOSI, MISO #else diff --git a/Marlin/src/pins/mega/pins_GT2560_V3.h b/Marlin/src/pins/mega/pins_GT2560_V3.h index 61f30fc7d4f4..0c588e6516ee 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3.h @@ -168,18 +168,10 @@ #define BEEPER_PIN 18 #if ENABLED(YHCB2004) - #ifndef YHCB2004_CLK - #define YHCB2004_CLK 5 - #define DIO52 YHCB2004_CLK - #endif - #ifndef YHCB2004_MOSI - #define YHCB2004_MOSI 21 - #define DIO50 YHCB2004_MOSI - #endif - #ifndef YHCB2004_MISO - #define YHCB2004_MISO 36 - #define DIO51 YHCB2004_MISO - #endif + #define YHCB2004_MOSI_PIN 21 + #define YHCB2004_MISO_PIN 36 + #define YHCB2004_SCK_PIN 5 + #define YHCB2004_SS_PIN SS #elif HAS_WIRED_LCD #ifndef LCD_PINS_RS #define LCD_PINS_RS 20 diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h index 772a45a9186a..2422dfdd73e5 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h @@ -26,12 +26,16 @@ * ATmega2560 */ -#define LCD_PINS_RS 5 -#define LCD_PINS_EN 36 -#define LCD_PINS_D4 21 -#define LCD_PINS_D7 6 +#if HAS_WIRED_LCD + #define LCD_PINS_RS 5 + #define LCD_PINS_EN 36 + #define LCD_PINS_D4 21 + #define LCD_PINS_D7 6 +#endif -#define SPEAKER // The speaker can produce tones +#ifndef SPEAKER + #define SPEAKER // The speaker can produce tones +#endif #if IS_NEWPANEL #define BTN_EN1 16 diff --git a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h index 3b3a80caa83f..405a3aba5bf8 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h @@ -28,12 +28,16 @@ #define BOARD_INFO_NAME "GT2560 4.x" -#define LCD_PINS_RS 5 -#define LCD_PINS_EN 36 -#define LCD_PINS_D4 21 -#define LCD_PINS_D7 6 +#if HAS_WIRED_LCD + #define LCD_PINS_RS 5 + #define LCD_PINS_EN 36 + #define LCD_PINS_D4 21 + #define LCD_PINS_D7 6 +#endif -#define SPEAKER // The speaker can produce tones +#ifndef SPEAKER + #define SPEAKER // The speaker can produce tones +#endif #if IS_NEWPANEL #define BTN_EN1 16 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 511870053324..6ee6401badfc 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -795,7 +795,7 @@ #elif MB(BLACKPILL_CUSTOM) #include "stm32f4/pins_BLACKPILL_CUSTOM.h" // STM32F4 env:STM32F401CD_blackpill_stlink #elif MB(I3DBEEZ9_V1) - #include "stm32f4/pins_I3DBEEZ9.h" // STM32F4 env:I3DBEEZ9_V1 + #include "stm32f4/pins_I3DBEEZ9.h" // STM32F4 env:I3DBEEZ9_V1 // // ARM Cortex M7 diff --git a/Marlin/src/pins/stm32f4/pins_BLACKPILL_CUSTOM.h b/Marlin/src/pins/stm32f4/pins_BLACKPILL_CUSTOM.h index 9049a553fb49..039333adfa91 100644 --- a/Marlin/src/pins/stm32f4/pins_BLACKPILL_CUSTOM.h +++ b/Marlin/src/pins/stm32f4/pins_BLACKPILL_CUSTOM.h @@ -117,7 +117,7 @@ //#define SDIO_SUPPORT #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer -#if SD_CONNECTION_IS(ONBOARD) +#if SD_CONNECTION_IS(ONBOARD) #define SDSS PA4 #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6