diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 58842209af..729f450147 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -784,6 +784,7 @@ #elif ENABLED(CR10_STOCKDISPLAY) #define IS_RRD_FG_SC 1 + #define NO_LCD_SDCARD #define LCD_ST7920_DELAY_1 125 #define LCD_ST7920_DELAY_2 125 #define LCD_ST7920_DELAY_3 125 @@ -1684,6 +1685,7 @@ #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY #define TFT_RES_480x320 #define TFT_INTERFACE_SPI + #define NO_LCD_SDCARD #elif ANY(LERDGE_TFT35, ANET_ET5_TFT35) // ST7796 #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY #define TFT_RES_480x320 diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index bab6fa1d01..a60ead1d08 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2705,8 +2705,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_2), "zh_CN") == 0, "LCD_LANGUAGE_2 must be set to zh_CN for ANYCUBIC_LCD_VYPER."); #endif -#if ANY(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) && SD_CONNECTION_IS(LCD) - #error "SDCARD_CONNECTION cannot be set to LCD for the enabled TFT. No available SD card reader." +#if ENABLED(NO_LCD_SDCARD) && SD_CONNECTION_IS(LCD) + #error "SDCARD_CONNECTION cannot be set to LCD for the enabled display. No available SD card reader." #endif /** diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index ca8010493b..569c9781d2 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -96,7 +96,7 @@ #define BTN_EN1 P4_28 #define BTN_EN2 P1_27 #define BTN_ENC P3_26 - #ifndef SDCARD_CONNECTION + #if !defined(SDCARD_CONNECTION) && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #endif #endif diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index 75eea8e0f6..ee3934a4ef 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -119,7 +119,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index a9184073c5..7aa4aa6423 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -160,7 +160,11 @@ // #ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION LCD + #if ENABLED(NO_LCD_SDCARD) + #define SDCARD_CONNECTION ONBOARD + #else + #define SDCARD_CONNECTION LCD + #endif #endif #if SD_CONNECTION_IS(LCD) diff --git a/Marlin/src/pins/stm32f1/pins_MD_D301.h b/Marlin/src/pins/stm32f1/pins_MD_D301.h index 5724879bad..bcede1d4be 100644 --- a/Marlin/src/pins/stm32f1/pins_MD_D301.h +++ b/Marlin/src/pins/stm32f1/pins_MD_D301.h @@ -160,8 +160,8 @@ // // SD Support // -#ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION LCD +#if !defined(SDCARD_CONNECTION) && DISABLED(NO_LCD_SDCARD) + #define SDCARD_CONNECTION LCD #endif #define SD_DETECT_PIN PE3 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 f88c75a27d..855e94c72d 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -235,7 +235,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD 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 42ee66caac..3ff29e6862 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -250,7 +250,11 @@ // #if HAS_MEDIA #ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION LCD + #if ENABLED(NO_LCD_SDCARD) + #define SDCARD_CONNECTION ONBOARD + #else + #define SDCARD_CONNECTION LCD + #endif #endif #if SD_CONNECTION_IS(ONBOARD) //#define SOFTWARE_SPI 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 fc3f679b8d..796527b364 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -228,7 +228,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD diff --git a/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h b/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h index ad24d902f9..d55e0a3f84 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h @@ -326,7 +326,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD diff --git a/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h b/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h index 346cd1c348..bc6118228f 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h @@ -272,7 +272,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD 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 b0890036ee..6c081f9b56 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -254,7 +254,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h index 43b3d68522..148b21de0b 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h @@ -246,7 +246,7 @@ // SD Support // #ifndef SDCARD_CONNECTION - #if HAS_WIRED_LCD + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD