|
|
@ -82,7 +82,7 @@ |
|
|
|
// Public Variables
|
|
|
|
// ------------------------
|
|
|
|
|
|
|
|
#if (defined(SERIAL_USB) && !defined(USE_USB_COMPOSITE)) |
|
|
|
#if defined(SERIAL_USB) && !HAS_SD_HOST_DRIVE |
|
|
|
USBSerial SerialUSB; |
|
|
|
#endif |
|
|
|
|
|
|
@ -251,7 +251,7 @@ void HAL_init() { |
|
|
|
#if PIN_EXISTS(LED) |
|
|
|
OUT_WRITE(LED_PIN, LOW); |
|
|
|
#endif |
|
|
|
#ifdef USE_USB_COMPOSITE |
|
|
|
#if HAS_SD_HOST_DRIVE |
|
|
|
MSC_SD_init(); |
|
|
|
#endif |
|
|
|
#if PIN_EXISTS(USB_CONNECT) |
|
|
@ -263,17 +263,15 @@ void HAL_init() { |
|
|
|
|
|
|
|
// HAL idle task
|
|
|
|
void HAL_idletask() { |
|
|
|
#ifdef USE_USB_COMPOSITE |
|
|
|
#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
|
|
|
|
// this will not reliably detect delete operations. To be safe we will lock
|
|
|
|
// the disk if Marlin has it mounted. Unfortunately there is currently no way
|
|
|
|
// to unmount the disk from the LCD menu.
|
|
|
|
// if (IS_SD_PRINTING() || IS_SD_FILE_OPEN())
|
|
|
|
/* copy from lpc1768 framework, should be fixed later for process HAS_SHARED_MEDIA*/ |
|
|
|
#endif |
|
|
|
#if HAS_SD_HOST_DRIVE |
|
|
|
// 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
|
|
|
|
// this will not reliably detect delete operations. To be safe we will lock
|
|
|
|
// the disk if Marlin has it mounted. Unfortunately there is currently no way
|
|
|
|
// to unmount the disk from the LCD menu.
|
|
|
|
// if (IS_SD_PRINTING() || IS_SD_FILE_OPEN())
|
|
|
|
/* copy from lpc1768 framework, should be fixed later for process HAS_SD_HOST_DRIVE*/ |
|
|
|
// process USB mass storage device class loop
|
|
|
|
MarlinMSC.loop(); |
|
|
|
#endif |
|
|
|