🔧 Fix SD connection defaults (#26666)

Co-authored-by: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Robherc 2024-01-12 23:03:34 -05:00 committed by GitHub
parent cadef64418
commit b2fd631d82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 24 additions and 14 deletions

View file

@ -784,6 +784,7 @@
#elif ENABLED(CR10_STOCKDISPLAY) #elif ENABLED(CR10_STOCKDISPLAY)
#define IS_RRD_FG_SC 1 #define IS_RRD_FG_SC 1
#define NO_LCD_SDCARD
#define LCD_ST7920_DELAY_1 125 #define LCD_ST7920_DELAY_1 125
#define LCD_ST7920_DELAY_2 125 #define LCD_ST7920_DELAY_2 125
#define LCD_ST7920_DELAY_3 125 #define LCD_ST7920_DELAY_3 125
@ -1684,6 +1685,7 @@
#define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY
#define TFT_RES_480x320 #define TFT_RES_480x320
#define TFT_INTERFACE_SPI #define TFT_INTERFACE_SPI
#define NO_LCD_SDCARD
#elif ANY(LERDGE_TFT35, ANET_ET5_TFT35) // ST7796 #elif ANY(LERDGE_TFT35, ANET_ET5_TFT35) // ST7796
#define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY
#define TFT_RES_480x320 #define TFT_RES_480x320

View file

@ -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."); static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_2), "zh_CN") == 0, "LCD_LANGUAGE_2 must be set to zh_CN for ANYCUBIC_LCD_VYPER.");
#endif #endif
#if ANY(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) && SD_CONNECTION_IS(LCD) #if ENABLED(NO_LCD_SDCARD) && SD_CONNECTION_IS(LCD)
#error "SDCARD_CONNECTION cannot be set to LCD for the enabled TFT. No available SD card reader." #error "SDCARD_CONNECTION cannot be set to LCD for the enabled display. No available SD card reader."
#endif #endif
/** /**

View file

@ -96,7 +96,7 @@
#define BTN_EN1 P4_28 #define BTN_EN1 P4_28
#define BTN_EN2 P1_27 #define BTN_EN2 P1_27
#define BTN_ENC P3_26 #define BTN_ENC P3_26
#ifndef SDCARD_CONNECTION #if !defined(SDCARD_CONNECTION) && DISABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION LCD #define SDCARD_CONNECTION LCD
#endif #endif
#endif #endif

View file

@ -119,7 +119,7 @@
// SD Support // SD Support
// //
#ifndef SDCARD_CONNECTION #ifndef SDCARD_CONNECTION
#if HAS_WIRED_LCD #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION LCD #define SDCARD_CONNECTION LCD
#else #else
#define SDCARD_CONNECTION ONBOARD #define SDCARD_CONNECTION ONBOARD

View file

@ -160,7 +160,11 @@
// //
#ifndef SDCARD_CONNECTION #ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION LCD #if ENABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION ONBOARD
#else
#define SDCARD_CONNECTION LCD
#endif
#endif #endif
#if SD_CONNECTION_IS(LCD) #if SD_CONNECTION_IS(LCD)

View file

@ -160,8 +160,8 @@
// //
// SD Support // SD Support
// //
#ifndef SDCARD_CONNECTION #if !defined(SDCARD_CONNECTION) && DISABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION LCD #define SDCARD_CONNECTION LCD
#endif #endif
#define SD_DETECT_PIN PE3 #define SD_DETECT_PIN PE3

View file

@ -235,7 +235,7 @@
// SD Support // SD Support
// //
#ifndef SDCARD_CONNECTION #ifndef SDCARD_CONNECTION
#if HAS_WIRED_LCD #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION LCD #define SDCARD_CONNECTION LCD
#else #else
#define SDCARD_CONNECTION ONBOARD #define SDCARD_CONNECTION ONBOARD

View file

@ -250,7 +250,11 @@
// //
#if HAS_MEDIA #if HAS_MEDIA
#ifndef SDCARD_CONNECTION #ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION LCD #if ENABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION ONBOARD
#else
#define SDCARD_CONNECTION LCD
#endif
#endif #endif
#if SD_CONNECTION_IS(ONBOARD) #if SD_CONNECTION_IS(ONBOARD)
//#define SOFTWARE_SPI //#define SOFTWARE_SPI

View file

@ -228,7 +228,7 @@
// SD Support // SD Support
// //
#ifndef SDCARD_CONNECTION #ifndef SDCARD_CONNECTION
#if HAS_WIRED_LCD #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION LCD #define SDCARD_CONNECTION LCD
#else #else
#define SDCARD_CONNECTION ONBOARD #define SDCARD_CONNECTION ONBOARD

View file

@ -326,7 +326,7 @@
// SD Support // SD Support
// //
#ifndef SDCARD_CONNECTION #ifndef SDCARD_CONNECTION
#if HAS_WIRED_LCD #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION LCD #define SDCARD_CONNECTION LCD
#else #else
#define SDCARD_CONNECTION ONBOARD #define SDCARD_CONNECTION ONBOARD

View file

@ -272,7 +272,7 @@
// SD Support // SD Support
// //
#ifndef SDCARD_CONNECTION #ifndef SDCARD_CONNECTION
#if HAS_WIRED_LCD #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION LCD #define SDCARD_CONNECTION LCD
#else #else
#define SDCARD_CONNECTION ONBOARD #define SDCARD_CONNECTION ONBOARD

View file

@ -254,7 +254,7 @@
// SD Support // SD Support
// //
#ifndef SDCARD_CONNECTION #ifndef SDCARD_CONNECTION
#if HAS_WIRED_LCD #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION LCD #define SDCARD_CONNECTION LCD
#else #else
#define SDCARD_CONNECTION ONBOARD #define SDCARD_CONNECTION ONBOARD

View file

@ -246,7 +246,7 @@
// SD Support // SD Support
// //
#ifndef SDCARD_CONNECTION #ifndef SDCARD_CONNECTION
#if HAS_WIRED_LCD #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION LCD #define SDCARD_CONNECTION LCD
#else #else
#define SDCARD_CONNECTION ONBOARD #define SDCARD_CONNECTION ONBOARD