|
@@ -196,16 +196,17 @@
|
196
|
196
|
|
197
|
197
|
/*
|
198
|
198
|
* There are a number of configurations available for the SBase SD card reader.
|
199
|
|
- * A custom cable can be used to allow access to the LCD based SD card.
|
200
|
|
- * A standard cable can be used for access to the LCD SD card (but no SD detect).
|
201
|
|
- * The onboard SD card can be used and optionally shared with a PC via USB.
|
|
199
|
+ * - A custom cable can be used to allow access to the LCD based SD card.
|
|
200
|
+ * - A standard cable can be used for access to the LCD SD card (but no SD detect).
|
|
201
|
+ * - The onboard SD card can be used and optionally shared with a PC via USB.
|
202
|
202
|
*/
|
203
|
203
|
|
204
|
204
|
//#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD
|
205
|
205
|
//#define LPC_SD_LCD // Marlin uses the SD drive attached to the LCD
|
206
|
206
|
#define LPC_SD_ONBOARD // Marlin uses the SD drive attached to the control board
|
207
|
207
|
|
208
|
|
-#ifdef LPC_SD_CUSTOM_CABLE
|
|
208
|
+#if ENABLED(LPC_SD_CUSTOM_CABLE)
|
|
209
|
+
|
209
|
210
|
/**
|
210
|
211
|
* A custom cable is needed. See the README file in the
|
211
|
212
|
* Marlin\src\config\examples\Mks\Sbase directory
|
|
@@ -218,43 +219,41 @@
|
218
|
219
|
* If you can't find a pin to use for the LCD's SD_DETECT then comment out
|
219
|
220
|
* SD_DETECT_PIN entirely and remove that wire from the the custom cable.
|
220
|
221
|
*/
|
221
|
|
- #define SD_DETECT_PIN P2_11 // J8-5 (moved from EXP2 P0.27)
|
222
|
|
- #define SCK_PIN P1_22 // J8-2 (moved from EXP2 P0.7)
|
223
|
|
- #define MISO_PIN P1_23 // J8-3 (moved from EXP2 P0.8)
|
224
|
|
- #define MOSI_PIN P2_12 // J8-4 (moved from EXP2 P0.9)
|
225
|
|
- #define SS_PIN P0_28 // Chip select for SD card used by Marlin
|
226
|
|
- #define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
|
|
222
|
+ #define SD_DETECT_PIN P2_11 // J8-5 (moved from EXP2 P0.27)
|
|
223
|
+ #define SCK_PIN P1_22 // J8-2 (moved from EXP2 P0.7)
|
|
224
|
+ #define MISO_PIN P1_23 // J8-3 (moved from EXP2 P0.8)
|
|
225
|
+ #define MOSI_PIN P2_12 // J8-4 (moved from EXP2 P0.9)
|
|
226
|
+ #define SS_PIN P0_28 // Chip select for SD card used by Marlin
|
|
227
|
+ #define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
|
227
|
228
|
#define LPC_SOFTWARE_SPI // With a custom cable we need software SPI because the
|
228
|
229
|
// selected pins are not on a hardware SPI controller
|
229
|
|
-#endif
|
|
230
|
+#elif ENABLED(LPC_SD_LCD)
|
230
|
231
|
|
231
|
|
-#ifdef LPC_SD_LCD
|
232
|
232
|
// use standard cable and header, SPI and SD detect sre shared with on-board SD card
|
233
|
233
|
// hardware SPI is used for both SD cards. The detect pin is shred between the
|
234
|
234
|
// LCD and onboard SD readers so we disable it.
|
235
|
|
- #undef SD_DETECT_PIN
|
236
|
|
- #define SCK_PIN P0_07
|
237
|
|
- #define MISO_PIN P0_08
|
238
|
|
- #define MOSI_PIN P0_09
|
239
|
|
- #define SS_PIN P0_28 // Chip select for SD card used by Marlin
|
240
|
|
- #define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
|
241
|
|
-#endif
|
|
235
|
+ #define SCK_PIN P0_07
|
|
236
|
+ #define MISO_PIN P0_08
|
|
237
|
+ #define MOSI_PIN P0_09
|
|
238
|
+ #define SS_PIN P0_28 // Chip select for SD card used by Marlin
|
|
239
|
+ #define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
|
|
240
|
+
|
|
241
|
+#elif ENABLED(LPC_SD_ONBOARD)
|
242
|
242
|
|
243
|
|
-#ifdef LPC_SD_ONBOARD
|
244
|
243
|
// The external SD card is not used. Hardware SPI is used to access the card.
|
245
|
|
- #ifdef USB_SD_ONBOARD
|
|
244
|
+ #if ENABLED(USB_SD_ONBOARD)
|
246
|
245
|
// When sharing the SD card with a PC we want the menu options to
|
247
|
246
|
// mount/unmount the card and refresh it. So we disable card detect.
|
248
|
247
|
#define SHARED_SD_CARD
|
249
|
|
- #undef SD_DETECT_PIN
|
250
|
248
|
#else
|
251
|
|
- #define SD_DETECT_PIN P0_27
|
|
249
|
+ #define SD_DETECT_PIN P0_27
|
252
|
250
|
#endif
|
253
|
|
- #define SCK_PIN P0_07
|
254
|
|
- #define MISO_PIN P0_08
|
255
|
|
- #define MOSI_PIN P0_09
|
256
|
|
- #define SS_PIN P0_06 // Chip select for SD card used by Marlin
|
257
|
|
- #define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
|
|
251
|
+ #define SCK_PIN P0_07
|
|
252
|
+ #define MISO_PIN P0_08
|
|
253
|
+ #define MOSI_PIN P0_09
|
|
254
|
+ #define SS_PIN P0_06 // Chip select for SD card used by Marlin
|
|
255
|
+ #define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
|
|
256
|
+
|
258
|
257
|
#endif
|
259
|
258
|
|
260
|
259
|
/**
|
|
@@ -286,6 +285,7 @@
|
286
|
285
|
#endif
|
287
|
286
|
#endif
|
288
|
287
|
#endif
|
|
288
|
+
|
289
|
289
|
#if HAS_DRIVER(TMC2208)
|
290
|
290
|
// The shortage of pins becomes apparent.
|
291
|
291
|
// Worst case you may have to give up the LCD
|