Browse Source

Allow override of RAMPS CS Pins (#9472)

Scott Lahteine 7 years ago
parent
commit
693843f1fa
No account linked to committer's email address
1 changed files with 33 additions and 8 deletions
  1. 33
    8
      Marlin/src/pins/pins_RAMPS.h

+ 33
- 8
Marlin/src/pins/pins_RAMPS.h View File

97
 #define X_STEP_PIN         54
97
 #define X_STEP_PIN         54
98
 #define X_DIR_PIN          55
98
 #define X_DIR_PIN          55
99
 #define X_ENABLE_PIN       38
99
 #define X_ENABLE_PIN       38
100
-#define X_CS_PIN           53
100
+#ifndef X_CS_PIN
101
+  #define X_CS_PIN         53
102
+#endif
101
 
103
 
102
 #define Y_STEP_PIN         60
104
 #define Y_STEP_PIN         60
103
 #define Y_DIR_PIN          61
105
 #define Y_DIR_PIN          61
104
 #define Y_ENABLE_PIN       56
106
 #define Y_ENABLE_PIN       56
105
-#define Y_CS_PIN           49
107
+#ifndef Y_CS_PIN
108
+  #define Y_CS_PIN         49
109
+#endif
106
 
110
 
107
 #define Z_STEP_PIN         46
111
 #define Z_STEP_PIN         46
108
 #define Z_DIR_PIN          48
112
 #define Z_DIR_PIN          48
109
 #define Z_ENABLE_PIN       62
113
 #define Z_ENABLE_PIN       62
110
-#define Z_CS_PIN           40
114
+#ifndef Z_CS_PIN
115
+  #define Z_CS_PIN         40
116
+#endif
111
 
117
 
112
 #define E0_STEP_PIN        26
118
 #define E0_STEP_PIN        26
113
 #define E0_DIR_PIN         28
119
 #define E0_DIR_PIN         28
114
 #define E0_ENABLE_PIN      24
120
 #define E0_ENABLE_PIN      24
115
-#define E0_CS_PIN          42
121
+#ifndef E0_CS_PIN
122
+  #define E0_CS_PIN        42
123
+#endif
116
 
124
 
117
 #define E1_STEP_PIN        36
125
 #define E1_STEP_PIN        36
118
 #define E1_DIR_PIN         34
126
 #define E1_DIR_PIN         34
119
 #define E1_ENABLE_PIN      30
127
 #define E1_ENABLE_PIN      30
120
-#define E1_CS_PIN          44
128
+#ifndef E1_CS_PIN
129
+  #define E1_CS_PIN        44
130
+#endif
131
+
132
+/**
133
+ * Default pins for TMC software SPI
134
+ */
135
+#if ENABLED(TMC_USE_SW_SPI)
136
+  #ifndef TMC_SW_MOSI
137
+    #define TMC_SW_MOSI    66
138
+  #endif
139
+  #ifndef TMC_SW_MISO
140
+    #define TMC_SW_MISO    44
141
+  #endif
142
+  #ifndef TMC_SW_SCK
143
+    #define TMC_SW_SCK     64
144
+  #endif
145
+#endif
121
 
146
 
122
 #if ENABLED(HAVE_TMC2208)
147
 #if ENABLED(HAVE_TMC2208)
123
-  /*
148
+  /**
124
    * TMC2208 stepper drivers
149
    * TMC2208 stepper drivers
125
    *
150
    *
126
    * Hardware serial communication ports.
151
    * Hardware serial communication ports.
136
   //#define E1_HARDWARE_SERIAL Serial1
161
   //#define E1_HARDWARE_SERIAL Serial1
137
   //#define E2_HARDWARE_SERIAL Serial1
162
   //#define E2_HARDWARE_SERIAL Serial1
138
   //#define E3_HARDWARE_SERIAL Serial1
163
   //#define E3_HARDWARE_SERIAL Serial1
139
-  //#define E3_HARDWARE_SERIAL Serial1
164
+  //#define E4_HARDWARE_SERIAL Serial1
140
 
165
 
141
-  /*
166
+  /**
142
    * Software serial
167
    * Software serial
143
    */
168
    */
144
 
169
 

Loading…
Cancel
Save