Skip to content

Commit

Permalink
USB Media Host followup
Browse files Browse the repository at this point in the history
Restore HAS_SHARED_MEDIA
  • Loading branch information
thinkyhead authored and dpreed committed Feb 5, 2021
1 parent 37b4885 commit 2eac08a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Marlin/src/HAL/LPC1768/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ extern "C" {
#include <debug_frmwrk.h>
}

#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();
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/STM32F1/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2eac08a

Please sign in to comment.