|
@@ -23,6 +23,18 @@
|
23
|
23
|
|
24
|
24
|
#include "env_validate.h"
|
25
|
25
|
|
|
26
|
+// If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION
|
|
27
|
+// https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT
|
|
28
|
+//#define BTT_MOTOR_EXPANSION
|
|
29
|
+
|
|
30
|
+#if BOTH(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION)
|
|
31
|
+ #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY)
|
|
32
|
+ #define EXP_MOT_USE_EXP2_ONLY 1
|
|
33
|
+ #else
|
|
34
|
+ #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time."
|
|
35
|
+ #endif
|
|
36
|
+#endif
|
|
37
|
+
|
26
|
38
|
// Use one of these or SDCard-based Emulation will be used
|
27
|
39
|
#if NO_EEPROM_SELECTED
|
28
|
40
|
//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
|
|
@@ -349,48 +361,59 @@
|
349
|
361
|
#endif
|
350
|
362
|
|
351
|
363
|
#if ENABLED(BTT_MOTOR_EXPANSION)
|
352
|
|
- /**
|
353
|
|
- * _____ _____
|
354
|
|
- * NC | · · | GND NC | · · | GND
|
355
|
|
- * NC | · · | PF12 (M1EN) (M2EN) PG7 | · · | PG6 (M3EN)
|
356
|
|
- * (M1STP) PB15 | · · PF11 (M1DIR) (M1RX) PG3 | · · PG2 (M1DIAG)
|
357
|
|
- * (M2DIR) PB12 | · · | PG10 (M2STP) (M2RX) PD10 | · · | PD11 (M2DIAG)
|
358
|
|
- * (M3DIR) PB13 | · · | PB14 (M3STP) (M3RX) PA8 | · · | PG4 (M3DIAG)
|
359
|
|
- * ----- -----
|
360
|
|
- * EXP2 EXP1
|
|
364
|
+ /** _____ _____
|
|
365
|
+ * NC | . . | GND NC | . . | GND
|
|
366
|
+ * NC | . . | M1EN M2EN | . . | M3EN
|
|
367
|
+ * M1STP | . . M1DIR M1RX | . . M1DIAG
|
|
368
|
+ * M2DIR | . . | M2STP M2RX | . . | M2DIAG
|
|
369
|
+ * M3DIR | . . | M3STP M3RX | . . | M3DIAG
|
|
370
|
+ * ----- -----
|
|
371
|
+ * EXP2 EXP1
|
|
372
|
+ *
|
|
373
|
+ * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN
|
361
|
374
|
*/
|
362
|
375
|
|
363
|
376
|
// M1 on Driver Expansion Module
|
364
|
|
- #define E3_STEP_PIN EXP2_05_PIN
|
365
|
|
- #define E3_DIR_PIN EXP2_06_PIN
|
366
|
|
- #define E3_ENABLE_PIN EXP2_04_PIN
|
367
|
|
- #define E3_DIAG_PIN EXP1_06_PIN
|
368
|
|
- #define E3_CS_PIN EXP1_05_PIN
|
369
|
|
- #if HAS_TMC_UART
|
370
|
|
- #define E3_SERIAL_TX_PIN EXP1_05_PIN
|
371
|
|
- #define E3_SERIAL_RX_PIN EXP1_05_PIN
|
|
377
|
+ #define E2_STEP_PIN EXP2_05_PIN
|
|
378
|
+ #define E2_DIR_PIN EXP2_06_PIN
|
|
379
|
+ #define E2_ENABLE_PIN EXP2_04_PIN
|
|
380
|
+ #if !EXP_MOT_USE_EXP2_ONLY
|
|
381
|
+ #define E2_DIAG_PIN EXP1_06_PIN
|
|
382
|
+ #define E2_CS_PIN EXP1_05_PIN
|
|
383
|
+ #if HAS_TMC_UART
|
|
384
|
+ #define E2_SERIAL_TX_PIN EXP1_05_PIN
|
|
385
|
+ #define E2_SERIAL_RX_PIN EXP1_05_PIN
|
|
386
|
+ #endif
|
372
|
387
|
#endif
|
373
|
388
|
|
374
|
389
|
// M2 on Driver Expansion Module
|
375
|
|
- #define E4_STEP_PIN EXP2_08_PIN
|
376
|
|
- #define E4_DIR_PIN EXP2_07_PIN
|
377
|
|
- #define E4_ENABLE_PIN EXP1_03_PIN
|
378
|
|
- #define E4_DIAG_PIN EXP1_08_PIN
|
379
|
|
- #define E4_CS_PIN EXP1_07_PIN
|
380
|
|
- #if HAS_TMC_UART
|
381
|
|
- #define E4_SERIAL_TX_PIN EXP1_07_PIN
|
382
|
|
- #define E4_SERIAL_RX_PIN EXP1_07_PIN
|
|
390
|
+ #define E3_STEP_PIN EXP2_08_PIN
|
|
391
|
+ #define E3_DIR_PIN EXP2_07_PIN
|
|
392
|
+ #if !EXP_MOT_USE_EXP2_ONLY
|
|
393
|
+ #define E3_ENABLE_PIN EXP1_03_PIN
|
|
394
|
+ #define E3_DIAG_PIN EXP1_08_PIN
|
|
395
|
+ #define E3_CS_PIN EXP1_07_PIN
|
|
396
|
+ #if HAS_TMC_UART
|
|
397
|
+ #define E3_SERIAL_TX_PIN EXP1_07_PIN
|
|
398
|
+ #define E3_SERIAL_RX_PIN EXP1_07_PIN
|
|
399
|
+ #endif
|
|
400
|
+ #else
|
|
401
|
+ #define E3_ENABLE_PIN EXP2_04_PIN
|
383
|
402
|
#endif
|
384
|
403
|
|
385
|
404
|
// M3 on Driver Expansion Module
|
386
|
|
- #define E5_STEP_PIN EXP2_10_PIN
|
387
|
|
- #define E5_DIR_PIN EXP2_09_PIN
|
388
|
|
- #define E5_ENABLE_PIN EXP1_04_PIN
|
389
|
|
- #define E5_DIAG_PIN EXP1_10_PIN
|
390
|
|
- #define E5_CS_PIN EXP1_09_PIN
|
391
|
|
- #if HAS_TMC_UART
|
392
|
|
- #define E5_SERIAL_TX_PIN EXP1_09_PIN
|
393
|
|
- #define E5_SERIAL_RX_PIN EXP1_09_PIN
|
|
405
|
+ #define E4_STEP_PIN EXP2_10_PIN
|
|
406
|
+ #define E4_DIR_PIN EXP2_09_PIN
|
|
407
|
+ #if !EXP_MOT_USE_EXP2_ONLY
|
|
408
|
+ #define E4_ENABLE_PIN EXP1_04_PIN
|
|
409
|
+ #define E4_DIAG_PIN EXP1_10_PIN
|
|
410
|
+ #define E4_CS_PIN EXP1_09_PIN
|
|
411
|
+ #if HAS_TMC_UART
|
|
412
|
+ #define E4_SERIAL_TX_PIN EXP1_09_PIN
|
|
413
|
+ #define E4_SERIAL_RX_PIN EXP1_09_PIN
|
|
414
|
+ #endif
|
|
415
|
+ #else
|
|
416
|
+ #define E4_ENABLE_PIN EXP2_04_PIN
|
394
|
417
|
#endif
|
395
|
418
|
|
396
|
419
|
#endif // BTT_MOTOR_EXPANSION
|