8282// Public Variables
8383// ------------------------
8484
85- #if ( defined(SERIAL_USB) && !defined(USE_USB_COMPOSITE))
85+ #if defined(SERIAL_USB) && !HAS_SD_HOST_DRIVE
8686 USBSerial SerialUSB;
8787#endif
8888
@@ -251,7 +251,7 @@ void HAL_init() {
251251 #if PIN_EXISTS(LED)
252252 OUT_WRITE (LED_PIN, LOW);
253253 #endif
254- #ifdef USE_USB_COMPOSITE
254+ #if HAS_SD_HOST_DRIVE
255255 MSC_SD_init ();
256256 #endif
257257 #if PIN_EXISTS(USB_CONNECT)
@@ -263,17 +263,15 @@ void HAL_init() {
263263
264264// HAL idle task
265265void HAL_idletask () {
266- #ifdef USE_USB_COMPOSITE
267- #if HAS_SHARED_MEDIA
268- // If Marlin is using the SD card we need to lock it to prevent access from
269- // a PC via USB.
270- // Other HALs use IS_SD_PRINTING() and IS_SD_FILE_OPEN() to check for access but
271- // this will not reliably detect delete operations. To be safe we will lock
272- // the disk if Marlin has it mounted. Unfortunately there is currently no way
273- // to unmount the disk from the LCD menu.
274- // if (IS_SD_PRINTING() || IS_SD_FILE_OPEN())
275- /* copy from lpc1768 framework, should be fixed later for process HAS_SHARED_MEDIA*/
276- #endif
266+ #if HAS_SD_HOST_DRIVE
267+ // If Marlin is using the SD card we need to lock it to prevent access from
268+ // a PC via USB.
269+ // Other HALs use IS_SD_PRINTING() and IS_SD_FILE_OPEN() to check for access but
270+ // this will not reliably detect delete operations. To be safe we will lock
271+ // the disk if Marlin has it mounted. Unfortunately there is currently no way
272+ // to unmount the disk from the LCD menu.
273+ // if (IS_SD_PRINTING() || IS_SD_FILE_OPEN())
274+ /* copy from lpc1768 framework, should be fixed later for process HAS_SD_HOST_DRIVE*/
277275 // process USB mass storage device class loop
278276 MarlinMSC.loop ();
279277 #endif
0 commit comments