Skip to content

Commit 05b5727

Browse files
committed
🔧 Cutter pins for SKR 2.0
1 parent aa3ec2f commit 05b5727

File tree

1 file changed

+57
-26
lines changed

1 file changed

+57
-26
lines changed

Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h

Lines changed: 57 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -181,26 +181,44 @@
181181
#define Z_CS_PIN PD0
182182
#endif
183183

184-
#define E0_STEP_PIN PD15
185-
#define E0_DIR_PIN PD14
186-
#define E0_ENABLE_PIN PC7
184+
#ifndef E0_STEP_PIN
185+
#define E0_STEP_PIN PD15
186+
#endif
187+
#ifndef E0_DIR_PIN
188+
#define E0_DIR_PIN PD14
189+
#endif
190+
#ifndef E0_ENABLE_PIN
191+
#define E0_ENABLE_PIN PC7
192+
#endif
187193
#ifndef E0_CS_PIN
188194
#define E0_CS_PIN PC6
189195
#endif
190196

191-
#define E1_STEP_PIN PD11
192-
#define E1_DIR_PIN PD10
193-
#define E1_ENABLE_PIN PD13
197+
#ifndef E1_STEP_PIN
198+
#define E1_STEP_PIN PD11
199+
#endif
200+
#ifndef E1_DIR_PIN
201+
#define E1_DIR_PIN PD10
202+
#endif
203+
#ifndef E1_ENABLE_PIN
204+
#define E1_ENABLE_PIN PD13
205+
#endif
194206
#ifndef E1_CS_PIN
195207
#define E1_CS_PIN PD12
196208
#endif
197209

198210
//
199211
// Temperature Sensors
200212
//
201-
#define TEMP_BED_PIN PA1 // TB
202-
#define TEMP_0_PIN PA2 // TH0
203-
#define TEMP_1_PIN PA3 // TH1
213+
#ifndef TEMP_0_PIN
214+
#define TEMP_0_PIN PA2 // TH0
215+
#endif
216+
#ifndef TEMP_1_PIN
217+
#define TEMP_1_PIN PA3 // TH1
218+
#endif
219+
#ifndef TEMP_BED_PIN
220+
#define TEMP_BED_PIN PA1 // TB
221+
#endif
204222

205223
#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
206224
#if TEMP_SENSOR_PROBE
@@ -225,12 +243,22 @@
225243
#ifndef FAN_PIN
226244
#define FAN_PIN PB7 // Fan0
227245
#endif
228-
#ifndef FAN1_PIN
229-
#define FAN1_PIN PB6 // Fan1
230-
#endif
231-
#ifndef FAN2_PIN
232-
#define FAN2_PIN PB5 // Fan2
233-
#endif
246+
247+
#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
248+
#ifndef SPINDLE_LASER_PWM_PIN
249+
#define SPINDLE_LASER_PWM_PIN PB5
250+
#endif
251+
#ifndef SPINDLE_LASER_ENA_PIN
252+
#define SPINDLE_LASER_ENA_PIN PB6
253+
#endif
254+
#else
255+
#ifndef FAN1_PIN
256+
#define FAN1_PIN PB6 // Fan1
257+
#endif
258+
#ifndef FAN2_PIN
259+
#define FAN2_PIN PB5 // Fan2
260+
#endif
261+
#endif // SPINDLE_FEATURE || LASER_FEATURE
234262

235263
//
236264
// Software SPI pins for TMC2130 stepper drivers
@@ -266,6 +294,9 @@
266294
//#define E3_HARDWARE_SERIAL Serial1
267295
//#define E4_HARDWARE_SERIAL Serial1
268296

297+
//
298+
// Software serial
299+
//
269300
#define X_SERIAL_TX_PIN PE0
270301
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
271302

@@ -324,7 +355,16 @@
324355
// Onboard SD card
325356
// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
326357
//
327-
#if SD_CONNECTION_IS(ONBOARD)
358+
#if SD_CONNECTION_IS(LCD)
359+
360+
#define SDSS PA4
361+
#define SD_SS_PIN SDSS
362+
#define SD_SCK_PIN PA5
363+
#define SD_MISO_PIN PA6
364+
#define SD_MOSI_PIN PA7
365+
#define SD_DETECT_PIN PC4
366+
367+
#elif SD_CONNECTION_IS(ONBOARD)
328368

329369
#define SDIO_SUPPORT // Use SDIO for onboard SD
330370
#define SDIO_D0_PIN PC8
@@ -334,17 +374,8 @@
334374
#define SDIO_CK_PIN PC12
335375
#define SDIO_CMD_PIN PD2
336376

337-
#elif SD_CONNECTION_IS(LCD)
338-
339-
#define SDSS PA4
340-
#define SD_SS_PIN SDSS
341-
#define SD_SCK_PIN PA5
342-
#define SD_MISO_PIN PA6
343-
#define SD_MOSI_PIN PA7
344-
#define SD_DETECT_PIN PC4
345-
346377
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
347-
#error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
378+
#error "No custom SD drive cable defined for this board."
348379
#endif
349380

350381
#if ENABLED(BTT_MOTOR_EXPANSION)

0 commit comments

Comments
 (0)