Skip to content

Commit

Permalink
🔧 Fix SD connection defaults (MarlinFirmware#26666)
Browse files Browse the repository at this point in the history
Co-authored-by: thisiskeithb <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
  • Loading branch information
3 people authored Jan 13, 2024
1 parent cadef64 commit b2fd631
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 14 deletions.
2 changes: 2 additions & 0 deletions Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/stm32f1/pins_MD_D301.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b2fd631

Please sign in to comment.