|
|
@ -517,20 +517,28 @@ |
|
|
|
#define HAS_SHARED_MEDIA 1 |
|
|
|
#endif |
|
|
|
|
|
|
|
// Set SD_DETECT_STATE based on hardware if not overridden
|
|
|
|
#if PIN_EXISTS(SD_DETECT) && !defined(SD_DETECT_STATE) |
|
|
|
#if BOTH(HAS_MARLINUI_MENU, ELB_FULL_GRAPHIC_CONTROLLER) && (SD_CONNECTION_IS(LCD) || !defined(SDCARD_CONNECTION)) |
|
|
|
#define SD_DETECT_STATE HIGH |
|
|
|
#else |
|
|
|
#define SD_DETECT_STATE LOW |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
// Extender cable doesn't support SD_DETECT_PIN
|
|
|
|
#if ENABLED(NO_SD_DETECT) |
|
|
|
#undef SD_DETECT_PIN |
|
|
|
#endif |
|
|
|
|
|
|
|
// Not onboard or custom cable
|
|
|
|
#if SD_CONNECTION_IS(LCD) || !defined(SDCARD_CONNECTION) |
|
|
|
#define SD_CONNECTION_TYPICAL 1 |
|
|
|
#endif |
|
|
|
|
|
|
|
// Set SD_DETECT_STATE based on hardware if not overridden
|
|
|
|
#if PIN_EXISTS(SD_DETECT) |
|
|
|
#define HAS_SD_DETECT 1 |
|
|
|
#ifndef SD_DETECT_STATE |
|
|
|
#if ALL(SD_CONNECTION_TYPICAL, HAS_MARLINUI_MENU, ELB_FULL_GRAPHIC_CONTROLLER) |
|
|
|
#define SD_DETECT_STATE HIGH |
|
|
|
#else |
|
|
|
#define SD_DETECT_STATE LOW |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#if DISABLED(USB_FLASH_DRIVE_SUPPORT) || BOTH(MULTI_VOLUME, VOLUME_SD_ONBOARD) |
|
|
|
#if ENABLED(SDIO_SUPPORT) |
|
|
|
#define NEED_SD2CARD_SDIO 1 |
|
|
@ -539,10 +547,10 @@ |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#endif |
|
|
|
#if HAS_SD_DETECT && NONE(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT, IS_DWIN_MARLINUI, EXTENSIBLE_UI, HAS_DWIN_E3V2) |
|
|
|
#define REINIT_NOISY_LCD 1 // Have the LCD re-init on SD insertion
|
|
|
|
#endif |
|
|
|
|
|
|
|
#if PIN_EXISTS(SD_DETECT) && NONE(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT, IS_DWIN_MARLINUI, EXTENSIBLE_UI, HAS_DWIN_E3V2) |
|
|
|
#define REINIT_NOISY_LCD 1 // Have the LCD re-init on SD insertion
|
|
|
|
#endif |
|
|
|
|
|
|
|
/**
|
|
|
|