Skip to content

Commit

Permalink
Update the sdcard usb sharing config and apply to Re-ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
p3p committed Oct 14, 2018
1 parent 61fbd0a commit 42fb7c1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 9 deletions.
15 changes: 7 additions & 8 deletions Marlin/src/pins/pins_MKS_SBASE.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
* definitions control this feature:
*/
//#define USB_SD_DISABLED
#define USB_SD_ONBOARD
#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device

/*
* There are a number of configurations available for the SBase SD card reader.
Expand All @@ -198,11 +198,11 @@
* The onboard SD card can be used and optionally shared with a PC via USB.
*/

//#define SBASE_SD_CUSTOM_CABLE // Use a custom cable to access the SD
//#define SBASE_SD_LCD // Use the SD drive attached to the LCD
#define SBASE_SD_ONBOARD // Use the SD drive on the control board
//#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD
//#define LPC_SD_LCD // Marlin uses the SD drive attached to the LCD
#define LPC_SD_ONBOARD // Marlin uses the SD drive attached to the control board

#ifdef SBASE_SD_CUSTOM_CABLE
#ifdef LPC_SD_CUSTOM_CABLE
/**
* A custom cable is needed. See the README file in the
* Marlin\src\config\examples\Mks\Sbase directory
Expand All @@ -225,11 +225,10 @@
// selected pins are not on a hardware SPI controller
#endif

#ifdef SBASE_SD_LCD
#ifdef LPC_SD_LCD
// use standard cable and header, SPI and SD detect sre shared with on-board SD card
// hardware SPI is used for both SD cards. The detect pin is shred between the
// LCD and onboard SD readers so we disable it.
#define SD_DETECT_PIN P0_27
#undef SD_DETECT_PIN
#define SCK_PIN P0_07
#define MISO_PIN P0_08
Expand All @@ -238,7 +237,7 @@
#define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
#endif

#ifdef SBASE_SD_ONBOARD
#ifdef LPC_SD_ONBOARD
// The external SD card is not used. Hardware SPI is used to access the card.
#ifdef USB_SD_ONBOARD
// When sharing the SD card with a PC we want the menu options to
Expand Down
30 changes: 29 additions & 1 deletion Marlin/src/pins/pins_RAMPS_RE_ARM.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@
// Misc. Functions
//
#define LED_PIN P4_28 // (13)
#define SDSS P1_23 // (53)

// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
#ifndef FIL_RUNOUT_PIN
Expand Down Expand Up @@ -364,6 +363,35 @@
#define ENET_TXD0 P1_00 // (78) J12-11
#define ENET_TXD1 P1_01 // (79) J12-12


//#define USB_SD_DISABLED
#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device

//#define LPC_SD_LCD // Marlin uses the SD drive attached to the LCD
#define LPC_SD_ONBOARD // Marlin uses the SD drive on the control board

#ifdef LPC_SD_LCD
#define SCK_PIN P0_15
#define MISO_PIN P0_17
#define MOSI_PIN P0_18
#define SS_PIN P1_23 // Chip select for SD card used by Marlin
#define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
#endif

#ifdef LPC_SD_ONBOARD
#ifdef USB_SD_ONBOARD
// When sharing the SD card with a PC we want the menu options to
// mount/unmount the card and refresh it. So we disable card detect.
#define SHARED_SD_CARD
#undef SD_DETECT_PIN // there is also no detect pin for the onboard card
#endif
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN P0_06 // Chip select for SD card used by Marlin
#define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
#endif

/**
* Fast PWMS
*
Expand Down

0 comments on commit 42fb7c1

Please sign in to comment.