Browse Source

Fix BTT GTR 1.0 endstop/DIAG pins (#20296)

ellensp 4 years ago
parent
commit
109f68f7df
No account linked to committer's email address
1 changed files with 45 additions and 6 deletions
  1. 45
    6
      Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h

+ 45
- 6
Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h View File

@@ -47,14 +47,53 @@
47 47
 #define PS_ON_PIN                           PH6
48 48
 
49 49
 //
50
+// Trinamic Stallguard pins
51
+//
52
+#define X_DIAG_PIN                          PF2   // X-
53
+#define Y_DIAG_PIN                          PC13  // Y-
54
+#define Z_DIAG_PIN                          PE0   // Z-
55
+#define E0_DIAG_PIN                         PG14  // X+
56
+#define E1_DIAG_PIN                         PG9   // Y+
57
+#define E2_DIAG_PIN                         PD3   // Z+
58
+
59
+//
50 60
 // Limit Switches
51 61
 //
52
-#define X_MIN_PIN                           PF2
53
-#define X_MAX_PIN                           PG14
54
-#define Y_MIN_PIN                           PC13
55
-#define Y_MAX_PIN                           PG9
56
-#define Z_MIN_PIN                           PE0
57
-#define Z_MAX_PIN                           PD3
62
+#ifdef X_STALL_SENSITIVITY
63
+  #define X_STOP_PIN                        X_DIAG_PIN
64
+  #if X_HOME_DIR < 0
65
+    #define X_MAX_PIN                       E0_DIAG_PIN  // X+
66
+  #else
67
+    #define X_MIN_PIN                       E0_DIAG_PIN  // X+
68
+  #endif
69
+#else
70
+  #define X_MIN_PIN                         X_DIAG_PIN   // X-
71
+  #define X_MAX_PIN                         E0_DIAG_PIN  // X+
72
+#endif
73
+
74
+#ifdef Y_STALL_SENSITIVITY
75
+  #define Y_STOP_PIN                        Y_DIAG_PIN
76
+  #if Y_HOME_DIR < 0
77
+    #define Y_MAX_PIN                       E1_DIAG_PIN  // Y+
78
+  #else
79
+    #define Y_MIN_PIN                       E1_DIAG_PIN  // Y+
80
+  #endif
81
+#else
82
+  #define Y_MIN_PIN                         Y_DIAG_PIN   // Y-
83
+  #define Y_MAX_PIN                         E1_DIAG_PIN  // Y+
84
+#endif
85
+
86
+#ifdef Z_STALL_SENSITIVITY
87
+  #define Z_STOP_PIN                        Z_DIAG_PIN
88
+  #if Z_HOME_DIR < 0
89
+    #define Z_MAX_PIN                       E2_DIAG_PIN  // Z+
90
+  #else
91
+    #define Z_MIN_PIN                       E2_DIAG_PIN  // Z+
92
+  #endif
93
+#else
94
+  #define Z_MIN_PIN                         Z_DIAG_PIN   // Z-
95
+  #define Z_MAX_PIN                         E2_DIAG_PIN  // Z+
96
+#endif
58 97
 
59 98
 //
60 99
 // Pins on the extender

Loading…
Cancel
Save