Bläddra i källkod

Update the sdcard usb sharing config and apply to Re-ARM

Christopher Pepper 6 år sedan
förälder
incheckning
42fb7c14b0
2 ändrade filer med 36 tillägg och 9 borttagningar
  1. 7
    8
      Marlin/src/pins/pins_MKS_SBASE.h
  2. 29
    1
      Marlin/src/pins/pins_RAMPS_RE_ARM.h

+ 7
- 8
Marlin/src/pins/pins_MKS_SBASE.h Visa fil

@@ -189,7 +189,7 @@
189 189
  * definitions control this feature:
190 190
  */
191 191
 //#define USB_SD_DISABLED
192
-#define USB_SD_ONBOARD
192
+#define USB_SD_ONBOARD        // Provide the onboard SD card to the host as a USB mass storage device
193 193
 
194 194
 /*
195 195
  * There are a number of configurations available for the SBase SD card reader.
@@ -198,11 +198,11 @@
198 198
  * The onboard SD card can be used and optionally shared with a PC via USB.
199 199
  */
200 200
 
201
-//#define SBASE_SD_CUSTOM_CABLE // Use a custom cable to access the SD
202
-//#define SBASE_SD_LCD          // Use the SD drive attached to the LCD
203
-#define SBASE_SD_ONBOARD        // Use the SD drive on the control board
201
+//#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD
202
+//#define LPC_SD_LCD          // Marlin uses the SD drive attached to the LCD
203
+#define LPC_SD_ONBOARD        // Marlin uses the SD drive attached to the control board
204 204
 
205
-#ifdef SBASE_SD_CUSTOM_CABLE
205
+#ifdef LPC_SD_CUSTOM_CABLE
206 206
   /**
207 207
    * A custom cable is needed. See the README file in the
208 208
    * Marlin\src\config\examples\Mks\Sbase directory
@@ -225,11 +225,10 @@
225 225
                             // selected pins are not on a hardware SPI controller
226 226
 #endif
227 227
 
228
-#ifdef SBASE_SD_LCD
228
+#ifdef LPC_SD_LCD
229 229
   // use standard cable and header, SPI and SD detect sre shared with on-board SD card
230 230
   // hardware SPI is used for both SD cards. The detect pin is shred between the
231 231
   // LCD and onboard SD readers so we disable it.
232
-  #define SD_DETECT_PIN      P0_27
233 232
   #undef SD_DETECT_PIN
234 233
   #define SCK_PIN            P0_07
235 234
   #define MISO_PIN           P0_08
@@ -238,7 +237,7 @@
238 237
   #define ONBOARD_SD_CS      P0_06   // Chip select for "System" SD card
239 238
 #endif
240 239
 
241
-#ifdef SBASE_SD_ONBOARD
240
+#ifdef LPC_SD_ONBOARD
242 241
   // The external SD card is not used. Hardware SPI is used to access the card.
243 242
   #ifdef USB_SD_ONBOARD
244 243
     // When sharing the SD card with a PC we want the menu options to

+ 29
- 1
Marlin/src/pins/pins_RAMPS_RE_ARM.h Visa fil

@@ -198,7 +198,6 @@
198 198
 // Misc. Functions
199 199
 //
200 200
 #define LED_PIN           P4_28   // (13)
201
-#define SDSS              P1_23   // (53)
202 201
 
203 202
 // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
204 203
 #ifndef FIL_RUNOUT_PIN
@@ -364,6 +363,35 @@
364 363
 #define ENET_TXD0     P1_00   // (78)  J12-11
365 364
 #define ENET_TXD1     P1_01   // (79)  J12-12
366 365
 
366
+
367
+//#define USB_SD_DISABLED
368
+#define USB_SD_ONBOARD        // Provide the onboard SD card to the host as a USB mass storage device
369
+
370
+//#define LPC_SD_LCD          // Marlin uses the SD drive attached to the LCD
371
+#define LPC_SD_ONBOARD        // Marlin uses the SD drive on the control board
372
+
373
+#ifdef LPC_SD_LCD
374
+  #define SCK_PIN            P0_15
375
+  #define MISO_PIN           P0_17
376
+  #define MOSI_PIN           P0_18
377
+  #define SS_PIN             P1_23   // Chip select for SD card used by Marlin
378
+  #define ONBOARD_SD_CS      P0_06   // Chip select for "System" SD card
379
+#endif
380
+
381
+#ifdef LPC_SD_ONBOARD
382
+  #ifdef USB_SD_ONBOARD
383
+    // When sharing the SD card with a PC we want the menu options to
384
+    // mount/unmount the card and refresh it. So we disable card detect.
385
+    #define SHARED_SD_CARD
386
+    #undef SD_DETECT_PIN // there is also no detect pin for the onboard card
387
+  #endif
388
+  #define SCK_PIN            P0_07
389
+  #define MISO_PIN           P0_08
390
+  #define MOSI_PIN           P0_09
391
+  #define SS_PIN             P0_06   // Chip select for SD card used by Marlin
392
+  #define ONBOARD_SD_CS      P0_06   // Chip select for "System" SD card
393
+#endif
394
+
367 395
 /**
368 396
  *  Fast PWMS
369 397
  *

Laddar…
Avbryt
Spara