From ffb418b226fdef98316a07365e869dfbf13d0210 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 14 Sep 2019 02:30:29 -0500 Subject: [PATCH] Move some SD comments --- Marlin/src/HAL/HAL_SAMD51/HAL.cpp | 3 ++- Marlin/src/inc/Conditionals_post.h | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Marlin/src/HAL/HAL_SAMD51/HAL.cpp b/Marlin/src/HAL/HAL_SAMD51/HAL.cpp index dac6037b20..5810cc1763 100644 --- a/Marlin/src/HAL/HAL_SAMD51/HAL.cpp +++ b/Marlin/src/HAL/HAL_SAMD51/HAL.cpp @@ -373,7 +373,8 @@ void HAL_init(void) { dma_init(); #endif #if ENABLED(SDSUPPORT) - #if SD_CONNECTION_IS(ONBOARD) && PIN_EXISTS(SD_DETECT) // SD_DETECT_PIN may be remove when NO_SD_HOST_DRIVE is not defined in configuration_adv + // SD_DETECT_PIN may be removed if NO_SD_HOST_DRIVE is not defined in Configuration_adv.h + #if SD_CONNECTION_IS(ONBOARD) && PIN_EXISTS(SD_DETECT) SET_INPUT_PULLUP(SD_DETECT_PIN); #endif OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 55a1896092..1d97240943 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -1818,13 +1818,13 @@ #endif #endif -// -// The external SD card is not used. Hardware SPI is used to access the card. -// When sharing the SD card with a PC we want the menu options to -// mount/unmount the card and refresh it. So we disable card detect. -// #if ENABLED(SDSUPPORT) #if SD_CONNECTION_IS(ONBOARD) && DISABLED(NO_SD_HOST_DRIVE) + // + // The external SD card is not used. Hardware SPI is used to access the card. + // When sharing the SD card with a PC we want the menu options to + // mount/unmount the card and refresh it. So we disable card detect. + // #undef SD_DETECT_PIN #define SHARED_SD_CARD #endif