Browse Source

🔧 Cutter pins for SKR 2.0

Scott Lahteine 3 years ago
parent
commit
e6bbdd89b4
1 changed files with 57 additions and 26 deletions
  1. 57
    26
      Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h

+ 57
- 26
Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h View File

@@ -190,16 +190,28 @@
190 190
   #define Z_CS_PIN                          PD0
191 191
 #endif
192 192
 
193
-#define E0_STEP_PIN                         PD15
194
-#define E0_DIR_PIN                          PD14
195
-#define E0_ENABLE_PIN                       PC7
193
+#ifndef E0_STEP_PIN
194
+  #define E0_STEP_PIN                       PD15
195
+#endif
196
+#ifndef E0_DIR_PIN
197
+  #define E0_DIR_PIN                        PD14
198
+#endif
199
+#ifndef E0_ENABLE_PIN
200
+  #define E0_ENABLE_PIN                     PC7
201
+#endif
196 202
 #ifndef E0_CS_PIN
197 203
   #define E0_CS_PIN                         PC6
198 204
 #endif
199 205
 
200
-#define E1_STEP_PIN                         PD11
201
-#define E1_DIR_PIN                          PD10
202
-#define E1_ENABLE_PIN                       PD13
206
+#ifndef E1_STEP_PIN
207
+  #define E1_STEP_PIN                       PD11
208
+#endif
209
+#ifndef E1_DIR_PIN
210
+  #define E1_DIR_PIN                        PD10
211
+#endif
212
+#ifndef E1_ENABLE_PIN
213
+  #define E1_ENABLE_PIN                     PD13
214
+#endif
203 215
 #ifndef E1_CS_PIN
204 216
   #define E1_CS_PIN                         PD12
205 217
 #endif
@@ -207,9 +219,15 @@
207 219
 //
208 220
 // Temperature Sensors
209 221
 //
210
-#define TEMP_BED_PIN                        PA1   // TB
211
-#define TEMP_0_PIN                          PA2   // TH0
212
-#define TEMP_1_PIN                          PA3   // TH1
222
+#ifndef TEMP_0_PIN
223
+  #define TEMP_0_PIN                        PA2   // TH0
224
+#endif
225
+#ifndef TEMP_1_PIN
226
+  #define TEMP_1_PIN                        PA3   // TH1
227
+#endif
228
+#ifndef TEMP_BED_PIN
229
+  #define TEMP_BED_PIN                      PA1   // TB
230
+#endif
213 231
 
214 232
 #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
215 233
   #if TEMP_SENSOR_PROBE
@@ -234,12 +252,22 @@
234 252
 #ifndef FAN_PIN
235 253
   #define FAN_PIN                           PB7   // Fan0
236 254
 #endif
237
-#ifndef FAN1_PIN
238
-  #define FAN1_PIN                          PB6   // Fan1
239
-#endif
240
-#ifndef FAN2_PIN
241
-  #define FAN2_PIN                          PB5   // Fan2
242
-#endif
255
+
256
+#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
257
+  #ifndef SPINDLE_LASER_PWM_PIN
258
+    #define SPINDLE_LASER_PWM_PIN           PB5
259
+  #endif
260
+  #ifndef SPINDLE_LASER_ENA_PIN
261
+    #define SPINDLE_LASER_ENA_PIN           PB6
262
+  #endif
263
+#else
264
+  #ifndef FAN1_PIN
265
+    #define FAN1_PIN                        PB6   // Fan1
266
+  #endif
267
+  #ifndef FAN2_PIN
268
+    #define FAN2_PIN                        PB5   // Fan2
269
+  #endif
270
+#endif // SPINDLE_FEATURE || LASER_FEATURE
243 271
 
244 272
 //
245 273
 // Software SPI pins for TMC2130 stepper drivers
@@ -275,6 +303,9 @@
275 303
   //#define E3_HARDWARE_SERIAL Serial1
276 304
   //#define E4_HARDWARE_SERIAL Serial1
277 305
 
306
+  //
307
+  // Software serial
308
+  //
278 309
   #define X_SERIAL_TX_PIN                   PE0
279 310
   #define X_SERIAL_RX_PIN        X_SERIAL_TX_PIN
280 311
 
@@ -333,7 +364,16 @@
333 364
 // Onboard SD card
334 365
 // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
335 366
 //
336
-#if SD_CONNECTION_IS(ONBOARD)
367
+#if SD_CONNECTION_IS(LCD)
368
+
369
+  #define SDSS                              PA4
370
+  #define SD_SS_PIN                         SDSS
371
+  #define SD_SCK_PIN                        PA5
372
+  #define SD_MISO_PIN                       PA6
373
+  #define SD_MOSI_PIN                       PA7
374
+  #define SD_DETECT_PIN                     PC4
375
+
376
+#elif SD_CONNECTION_IS(ONBOARD)
337 377
 
338 378
   #define SDIO_SUPPORT                            // Use SDIO for onboard SD
339 379
   #define SDIO_D0_PIN                       PC8
@@ -343,17 +383,8 @@
343 383
   #define SDIO_CK_PIN                       PC12
344 384
   #define SDIO_CMD_PIN                      PD2
345 385
 
346
-#elif SD_CONNECTION_IS(LCD)
347
-
348
-  #define SDSS                              PA4
349
-  #define SD_SS_PIN                         SDSS
350
-  #define SD_SCK_PIN                        PA5
351
-  #define SD_MISO_PIN                       PA6
352
-  #define SD_MOSI_PIN                       PA7
353
-  #define SD_DETECT_PIN                     PC4
354
-
355 386
 #elif SD_CONNECTION_IS(CUSTOM_CABLE)
356
-  #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
387
+  #error "No custom SD drive cable defined for this board."
357 388
 #endif
358 389
 
359 390
 #if ENABLED(BTT_MOTOR_EXPANSION)

Loading…
Cancel
Save