From e5df74b52b1c0360c19a535079bff63c69f96f21 Mon Sep 17 00:00:00 2001 From: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:06:54 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20MKS=20Gen-L=20V1=20pins,?= =?UTF-8?q?=20allow=20more=20RAMPS=20overrides?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/pins.h | 2 +- Marlin/src/pins/ramps/pins_MKS_GEN_L.h | 15 ++++++++++----- Marlin/src/pins/ramps/pins_RAMPS.h | 20 +++++++++++++++----- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index cdc4fdb7a406d..3e74509180e27 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -169,7 +169,7 @@ #elif MB(MKS_GEN_13) #include "ramps/pins_MKS_GEN_13.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(MKS_GEN_L) - #include "ramps/pins_MKS_GEN_L.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 + #include "ramps/pins_MKS_GEN_L.h" // ATmega2560 env:mega2560 #elif MB(KFB_2) #include "ramps/pins_BIQU_KFB_2.h" // ATmega2560 env:mega2560 #elif MB(ZRIB_V20) diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h index 73e7aa577d50c..55180b4b9a5f3 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h @@ -25,7 +25,7 @@ * MKS GEN L – Arduino Mega2560 with RAMPS v1.4 pin assignments * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20GEN%20L%20v1.0/MKS%20Gen_L%20V1.0_008%20SCH.pdf * Origin: https://github.com/makerbase-mks/MKS-GEN_L/blob/master/hardware/MKS%20Gen_L%20V1.0_008/MKS%20Gen_L%20V1.0_008%20SCH.pdf - * ATmega2560, ATmega1280 + * ATmega2560 */ #if HOTENDS > 2 || E_STEPPERS > 2 @@ -38,10 +38,15 @@ // Heaters / Fans // -#define MOSFET_A_PIN 10 // HE0 -#define MOSFET_B_PIN 7 // HE1 or FAN Hotend Cooling -#define MOSFET_C_PIN 8 // HBED -#define FAN0_PIN 9 // FAN Part Cooling +#define HEATER_BED_PIN 8 // H-BED +#define HEATER_0_PIN 10 // HE0 +#if ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL) + #define HEATER_1_PIN 7 // HE1 +#else + #define FAN1_PIN 7 // HE1 +#endif + +#define FAN0_PIN 9 // FAN // // CS Pins wired to avoid conflict with the LCD diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 0195f3a1bc9aa..5bbdf1f419cf7 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -231,16 +231,22 @@ #define MOSFET_D_PIN -1 #endif -#define HEATER_0_PIN MOSFET_A_PIN +#ifndef HEATER_0_PIN + #define HEATER_0_PIN MOSFET_A_PIN +#endif #if FET_ORDER_EFB // Hotend, Fan, Bed #ifndef HEATER_BED_PIN #define HEATER_BED_PIN MOSFET_C_PIN #endif #elif FET_ORDER_EEF // Hotend, Hotend, Fan - #define HEATER_1_PIN MOSFET_B_PIN + #ifndef HEATER_1_PIN + #define HEATER_1_PIN MOSFET_B_PIN + #endif #elif FET_ORDER_EEB // Hotend, Hotend, Bed - #define HEATER_1_PIN MOSFET_B_PIN + #ifndef HEATER_1_PIN + #define HEATER_1_PIN MOSFET_B_PIN + #endif #ifndef HEATER_BED_PIN #define HEATER_BED_PIN MOSFET_C_PIN #endif @@ -253,9 +259,13 @@ #define HEATER_BED_PIN MOSFET_C_PIN #endif #if ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL) - #define HEATER_1_PIN MOSFET_D_PIN + #ifndef HEATER_1_PIN + #define HEATER_1_PIN MOSFET_D_PIN + #endif #else - #define FAN1_PIN MOSFET_D_PIN + #ifndef FAN1_PIN + #define FAN1_PIN MOSFET_D_PIN + #endif #endif #endif