Update SD card connection / sharing options (#14325)
This commit is contained in:
committed by
Scott Lahteine
parent
9f136a7c67
commit
064177154c
@ -69,11 +69,3 @@
|
||||
#if IS_RE_ARM_BOARD && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
|
||||
#error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 require TMC_USE_SW_SPI"
|
||||
#endif
|
||||
|
||||
#if 1 < (ENABLED(LPC_SD_CUSTOM_CABLE) + ENABLED(LPC_SD_LCD) + ENABLED(LPC_SD_ONBOARD))
|
||||
#error "Enable only one of LPC_SD_CUSTOM_CABLE, LPC_SD_LCD, or LPC_SD_ONBOARD."
|
||||
#endif
|
||||
|
||||
#if 1 < (ENABLED(USB_SD_DISABLED) + ENABLED(USB_SD_ONBOARD))
|
||||
#error "Enable only one of USB_SD_DISABLED or USB_SD_ONBOARD."
|
||||
#endif
|
||||
|
@ -81,8 +81,8 @@ void HAL_init() {
|
||||
OUT_WRITE(SS_PIN, HIGH);
|
||||
#endif
|
||||
|
||||
#if defined(ONBOARD_SD_CS) && ONBOARD_SD_CS > -1
|
||||
OUT_WRITE(ONBOARD_SD_CS, HIGH);
|
||||
#if PIN_EXISTS(ONBOARD_SD_CS) && ONBOARD_SD_CS_PIN != SS_PIN
|
||||
OUT_WRITE(ONBOARD_SD_CS_PIN, HIGH);
|
||||
#endif
|
||||
|
||||
USB_Init(); // USB Initialization
|
||||
@ -90,7 +90,7 @@ void HAL_init() {
|
||||
delay(1000); // Give OS time to notice
|
||||
USB_Connect(TRUE);
|
||||
|
||||
#if DISABLED(USB_SD_DISABLED)
|
||||
#if !BOTH(SHARED_SD_CARD, INIT_SDCARD_ON_BOOT) && DISABLED(NO_SD_HOST_DRIVE)
|
||||
MSC_SD_Init(0); // Enable USB SD card access
|
||||
#endif
|
||||
|
||||
@ -117,7 +117,7 @@ void HAL_init() {
|
||||
|
||||
// HAL idle task
|
||||
void HAL_idletask(void) {
|
||||
#if BOTH(SDSUPPORT, SHARED_SD_CARD)
|
||||
#if ENABLED(SHARED_SD_CARD)
|
||||
// If Marlin is using the SD card we need to lock it to prevent access from
|
||||
// a PC via USB.
|
||||
// Other HALs use IS_SD_PRINTING() and IS_SD_FILE_OPEN() to check for access but
|
||||
|
Reference in New Issue
Block a user