Browse Source

MKS 1.3+: Add pin mapping for PS_ON

This allows the use of D4 as PS_ON since MKS Gen doesn't have a PS_ON pin. However this effectively allows only 3 servos (instead of 4).

Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
Alexey Shvetsov 7 years ago
parent
commit
f38b8c5bf8
2 changed files with 16 additions and 2 deletions
  1. 10
    0
      Marlin/pins_MKS_13.h
  2. 6
    2
      Marlin/pins_RAMPS.h

+ 10
- 0
Marlin/pins_MKS_13.h View File

@@ -41,6 +41,16 @@
41 41
 // Power outputs EFBF or EFBE
42 42
 #define MOSFET_D_PIN 7
43 43
 
44
+//
45
+// PSU / SERVO
46
+//
47
+// If POWER_SUPPLY is specified, always hijack Servo 3
48
+//
49
+#if POWER_SUPPLY > 0
50
+  #define SERVO3_PIN      -1
51
+  #define PS_ON_PIN        4
52
+#endif
53
+
44 54
 #include "pins_RAMPS.h"
45 55
 
46 56
 //

+ 6
- 2
Marlin/pins_RAMPS.h View File

@@ -64,7 +64,9 @@
64 64
 #endif
65 65
 #define SERVO1_PIN          6
66 66
 #define SERVO2_PIN          5
67
-#define SERVO3_PIN          4
67
+#ifndef SERVO3_PIN
68
+  #define SERVO3_PIN        4
69
+#endif
68 70
 
69 71
 //
70 72
 // Limit Switches
@@ -203,7 +205,9 @@
203 205
 // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
204 206
 #define FIL_RUNOUT_PIN      4
205 207
 
206
-#define PS_ON_PIN          12
208
+#ifndef PS_ON_PIN
209
+  #define PS_ON_PIN        12
210
+#endif
207 211
 
208 212
 #if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENABLE_PIN)
209 213
   #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first

Loading…
Cancel
Save