From 2eac08af5774730df3f9a72e9d1b0ae0c6f066ad Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 18 Nov 2020 00:13:17 -0600 Subject: [PATCH] USB Media Host followup Restore HAS_SHARED_MEDIA --- Marlin/src/HAL/LPC1768/main.cpp | 5 +++-- Marlin/src/HAL/STM32F1/HAL.cpp | 2 +- Marlin/src/inc/Conditionals_post.h | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Marlin/src/HAL/LPC1768/main.cpp b/Marlin/src/HAL/LPC1768/main.cpp index 645d6942ebb3..085b8ce04bcf 100644 --- a/Marlin/src/HAL/LPC1768/main.cpp +++ b/Marlin/src/HAL/LPC1768/main.cpp @@ -35,10 +35,11 @@ extern "C" { #include } -#include "../../sd/cardreader.h" #include "../../inc/MarlinConfig.h" #include "../../core/millis_t.h" +#include "../../sd/cardreader.h" + extern uint32_t MSC_SD_Init(uint8_t pdrv); extern "C" int isLPC1769(); extern "C" void disk_timerproc(); @@ -140,7 +141,7 @@ void HAL_init() { // HAL idle task void HAL_idletask() { - #if HAS_SD_HOST_DRIVE + #if HAS_SHARED_MEDIA // 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 diff --git a/Marlin/src/HAL/STM32F1/HAL.cpp b/Marlin/src/HAL/STM32F1/HAL.cpp index e6ac87b0eb1f..dfa99d83f4cf 100644 --- a/Marlin/src/HAL/STM32F1/HAL.cpp +++ b/Marlin/src/HAL/STM32F1/HAL.cpp @@ -263,7 +263,7 @@ void HAL_init() { // HAL idle task void HAL_idletask() { - #if HAS_SD_HOST_DRIVE + #if HAS_SHARED_MEDIA // 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 diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 99a40b016a52..994d83ffb3cb 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -367,6 +367,7 @@ // mount/unmount the card and refresh it. So we disable card detect. // #undef SD_DETECT_PIN + #define HAS_SHARED_MEDIA 1 #endif #if PIN_EXISTS(SD_DETECT)