Skip to content

Commit 977624c

Browse files
robhercthisiskeithbthinkyhead
authored andcommitted
🔧 Fix SD connection defaults (MarlinFirmware#26666)
Co-authored-by: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com> Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
1 parent 50d940d commit 977624c

13 files changed

+24
-14
lines changed

Marlin/src/inc/Conditionals_LCD.h

+2
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,7 @@
790790
#elif ENABLED(CR10_STOCKDISPLAY)
791791

792792
#define IS_RRD_FG_SC 1
793+
#define NO_LCD_SDCARD
793794
#define LCD_ST7920_DELAY_1 125
794795
#define LCD_ST7920_DELAY_2 125
795796
#define LCD_ST7920_DELAY_3 125
@@ -1690,6 +1691,7 @@
16901691
#define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY
16911692
#define TFT_RES_480x320
16921693
#define TFT_INTERFACE_SPI
1694+
#define NO_LCD_SDCARD
16931695
#elif ANY(LERDGE_TFT35, ANET_ET5_TFT35) // ST7796
16941696
#define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY
16951697
#define TFT_RES_480x320

Marlin/src/inc/SanityCheck.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2711,8 +2711,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
27112711
static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_2), "zh_CN") == 0, "LCD_LANGUAGE_2 must be set to zh_CN for ANYCUBIC_LCD_VYPER.");
27122712
#endif
27132713

2714-
#if ANY(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) && SD_CONNECTION_IS(LCD)
2715-
#error "SDCARD_CONNECTION cannot be set to LCD for the enabled TFT. No available SD card reader."
2714+
#if ENABLED(NO_LCD_SDCARD) && SD_CONNECTION_IS(LCD)
2715+
#error "SDCARD_CONNECTION cannot be set to LCD for the enabled display. No available SD card reader."
27162716
#endif
27172717

27182718
/**

Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
#define BTN_EN1 P4_28
9797
#define BTN_EN2 P1_27
9898
#define BTN_ENC P3_26
99-
#ifndef SDCARD_CONNECTION
99+
#if !defined(SDCARD_CONNECTION) && DISABLED(NO_LCD_SDCARD)
100100
#define SDCARD_CONNECTION LCD
101101
#endif
102102
#endif

Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
// SD Support
120120
//
121121
#ifndef SDCARD_CONNECTION
122-
#if HAS_WIRED_LCD
122+
#if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
123123
#define SDCARD_CONNECTION LCD
124124
#else
125125
#define SDCARD_CONNECTION ONBOARD

Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@
160160
//
161161

162162
#ifndef SDCARD_CONNECTION
163-
#define SDCARD_CONNECTION LCD
163+
#if ENABLED(NO_LCD_SDCARD)
164+
#define SDCARD_CONNECTION ONBOARD
165+
#else
166+
#define SDCARD_CONNECTION LCD
167+
#endif
164168
#endif
165169

166170
#if SD_CONNECTION_IS(LCD)

Marlin/src/pins/stm32f1/pins_MD_D301.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@
160160
//
161161
// SD Support
162162
//
163-
#ifndef SDCARD_CONNECTION
164-
#define SDCARD_CONNECTION LCD
163+
#if !defined(SDCARD_CONNECTION) && DISABLED(NO_LCD_SDCARD)
164+
#define SDCARD_CONNECTION LCD
165165
#endif
166166

167167
#define SD_DETECT_PIN PE3

Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
// SD Support
236236
//
237237
#ifndef SDCARD_CONNECTION
238-
#if HAS_WIRED_LCD
238+
#if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
239239
#define SDCARD_CONNECTION LCD
240240
#else
241241
#define SDCARD_CONNECTION ONBOARD

Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,11 @@
250250
//
251251
#if HAS_MEDIA
252252
#ifndef SDCARD_CONNECTION
253-
#define SDCARD_CONNECTION LCD
253+
#if ENABLED(NO_LCD_SDCARD)
254+
#define SDCARD_CONNECTION ONBOARD
255+
#else
256+
#define SDCARD_CONNECTION LCD
257+
#endif
254258
#endif
255259
#if SD_CONNECTION_IS(ONBOARD)
256260
//#define SOFTWARE_SPI

Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
// SD Support
229229
//
230230
#ifndef SDCARD_CONNECTION
231-
#if HAS_WIRED_LCD
231+
#if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
232232
#define SDCARD_CONNECTION LCD
233233
#else
234234
#define SDCARD_CONNECTION ONBOARD

Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@
326326
// SD Support
327327
//
328328
#ifndef SDCARD_CONNECTION
329-
#if HAS_WIRED_LCD
329+
#if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
330330
#define SDCARD_CONNECTION LCD
331331
#else
332332
#define SDCARD_CONNECTION ONBOARD

Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
// SD Support
273273
//
274274
#ifndef SDCARD_CONNECTION
275-
#if HAS_WIRED_LCD
275+
#if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
276276
#define SDCARD_CONNECTION LCD
277277
#else
278278
#define SDCARD_CONNECTION ONBOARD

Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
// SD Support
255255
//
256256
#ifndef SDCARD_CONNECTION
257-
#if HAS_WIRED_LCD
257+
#if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
258258
#define SDCARD_CONNECTION LCD
259259
#else
260260
#define SDCARD_CONNECTION ONBOARD

Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
// SD Support
247247
//
248248
#ifndef SDCARD_CONNECTION
249-
#if HAS_WIRED_LCD
249+
#if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
250250
#define SDCARD_CONNECTION LCD
251251
#else
252252
#define SDCARD_CONNECTION ONBOARD

0 commit comments

Comments
 (0)