|
@@ -0,0 +1,447 @@
|
|
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
|
+
|
|
23
|
+// How many DIO pins are defined?
|
|
24
|
+#if defined(DIO85_PIN)
|
|
25
|
+ #define DIO_COUNT 86
|
|
26
|
+#elif defined(DIO53_PIN)
|
|
27
|
+ #define DIO_COUNT 54
|
|
28
|
+#elif defined(DIO47_PIN)
|
|
29
|
+ #define DIO_COUNT 48
|
|
30
|
+#elif defined(DIO31_PIN)
|
|
31
|
+ #define DIO_COUNT 32
|
|
32
|
+#elif defined(DIO21_PIN)
|
|
33
|
+ #define DIO_COUNT 22
|
|
34
|
+#endif
|
|
35
|
+
|
|
36
|
+#define _PIN_SAY(NAME) { SERIAL_ECHOPGM(STRINGIFY(NAME)); return true; }
|
|
37
|
+#define PIN_SAY(NAME) if (pin == NAME) _PIN_SAY(_##NAME##_);
|
|
38
|
+#define ANALOG_PIN_SAY(NAME) if (pin == analogInputToDigitalPin(NAME)) _PIN_SAY(_##NAME##_);
|
|
39
|
+#define IS_ANALOG(P) if ((P) >= analogInputToDigitalPin(0) && ((P) <= analogInputToDigitalPin(15) || (P) <= analogInputToDigitalPin(5)))
|
|
40
|
+
|
|
41
|
+// Report pin name for a given fastio digital pin index
|
|
42
|
+static bool report_pin_name(int8_t pin) {
|
|
43
|
+
|
|
44
|
+ SERIAL_ECHO((int)pin);
|
|
45
|
+ SERIAL_CHAR(' ');
|
|
46
|
+
|
|
47
|
+ if (IS_ANALOG(pin)) {
|
|
48
|
+ SERIAL_CHAR('('); SERIAL_CHAR('A');
|
|
49
|
+ SERIAL_ECHO(int(pin - analogInputToDigitalPin(0)));
|
|
50
|
+ SERIAL_CHAR(')'); SERIAL_CHAR(' ');
|
|
51
|
+ }
|
|
52
|
+
|
|
53
|
+ #if defined(RXD) && RXD > -1
|
|
54
|
+ if (pin == 0) { SERIAL_ECHOPGM("RXD"); return true; }
|
|
55
|
+ #endif
|
|
56
|
+ #if defined(TXD) && TXD > -1
|
|
57
|
+ if (pin == 1) { SERIAL_ECHOPGM("TXD"); return true; }
|
|
58
|
+ #endif
|
|
59
|
+
|
|
60
|
+ #if PIN_EXISTS(SERVO0)
|
|
61
|
+ PIN_SAY(SERVO0_PIN);
|
|
62
|
+ #endif
|
|
63
|
+ #if PIN_EXISTS(SERVO1)
|
|
64
|
+ PIN_SAY(SERVO1_PIN);
|
|
65
|
+ #endif
|
|
66
|
+ #if PIN_EXISTS(SERVO2)
|
|
67
|
+ PIN_SAY(SERVO2_PIN);
|
|
68
|
+ #endif
|
|
69
|
+ #if PIN_EXISTS(SERVO3)
|
|
70
|
+ PIN_SAY(SERVO3_PIN);
|
|
71
|
+ #endif
|
|
72
|
+
|
|
73
|
+ #if PIN_EXISTS(X_MIN)
|
|
74
|
+ PIN_SAY(X_MIN_PIN);
|
|
75
|
+ #endif
|
|
76
|
+ #if PIN_EXISTS(X_MAX)
|
|
77
|
+ PIN_SAY(X_MAX_PIN);
|
|
78
|
+ #endif
|
|
79
|
+ #if PIN_EXISTS(Y_MIN)
|
|
80
|
+ PIN_SAY(Y_MIN_PIN);
|
|
81
|
+ #endif
|
|
82
|
+ #if PIN_EXISTS(Y_MAX)
|
|
83
|
+ PIN_SAY(Y_MAX_PIN);
|
|
84
|
+ #endif
|
|
85
|
+ #if PIN_EXISTS(Z_MIN)
|
|
86
|
+ PIN_SAY(Z_MIN_PIN);
|
|
87
|
+ #endif
|
|
88
|
+ #if PIN_EXISTS(Z_MAX)
|
|
89
|
+ PIN_SAY(Z_MAX_PIN);
|
|
90
|
+ #endif
|
|
91
|
+ #if PIN_EXISTS(Z_MIN_PROBE)
|
|
92
|
+ PIN_SAY(Z_MIN_PROBE_PIN);
|
|
93
|
+ #endif
|
|
94
|
+ #if PIN_EXISTS(X_STEP)
|
|
95
|
+ PIN_SAY(X_STEP_PIN);
|
|
96
|
+ #endif
|
|
97
|
+ #if PIN_EXISTS(X_DIR)
|
|
98
|
+ PIN_SAY(X_DIR_PIN);
|
|
99
|
+ #endif
|
|
100
|
+ #if PIN_EXISTS(X_ENABLE)
|
|
101
|
+ PIN_SAY(X_ENABLE_PIN);
|
|
102
|
+ #endif
|
|
103
|
+ #if PIN_EXISTS(X_MS1)
|
|
104
|
+ PIN_SAY(X_MS1_PIN);
|
|
105
|
+ #endif
|
|
106
|
+ #if PIN_EXISTS(X_MS2)
|
|
107
|
+ PIN_SAY(X_MS2_PIN);
|
|
108
|
+ #endif
|
|
109
|
+ #if PIN_EXISTS(X2_STEP)
|
|
110
|
+ PIN_SAY(X2_STEP_PIN);
|
|
111
|
+ #endif
|
|
112
|
+ #if PIN_EXISTS(X2_DIR)
|
|
113
|
+ PIN_SAY(X2_DIR_PIN);
|
|
114
|
+ #endif
|
|
115
|
+ #if PIN_EXISTS(X2_ENABLE)
|
|
116
|
+ PIN_SAY(X2_ENABLE_PIN);
|
|
117
|
+ #endif
|
|
118
|
+ #if PIN_EXISTS(Y_STEP)
|
|
119
|
+ PIN_SAY(Y_STEP_PIN);
|
|
120
|
+ #endif
|
|
121
|
+ #if PIN_EXISTS(Y_DIR)
|
|
122
|
+ PIN_SAY(Y_DIR_PIN);
|
|
123
|
+ #endif
|
|
124
|
+ #if PIN_EXISTS(Y_ENABLE)
|
|
125
|
+ PIN_SAY(Y_ENABLE_PIN);
|
|
126
|
+ #endif
|
|
127
|
+ #if PIN_EXISTS(Y_MS1)
|
|
128
|
+ PIN_SAY(Y_MS1_PIN);
|
|
129
|
+ #endif
|
|
130
|
+ #if PIN_EXISTS(Y_MS2)
|
|
131
|
+ PIN_SAY(Y_MS2_PIN);
|
|
132
|
+ #endif
|
|
133
|
+ #if PIN_EXISTS(Y2_STEP)
|
|
134
|
+ PIN_SAY(Y2_STEP_PIN);
|
|
135
|
+ #endif
|
|
136
|
+ #if PIN_EXISTS(Y2_DIR)
|
|
137
|
+ PIN_SAY(Y2_DIR_PIN);
|
|
138
|
+ #endif
|
|
139
|
+ #if PIN_EXISTS(Y2_ENABLE)
|
|
140
|
+ PIN_SAY(Y2_ENABLE_PIN);
|
|
141
|
+ #endif
|
|
142
|
+ #if PIN_EXISTS(Z_STEP)
|
|
143
|
+ PIN_SAY(Z_STEP_PIN);
|
|
144
|
+ #endif
|
|
145
|
+ #if PIN_EXISTS(Z_DIR)
|
|
146
|
+ PIN_SAY(Z_DIR_PIN);
|
|
147
|
+ #endif
|
|
148
|
+ #if PIN_EXISTS(Z_ENABLE)
|
|
149
|
+ PIN_SAY(Z_ENABLE_PIN);
|
|
150
|
+ #endif
|
|
151
|
+ #if PIN_EXISTS(Z_MS1)
|
|
152
|
+ PIN_SAY(Z_MS1_PIN);
|
|
153
|
+ #endif
|
|
154
|
+ #if PIN_EXISTS(Z_MS2)
|
|
155
|
+ PIN_SAY(Z_MS2_PIN);
|
|
156
|
+ #endif
|
|
157
|
+ #if PIN_EXISTS(Z2_STEP)
|
|
158
|
+ PIN_SAY(Z2_STEP_PIN);
|
|
159
|
+ #endif
|
|
160
|
+ #if PIN_EXISTS(Z2_DIR)
|
|
161
|
+ PIN_SAY(Z2_DIR_PIN);
|
|
162
|
+ #endif
|
|
163
|
+ #if PIN_EXISTS(Z2_ENABLE)
|
|
164
|
+ PIN_SAY(Z2_ENABLE_PIN);
|
|
165
|
+ #endif
|
|
166
|
+
|
|
167
|
+ #if PIN_EXISTS(E0_STEP)
|
|
168
|
+ PIN_SAY(E0_STEP_PIN);
|
|
169
|
+ #endif
|
|
170
|
+ #if PIN_EXISTS(E0_DIR)
|
|
171
|
+ PIN_SAY(E0_DIR_PIN);
|
|
172
|
+ #endif
|
|
173
|
+ #if PIN_EXISTS(E0_ENABLE)
|
|
174
|
+ PIN_SAY(E0_ENABLE_PIN);
|
|
175
|
+ #endif
|
|
176
|
+ #if PIN_EXISTS(E0_MS1)
|
|
177
|
+ PIN_SAY(E0_MS1_PIN);
|
|
178
|
+ #endif
|
|
179
|
+ #if PIN_EXISTS(E0_MS2)
|
|
180
|
+ PIN_SAY(E0_MS2_PIN);
|
|
181
|
+ #endif
|
|
182
|
+ #if PIN_EXISTS(E1_STEP)
|
|
183
|
+ PIN_SAY(E1_STEP_PIN);
|
|
184
|
+ #endif
|
|
185
|
+ #if PIN_EXISTS(E1_DIR)
|
|
186
|
+ PIN_SAY(E1_DIR_PIN);
|
|
187
|
+ #endif
|
|
188
|
+ #if PIN_EXISTS(E1_ENABLE)
|
|
189
|
+ PIN_SAY(E1_ENABLE_PIN);
|
|
190
|
+ #endif
|
|
191
|
+ #if PIN_EXISTS(E1_MS1)
|
|
192
|
+ PIN_SAY(E1_MS1_PIN);
|
|
193
|
+ #endif
|
|
194
|
+ #if PIN_EXISTS(E1_MS2)
|
|
195
|
+ PIN_SAY(E1_MS2_PIN);
|
|
196
|
+ #endif
|
|
197
|
+ #if PIN_EXISTS(E2_STEP)
|
|
198
|
+ PIN_SAY(E2_STEP_PIN);
|
|
199
|
+ #endif
|
|
200
|
+ #if PIN_EXISTS(E2_DIR)
|
|
201
|
+ PIN_SAY(E2_DIR_PIN);
|
|
202
|
+ #endif
|
|
203
|
+ #if PIN_EXISTS(E2_ENABLE)
|
|
204
|
+ PIN_SAY(E2_ENABLE_PIN);
|
|
205
|
+ #endif
|
|
206
|
+ #if PIN_EXISTS(E3_STEP)
|
|
207
|
+ PIN_SAY(E3_STEP_PIN);
|
|
208
|
+ #endif
|
|
209
|
+ #if PIN_EXISTS(E3_DIR)
|
|
210
|
+ PIN_SAY(E3_DIR_PIN);
|
|
211
|
+ #endif
|
|
212
|
+ #if PIN_EXISTS(E3_ENABLE)
|
|
213
|
+ PIN_SAY(E3_ENABLE_PIN);
|
|
214
|
+ #endif
|
|
215
|
+ #if PIN_EXISTS(E4_STEP)
|
|
216
|
+ PIN_SAY(E4_STEP_PIN);
|
|
217
|
+ #endif
|
|
218
|
+ #if PIN_EXISTS(E4_DIR)
|
|
219
|
+ PIN_SAY(E4_DIR_PIN);
|
|
220
|
+ #endif
|
|
221
|
+ #if PIN_EXISTS(E4_ENABLE)
|
|
222
|
+ PIN_SAY(E4_ENABLE_PIN);
|
|
223
|
+ #endif
|
|
224
|
+
|
|
225
|
+ #if PIN_EXISTS(FAN)
|
|
226
|
+ PIN_SAY(FAN_PIN);
|
|
227
|
+ #endif
|
|
228
|
+ #if PIN_EXISTS(FAN1)
|
|
229
|
+ PIN_SAY(FAN1_PIN);
|
|
230
|
+ #endif
|
|
231
|
+ #if PIN_EXISTS(FAN2)
|
|
232
|
+ PIN_SAY(FAN2_PIN);
|
|
233
|
+ #endif
|
|
234
|
+ #if PIN_EXISTS(CONTROLLERFAN)
|
|
235
|
+ PIN_SAY(CONTROLLERFAN_PIN);
|
|
236
|
+ #endif
|
|
237
|
+ #if PIN_EXISTS(EXTRUDER_0_AUTO_FAN)
|
|
238
|
+ PIN_SAY(EXTRUDER_0_AUTO_FAN_PIN);
|
|
239
|
+ #endif
|
|
240
|
+ #if PIN_EXISTS(EXTRUDER_1_AUTO_FAN)
|
|
241
|
+ PIN_SAY(EXTRUDER_1_AUTO_FAN_PIN);
|
|
242
|
+ #endif
|
|
243
|
+ #if PIN_EXISTS(EXTRUDER_2_AUTO_FAN)
|
|
244
|
+ PIN_SAY(EXTRUDER_2_AUTO_FAN_PIN);
|
|
245
|
+ #endif
|
|
246
|
+ #if PIN_EXISTS(EXTRUDER_3_AUTO_FAN)
|
|
247
|
+ PIN_SAY(EXTRUDER_3_AUTO_FAN_PIN);
|
|
248
|
+ #endif
|
|
249
|
+ #if PIN_EXISTS(HEATER_0)
|
|
250
|
+ PIN_SAY(HEATER_0_PIN);
|
|
251
|
+ #endif
|
|
252
|
+ #if PIN_EXISTS(HEATER_1)
|
|
253
|
+ PIN_SAY(HEATER_1_PIN);
|
|
254
|
+ #endif
|
|
255
|
+ #if PIN_EXISTS(HEATER_2)
|
|
256
|
+ PIN_SAY(HEATER_2_PIN);
|
|
257
|
+ #endif
|
|
258
|
+ #if PIN_EXISTS(HEATER_3)
|
|
259
|
+ PIN_SAY(HEATER_3_PIN);
|
|
260
|
+ #endif
|
|
261
|
+ #if PIN_EXISTS(HEATER_BED)
|
|
262
|
+ PIN_SAY(HEATER_BED_PIN);
|
|
263
|
+ #endif
|
|
264
|
+
|
|
265
|
+ #if PIN_EXISTS(X_ATT)
|
|
266
|
+ PIN_SAY(X_ATT_PIN);
|
|
267
|
+ #endif
|
|
268
|
+ #if PIN_EXISTS(Y_ATT)
|
|
269
|
+ PIN_SAY(Y_ATT_PIN);
|
|
270
|
+ #endif
|
|
271
|
+ #if PIN_EXISTS(Z_ATT)
|
|
272
|
+ PIN_SAY(Z_ATT_PIN);
|
|
273
|
+ #endif
|
|
274
|
+ #if PIN_EXISTS(E0_ATT)
|
|
275
|
+ PIN_SAY(E0_ATT_PIN);
|
|
276
|
+ #endif
|
|
277
|
+
|
|
278
|
+ #if PIN_EXISTS(TEMP_0)
|
|
279
|
+ ANALOG_PIN_SAY(TEMP_0_PIN);
|
|
280
|
+ #endif
|
|
281
|
+ #if PIN_EXISTS(TEMP_1)
|
|
282
|
+ ANALOG_PIN_SAY(TEMP_1_PIN);
|
|
283
|
+ #endif
|
|
284
|
+ #if PIN_EXISTS(TEMP_2)
|
|
285
|
+ ANALOG_PIN_SAY(TEMP_2_PIN);
|
|
286
|
+ #endif
|
|
287
|
+ #if PIN_EXISTS(TEMP_3)
|
|
288
|
+ ANALOG_PIN_SAY(TEMP_3_PIN);
|
|
289
|
+ #endif
|
|
290
|
+ #if PIN_EXISTS(TEMP_BED)
|
|
291
|
+ ANALOG_PIN_SAY(TEMP_BED_PIN);
|
|
292
|
+ #endif
|
|
293
|
+ #if PIN_EXISTS(FILWIDTH)
|
|
294
|
+ ANALOG_PIN_SAY(FILWIDTH_PIN);
|
|
295
|
+ #endif
|
|
296
|
+
|
|
297
|
+ #if PIN_EXISTS(BEEPER)
|
|
298
|
+ PIN_SAY(BEEPER_PIN);
|
|
299
|
+ #endif
|
|
300
|
+ #if PIN_EXISTS(SLED)
|
|
301
|
+ PIN_SAY(SLED_PIN);
|
|
302
|
+ #endif
|
|
303
|
+ #if PIN_EXISTS(FIL_RUNOUT)
|
|
304
|
+ PIN_SAY(FIL_RUNOUT_PIN);
|
|
305
|
+ #endif
|
|
306
|
+
|
|
307
|
+ #if PIN_EXISTS(LED)
|
|
308
|
+ PIN_SAY(LED_PIN);
|
|
309
|
+ #endif
|
|
310
|
+ // #if defined(DEBUG_LED) && DEBUG_LED > -1
|
|
311
|
+ // PIN_SAY(DEBUG_LED);
|
|
312
|
+ // #endif
|
|
313
|
+ #if PIN_EXISTS(STAT_LED_RED)
|
|
314
|
+ PIN_SAY(STAT_LED_RED_PIN);
|
|
315
|
+ #endif
|
|
316
|
+ #if PIN_EXISTS(STAT_LED_BLUE)
|
|
317
|
+ PIN_SAY(STAT_LED_BLUE_PIN);
|
|
318
|
+ #endif
|
|
319
|
+
|
|
320
|
+ #if PIN_EXISTS(DIGIPOTSS)
|
|
321
|
+ PIN_SAY(DIGIPOTSS_PIN);
|
|
322
|
+ #endif
|
|
323
|
+
|
|
324
|
+ #if PIN_EXISTS(SCK)
|
|
325
|
+ PIN_SAY(SCK_PIN);
|
|
326
|
+ #endif
|
|
327
|
+ #if PIN_EXISTS(MISO)
|
|
328
|
+ PIN_SAY(MISO_PIN);
|
|
329
|
+ #endif
|
|
330
|
+ #if PIN_EXISTS(MOSI)
|
|
331
|
+ PIN_SAY(MOSI_PIN);
|
|
332
|
+ #endif
|
|
333
|
+ #if PIN_EXISTS(SS)
|
|
334
|
+ PIN_SAY(SS_PIN);
|
|
335
|
+ #endif
|
|
336
|
+
|
|
337
|
+ #if PIN_EXISTS(SD_DETECT)
|
|
338
|
+ PIN_SAY(SD_DETECT_PIN);
|
|
339
|
+ #endif
|
|
340
|
+
|
|
341
|
+ #if defined(SDPOWER) && SDPOWER > -1
|
|
342
|
+ PIN_SAY(SDPOWER);
|
|
343
|
+ #endif
|
|
344
|
+ #if defined(SDSS) && SDSS > -1
|
|
345
|
+ PIN_SAY(SDSS);
|
|
346
|
+ #endif
|
|
347
|
+ #if defined(I2C_SCL) && I2C_SCL > -1
|
|
348
|
+ PIN_SAY(I2C_SCL);
|
|
349
|
+ #endif
|
|
350
|
+ #if defined(I2C_SDA) && I2C_SDA > -1
|
|
351
|
+ PIN_SAY(I2C_SDA);
|
|
352
|
+ #endif
|
|
353
|
+ #if defined(SCL) && SCL > -1
|
|
354
|
+ PIN_SAY(SCL);
|
|
355
|
+ #endif
|
|
356
|
+ #if defined(SDA) && SDA > -1
|
|
357
|
+ PIN_SAY(SDA);
|
|
358
|
+ #endif
|
|
359
|
+
|
|
360
|
+ #if PIN_EXISTS(PS_ON)
|
|
361
|
+ PIN_SAY(PS_ON_PIN);
|
|
362
|
+ #endif
|
|
363
|
+ #if PIN_EXISTS(KILL)
|
|
364
|
+ PIN_SAY(KILL_PIN);
|
|
365
|
+ #endif
|
|
366
|
+ #if PIN_EXISTS(SUICIDE)
|
|
367
|
+ PIN_SAY(SUICIDE_PIN);
|
|
368
|
+ #endif
|
|
369
|
+ #if PIN_EXISTS(DEBUG)
|
|
370
|
+ PIN_SAY(DEBUG_PIN);
|
|
371
|
+ #endif
|
|
372
|
+ #if PIN_EXISTS(PHOTOGRAPH)
|
|
373
|
+ PIN_SAY(PHOTOGRAPH_PIN);
|
|
374
|
+ #endif
|
|
375
|
+
|
|
376
|
+ #if PIN_EXISTS(BEEPER)
|
|
377
|
+ PIN_SAY(BEEPER_PIN);
|
|
378
|
+ #endif
|
|
379
|
+ #if defined(BTN_EN1) && BTN_EN1 > -1
|
|
380
|
+ PIN_SAY(BTN_EN1);
|
|
381
|
+ #endif
|
|
382
|
+ #if defined(BTN_EN2) && BTN_EN2 > -1
|
|
383
|
+ PIN_SAY(BTN_EN2);
|
|
384
|
+ #endif
|
|
385
|
+ #if defined(BTN_ENC) && BTN_ENC > -1
|
|
386
|
+ PIN_SAY(BTN_ENC);
|
|
387
|
+ #endif
|
|
388
|
+ #if defined(LCD_PINS_RS) && LCD_PINS_RS > -1
|
|
389
|
+ PIN_SAY(LCD_PINS_RS);
|
|
390
|
+ #endif
|
|
391
|
+ #if defined(LCD_PINS_ENABLE) && LCD_PINS_ENABLE > -1
|
|
392
|
+ PIN_SAY(LCD_PINS_ENABLE);
|
|
393
|
+ #endif
|
|
394
|
+ #if defined(LCD_PINS_D4) && LCD_PINS_D4 > -1
|
|
395
|
+ PIN_SAY(LCD_PINS_D4);
|
|
396
|
+ #endif
|
|
397
|
+ #if defined(LCD_PINS_D5) && LCD_PINS_D5 > -1
|
|
398
|
+ PIN_SAY(LCD_PINS_D5);
|
|
399
|
+ #endif
|
|
400
|
+ #if defined(LCD_PINS_D6) && LCD_PINS_D6 > -1
|
|
401
|
+ PIN_SAY(LCD_PINS_D6);
|
|
402
|
+ #endif
|
|
403
|
+ #if defined(LCD_PINS_D7) && LCD_PINS_D7 > -1
|
|
404
|
+ PIN_SAY(LCD_PINS_D7);
|
|
405
|
+ #endif
|
|
406
|
+
|
|
407
|
+ #if PIN_EXISTS(RAMPS_D8)
|
|
408
|
+ PIN_SAY(RAMPS_D8_PIN);
|
|
409
|
+ #endif
|
|
410
|
+ #if PIN_EXISTS(RAMPS_D9)
|
|
411
|
+ PIN_SAY(RAMPS_D9_PIN);
|
|
412
|
+ #endif
|
|
413
|
+ #if PIN_EXISTS(RAMPS_D10)
|
|
414
|
+ PIN_SAY(RAMPS_D10_PIN);
|
|
415
|
+ #endif
|
|
416
|
+ #if PIN_EXISTS(MOSFET_D)
|
|
417
|
+ PIN_SAY(MOSFET_D_PIN);
|
|
418
|
+ #endif
|
|
419
|
+
|
|
420
|
+ #if PIN_EXISTS(TX_ENABLE)
|
|
421
|
+ PIN_SAY(TX_ENABLE_PIN);
|
|
422
|
+ #endif
|
|
423
|
+ #if PIN_EXISTS(RX_ENABLE)
|
|
424
|
+ PIN_SAY(RX_ENABLE_PIN);
|
|
425
|
+ #endif
|
|
426
|
+
|
|
427
|
+ SERIAL_ECHOPGM("<unused>");
|
|
428
|
+ return false;
|
|
429
|
+}
|
|
430
|
+
|
|
431
|
+inline void report_pin_state(int8_t pin) {
|
|
432
|
+ if (report_pin_name(pin)) {
|
|
433
|
+ if (pin_is_protected(pin))
|
|
434
|
+ SERIAL_ECHOPGM(" (protected)");
|
|
435
|
+ else {
|
|
436
|
+ SERIAL_ECHOPGM(" = ");
|
|
437
|
+ pinMode(pin, INPUT_PULLUP);
|
|
438
|
+ SERIAL_ECHO(digitalRead(pin));
|
|
439
|
+ if (IS_ANALOG(pin)) {
|
|
440
|
+ SERIAL_CHAR(' '); SERIAL_CHAR('(');
|
|
441
|
+ SERIAL_ECHO(analogRead(pin - analogInputToDigitalPin(0)));
|
|
442
|
+ SERIAL_CHAR(')');
|
|
443
|
+ }
|
|
444
|
+ }
|
|
445
|
+ }
|
|
446
|
+ SERIAL_EOL;
|
|
447
|
+}
|