From e6bbdd89b44a6d83df8788debf25880fadfab87a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 4 Dec 2021 17:17:10 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Cutter=20pins=20for=20SKR=202.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 83 +++++++++++++------ 1 file changed, 57 insertions(+), 26 deletions(-) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index a2111d849e..bf3409210e 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -190,16 +190,28 @@ #define Z_CS_PIN PD0 #endif -#define E0_STEP_PIN PD15 -#define E0_DIR_PIN PD14 -#define E0_ENABLE_PIN PC7 +#ifndef E0_STEP_PIN + #define E0_STEP_PIN PD15 +#endif +#ifndef E0_DIR_PIN + #define E0_DIR_PIN PD14 +#endif +#ifndef E0_ENABLE_PIN + #define E0_ENABLE_PIN PC7 +#endif #ifndef E0_CS_PIN #define E0_CS_PIN PC6 #endif -#define E1_STEP_PIN PD11 -#define E1_DIR_PIN PD10 -#define E1_ENABLE_PIN PD13 +#ifndef E1_STEP_PIN + #define E1_STEP_PIN PD11 +#endif +#ifndef E1_DIR_PIN + #define E1_DIR_PIN PD10 +#endif +#ifndef E1_ENABLE_PIN + #define E1_ENABLE_PIN PD13 +#endif #ifndef E1_CS_PIN #define E1_CS_PIN PD12 #endif @@ -207,9 +219,15 @@ // // Temperature Sensors // -#define TEMP_BED_PIN PA1 // TB -#define TEMP_0_PIN PA2 // TH0 -#define TEMP_1_PIN PA3 // TH1 +#ifndef TEMP_0_PIN + #define TEMP_0_PIN PA2 // TH0 +#endif +#ifndef TEMP_1_PIN + #define TEMP_1_PIN PA3 // TH1 +#endif +#ifndef TEMP_BED_PIN + #define TEMP_BED_PIN PA1 // TB +#endif #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #if TEMP_SENSOR_PROBE @@ -234,12 +252,22 @@ #ifndef FAN_PIN #define FAN_PIN PB7 // Fan0 #endif -#ifndef FAN1_PIN - #define FAN1_PIN PB6 // Fan1 -#endif -#ifndef FAN2_PIN - #define FAN2_PIN PB5 // Fan2 -#endif + +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #ifndef SPINDLE_LASER_PWM_PIN + #define SPINDLE_LASER_PWM_PIN PB5 + #endif + #ifndef SPINDLE_LASER_ENA_PIN + #define SPINDLE_LASER_ENA_PIN PB6 + #endif +#else + #ifndef FAN1_PIN + #define FAN1_PIN PB6 // Fan1 + #endif + #ifndef FAN2_PIN + #define FAN2_PIN PB5 // Fan2 + #endif +#endif // SPINDLE_FEATURE || LASER_FEATURE // // Software SPI pins for TMC2130 stepper drivers @@ -275,6 +303,9 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 + // + // Software serial + // #define X_SERIAL_TX_PIN PE0 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN @@ -333,7 +364,16 @@ // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // -#if SD_CONNECTION_IS(ONBOARD) +#if SD_CONNECTION_IS(LCD) + + #define SDSS PA4 + #define SD_SS_PIN SDSS + #define SD_SCK_PIN PA5 + #define SD_MISO_PIN PA6 + #define SD_MOSI_PIN PA7 + #define SD_DETECT_PIN PC4 + +#elif SD_CONNECTION_IS(ONBOARD) #define SDIO_SUPPORT // Use SDIO for onboard SD #define SDIO_D0_PIN PC8 @@ -343,17 +383,8 @@ #define SDIO_CK_PIN PC12 #define SDIO_CMD_PIN PD2 -#elif SD_CONNECTION_IS(LCD) - - #define SDSS PA4 - #define SD_SS_PIN SDSS - #define SD_SCK_PIN PA5 - #define SD_MISO_PIN PA6 - #define SD_MOSI_PIN PA7 - #define SD_DETECT_PIN PC4 - #elif SD_CONNECTION_IS(CUSTOM_CABLE) - #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board" + #error "No custom SD drive cable defined for this board." #endif #if ENABLED(BTT_MOTOR_EXPANSION)