|
@@ -0,0 +1,516 @@
|
|
1
|
+/**
|
|
2
|
+ * Marlin 3D Printer Firmware
|
|
3
|
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
4
|
+ *
|
|
5
|
+ * Based on Sprinter and grbl.
|
|
6
|
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
|
7
|
+ *
|
|
8
|
+ * This program is free software: you can redistribute it and/or modify
|
|
9
|
+ * it under the terms of the GNU General Public License as published by
|
|
10
|
+ * the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+ * (at your option) any later version.
|
|
12
|
+ *
|
|
13
|
+ * This program is distributed in the hope that it will be useful,
|
|
14
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+ * GNU General Public License for more details.
|
|
17
|
+ *
|
|
18
|
+ * You should have received a copy of the GNU General Public License
|
|
19
|
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+ *
|
|
21
|
+ */
|
|
22
|
+#pragma once
|
|
23
|
+
|
|
24
|
+//
|
|
25
|
+// Prepare a list of protected pins for M42/M43
|
|
26
|
+//
|
|
27
|
+
|
|
28
|
+#if PIN_EXISTS(X_MIN)
|
|
29
|
+ #define _X_MIN X_MIN_PIN,
|
|
30
|
+#else
|
|
31
|
+ #define _X_MIN
|
|
32
|
+#endif
|
|
33
|
+#if PIN_EXISTS(X_MAX)
|
|
34
|
+ #define _X_MAX X_MAX_PIN,
|
|
35
|
+#else
|
|
36
|
+ #define _X_MAX
|
|
37
|
+#endif
|
|
38
|
+#if PIN_EXISTS(X_CS)
|
|
39
|
+ #define _X_CS X_CS_PIN,
|
|
40
|
+#else
|
|
41
|
+ #define _X_CS
|
|
42
|
+#endif
|
|
43
|
+#if PIN_EXISTS(X_MS1)
|
|
44
|
+ #define _X_MS1 X_MS1_PIN,
|
|
45
|
+#else
|
|
46
|
+ #define _X_MS1
|
|
47
|
+#endif
|
|
48
|
+#if PIN_EXISTS(X_MS2)
|
|
49
|
+ #define _X_MS2 X_MS2_PIN,
|
|
50
|
+#else
|
|
51
|
+ #define _X_MS2
|
|
52
|
+#endif
|
|
53
|
+#if PIN_EXISTS(X_MS3)
|
|
54
|
+ #define _X_MS3 X_MS3_PIN,
|
|
55
|
+#else
|
|
56
|
+ #define _X_MS3
|
|
57
|
+#endif
|
|
58
|
+
|
|
59
|
+#define _X_PINS X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, _X_MIN _X_MAX _X_MS1 _X_MS2 _X_MS3 _X_CS
|
|
60
|
+
|
|
61
|
+#if PIN_EXISTS(Y_MIN)
|
|
62
|
+ #define _Y_MIN Y_MIN_PIN,
|
|
63
|
+#else
|
|
64
|
+ #define _Y_MIN
|
|
65
|
+#endif
|
|
66
|
+#if PIN_EXISTS(Y_MAX)
|
|
67
|
+ #define _Y_MAX Y_MAX_PIN,
|
|
68
|
+#else
|
|
69
|
+ #define _Y_MAX
|
|
70
|
+#endif
|
|
71
|
+#if PIN_EXISTS(Y_CS)
|
|
72
|
+ #define _Y_CS Y_CS_PIN,
|
|
73
|
+#else
|
|
74
|
+ #define _Y_CS
|
|
75
|
+#endif
|
|
76
|
+#if PIN_EXISTS(Y_MS1)
|
|
77
|
+ #define _Y_MS1 Y_MS1_PIN,
|
|
78
|
+#else
|
|
79
|
+ #define _Y_MS1
|
|
80
|
+#endif
|
|
81
|
+#if PIN_EXISTS(Y_MS2)
|
|
82
|
+ #define _Y_MS2 Y_MS2_PIN,
|
|
83
|
+#else
|
|
84
|
+ #define _Y_MS2
|
|
85
|
+#endif
|
|
86
|
+#if PIN_EXISTS(Y_MS3)
|
|
87
|
+ #define _Y_MS3 Y_MS3_PIN,
|
|
88
|
+#else
|
|
89
|
+ #define _Y_MS3
|
|
90
|
+#endif
|
|
91
|
+
|
|
92
|
+#define _Y_PINS Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, _Y_MIN _Y_MAX _Y_MS1 _Y_MS2 _Y_MS3 _Y_CS
|
|
93
|
+
|
|
94
|
+#if PIN_EXISTS(Z_MIN)
|
|
95
|
+ #define _Z_MIN Z_MIN_PIN,
|
|
96
|
+#else
|
|
97
|
+ #define _Z_MIN
|
|
98
|
+#endif
|
|
99
|
+#if PIN_EXISTS(Z_MAX)
|
|
100
|
+ #define _Z_MAX Z_MAX_PIN,
|
|
101
|
+#else
|
|
102
|
+ #define _Z_MAX
|
|
103
|
+#endif
|
|
104
|
+#if PIN_EXISTS(Z_CS)
|
|
105
|
+ #define _Z_CS Z_CS_PIN,
|
|
106
|
+#else
|
|
107
|
+ #define _Z_CS
|
|
108
|
+#endif
|
|
109
|
+#if PIN_EXISTS(Z_MS1)
|
|
110
|
+ #define _Z_MS1 Z_MS1_PIN,
|
|
111
|
+#else
|
|
112
|
+ #define _Z_MS1
|
|
113
|
+#endif
|
|
114
|
+#if PIN_EXISTS(Z_MS2)
|
|
115
|
+ #define _Z_MS2 Z_MS2_PIN,
|
|
116
|
+#else
|
|
117
|
+ #define _Z_MS2
|
|
118
|
+#endif
|
|
119
|
+#if PIN_EXISTS(Z_MS3)
|
|
120
|
+ #define _Z_MS3 Z_MS3_PIN,
|
|
121
|
+#else
|
|
122
|
+ #define _Z_MS3
|
|
123
|
+#endif
|
|
124
|
+
|
|
125
|
+#define _Z_PINS Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, _Z_MIN _Z_MAX _Z_MS1 _Z_MS2 _Z_MS3 _Z_CS
|
|
126
|
+
|
|
127
|
+//
|
|
128
|
+// Extruder Chip Select, Digital Micro-steps
|
|
129
|
+//
|
|
130
|
+
|
|
131
|
+// Mixing stepper, Switching stepper, or regular stepper
|
|
132
|
+#define E_NEEDED(N) (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > N) \
|
|
133
|
+ || (ENABLED(SWITCHING_EXTRUDER) && E_STEPPERS > N) \
|
|
134
|
+ || (DISABLED(SWITCHING_EXTRUDER) && DISABLED(MIXING_EXTRUDER) && EXTRUDERS > N)
|
|
135
|
+
|
|
136
|
+#if PIN_EXISTS(E0_CS)
|
|
137
|
+ #define _E0_CS E0_CS_PIN,
|
|
138
|
+#else
|
|
139
|
+ #define _E0_CS
|
|
140
|
+#endif
|
|
141
|
+#if PIN_EXISTS(E0_MS1)
|
|
142
|
+ #define _E0_MS1 E0_MS1_PIN,
|
|
143
|
+#else
|
|
144
|
+ #define _E0_MS1
|
|
145
|
+#endif
|
|
146
|
+#if PIN_EXISTS(E0_MS2)
|
|
147
|
+ #define _E0_MS2 E0_MS2_PIN,
|
|
148
|
+#else
|
|
149
|
+ #define _E0_MS2
|
|
150
|
+#endif
|
|
151
|
+#if PIN_EXISTS(E0_MS3)
|
|
152
|
+ #define _E0_MS3 E0_MS3_PIN,
|
|
153
|
+#else
|
|
154
|
+ #define _E0_MS3
|
|
155
|
+#endif
|
|
156
|
+
|
|
157
|
+#define _E1_CS
|
|
158
|
+#define _E1_MS1
|
|
159
|
+#define _E1_MS2
|
|
160
|
+#define _E1_MS3
|
|
161
|
+
|
|
162
|
+#if E_NEEDED(1)
|
|
163
|
+ #if PIN_EXISTS(E1_CS)
|
|
164
|
+ #undef _E1_CS
|
|
165
|
+ #define _E1_CS E1_CS_PIN,
|
|
166
|
+ #endif
|
|
167
|
+ #if PIN_EXISTS(E1_MS1)
|
|
168
|
+ #undef _E1_MS1
|
|
169
|
+ #define _E1_MS1 E1_MS1_PIN,
|
|
170
|
+ #endif
|
|
171
|
+ #if PIN_EXISTS(E1_MS2)
|
|
172
|
+ #undef _E1_MS2
|
|
173
|
+ #define _E1_MS2 E1_MS2_PIN,
|
|
174
|
+ #endif
|
|
175
|
+ #if PIN_EXISTS(E1_MS3)
|
|
176
|
+ #undef _E1_MS3
|
|
177
|
+ #define _E1_MS3 E1_MS3_PIN,
|
|
178
|
+ #endif
|
|
179
|
+#endif
|
|
180
|
+
|
|
181
|
+#define _E2_CS
|
|
182
|
+#define _E2_MS1
|
|
183
|
+#define _E2_MS2
|
|
184
|
+#define _E2_MS3
|
|
185
|
+
|
|
186
|
+#if E_NEEDED(2)
|
|
187
|
+ #if PIN_EXISTS(E2_CS)
|
|
188
|
+ #undef _E2_CS
|
|
189
|
+ #define _E2_CS E2_CS_PIN,
|
|
190
|
+ #endif
|
|
191
|
+ #if PIN_EXISTS(E2_MS1)
|
|
192
|
+ #undef _E2_MS1
|
|
193
|
+ #define _E2_MS1 E2_MS1_PIN,
|
|
194
|
+ #endif
|
|
195
|
+ #if PIN_EXISTS(E2_MS2)
|
|
196
|
+ #undef _E2_MS2
|
|
197
|
+ #define _E2_MS2 E2_MS2_PIN,
|
|
198
|
+ #endif
|
|
199
|
+ #if PIN_EXISTS(E2_MS3)
|
|
200
|
+ #undef _E2_MS3
|
|
201
|
+ #define _E2_MS3 E2_MS3_PIN,
|
|
202
|
+ #endif
|
|
203
|
+#endif
|
|
204
|
+
|
|
205
|
+#define _E3_CS
|
|
206
|
+#define _E3_MS1
|
|
207
|
+#define _E3_MS2
|
|
208
|
+#define _E3_MS3
|
|
209
|
+
|
|
210
|
+#if E_NEEDED(3)
|
|
211
|
+ #if PIN_EXISTS(E3_CS)
|
|
212
|
+ #undef _E3_CS
|
|
213
|
+ #define _E3_CS E3_CS_PIN,
|
|
214
|
+ #endif
|
|
215
|
+ #if PIN_EXISTS(E3_MS1)
|
|
216
|
+ #undef _E3_MS1
|
|
217
|
+ #define _E3_MS1 E3_MS1_PIN,
|
|
218
|
+ #endif
|
|
219
|
+ #if PIN_EXISTS(E3_MS2)
|
|
220
|
+ #undef _E3_MS2
|
|
221
|
+ #define _E3_MS2 E3_MS2_PIN,
|
|
222
|
+ #endif
|
|
223
|
+ #if PIN_EXISTS(E3_MS3)
|
|
224
|
+ #undef _E3_MS3
|
|
225
|
+ #define _E3_MS3 E3_MS3_PIN,
|
|
226
|
+ #endif
|
|
227
|
+#endif
|
|
228
|
+
|
|
229
|
+#define _E4_CS
|
|
230
|
+#define _E4_MS1
|
|
231
|
+#define _E4_MS2
|
|
232
|
+#define _E4_MS3
|
|
233
|
+
|
|
234
|
+#if E_NEEDED(4)
|
|
235
|
+ #if PIN_EXISTS(E4_CS)
|
|
236
|
+ #undef _E4_CS
|
|
237
|
+ #define _E4_CS E4_CS_PIN,
|
|
238
|
+ #endif
|
|
239
|
+ #if PIN_EXISTS(E4_MS1)
|
|
240
|
+ #undef _E4_MS1
|
|
241
|
+ #define _E4_MS1 E4_MS1_PIN,
|
|
242
|
+ #endif
|
|
243
|
+ #if PIN_EXISTS(E4_MS2)
|
|
244
|
+ #undef _E4_MS2
|
|
245
|
+ #define _E4_MS2 E4_MS2_PIN,
|
|
246
|
+ #endif
|
|
247
|
+ #if PIN_EXISTS(E4_MS3)
|
|
248
|
+ #undef _E4_MS3
|
|
249
|
+ #define _E4_MS3 E4_MS3_PIN,
|
|
250
|
+ #endif
|
|
251
|
+#endif
|
|
252
|
+
|
|
253
|
+#define _E5_CS
|
|
254
|
+#define _E5_MS1
|
|
255
|
+#define _E5_MS2
|
|
256
|
+#define _E5_MS3
|
|
257
|
+
|
|
258
|
+#if E_NEEDED(5)
|
|
259
|
+ #if PIN_EXISTS(E5_CS)
|
|
260
|
+ #undef _E5_CS
|
|
261
|
+ #define _E5_CS E5_CS_PIN,
|
|
262
|
+ #endif
|
|
263
|
+ #if PIN_EXISTS(E5_MS1)
|
|
264
|
+ #undef _E5_MS1
|
|
265
|
+ #define _E5_MS1 E5_MS1_PIN,
|
|
266
|
+ #endif
|
|
267
|
+ #if PIN_EXISTS(E5_MS2)
|
|
268
|
+ #undef _E5_MS2
|
|
269
|
+ #define _E5_MS2 E5_MS2_PIN,
|
|
270
|
+ #endif
|
|
271
|
+ #if PIN_EXISTS(E5_MS3)
|
|
272
|
+ #undef _E5_MS3
|
|
273
|
+ #define _E5_MS3 E5_MS3_PIN,
|
|
274
|
+ #endif
|
|
275
|
+#endif
|
|
276
|
+
|
|
277
|
+//
|
|
278
|
+// E Steppers
|
|
279
|
+//
|
|
280
|
+
|
|
281
|
+#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, _E0_CS _E0_MS1 _E0_MS2 _E0_MS3
|
|
282
|
+#define _E1_PINS
|
|
283
|
+#define _E2_PINS
|
|
284
|
+#define _E3_PINS
|
|
285
|
+#define _E4_PINS
|
|
286
|
+#define _E5_PINS
|
|
287
|
+
|
|
288
|
+#if ENABLED(SWITCHING_EXTRUDER)
|
|
289
|
+ // Tools 0 and 1 use E0
|
|
290
|
+ #if EXTRUDERS > 2 // Tools 2 and 3 use E1
|
|
291
|
+ #undef _E1_PINS
|
|
292
|
+ #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, _E1_CS _E1_MS1 _E1_MS2 _E1_MS3
|
|
293
|
+ #if EXTRUDERS > 4 // Tools 4 and 5 use E2
|
|
294
|
+ #undef _E2_PINS
|
|
295
|
+ #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, _E2_CS _E2_MS1 _E2_MS2 _E2_MS3
|
|
296
|
+ #endif
|
|
297
|
+ #endif
|
|
298
|
+#elif EXTRUDERS > 1 || ENABLED(MIXING_EXTRUDER)
|
|
299
|
+ #undef _E1_PINS
|
|
300
|
+ #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, _E1_CS _E1_MS1 _E1_MS2 _E1_MS3
|
|
301
|
+ #if EXTRUDERS > 2 || (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > 2)
|
|
302
|
+ #undef _E2_PINS
|
|
303
|
+ #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, _E2_CS _E2_MS1 _E2_MS2 _E2_MS3
|
|
304
|
+ #if EXTRUDERS > 3 || (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > 3)
|
|
305
|
+ #undef _E3_PINS
|
|
306
|
+ #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, _E3_CS _E3_MS1 _E3_MS2 _E3_MS3
|
|
307
|
+ #if EXTRUDERS > 4 || (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > 4)
|
|
308
|
+ #undef _E4_PINS
|
|
309
|
+ #define _E4_PINS E4_STEP_PIN, E4_DIR_PIN, E4_ENABLE_PIN, _E4_CS _E4_MS1 _E4_MS2 _E4_MS3
|
|
310
|
+ #if EXTRUDERS > 5 || (ENABLED(MIXING_EXTRUDER) && MIXING_STEPPERS > 5)
|
|
311
|
+ #undef _E5_PINS
|
|
312
|
+ #define _E5_PINS E5_STEP_PIN, E5_DIR_PIN, E5_ENABLE_PIN, _E5_CS _E5_MS1 _E5_MS2 _E5_MS3
|
|
313
|
+ #endif // EXTRUDERS > 5 || MIXING_EXTRUDER > 5
|
|
314
|
+ #endif // EXTRUDERS > 4 || MIXING_EXTRUDER > 4
|
|
315
|
+ #endif // EXTRUDERS > 3 || MIXING_EXTRUDER > 3
|
|
316
|
+ #endif // EXTRUDERS > 2 || MIXING_EXTRUDER > 2
|
|
317
|
+#endif // EXTRUDERS > 1 || MIXING_EXTRUDER
|
|
318
|
+
|
|
319
|
+//
|
|
320
|
+// Heaters, Fans, Temp Sensors
|
|
321
|
+//
|
|
322
|
+
|
|
323
|
+#define _H0_PINS HEATER_0_PIN, E0_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_0_PIN),
|
|
324
|
+#define _H1_PINS
|
|
325
|
+#define _H2_PINS
|
|
326
|
+#define _H3_PINS
|
|
327
|
+#define _H4_PINS
|
|
328
|
+#define _H5_PINS
|
|
329
|
+
|
|
330
|
+#if HOTENDS > 1
|
|
331
|
+ #undef _H1_PINS
|
|
332
|
+ #define _H1_PINS HEATER_1_PIN, E1_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_1_PIN),
|
|
333
|
+ #if HOTENDS > 2
|
|
334
|
+ #undef _H2_PINS
|
|
335
|
+ #define _H2_PINS HEATER_2_PIN, E2_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_2_PIN),
|
|
336
|
+ #if HOTENDS > 3
|
|
337
|
+ #undef _H3_PINS
|
|
338
|
+ #define _H3_PINS HEATER_3_PIN, E3_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_3_PIN),
|
|
339
|
+ #if HOTENDS > 4
|
|
340
|
+ #undef _H4_PINS
|
|
341
|
+ #define _H4_PINS HEATER_4_PIN, E4_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_4_PIN),
|
|
342
|
+ #if HOTENDS > 5
|
|
343
|
+ #undef _H5_PINS
|
|
344
|
+ #define _H5_PINS HEATER_5_PIN, E5_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_5_PIN),
|
|
345
|
+ #endif // HOTENDS > 5
|
|
346
|
+ #endif // HOTENDS > 4
|
|
347
|
+ #endif // HOTENDS > 3
|
|
348
|
+ #endif // HOTENDS > 2
|
|
349
|
+#endif // HOTENDS > 1
|
|
350
|
+
|
|
351
|
+#define _BED_PINS HEATER_BED_PIN, analogInputToDigitalPin(TEMP_BED_PIN),
|
|
352
|
+
|
|
353
|
+//
|
|
354
|
+// Dual X, Dual Y, Multi-Z
|
|
355
|
+// Chip Select and Digital Micro-stepping
|
|
356
|
+//
|
|
357
|
+
|
|
358
|
+#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_DUAL_STEPPER_DRIVERS)
|
|
359
|
+ #if PIN_EXISTS(X2_CS)
|
|
360
|
+ #define _X2_CS X2_CS_PIN,
|
|
361
|
+ #else
|
|
362
|
+ #define _X2_CS
|
|
363
|
+ #endif
|
|
364
|
+ #if PIN_EXISTS(X2_MS1)
|
|
365
|
+ #define _X2_MS1 X2_MS1_PIN,
|
|
366
|
+ #else
|
|
367
|
+ #define _X2_MS1
|
|
368
|
+ #endif
|
|
369
|
+ #if PIN_EXISTS(X2_MS2)
|
|
370
|
+ #define _X2_MS2 X2_MS2_PIN,
|
|
371
|
+ #else
|
|
372
|
+ #define _X2_MS2
|
|
373
|
+ #endif
|
|
374
|
+ #if PIN_EXISTS(X2_MS3)
|
|
375
|
+ #define _X2_MS3 X2_MS3_PIN,
|
|
376
|
+ #else
|
|
377
|
+ #define _X2_MS3
|
|
378
|
+ #endif
|
|
379
|
+ #define _X2_PINS X2_STEP_PIN, X2_DIR_PIN, X2_ENABLE_PIN, _X2_CS _X2_MS1 _X2_MS2 _X2_MS3
|
|
380
|
+#else
|
|
381
|
+ #define _X2_PINS
|
|
382
|
+#endif
|
|
383
|
+
|
|
384
|
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
|
|
385
|
+ #if PIN_EXISTS(Y2_CS)
|
|
386
|
+ #define _Y2_CS Y2_CS_PIN,
|
|
387
|
+ #else
|
|
388
|
+ #define _Y2_CS
|
|
389
|
+ #endif
|
|
390
|
+ #if PIN_EXISTS(Y2_MS1)
|
|
391
|
+ #define _Y2_MS1 Y2_MS1_PIN,
|
|
392
|
+ #else
|
|
393
|
+ #define _Y2_MS1
|
|
394
|
+ #endif
|
|
395
|
+ #if PIN_EXISTS(Y2_MS2)
|
|
396
|
+ #define _Y2_MS2 Y2_MS2_PIN,
|
|
397
|
+ #else
|
|
398
|
+ #define _Y2_MS2
|
|
399
|
+ #endif
|
|
400
|
+ #if PIN_EXISTS(Y2_MS3)
|
|
401
|
+ #define _Y2_MS3 Y2_MS3_PIN,
|
|
402
|
+ #else
|
|
403
|
+ #define _Y2_MS3
|
|
404
|
+ #endif
|
|
405
|
+ #define _Y2_PINS Y2_STEP_PIN, Y2_DIR_PIN, Y2_ENABLE_PIN, _Y2_CS _Y2_MS1 _Y2_MS2 _Y2_MS3
|
|
406
|
+#else
|
|
407
|
+ #define _Y2_PINS
|
|
408
|
+#endif
|
|
409
|
+
|
|
410
|
+#if Z_MULTI_STEPPER_DRIVERS
|
|
411
|
+ #if PIN_EXISTS(Z2_CS)
|
|
412
|
+ #define _Z2_CS Z2_CS_PIN,
|
|
413
|
+ #else
|
|
414
|
+ #define _Z2_CS
|
|
415
|
+ #endif
|
|
416
|
+ #if PIN_EXISTS(Z2_MS1)
|
|
417
|
+ #define _Z2_MS1 Z2_MS1_PIN,
|
|
418
|
+ #else
|
|
419
|
+ #define _Z2_MS1
|
|
420
|
+ #endif
|
|
421
|
+ #if PIN_EXISTS(Z2_MS2)
|
|
422
|
+ #define _Z2_MS2 Z2_MS2_PIN,
|
|
423
|
+ #else
|
|
424
|
+ #define _Z2_MS2
|
|
425
|
+ #endif
|
|
426
|
+ #if PIN_EXISTS(Z2_MS3)
|
|
427
|
+ #define _Z2_MS3 Z2_MS3_PIN,
|
|
428
|
+ #else
|
|
429
|
+ #define _Z2_MS3
|
|
430
|
+ #endif
|
|
431
|
+ #define _Z2_PINS Z2_STEP_PIN, Z2_DIR_PIN, Z2_ENABLE_PIN, _Z2_CS _Z2_MS1 _Z2_MS2 _Z2_MS3
|
|
432
|
+#else
|
|
433
|
+ #define _Z2_PINS
|
|
434
|
+#endif
|
|
435
|
+
|
|
436
|
+#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
|
437
|
+ #if PIN_EXISTS(Z3_CS)
|
|
438
|
+ #define _Z3_CS Z3_CS_PIN,
|
|
439
|
+ #else
|
|
440
|
+ #define _Z3_CS
|
|
441
|
+ #endif
|
|
442
|
+ #if PIN_EXISTS(Z3_MS1)
|
|
443
|
+ #define _Z3_MS1 Z3_MS1_PIN,
|
|
444
|
+ #else
|
|
445
|
+ #define _Z3_MS1
|
|
446
|
+ #endif
|
|
447
|
+ #if PIN_EXISTS(Z3_MS2)
|
|
448
|
+ #define _Z3_MS2 Z3_MS2_PIN,
|
|
449
|
+ #else
|
|
450
|
+ #define _Z3_MS2
|
|
451
|
+ #endif
|
|
452
|
+ #if PIN_EXISTS(Z3_MS3)
|
|
453
|
+ #define _Z3_MS3 Z3_MS3_PIN,
|
|
454
|
+ #else
|
|
455
|
+ #define _Z3_MS3
|
|
456
|
+ #endif
|
|
457
|
+ #define _Z3_PINS Z3_STEP_PIN, Z3_DIR_PIN, Z3_ENABLE_PIN, _Z3_CS _Z3_MS1 _Z3_MS2 _Z3_MS3
|
|
458
|
+#else
|
|
459
|
+ #define _Z3_PINS
|
|
460
|
+#endif
|
|
461
|
+
|
|
462
|
+//
|
|
463
|
+// Generate the final Sensitive Pins array,
|
|
464
|
+// keeping the array as small as possible.
|
|
465
|
+//
|
|
466
|
+
|
|
467
|
+#if PIN_EXISTS(PS_ON)
|
|
468
|
+ #define _PS_ON PS_ON_PIN,
|
|
469
|
+#else
|
|
470
|
+ #define _PS_ON
|
|
471
|
+#endif
|
|
472
|
+
|
|
473
|
+#if HAS_BED_PROBE && PIN_EXISTS(Z_MIN_PROBE)
|
|
474
|
+ #define _Z_PROBE Z_MIN_PROBE_PIN,
|
|
475
|
+#else
|
|
476
|
+ #define _Z_PROBE
|
|
477
|
+#endif
|
|
478
|
+
|
|
479
|
+#if TEMP_SENSOR_BED && PIN_EXISTS(HEATER_BED)
|
|
480
|
+ #define _HEATER_BED HEATER_BED_PIN,
|
|
481
|
+#else
|
|
482
|
+ #define _HEATER_BED
|
|
483
|
+#endif
|
|
484
|
+
|
|
485
|
+#if PIN_EXISTS(FAN)
|
|
486
|
+ #define _FAN0 FAN_PIN,
|
|
487
|
+#else
|
|
488
|
+ #define _FAN0
|
|
489
|
+#endif
|
|
490
|
+#if PIN_EXISTS(FAN1)
|
|
491
|
+ #define _FAN1 FAN1_PIN,
|
|
492
|
+#else
|
|
493
|
+ #define _FAN1
|
|
494
|
+#endif
|
|
495
|
+#if PIN_EXISTS(FAN2)
|
|
496
|
+ #define _FAN2 FAN2_PIN,
|
|
497
|
+#else
|
|
498
|
+ #define _FAN2
|
|
499
|
+#endif
|
|
500
|
+#if PIN_EXISTS(CONTROLLER_FAN)
|
|
501
|
+ #define _FANC CONTROLLER_FAN_PIN,
|
|
502
|
+#else
|
|
503
|
+ #define _FANC
|
|
504
|
+#endif
|
|
505
|
+
|
|
506
|
+#ifndef HAL_SENSITIVE_PINS
|
|
507
|
+ #define HAL_SENSITIVE_PINS
|
|
508
|
+#endif
|
|
509
|
+
|
|
510
|
+#define SENSITIVE_PINS { \
|
|
511
|
+ _X_PINS _Y_PINS _Z_PINS _X2_PINS _Y2_PINS _Z2_PINS _Z3_PINS _Z_PROBE \
|
|
512
|
+ _E0_PINS _E1_PINS _E2_PINS _E3_PINS _E4_PINS _E5_PINS _BED_PINS \
|
|
513
|
+ _H0_PINS _H1_PINS _H2_PINS _H3_PINS _H4_PINS _H5_PINS \
|
|
514
|
+ _PS_ON _HEATER_BED _FAN0 _FAN1 _FAN2 _FANC \
|
|
515
|
+ HAL_SENSITIVE_PINS \
|
|
516
|
+}
|