Skip to content

Commit e5df74b

Browse files
committed
🩹 Fix MKS Gen-L V1 pins, allow more RAMPS overrides
1 parent 1f84f50 commit e5df74b

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed

Marlin/src/pins/pins.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
#elif MB(MKS_GEN_13)
170170
#include "ramps/pins_MKS_GEN_13.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
171171
#elif MB(MKS_GEN_L)
172-
#include "ramps/pins_MKS_GEN_L.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
172+
#include "ramps/pins_MKS_GEN_L.h" // ATmega2560 env:mega2560
173173
#elif MB(KFB_2)
174174
#include "ramps/pins_BIQU_KFB_2.h" // ATmega2560 env:mega2560
175175
#elif MB(ZRIB_V20)

Marlin/src/pins/ramps/pins_MKS_GEN_L.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* MKS GEN L – Arduino Mega2560 with RAMPS v1.4 pin assignments
2626
* Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20GEN%20L%20v1.0/MKS%20Gen_L%20V1.0_008%20SCH.pdf
2727
* 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
28-
* ATmega2560, ATmega1280
28+
* ATmega2560
2929
*/
3030

3131
#if HOTENDS > 2 || E_STEPPERS > 2
@@ -38,10 +38,15 @@
3838
// Heaters / Fans
3939
//
4040

41-
#define MOSFET_A_PIN 10 // HE0
42-
#define MOSFET_B_PIN 7 // HE1 or FAN Hotend Cooling
43-
#define MOSFET_C_PIN 8 // HBED
44-
#define FAN0_PIN 9 // FAN Part Cooling
41+
#define HEATER_BED_PIN 8 // H-BED
42+
#define HEATER_0_PIN 10 // HE0
43+
#if ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL)
44+
#define HEATER_1_PIN 7 // HE1
45+
#else
46+
#define FAN1_PIN 7 // HE1
47+
#endif
48+
49+
#define FAN0_PIN 9 // FAN
4550

4651
//
4752
// CS Pins wired to avoid conflict with the LCD

Marlin/src/pins/ramps/pins_RAMPS.h

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,22 @@
231231
#define MOSFET_D_PIN -1
232232
#endif
233233

234-
#define HEATER_0_PIN MOSFET_A_PIN
234+
#ifndef HEATER_0_PIN
235+
#define HEATER_0_PIN MOSFET_A_PIN
236+
#endif
235237

236238
#if FET_ORDER_EFB // Hotend, Fan, Bed
237239
#ifndef HEATER_BED_PIN
238240
#define HEATER_BED_PIN MOSFET_C_PIN
239241
#endif
240242
#elif FET_ORDER_EEF // Hotend, Hotend, Fan
241-
#define HEATER_1_PIN MOSFET_B_PIN
243+
#ifndef HEATER_1_PIN
244+
#define HEATER_1_PIN MOSFET_B_PIN
245+
#endif
242246
#elif FET_ORDER_EEB // Hotend, Hotend, Bed
243-
#define HEATER_1_PIN MOSFET_B_PIN
247+
#ifndef HEATER_1_PIN
248+
#define HEATER_1_PIN MOSFET_B_PIN
249+
#endif
244250
#ifndef HEATER_BED_PIN
245251
#define HEATER_BED_PIN MOSFET_C_PIN
246252
#endif
@@ -253,9 +259,13 @@
253259
#define HEATER_BED_PIN MOSFET_C_PIN
254260
#endif
255261
#if ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL)
256-
#define HEATER_1_PIN MOSFET_D_PIN
262+
#ifndef HEATER_1_PIN
263+
#define HEATER_1_PIN MOSFET_D_PIN
264+
#endif
257265
#else
258-
#define FAN1_PIN MOSFET_D_PIN
266+
#ifndef FAN1_PIN
267+
#define FAN1_PIN MOSFET_D_PIN
268+
#endif
259269
#endif
260270
#endif
261271

0 commit comments

Comments
 (0)