Browse Source

🎨 Fix L64xx enable, clean up conditionals

Scott Lahteine 3 years ago
parent
commit
b88117d636

+ 1
- 1
Marlin/src/feature/pause.cpp View File

207
         #if ENABLED(MULTI_FILAMENT_SENSOR)
207
         #if ENABLED(MULTI_FILAMENT_SENSOR)
208
           #define _CASE_INSERTED(N) case N-1: if (READ(FIL_RUNOUT##N##_PIN) != FIL_RUNOUT##N##_STATE) wait_for_user = false; break;
208
           #define _CASE_INSERTED(N) case N-1: if (READ(FIL_RUNOUT##N##_PIN) != FIL_RUNOUT##N##_STATE) wait_for_user = false; break;
209
           switch (active_extruder) {
209
           switch (active_extruder) {
210
-            REPEAT_S(1, INCREMENT(NUM_RUNOUT_SENSORS), _CASE_INSERTED)
210
+            REPEAT_1(NUM_RUNOUT_SENSORS, _CASE_INSERTED)
211
           }
211
           }
212
         #else
212
         #else
213
           if (READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE) wait_for_user = false;
213
           if (READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE) wait_for_user = false;

+ 2
- 2
Marlin/src/gcode/feature/leds/M150.cpp View File

56
   #if ENABLED(NEOPIXEL_LED)
56
   #if ENABLED(NEOPIXEL_LED)
57
     const int8_t index = parser.intval('I', -1);
57
     const int8_t index = parser.intval('I', -1);
58
     #if ENABLED(NEOPIXEL2_SEPARATE)
58
     #if ENABLED(NEOPIXEL2_SEPARATE)
59
-      int8_t brightness, unit = parser.intval('S', -1);
59
+      int8_t brightness = neo.brightness(), unit = parser.intval('S', -1);
60
       switch (unit) {
60
       switch (unit) {
61
         case -1: neo2.neoindex = index; // fall-thru
61
         case -1: neo2.neoindex = index; // fall-thru
62
-        case  0:  neo.neoindex = index; brightness =  neo.brightness(); break;
62
+        case  0:  neo.neoindex = index; break;
63
         case  1: neo2.neoindex = index; brightness = neo2.brightness(); break;
63
         case  1: neo2.neoindex = index; brightness = neo2.brightness(); break;
64
       }
64
       }
65
     #else
65
     #else

+ 162
- 145
Marlin/src/inc/Conditionals_post.h View File

94
 #endif
94
 #endif
95
 #if HAS_Z_AXIS
95
 #if HAS_Z_AXIS
96
   #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
96
   #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
97
+#else
98
+  #undef CONTROLLER_FAN_USE_Z_ONLY
97
 #endif
99
 #endif
98
 #if LINEAR_AXES >= 4
100
 #if LINEAR_AXES >= 4
99
   #define I_MAX_LENGTH (I_MAX_POS - (I_MIN_POS))
101
   #define I_MAX_LENGTH (I_MAX_POS - (I_MIN_POS))
471
 #endif
473
 #endif
472
 
474
 
473
 /**
475
 /**
474
- * Set defaults for missing (newer) options
475
- */
476
-#ifndef DISABLE_INACTIVE_X
477
-  #define DISABLE_INACTIVE_X DISABLE_X
478
-#endif
479
-#if HAS_Y_AXIS && !defined(DISABLE_INACTIVE_Y)
480
-  #define DISABLE_INACTIVE_Y DISABLE_Y
481
-#endif
482
-#if HAS_Z_AXIS && !defined(DISABLE_INACTIVE_Z)
483
-  #define DISABLE_INACTIVE_Z DISABLE_Z
484
-#endif
485
-#ifndef DISABLE_INACTIVE_E
486
-  #define DISABLE_INACTIVE_E DISABLE_E
487
-#endif
488
-#if LINEAR_AXES >= 4 && !defined(DISABLE_INACTIVE_I)
489
-  #define DISABLE_INACTIVE_I DISABLE_I
490
-#endif
491
-#if LINEAR_AXES >= 5 && !defined(DISABLE_INACTIVE_J)
492
-  #define DISABLE_INACTIVE_J DISABLE_J
493
-#endif
494
-#if LINEAR_AXES >= 6 && !defined(DISABLE_INACTIVE_K)
495
-  #define DISABLE_INACTIVE_K DISABLE_K
496
-#endif
497
-
498
-/**
499
  * Power Supply
476
  * Power Supply
500
  */
477
  */
501
 #ifndef PSU_NAME
478
 #ifndef PSU_NAME
1468
   #define HAS_X_MS_PINS 1
1445
   #define HAS_X_MS_PINS 1
1469
 #endif
1446
 #endif
1470
 
1447
 
1471
-#if PIN_EXISTS(X2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2))
1448
+#if PIN_EXISTS(X2_ENABLE) || AXIS_IS_L64XX(X2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2))
1472
   #define HAS_X2_ENABLE 1
1449
   #define HAS_X2_ENABLE 1
1473
 #endif
1450
 #endif
1474
 #if PIN_EXISTS(X2_DIR)
1451
 #if PIN_EXISTS(X2_DIR)
1481
   #define HAS_X2_MS_PINS 1
1458
   #define HAS_X2_MS_PINS 1
1482
 #endif
1459
 #endif
1483
 
1460
 
1461
+/**
1462
+ * Set defaults for missing (newer) options
1463
+ */
1464
+#if !defined(DISABLE_INACTIVE_X) && ENABLED(DISABLE_X)
1465
+  #define DISABLE_INACTIVE_X 1
1466
+#endif
1467
+
1484
 #if HAS_Y_AXIS
1468
 #if HAS_Y_AXIS
1485
-  #if PIN_EXISTS(Y_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y))
1469
+  #if PIN_EXISTS(Y_ENABLE) || AXIS_IS_L64XX(Y) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y))
1486
     #define HAS_Y_ENABLE 1
1470
     #define HAS_Y_ENABLE 1
1487
   #endif
1471
   #endif
1488
   #if PIN_EXISTS(Y_DIR)
1472
   #if PIN_EXISTS(Y_DIR)
1495
     #define HAS_Y_MS_PINS 1
1479
     #define HAS_Y_MS_PINS 1
1496
   #endif
1480
   #endif
1497
 
1481
 
1498
-  #if PIN_EXISTS(Y2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2))
1482
+  #if PIN_EXISTS(Y2_ENABLE) || AXIS_IS_L64XX(Y2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2))
1499
     #define HAS_Y2_ENABLE 1
1483
     #define HAS_Y2_ENABLE 1
1500
   #endif
1484
   #endif
1501
   #if PIN_EXISTS(Y2_DIR)
1485
   #if PIN_EXISTS(Y2_DIR)
1507
   #if PIN_EXISTS(Y2_MS1)
1491
   #if PIN_EXISTS(Y2_MS1)
1508
     #define HAS_Y2_MS_PINS 1
1492
     #define HAS_Y2_MS_PINS 1
1509
   #endif
1493
   #endif
1494
+  #if !defined(DISABLE_INACTIVE_Y) && ENABLED(DISABLE_Y)
1495
+    #define DISABLE_INACTIVE_Y 1
1496
+  #endif
1497
+#else
1498
+  #undef DISABLE_INACTIVE_Y
1510
 #endif
1499
 #endif
1511
 
1500
 
1512
 #if HAS_Z_AXIS
1501
 #if HAS_Z_AXIS
1513
-  #if PIN_EXISTS(Z_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z))
1502
+  #if PIN_EXISTS(Z_ENABLE) || AXIS_IS_L64XX(Z) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z))
1514
     #define HAS_Z_ENABLE 1
1503
     #define HAS_Z_ENABLE 1
1515
   #endif
1504
   #endif
1516
   #if PIN_EXISTS(Z_DIR)
1505
   #if PIN_EXISTS(Z_DIR)
1522
   #if PIN_EXISTS(Z_MS1)
1511
   #if PIN_EXISTS(Z_MS1)
1523
     #define HAS_Z_MS_PINS 1
1512
     #define HAS_Z_MS_PINS 1
1524
   #endif
1513
   #endif
1514
+  #if !defined(DISABLE_INACTIVE_Z) && ENABLED(DISABLE_Z)
1515
+    #define DISABLE_INACTIVE_Z 1
1516
+  #endif
1517
+#else
1518
+  #undef DISABLE_INACTIVE_Z
1525
 #endif
1519
 #endif
1526
 
1520
 
1527
 #if NUM_Z_STEPPER_DRIVERS >= 2
1521
 #if NUM_Z_STEPPER_DRIVERS >= 2
1528
-  #if PIN_EXISTS(Z2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
1522
+  #if PIN_EXISTS(Z2_ENABLE) || AXIS_IS_L64XX(Z2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
1529
     #define HAS_Z2_ENABLE 1
1523
     #define HAS_Z2_ENABLE 1
1530
   #endif
1524
   #endif
1531
   #if PIN_EXISTS(Z2_DIR)
1525
   #if PIN_EXISTS(Z2_DIR)
1540
 #endif
1534
 #endif
1541
 
1535
 
1542
 #if NUM_Z_STEPPER_DRIVERS >= 3
1536
 #if NUM_Z_STEPPER_DRIVERS >= 3
1543
-  #if PIN_EXISTS(Z3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
1537
+  #if PIN_EXISTS(Z3_ENABLE) || AXIS_IS_L64XX(Z3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
1544
     #define HAS_Z3_ENABLE 1
1538
     #define HAS_Z3_ENABLE 1
1545
   #endif
1539
   #endif
1546
   #if PIN_EXISTS(Z3_DIR)
1540
   #if PIN_EXISTS(Z3_DIR)
1555
 #endif
1549
 #endif
1556
 
1550
 
1557
 #if NUM_Z_STEPPER_DRIVERS >= 4
1551
 #if NUM_Z_STEPPER_DRIVERS >= 4
1558
-  #if PIN_EXISTS(Z4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
1552
+  #if PIN_EXISTS(Z4_ENABLE) || AXIS_IS_L64XX(Z4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
1559
     #define HAS_Z4_ENABLE 1
1553
     #define HAS_Z4_ENABLE 1
1560
   #endif
1554
   #endif
1561
   #if PIN_EXISTS(Z4_DIR)
1555
   #if PIN_EXISTS(Z4_DIR)
1570
 #endif
1564
 #endif
1571
 
1565
 
1572
 #if LINEAR_AXES >= 4
1566
 #if LINEAR_AXES >= 4
1573
-  #if PIN_EXISTS(I_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(I))
1567
+  #if PIN_EXISTS(I_ENABLE) || AXIS_IS_L64XX(I) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(I))
1574
     #define HAS_I_ENABLE 1
1568
     #define HAS_I_ENABLE 1
1575
   #endif
1569
   #endif
1576
   #if PIN_EXISTS(I_DIR)
1570
   #if PIN_EXISTS(I_DIR)
1582
   #if PIN_EXISTS(I_MS1)
1576
   #if PIN_EXISTS(I_MS1)
1583
     #define HAS_I_MS_PINS 1
1577
     #define HAS_I_MS_PINS 1
1584
   #endif
1578
   #endif
1579
+  #if !defined(DISABLE_INACTIVE_I) && ENABLED(DISABLE_I)
1580
+    #define DISABLE_INACTIVE_I 1
1581
+  #endif
1582
+#else
1583
+  #undef DISABLE_INACTIVE_I
1585
 #endif
1584
 #endif
1586
 
1585
 
1587
 #if LINEAR_AXES >= 5
1586
 #if LINEAR_AXES >= 5
1588
-  #if PIN_EXISTS(J_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(J))
1587
+  #if PIN_EXISTS(J_ENABLE) || AXIS_IS_L64XX(J) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(J))
1589
     #define HAS_J_ENABLE 1
1588
     #define HAS_J_ENABLE 1
1590
   #endif
1589
   #endif
1591
   #if PIN_EXISTS(J_DIR)
1590
   #if PIN_EXISTS(J_DIR)
1597
   #if PIN_EXISTS(J_MS1)
1596
   #if PIN_EXISTS(J_MS1)
1598
     #define HAS_J_MS_PINS 1
1597
     #define HAS_J_MS_PINS 1
1599
   #endif
1598
   #endif
1599
+  #if !defined(DISABLE_INACTIVE_J) && ENABLED(DISABLE_J)
1600
+    #define DISABLE_INACTIVE_J 1
1601
+  #endif
1602
+#else
1603
+  #undef DISABLE_INACTIVE_J
1600
 #endif
1604
 #endif
1601
 
1605
 
1602
 #if LINEAR_AXES >= 6
1606
 #if LINEAR_AXES >= 6
1603
-  #if PIN_EXISTS(K_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(K))
1607
+  #if PIN_EXISTS(K_ENABLE) || AXIS_IS_L64XX(K) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(K))
1604
     #define HAS_K_ENABLE 1
1608
     #define HAS_K_ENABLE 1
1605
   #endif
1609
   #endif
1606
   #if PIN_EXISTS(K_DIR)
1610
   #if PIN_EXISTS(K_DIR)
1612
   #if PIN_EXISTS(K_MS1)
1616
   #if PIN_EXISTS(K_MS1)
1613
     #define HAS_K_MS_PINS 1
1617
     #define HAS_K_MS_PINS 1
1614
   #endif
1618
   #endif
1619
+  #if !defined(DISABLE_INACTIVE_K) && ENABLED(DISABLE_K)
1620
+    #define DISABLE_INACTIVE_K 1
1621
+  #endif
1622
+#else
1623
+  #undef DISABLE_INACTIVE_K
1615
 #endif
1624
 #endif
1616
 
1625
 
1617
 // Extruder steppers and solenoids
1626
 // Extruder steppers and solenoids
1618
 #if HAS_EXTRUDERS
1627
 #if HAS_EXTRUDERS
1619
 
1628
 
1620
-  #if PIN_EXISTS(E0_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0))
1629
+  #if PIN_EXISTS(E0_ENABLE) || AXIS_IS_L64XX(E0) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0))
1621
     #define HAS_E0_ENABLE 1
1630
     #define HAS_E0_ENABLE 1
1622
   #endif
1631
   #endif
1623
   #if PIN_EXISTS(E0_DIR)
1632
   #if PIN_EXISTS(E0_DIR)
1633
     #define HAS_SOLENOID_0 1
1642
     #define HAS_SOLENOID_0 1
1634
   #endif
1643
   #endif
1635
 
1644
 
1636
-  #if PIN_EXISTS(E1_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1))
1637
-    #define HAS_E1_ENABLE 1
1638
-  #endif
1639
-  #if PIN_EXISTS(E1_DIR)
1640
-    #define HAS_E1_DIR 1
1641
-  #endif
1642
-  #if PIN_EXISTS(E1_STEP)
1643
-    #define HAS_E1_STEP 1
1644
-  #endif
1645
-  #if PIN_EXISTS(E1_MS1)
1646
-    #define HAS_E1_MS_PINS 1
1647
-  #endif
1648
-  #if PIN_EXISTS(SOL1)
1649
-    #define HAS_SOLENOID_1 1
1645
+  #if E_STEPPERS > 1
1646
+    #if PIN_EXISTS(E1_ENABLE) || AXIS_IS_L64XX(E1) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1))
1647
+      #define HAS_E1_ENABLE 1
1648
+    #endif
1649
+    #if PIN_EXISTS(E1_DIR)
1650
+      #define HAS_E1_DIR 1
1651
+    #endif
1652
+    #if PIN_EXISTS(E1_STEP)
1653
+      #define HAS_E1_STEP 1
1654
+    #endif
1655
+    #if PIN_EXISTS(E1_MS1)
1656
+      #define HAS_E1_MS_PINS 1
1657
+    #endif
1658
+    #if PIN_EXISTS(SOL1)
1659
+      #define HAS_SOLENOID_1 1
1660
+    #endif
1650
   #endif
1661
   #endif
1651
 
1662
 
1652
-  #if PIN_EXISTS(E2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2))
1653
-    #define HAS_E2_ENABLE 1
1654
-  #endif
1655
-  #if PIN_EXISTS(E2_DIR)
1656
-    #define HAS_E2_DIR 1
1657
-  #endif
1658
-  #if PIN_EXISTS(E2_STEP)
1659
-    #define HAS_E2_STEP 1
1660
-  #endif
1661
-  #if PIN_EXISTS(E2_MS1)
1662
-    #define HAS_E2_MS_PINS 1
1663
-  #endif
1664
-  #if PIN_EXISTS(SOL2)
1665
-    #define HAS_SOLENOID_2 1
1663
+  #if E_STEPPERS > 2
1664
+    #if PIN_EXISTS(E2_ENABLE) || AXIS_IS_L64XX(E2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2))
1665
+      #define HAS_E2_ENABLE 1
1666
+    #endif
1667
+    #if PIN_EXISTS(E2_DIR)
1668
+      #define HAS_E2_DIR 1
1669
+    #endif
1670
+    #if PIN_EXISTS(E2_STEP)
1671
+      #define HAS_E2_STEP 1
1672
+    #endif
1673
+    #if PIN_EXISTS(E2_MS1)
1674
+      #define HAS_E2_MS_PINS 1
1675
+    #endif
1676
+    #if PIN_EXISTS(SOL2)
1677
+      #define HAS_SOLENOID_2 1
1678
+    #endif
1666
   #endif
1679
   #endif
1667
 
1680
 
1668
-  #if PIN_EXISTS(E3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3))
1669
-    #define HAS_E3_ENABLE 1
1670
-  #endif
1671
-  #if PIN_EXISTS(E3_DIR)
1672
-    #define HAS_E3_DIR 1
1673
-  #endif
1674
-  #if PIN_EXISTS(E3_STEP)
1675
-    #define HAS_E3_STEP 1
1676
-  #endif
1677
-  #if PIN_EXISTS(E3_MS1)
1678
-    #define HAS_E3_MS_PINS 1
1679
-  #endif
1680
-  #if PIN_EXISTS(SOL3)
1681
-    #define HAS_SOLENOID_3 1
1681
+  #if E_STEPPERS > 3
1682
+    #if PIN_EXISTS(E3_ENABLE) || AXIS_IS_L64XX(E3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3))
1683
+      #define HAS_E3_ENABLE 1
1684
+    #endif
1685
+    #if PIN_EXISTS(E3_DIR)
1686
+      #define HAS_E3_DIR 1
1687
+    #endif
1688
+    #if PIN_EXISTS(E3_STEP)
1689
+      #define HAS_E3_STEP 1
1690
+    #endif
1691
+    #if PIN_EXISTS(E3_MS1)
1692
+      #define HAS_E3_MS_PINS 1
1693
+    #endif
1694
+    #if PIN_EXISTS(SOL3)
1695
+      #define HAS_SOLENOID_3 1
1696
+    #endif
1682
   #endif
1697
   #endif
1683
 
1698
 
1684
-  #if PIN_EXISTS(E4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4))
1685
-    #define HAS_E4_ENABLE 1
1686
-  #endif
1687
-  #if PIN_EXISTS(E4_DIR)
1688
-    #define HAS_E4_DIR 1
1689
-  #endif
1690
-  #if PIN_EXISTS(E4_STEP)
1691
-    #define HAS_E4_STEP 1
1692
-  #endif
1693
-  #if PIN_EXISTS(E4_MS1)
1694
-    #define HAS_E4_MS_PINS 1
1695
-  #endif
1696
-  #if PIN_EXISTS(SOL4)
1697
-    #define HAS_SOLENOID_4 1
1699
+  #if E_STEPPERS > 4
1700
+    #if PIN_EXISTS(E4_ENABLE) || AXIS_IS_L64XX(E4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4))
1701
+      #define HAS_E4_ENABLE 1
1702
+    #endif
1703
+    #if PIN_EXISTS(E4_DIR)
1704
+      #define HAS_E4_DIR 1
1705
+    #endif
1706
+    #if PIN_EXISTS(E4_STEP)
1707
+      #define HAS_E4_STEP 1
1708
+    #endif
1709
+    #if PIN_EXISTS(E4_MS1)
1710
+      #define HAS_E4_MS_PINS 1
1711
+    #endif
1712
+    #if PIN_EXISTS(SOL4)
1713
+      #define HAS_SOLENOID_4 1
1714
+    #endif
1698
   #endif
1715
   #endif
1699
 
1716
 
1700
-  #if PIN_EXISTS(E5_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5))
1701
-    #define HAS_E5_ENABLE 1
1702
-  #endif
1703
-  #if PIN_EXISTS(E5_DIR)
1704
-    #define HAS_E5_DIR 1
1705
-  #endif
1706
-  #if PIN_EXISTS(E5_STEP)
1707
-    #define HAS_E5_STEP 1
1708
-  #endif
1709
-  #if PIN_EXISTS(E5_MS1)
1710
-    #define HAS_E5_MS_PINS 1
1711
-  #endif
1712
-  #if PIN_EXISTS(SOL5)
1713
-    #define HAS_SOLENOID_5 1
1717
+  #if E_STEPPERS > 5
1718
+    #if PIN_EXISTS(E5_ENABLE) || AXIS_IS_L64XX(E5) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5))
1719
+      #define HAS_E5_ENABLE 1
1720
+    #endif
1721
+    #if PIN_EXISTS(E5_DIR)
1722
+      #define HAS_E5_DIR 1
1723
+    #endif
1724
+    #if PIN_EXISTS(E5_STEP)
1725
+      #define HAS_E5_STEP 1
1726
+    #endif
1727
+    #if PIN_EXISTS(E5_MS1)
1728
+      #define HAS_E5_MS_PINS 1
1729
+    #endif
1730
+    #if PIN_EXISTS(SOL5)
1731
+      #define HAS_SOLENOID_5 1
1732
+    #endif
1714
   #endif
1733
   #endif
1715
 
1734
 
1716
-  #if PIN_EXISTS(E6_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6))
1717
-    #define HAS_E6_ENABLE 1
1718
-  #endif
1719
-  #if PIN_EXISTS(E6_DIR)
1720
-    #define HAS_E6_DIR 1
1721
-  #endif
1722
-  #if PIN_EXISTS(E6_STEP)
1723
-    #define HAS_E6_STEP 1
1724
-  #endif
1725
-  #if PIN_EXISTS(E6_MS1)
1726
-    #define HAS_E6_MS_PINS 1
1727
-  #endif
1728
-  #if PIN_EXISTS(SOL6)
1729
-    #define HAS_SOLENOID_6 1
1735
+  #if E_STEPPERS > 6
1736
+    #if PIN_EXISTS(E6_ENABLE) || AXIS_IS_L64XX(E6) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6))
1737
+      #define HAS_E6_ENABLE 1
1738
+    #endif
1739
+    #if PIN_EXISTS(E6_DIR)
1740
+      #define HAS_E6_DIR 1
1741
+    #endif
1742
+    #if PIN_EXISTS(E6_STEP)
1743
+      #define HAS_E6_STEP 1
1744
+    #endif
1745
+    #if PIN_EXISTS(E6_MS1)
1746
+      #define HAS_E6_MS_PINS 1
1747
+    #endif
1748
+    #if PIN_EXISTS(SOL6)
1749
+      #define HAS_SOLENOID_6 1
1750
+    #endif
1730
   #endif
1751
   #endif
1731
 
1752
 
1732
-  #if PIN_EXISTS(E7_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7))
1733
-    #define HAS_E7_ENABLE 1
1734
-  #endif
1735
-  #if PIN_EXISTS(E7_DIR)
1736
-    #define HAS_E7_DIR 1
1737
-  #endif
1738
-  #if PIN_EXISTS(E7_STEP)
1739
-    #define HAS_E7_STEP 1
1740
-  #endif
1741
-  #if PIN_EXISTS(E7_MS1)
1742
-    #define HAS_E7_MS_PINS 1
1743
-  #endif
1744
-  #if PIN_EXISTS(SOL7)
1745
-    #define HAS_SOLENOID_7 1
1753
+  #if E_STEPPERS > 7
1754
+    #if PIN_EXISTS(E7_ENABLE) || AXIS_IS_L64XX(E7) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7))
1755
+      #define HAS_E7_ENABLE 1
1756
+    #endif
1757
+    #if PIN_EXISTS(E7_DIR)
1758
+      #define HAS_E7_DIR 1
1759
+    #endif
1760
+    #if PIN_EXISTS(E7_STEP)
1761
+      #define HAS_E7_STEP 1
1762
+    #endif
1763
+    #if PIN_EXISTS(E7_MS1)
1764
+      #define HAS_E7_MS_PINS 1
1765
+    #endif
1766
+    #if PIN_EXISTS(SOL7)
1767
+      #define HAS_SOLENOID_7 1
1768
+    #endif
1746
   #endif
1769
   #endif
1747
 
1770
 
1771
+  #if !defined(DISABLE_INACTIVE_E) && ENABLED(DISABLE_E)
1772
+    #define DISABLE_INACTIVE_E 1
1773
+  #endif
1774
+#else
1775
+  #undef DISABLE_INACTIVE_E
1748
 #endif // HAS_EXTRUDERS
1776
 #endif // HAS_EXTRUDERS
1749
 
1777
 
1750
 //
1778
 //
1997
   #endif
2025
   #endif
1998
 #endif
2026
 #endif
1999
 
2027
 
2000
-#if (HAS_E_DRIVER(TMC2660) \
2001
-  || ( E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != X_ENABLE_PIN   \
2002
-    && E0_ENABLE_PIN != Y_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN ) )
2003
-  #define HAS_E_STEPPER_ENABLE 1
2004
-#endif
2005
-
2006
 #if ANY_AXIS_HAS(HW_SERIAL)
2028
 #if ANY_AXIS_HAS(HW_SERIAL)
2007
   #define HAS_TMC_HW_SERIAL 1
2029
   #define HAS_TMC_HW_SERIAL 1
2008
 #endif
2030
 #endif
3260
   #define SD_SPI_SPEED SPI_FULL_SPEED
3282
   #define SD_SPI_SPEED SPI_FULL_SPEED
3261
 #endif
3283
 #endif
3262
 
3284
 
3263
-// Defined here to catch the above defines
3264
-#if ENABLED(SDCARD_SORT_ALPHA) && (FOLDER_SORTING || ENABLED(SDSORT_GCODE))
3265
-  #define HAS_FOLDER_SORTING 1
3266
-#endif
3267
-
3268
 #if HAS_WIRED_LCD
3285
 #if HAS_WIRED_LCD
3269
   // Get LCD character width/height, which may be overridden by pins, configs, etc.
3286
   // Get LCD character width/height, which may be overridden by pins, configs, etc.
3270
   #ifndef LCD_WIDTH
3287
   #ifndef LCD_WIDTH

+ 24
- 40
Marlin/src/inc/SanityCheck.h View File

2355
   #endif
2355
   #endif
2356
 #endif
2356
 #endif
2357
 
2357
 
2358
-#if E_STEPPERS
2359
-  #if !(PINS_EXIST(E0_STEP, E0_DIR) && HAS_E0_ENABLE)
2360
-    #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
2361
-  #endif
2362
-  #if E_STEPPERS > 1
2363
-    #if !(PINS_EXIST(E1_STEP, E1_DIR) && HAS_E1_ENABLE)
2364
-      #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
2365
-    #endif
2366
-    #if E_STEPPERS > 2
2367
-      #if !(PINS_EXIST(E2_STEP, E2_DIR) && HAS_E2_ENABLE)
2368
-        #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
2369
-      #endif
2370
-      #if E_STEPPERS > 3
2371
-        #if !(PINS_EXIST(E3_STEP, E3_DIR) && HAS_E3_ENABLE)
2372
-          #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
2373
-        #endif
2374
-        #if E_STEPPERS > 4
2375
-          #if !(PINS_EXIST(E4_STEP, E4_DIR) && HAS_E4_ENABLE)
2376
-            #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
2377
-          #endif
2378
-          #if E_STEPPERS > 5
2379
-            #if !(PINS_EXIST(E5_STEP, E5_DIR) && HAS_E5_ENABLE)
2380
-              #error "E5_STEP_PIN, E5_DIR_PIN, or E5_ENABLE_PIN not defined for this board."
2381
-            #endif
2382
-            #if E_STEPPERS > 6
2383
-              #if !(PINS_EXIST(E6_STEP, E6_DIR) && HAS_E6_ENABLE)
2384
-                #error "E6_STEP_PIN, E6_DIR_PIN, or E6_ENABLE_PIN not defined for this board."
2385
-              #endif
2386
-              #if E_STEPPERS > 7
2387
-                #if !(PINS_EXIST(E7_STEP, E7_DIR) && HAS_E7_ENABLE)
2388
-                  #error "E7_STEP_PIN, E7_DIR_PIN, or E7_ENABLE_PIN not defined for this board."
2389
-                #endif
2390
-              #endif // E_STEPPERS > 7
2391
-            #endif // E_STEPPERS > 6
2392
-          #endif // E_STEPPERS > 5
2393
-        #endif // E_STEPPERS > 4
2394
-      #endif // E_STEPPERS > 3
2395
-    #endif // E_STEPPERS > 2
2396
-  #endif // E_STEPPERS > 1
2397
-#endif // E_STEPPERS
2358
+#if E_STEPPERS > 0 && !(PINS_EXIST(E0_STEP, E0_DIR) && HAS_E0_ENABLE)
2359
+  #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
2360
+#endif
2361
+#if E_STEPPERS > 1 && !(PINS_EXIST(E1_STEP, E1_DIR) && HAS_E1_ENABLE)
2362
+  #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
2363
+#endif
2364
+#if E_STEPPERS > 2 && !(PINS_EXIST(E2_STEP, E2_DIR) && HAS_E2_ENABLE)
2365
+  #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
2366
+#endif
2367
+#if E_STEPPERS > 3 && !(PINS_EXIST(E3_STEP, E3_DIR) && HAS_E3_ENABLE)
2368
+  #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
2369
+#endif
2370
+#if E_STEPPERS > 4 && !(PINS_EXIST(E4_STEP, E4_DIR) && HAS_E4_ENABLE)
2371
+  #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
2372
+#endif
2373
+#if E_STEPPERS > 5 && !(PINS_EXIST(E5_STEP, E5_DIR) && HAS_E5_ENABLE)
2374
+  #error "E5_STEP_PIN, E5_DIR_PIN, or E5_ENABLE_PIN not defined for this board."
2375
+#endif
2376
+#if E_STEPPERS > 6 && !(PINS_EXIST(E6_STEP, E6_DIR) && HAS_E6_ENABLE)
2377
+  #error "E6_STEP_PIN, E6_DIR_PIN, or E6_ENABLE_PIN not defined for this board."
2378
+#endif
2379
+#if E_STEPPERS > 7 && !(PINS_EXIST(E7_STEP, E7_DIR) && HAS_E7_ENABLE)
2380
+  #error "E7_STEP_PIN, E7_DIR_PIN, or E7_ENABLE_PIN not defined for this board."
2381
+#endif
2398
 
2382
 
2399
 /**
2383
 /**
2400
  * Endstop Tests
2384
  * Endstop Tests

+ 5
- 11
Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp View File

229
   switch (vp.addr) {
229
   switch (vp.addr) {
230
     default: return;
230
     default: return;
231
     case DGUS_Addr::ADJUST_SetFlowrate_CUR:
231
     case DGUS_Addr::ADJUST_SetFlowrate_CUR:
232
-      #if EXTRUDERS > 1
233
-        ExtUI::setFlow_percent(flowrate, ExtUI::getActiveTool());
234
-      #else
235
-        ExtUI::setFlow_percent(flowrate, ExtUI::E0);
236
-      #endif
232
+      ExtUI::setFlow_percent(flowrate, TERN(HAS_MULTI_EXTRUDER, ExtUI::getActiveTool(), ExtUI::E0));
237
       break;
233
       break;
238
-    #if EXTRUDERS > 1
234
+    #if HAS_MULTI_EXTRUDER
239
       case DGUS_Addr::ADJUST_SetFlowrate_E0:
235
       case DGUS_Addr::ADJUST_SetFlowrate_E0:
240
         ExtUI::setFlow_percent(flowrate, ExtUI::E0);
236
         ExtUI::setFlow_percent(flowrate, ExtUI::E0);
241
         break;
237
         break;
557
     default: return;
553
     default: return;
558
     case DGUS_Data::Extruder::CURRENT:
554
     case DGUS_Data::Extruder::CURRENT:
559
     case DGUS_Data::Extruder::E0:
555
     case DGUS_Data::Extruder::E0:
560
-    #if EXTRUDERS > 1
561
-      case DGUS_Data::Extruder::E1:
562
-    #endif
556
+    TERN_(HAS_MULTI_EXTRUDER, case DGUS_Data::Extruder::E1:)
563
       dgus_screen_handler.filament_extruder = extruder;
557
       dgus_screen_handler.filament_extruder = extruder;
564
       break;
558
       break;
565
   }
559
   }
590
   switch (dgus_screen_handler.filament_extruder) {
584
   switch (dgus_screen_handler.filament_extruder) {
591
     default: return;
585
     default: return;
592
     case DGUS_Data::Extruder::CURRENT:
586
     case DGUS_Data::Extruder::CURRENT:
593
-      #if EXTRUDERS > 1
587
+      #if HAS_MULTI_EXTRUDER
594
         extruder = ExtUI::getActiveTool();
588
         extruder = ExtUI::getActiveTool();
595
         break;
589
         break;
596
       #endif
590
       #endif
597
     case DGUS_Data::Extruder::E0:
591
     case DGUS_Data::Extruder::E0:
598
       extruder = ExtUI::E0;
592
       extruder = ExtUI::E0;
599
       break;
593
       break;
600
-    #if EXTRUDERS > 1
594
+    #if HAS_MULTI_EXTRUDER
601
       case DGUS_Data::Extruder::E1:
595
       case DGUS_Data::Extruder::E1:
602
         extruder = ExtUI::E1;
596
         extruder = ExtUI::E1;
603
         break;
597
         break;

+ 3
- 7
Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp View File

249
   switch (vp.addr) {
249
   switch (vp.addr) {
250
     default: return;
250
     default: return;
251
     case DGUS_Addr::ADJUST_Flowrate_CUR:
251
     case DGUS_Addr::ADJUST_Flowrate_CUR:
252
-      #if EXTRUDERS > 1
253
-        flowrate = ExtUI::getFlow_percent(ExtUI::getActiveTool());
254
-      #else
255
-        flowrate = ExtUI::getFlow_percent(ExtUI::E0);
256
-      #endif
252
+      flowrate = ExtUI::getFlow_percent(TERN(HAS_MULTI_EXTRUDER, ExtUI::getActiveTool(), ExtUI::E0));
257
       break;
253
       break;
258
-    #if EXTRUDERS > 1
254
+    #if HAS_MULTI_EXTRUDER
259
       case DGUS_Addr::ADJUST_Flowrate_E0:
255
       case DGUS_Addr::ADJUST_Flowrate_E0:
260
         flowrate = ExtUI::getFlow_percent(ExtUI::E0);
256
         flowrate = ExtUI::getFlow_percent(ExtUI::E0);
261
         break;
257
         break;
366
   switch (dgus_screen_handler.filament_extruder) {
362
   switch (dgus_screen_handler.filament_extruder) {
367
     default: return;
363
     default: return;
368
     case DGUS_Data::Extruder::CURRENT:
364
     case DGUS_Data::Extruder::CURRENT:
369
-      #if EXTRUDERS > 1
365
+      #if HAS_MULTI_EXTRUDER
370
         switch (ExtUI::getActiveTool()) {
366
         switch (ExtUI::getActiveTool()) {
371
           default: break;
367
           default: break;
372
           case ExtUI::E0:
368
           case ExtUI::E0:

+ 2
- 2
Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h View File

55
   STATUS_Resume             = 0x2009, // Popup / Data: DGUS_Data::Popup
55
   STATUS_Resume             = 0x2009, // Popup / Data: DGUS_Data::Popup
56
   ADJUST_SetFeedrate        = 0x200A, // Type: Integer (16 bits signed)
56
   ADJUST_SetFeedrate        = 0x200A, // Type: Integer (16 bits signed)
57
   ADJUST_SetFlowrate_CUR    = 0x200B, // Type: Integer (16 bits signed)
57
   ADJUST_SetFlowrate_CUR    = 0x200B, // Type: Integer (16 bits signed)
58
-  #if EXTRUDERS > 1
58
+  #if HAS_MULTI_EXTRUDER
59
     ADJUST_SetFlowrate_E0   = 0x200C, // Type: Integer (16 bits signed)
59
     ADJUST_SetFlowrate_E0   = 0x200C, // Type: Integer (16 bits signed)
60
     ADJUST_SetFlowrate_E1   = 0x200D, // Type: Integer (16 bits signed)
60
     ADJUST_SetFlowrate_E1   = 0x200D, // Type: Integer (16 bits signed)
61
   #endif
61
   #endif
113
   STATUS_Icons              = 0x30F7, // Bits: DGUS_Data::StatusIcon
113
   STATUS_Icons              = 0x30F7, // Bits: DGUS_Data::StatusIcon
114
   ADJUST_Feedrate           = 0x30F8, // Type: Integer (16 bits signed)
114
   ADJUST_Feedrate           = 0x30F8, // Type: Integer (16 bits signed)
115
   ADJUST_Flowrate_CUR       = 0x30F9, // Type: Integer (16 bits signed)
115
   ADJUST_Flowrate_CUR       = 0x30F9, // Type: Integer (16 bits signed)
116
-  #if EXTRUDERS > 1
116
+  #if HAS_MULTI_EXTRUDER
117
     ADJUST_Flowrate_E0      = 0x30FA, // Type: Integer (16 bits signed)
117
     ADJUST_Flowrate_E0      = 0x30FA, // Type: Integer (16 bits signed)
118
     ADJUST_Flowrate_E1      = 0x30FB, // Type: Integer (16 bits signed)
118
     ADJUST_Flowrate_E1      = 0x30FB, // Type: Integer (16 bits signed)
119
   #endif
119
   #endif

+ 2
- 2
Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp View File

92
 
92
 
93
   VP_HELPER_RX(DGUS_Addr::ADJUST_SetFeedrate,     &DGUSRxHandler::Feedrate),
93
   VP_HELPER_RX(DGUS_Addr::ADJUST_SetFeedrate,     &DGUSRxHandler::Feedrate),
94
   VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_CUR, &DGUSRxHandler::Flowrate),
94
   VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_CUR, &DGUSRxHandler::Flowrate),
95
-  #if EXTRUDERS > 1
95
+  #if HAS_MULTI_EXTRUDER
96
     VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_E0,  &DGUSRxHandler::Flowrate),
96
     VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_E0,  &DGUSRxHandler::Flowrate),
97
     VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_E1,  &DGUSRxHandler::Flowrate),
97
     VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_E1,  &DGUSRxHandler::Flowrate),
98
   #endif
98
   #endif
194
   VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Flowrate_CUR,
194
   VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Flowrate_CUR,
195
                     nullptr,
195
                     nullptr,
196
                     &DGUSTxHandler::Flowrate),
196
                     &DGUSTxHandler::Flowrate),
197
-  #if EXTRUDERS > 1
197
+  #if HAS_MULTI_EXTRUDER
198
     VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Flowrate_E0,
198
     VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Flowrate_E0,
199
                       nullptr,
199
                       nullptr,
200
                       &DGUSTxHandler::Flowrate),
200
                       &DGUSTxHandler::Flowrate),

+ 2
- 2
Marlin/src/lcd/extui/mks_ui/wifi_module.cpp View File

988
                   if (card.isFileOpen()) {
988
                   if (card.isFileOpen()) {
989
                     //saved_feedrate_percentage = feedrate_percentage;
989
                     //saved_feedrate_percentage = feedrate_percentage;
990
                     feedrate_percentage = 100;
990
                     feedrate_percentage = 100;
991
-                    #if EXTRUDERS
991
+                    #if HAS_EXTRUDERS
992
                       planner.flow_percentage[0] = 100;
992
                       planner.flow_percentage[0] = 100;
993
                       planner.e_factor[0] = planner.flow_percentage[0] * 0.01f;
993
                       planner.e_factor[0] = planner.flow_percentage[0] * 0.01f;
994
                     #endif
994
                     #endif
995
-                    #if EXTRUDERS == 2
995
+                    #if HAS_MULTI_EXTRUDER
996
                       planner.flow_percentage[1] = 100;
996
                       planner.flow_percentage[1] = 100;
997
                       planner.e_factor[1] = planner.flow_percentage[1] * 0.01f;
997
                       planner.e_factor[1] = planner.flow_percentage[1] * 0.01f;
998
                     #endif
998
                     #endif

+ 12
- 12
Marlin/src/module/probe.cpp View File

48
   #include "delta.h"
48
   #include "delta.h"
49
 #endif
49
 #endif
50
 
50
 
51
-#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
52
-  #include "planner.h"
51
+#if ANY(HAS_QUIET_PROBING, USE_SENSORLESS)
52
+  #include "stepper/indirection.h"
53
+  #if BOTH(HAS_QUIET_PROBING, PROBING_ESTEPPERS_OFF)
54
+    #include "stepper.h"
55
+  #endif
56
+  #if USE_SENSORLESS
57
+    #include "../feature/tmc_util.h"
58
+    #if ENABLED(IMPROVE_HOMING_RELIABILITY)
59
+      #include "planner.h"
60
+    #endif
61
+  #endif
53
 #endif
62
 #endif
54
 
63
 
55
 #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
64
 #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
68
   #include "servo.h"
77
   #include "servo.h"
69
 #endif
78
 #endif
70
 
79
 
71
-#if EITHER(SENSORLESS_PROBING, SENSORLESS_HOMING)
72
-  #include "stepper.h"
73
-  #include "../feature/tmc_util.h"
74
-#endif
75
-
76
-#if HAS_QUIET_PROBING
77
-  #include "stepper/indirection.h"
78
-#endif
79
-
80
 #if ENABLED(EXTENSIBLE_UI)
80
 #if ENABLED(EXTENSIBLE_UI)
81
   #include "../lcd/extui/ui_api.h"
81
   #include "../lcd/extui/ui_api.h"
82
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
82
 #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
818
 
818
 
819
 #endif // HAS_Z_SERVO_PROBE
819
 #endif // HAS_Z_SERVO_PROBE
820
 
820
 
821
-#if EITHER(SENSORLESS_PROBING, SENSORLESS_HOMING)
821
+#if USE_SENSORLESS
822
 
822
 
823
   sensorless_t stealth_states { false };
823
   sensorless_t stealth_states { false };
824
 
824
 

+ 1
- 1
Marlin/src/module/probe.h View File

263
   #endif
263
   #endif
264
 
264
 
265
   // Basic functions for Sensorless Homing and Probing
265
   // Basic functions for Sensorless Homing and Probing
266
-  #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
266
+  #if USE_SENSORLESS
267
     static void enable_stallguard_diag1();
267
     static void enable_stallguard_diag1();
268
     static void disable_stallguard_diag1();
268
     static void disable_stallguard_diag1();
269
     static void set_homing_current(const bool onoff);
269
     static void set_homing_current(const bool onoff);

+ 24
- 120
Marlin/src/module/stepper/indirection.h View File

667
 //
667
 //
668
 
668
 
669
 #ifndef ENABLE_STEPPER_X
669
 #ifndef ENABLE_STEPPER_X
670
-  #if HAS_X_ENABLE
671
-    #define  ENABLE_STEPPER_X() X_ENABLE_WRITE( X_ENABLE_ON)
672
-  #else
673
-    #define  ENABLE_STEPPER_X() NOOP
674
-  #endif
670
+  #define  ENABLE_STEPPER_X() TERN(HAS_X_ENABLE, X_ENABLE_WRITE( X_ENABLE_ON), NOOP)
675
 #endif
671
 #endif
676
 #ifndef DISABLE_STEPPER_X
672
 #ifndef DISABLE_STEPPER_X
677
-  #if HAS_X_ENABLE
678
-    #define DISABLE_STEPPER_X() X_ENABLE_WRITE(!X_ENABLE_ON)
679
-  #else
680
-    #define DISABLE_STEPPER_X() NOOP
681
-  #endif
673
+  #define DISABLE_STEPPER_X() TERN(HAS_X_ENABLE, X_ENABLE_WRITE(!X_ENABLE_ON), NOOP)
682
 #endif
674
 #endif
683
 
675
 
684
 #ifndef ENABLE_STEPPER_X2
676
 #ifndef ENABLE_STEPPER_X2
685
-  #if HAS_X2_ENABLE
686
-    #define  ENABLE_STEPPER_X2() X2_ENABLE_WRITE( X_ENABLE_ON)
687
-  #else
688
-    #define  ENABLE_STEPPER_X2() NOOP
689
-  #endif
677
+  #define  ENABLE_STEPPER_X2() TERN(HAS_X2_ENABLE, X2_ENABLE_WRITE( X_ENABLE_ON), NOOP)
690
 #endif
678
 #endif
691
 #ifndef DISABLE_STEPPER_X2
679
 #ifndef DISABLE_STEPPER_X2
692
-  #if HAS_X2_ENABLE
693
-    #define DISABLE_STEPPER_X2() X2_ENABLE_WRITE(!X_ENABLE_ON)
694
-  #else
695
-    #define DISABLE_STEPPER_X2() NOOP
696
-  #endif
680
+  #define DISABLE_STEPPER_X2() TERN(HAS_X2_ENABLE, X2_ENABLE_WRITE(!X_ENABLE_ON), NOOP)
697
 #endif
681
 #endif
698
 
682
 
699
 #ifndef ENABLE_STEPPER_Y
683
 #ifndef ENABLE_STEPPER_Y
700
-  #if HAS_Y_ENABLE
701
-    #define  ENABLE_STEPPER_Y() Y_ENABLE_WRITE( Y_ENABLE_ON)
702
-  #else
703
-    #define  ENABLE_STEPPER_Y() NOOP
704
-  #endif
684
+  #define  ENABLE_STEPPER_Y() TERN(HAS_Y_ENABLE, Y_ENABLE_WRITE( Y_ENABLE_ON), NOOP)
705
 #endif
685
 #endif
706
 #ifndef DISABLE_STEPPER_Y
686
 #ifndef DISABLE_STEPPER_Y
707
-  #if HAS_Y_ENABLE
708
-    #define DISABLE_STEPPER_Y() Y_ENABLE_WRITE(!Y_ENABLE_ON)
709
-  #else
710
-    #define DISABLE_STEPPER_Y() NOOP
711
-  #endif
687
+  #define DISABLE_STEPPER_Y() TERN(HAS_Y_ENABLE, Y_ENABLE_WRITE(!Y_ENABLE_ON), NOOP)
712
 #endif
688
 #endif
713
 
689
 
714
 #ifndef ENABLE_STEPPER_Y2
690
 #ifndef ENABLE_STEPPER_Y2
715
-  #if HAS_Y2_ENABLE
716
-    #define  ENABLE_STEPPER_Y2() Y2_ENABLE_WRITE( Y_ENABLE_ON)
717
-  #else
718
-    #define  ENABLE_STEPPER_Y2() NOOP
719
-  #endif
691
+  #define  ENABLE_STEPPER_Y2() TERN(HAS_Y2_ENABLE, Y2_ENABLE_WRITE( Y_ENABLE_ON), NOOP)
720
 #endif
692
 #endif
721
 #ifndef DISABLE_STEPPER_Y2
693
 #ifndef DISABLE_STEPPER_Y2
722
-  #if HAS_Y2_ENABLE
723
-    #define DISABLE_STEPPER_Y2() Y2_ENABLE_WRITE(!Y_ENABLE_ON)
724
-  #else
725
-    #define DISABLE_STEPPER_Y2() NOOP
726
-  #endif
694
+  #define DISABLE_STEPPER_Y2() TERN(HAS_Y2_ENABLE, Y2_ENABLE_WRITE(!Y_ENABLE_ON), NOOP)
727
 #endif
695
 #endif
728
 
696
 
729
 #ifndef ENABLE_STEPPER_Z
697
 #ifndef ENABLE_STEPPER_Z
730
-  #if HAS_Z_ENABLE
731
-    #define  ENABLE_STEPPER_Z() Z_ENABLE_WRITE( Z_ENABLE_ON)
732
-  #else
733
-    #define  ENABLE_STEPPER_Z() NOOP
734
-  #endif
698
+  #define  ENABLE_STEPPER_Z() TERN(HAS_Z_ENABLE, Z_ENABLE_WRITE( Z_ENABLE_ON), NOOP)
735
 #endif
699
 #endif
736
 #ifndef DISABLE_STEPPER_Z
700
 #ifndef DISABLE_STEPPER_Z
737
-  #if HAS_Z_ENABLE
738
-    #define DISABLE_STEPPER_Z() Z_ENABLE_WRITE(!Z_ENABLE_ON)
739
-  #else
740
-    #define DISABLE_STEPPER_Z() NOOP
741
-  #endif
701
+  #define DISABLE_STEPPER_Z() TERN(HAS_Z_ENABLE, Z_ENABLE_WRITE(!Z_ENABLE_ON), NOOP)
742
 #endif
702
 #endif
743
 
703
 
744
 #ifndef ENABLE_STEPPER_Z2
704
 #ifndef ENABLE_STEPPER_Z2
745
-  #if HAS_Z2_ENABLE
746
-    #define  ENABLE_STEPPER_Z2() Z2_ENABLE_WRITE( Z_ENABLE_ON)
747
-  #else
748
-    #define  ENABLE_STEPPER_Z2() NOOP
749
-  #endif
705
+  #define  ENABLE_STEPPER_Z2() TERN(HAS_Z2_ENABLE, Z2_ENABLE_WRITE( Z_ENABLE_ON), NOOP)
750
 #endif
706
 #endif
751
 #ifndef DISABLE_STEPPER_Z2
707
 #ifndef DISABLE_STEPPER_Z2
752
-  #if HAS_Z2_ENABLE
753
-    #define DISABLE_STEPPER_Z2() Z2_ENABLE_WRITE(!Z_ENABLE_ON)
754
-  #else
755
-    #define DISABLE_STEPPER_Z2() NOOP
756
-  #endif
708
+  #define DISABLE_STEPPER_Z2() TERN(HAS_Z2_ENABLE, Z2_ENABLE_WRITE(!Z_ENABLE_ON), NOOP)
757
 #endif
709
 #endif
758
 
710
 
759
 #ifndef ENABLE_STEPPER_Z3
711
 #ifndef ENABLE_STEPPER_Z3
760
-  #if HAS_Z3_ENABLE
761
-    #define  ENABLE_STEPPER_Z3() Z3_ENABLE_WRITE( Z_ENABLE_ON)
762
-  #else
763
-    #define  ENABLE_STEPPER_Z3() NOOP
764
-  #endif
712
+  #define  ENABLE_STEPPER_Z3() TERN(HAS_Z3_ENABLE, Z3_ENABLE_WRITE( Z_ENABLE_ON), NOOP)
765
 #endif
713
 #endif
766
 #ifndef DISABLE_STEPPER_Z3
714
 #ifndef DISABLE_STEPPER_Z3
767
-  #if HAS_Z3_ENABLE
768
-    #define DISABLE_STEPPER_Z3() Z3_ENABLE_WRITE(!Z_ENABLE_ON)
769
-  #else
770
-    #define DISABLE_STEPPER_Z3() NOOP
771
-  #endif
715
+  #define DISABLE_STEPPER_Z3() TERN(HAS_Z3_ENABLE, Z3_ENABLE_WRITE(!Z_ENABLE_ON), NOOP)
772
 #endif
716
 #endif
773
 
717
 
774
 #ifndef ENABLE_STEPPER_Z4
718
 #ifndef ENABLE_STEPPER_Z4
775
-  #if HAS_Z4_ENABLE
776
-    #define  ENABLE_STEPPER_Z4() Z4_ENABLE_WRITE( Z_ENABLE_ON)
777
-  #else
778
-    #define  ENABLE_STEPPER_Z4() NOOP
779
-  #endif
719
+  #define  ENABLE_STEPPER_Z4() TERN(HAS_Z4_ENABLE, Z4_ENABLE_WRITE( Z_ENABLE_ON), NOOP)
780
 #endif
720
 #endif
781
 #ifndef DISABLE_STEPPER_Z4
721
 #ifndef DISABLE_STEPPER_Z4
782
-  #if HAS_Z4_ENABLE
783
-    #define DISABLE_STEPPER_Z4() Z4_ENABLE_WRITE(!Z_ENABLE_ON)
784
-  #else
785
-    #define DISABLE_STEPPER_Z4() NOOP
786
-  #endif
722
+  #define DISABLE_STEPPER_Z4() TERN(HAS_Z4_ENABLE, Z4_ENABLE_WRITE(!Z_ENABLE_ON), NOOP)
787
 #endif
723
 #endif
788
 
724
 
789
 #ifndef ENABLE_STEPPER_I
725
 #ifndef ENABLE_STEPPER_I
790
-  #if HAS_I_ENABLE
791
-    #define  ENABLE_STEPPER_I() I_ENABLE_WRITE( I_ENABLE_ON)
792
-  #else
793
-    #define  ENABLE_STEPPER_I() NOOP
794
-  #endif
726
+  #define  ENABLE_STEPPER_I() TERN(HAS_I_ENABLE, I_ENABLE_WRITE( I_ENABLE_ON), NOOP)
795
 #endif
727
 #endif
796
 #ifndef DISABLE_STEPPER_I
728
 #ifndef DISABLE_STEPPER_I
797
-  #if HAS_I_ENABLE
798
-    #define DISABLE_STEPPER_I() I_ENABLE_WRITE(!I_ENABLE_ON)
799
-  #else
800
-    #define DISABLE_STEPPER_I() NOOP
801
-  #endif
729
+  #define DISABLE_STEPPER_I() TERN(HAS_I_ENABLE, I_ENABLE_WRITE(!I_ENABLE_ON), NOOP)
802
 #endif
730
 #endif
803
 
731
 
804
 #ifndef ENABLE_STEPPER_J
732
 #ifndef ENABLE_STEPPER_J
805
-  #if HAS_J_ENABLE
806
-    #define  ENABLE_STEPPER_J() J_ENABLE_WRITE( J_ENABLE_ON)
807
-  #else
808
-    #define  ENABLE_STEPPER_J() NOOP
809
-  #endif
733
+  #define  ENABLE_STEPPER_J() TERN(HAS_J_ENABLE, J_ENABLE_WRITE( J_ENABLE_ON), NOOP)
810
 #endif
734
 #endif
811
 #ifndef DISABLE_STEPPER_J
735
 #ifndef DISABLE_STEPPER_J
812
-  #if HAS_J_ENABLE
813
-    #define DISABLE_STEPPER_J() J_ENABLE_WRITE(!J_ENABLE_ON)
814
-  #else
815
-    #define DISABLE_STEPPER_J() NOOP
816
-  #endif
736
+  #define DISABLE_STEPPER_J() TERN(HAS_J_ENABLE, J_ENABLE_WRITE(!J_ENABLE_ON), NOOP)
817
 #endif
737
 #endif
818
 
738
 
819
 #ifndef ENABLE_STEPPER_K
739
 #ifndef ENABLE_STEPPER_K
820
-  #if HAS_K_ENABLE
821
-    #define  ENABLE_STEPPER_K() K_ENABLE_WRITE( K_ENABLE_ON)
822
-  #else
823
-    #define  ENABLE_STEPPER_K() NOOP
824
-  #endif
740
+  #define  ENABLE_STEPPER_K() TERN(HAS_K_ENABLE, K_ENABLE_WRITE( K_ENABLE_ON), NOOP)
825
 #endif
741
 #endif
826
 #ifndef DISABLE_STEPPER_K
742
 #ifndef DISABLE_STEPPER_K
827
-  #if HAS_K_ENABLE
828
-    #define DISABLE_STEPPER_K() K_ENABLE_WRITE(!K_ENABLE_ON)
829
-  #else
830
-    #define DISABLE_STEPPER_K() NOOP
831
-  #endif
743
+  #define DISABLE_STEPPER_K() TERN(HAS_K_ENABLE, K_ENABLE_WRITE(!K_ENABLE_ON), NOOP)
832
 #endif
744
 #endif
833
 
745
 
834
 #ifndef ENABLE_STEPPER_E0
746
 #ifndef ENABLE_STEPPER_E0
835
-  #if HAS_E0_ENABLE
836
-    #define  ENABLE_STEPPER_E0() E0_ENABLE_WRITE( E_ENABLE_ON)
837
-  #else
838
-    #define  ENABLE_STEPPER_E0() NOOP
839
-  #endif
747
+  #define  ENABLE_STEPPER_E0() TERN(HAS_E0_ENABLE, E0_ENABLE_WRITE( E_ENABLE_ON), NOOP)
840
 #endif
748
 #endif
841
 #ifndef DISABLE_STEPPER_E0
749
 #ifndef DISABLE_STEPPER_E0
842
-  #if HAS_E0_ENABLE
843
-    #define DISABLE_STEPPER_E0() E0_ENABLE_WRITE(!E_ENABLE_ON)
844
-  #else
845
-    #define DISABLE_STEPPER_E0() NOOP
846
-  #endif
750
+  #define DISABLE_STEPPER_E0() TERN(HAS_E0_ENABLE, E0_ENABLE_WRITE(!E_ENABLE_ON), NOOP)
847
 #endif
751
 #endif
848
 
752
 
849
 #ifndef ENABLE_STEPPER_E1
753
 #ifndef ENABLE_STEPPER_E1

+ 9
- 9
Marlin/src/module/stepper/trinamic.h View File

194
     #define CHOPPER_TIMING_Z2 CHOPPER_TIMING_Z
194
     #define CHOPPER_TIMING_Z2 CHOPPER_TIMING_Z
195
   #endif
195
   #endif
196
   static constexpr chopper_timing_t chopper_timing_Z2 = CHOPPER_TIMING_Z2;
196
   static constexpr chopper_timing_t chopper_timing_Z2 = CHOPPER_TIMING_Z2;
197
-  #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2)
197
+  #if ENABLED(SOFTWARE_DRIVER_ENABLE)
198
     #define Z2_ENABLE_INIT() NOOP
198
     #define Z2_ENABLE_INIT() NOOP
199
     #define Z2_ENABLE_WRITE(STATE) stepperZ2.toff((STATE)==Z_ENABLE_ON ? chopper_timing_Z2.toff : 0)
199
     #define Z2_ENABLE_WRITE(STATE) stepperZ2.toff((STATE)==Z_ENABLE_ON ? chopper_timing_Z2.toff : 0)
200
     #define Z2_ENABLE_READ() stepperZ2.isEnabled()
200
     #define Z2_ENABLE_READ() stepperZ2.isEnabled()
287
     #define CHOPPER_TIMING_E0 CHOPPER_TIMING_E
287
     #define CHOPPER_TIMING_E0 CHOPPER_TIMING_E
288
   #endif
288
   #endif
289
   static constexpr chopper_timing_t chopper_timing_E0 = CHOPPER_TIMING_E0;
289
   static constexpr chopper_timing_t chopper_timing_E0 = CHOPPER_TIMING_E0;
290
-  #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0)
290
+  #if ENABLED(SOFTWARE_DRIVER_ENABLE)
291
     #define E0_ENABLE_INIT() NOOP
291
     #define E0_ENABLE_INIT() NOOP
292
     #define E0_ENABLE_WRITE(STATE) stepperE0.toff((STATE)==E_ENABLE_ON ? chopper_timing_E0.toff : 0)
292
     #define E0_ENABLE_WRITE(STATE) stepperE0.toff((STATE)==E_ENABLE_ON ? chopper_timing_E0.toff : 0)
293
     #define E0_ENABLE_READ() stepperE0.isEnabled()
293
     #define E0_ENABLE_READ() stepperE0.isEnabled()
304
     #define CHOPPER_TIMING_E1 CHOPPER_TIMING_E
304
     #define CHOPPER_TIMING_E1 CHOPPER_TIMING_E
305
   #endif
305
   #endif
306
   static constexpr chopper_timing_t chopper_timing_E1 = CHOPPER_TIMING_E1;
306
   static constexpr chopper_timing_t chopper_timing_E1 = CHOPPER_TIMING_E1;
307
-  #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1)
307
+  #if ENABLED(SOFTWARE_DRIVER_ENABLE)
308
     #define E1_ENABLE_INIT() NOOP
308
     #define E1_ENABLE_INIT() NOOP
309
     #define E1_ENABLE_WRITE(STATE) stepperE1.toff((STATE)==E_ENABLE_ON ? chopper_timing_E1.toff : 0)
309
     #define E1_ENABLE_WRITE(STATE) stepperE1.toff((STATE)==E_ENABLE_ON ? chopper_timing_E1.toff : 0)
310
     #define E1_ENABLE_READ() stepperE1.isEnabled()
310
     #define E1_ENABLE_READ() stepperE1.isEnabled()
321
     #define CHOPPER_TIMING_E2 CHOPPER_TIMING_E
321
     #define CHOPPER_TIMING_E2 CHOPPER_TIMING_E
322
   #endif
322
   #endif
323
   static constexpr chopper_timing_t chopper_timing_E2 = CHOPPER_TIMING_E2;
323
   static constexpr chopper_timing_t chopper_timing_E2 = CHOPPER_TIMING_E2;
324
-  #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2)
324
+  #if ENABLED(SOFTWARE_DRIVER_ENABLE)
325
     #define E2_ENABLE_INIT() NOOP
325
     #define E2_ENABLE_INIT() NOOP
326
     #define E2_ENABLE_WRITE(STATE) stepperE2.toff((STATE)==E_ENABLE_ON ? chopper_timing_E2.toff : 0)
326
     #define E2_ENABLE_WRITE(STATE) stepperE2.toff((STATE)==E_ENABLE_ON ? chopper_timing_E2.toff : 0)
327
     #define E2_ENABLE_READ() stepperE2.isEnabled()
327
     #define E2_ENABLE_READ() stepperE2.isEnabled()
338
     #define CHOPPER_TIMING_E3 CHOPPER_TIMING_E
338
     #define CHOPPER_TIMING_E3 CHOPPER_TIMING_E
339
   #endif
339
   #endif
340
   static constexpr chopper_timing_t chopper_timing_E3 = CHOPPER_TIMING_E3;
340
   static constexpr chopper_timing_t chopper_timing_E3 = CHOPPER_TIMING_E3;
341
-  #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3)
341
+  #if ENABLED(SOFTWARE_DRIVER_ENABLE)
342
     #define E3_ENABLE_INIT() NOOP
342
     #define E3_ENABLE_INIT() NOOP
343
     #define E3_ENABLE_WRITE(STATE) stepperE3.toff((STATE)==E_ENABLE_ON ? chopper_timing_E3.toff : 0)
343
     #define E3_ENABLE_WRITE(STATE) stepperE3.toff((STATE)==E_ENABLE_ON ? chopper_timing_E3.toff : 0)
344
     #define E3_ENABLE_READ() stepperE3.isEnabled()
344
     #define E3_ENABLE_READ() stepperE3.isEnabled()
355
     #define CHOPPER_TIMING_E4 CHOPPER_TIMING_E
355
     #define CHOPPER_TIMING_E4 CHOPPER_TIMING_E
356
   #endif
356
   #endif
357
   static constexpr chopper_timing_t chopper_timing_E4 = CHOPPER_TIMING_E4;
357
   static constexpr chopper_timing_t chopper_timing_E4 = CHOPPER_TIMING_E4;
358
-  #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4)
358
+  #if ENABLED(SOFTWARE_DRIVER_ENABLE)
359
     #define E4_ENABLE_INIT() NOOP
359
     #define E4_ENABLE_INIT() NOOP
360
     #define E4_ENABLE_WRITE(STATE) stepperE4.toff((STATE)==E_ENABLE_ON ? chopper_timing_E4.toff : 0)
360
     #define E4_ENABLE_WRITE(STATE) stepperE4.toff((STATE)==E_ENABLE_ON ? chopper_timing_E4.toff : 0)
361
     #define E4_ENABLE_READ() stepperE4.isEnabled()
361
     #define E4_ENABLE_READ() stepperE4.isEnabled()
372
     #define CHOPPER_TIMING_E5 CHOPPER_TIMING_E
372
     #define CHOPPER_TIMING_E5 CHOPPER_TIMING_E
373
   #endif
373
   #endif
374
   static constexpr chopper_timing_t chopper_timing_E5 = CHOPPER_TIMING_E5;
374
   static constexpr chopper_timing_t chopper_timing_E5 = CHOPPER_TIMING_E5;
375
-  #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5)
375
+  #if ENABLED(SOFTWARE_DRIVER_ENABLE)
376
     #define E5_ENABLE_INIT() NOOP
376
     #define E5_ENABLE_INIT() NOOP
377
     #define E5_ENABLE_WRITE(STATE) stepperE5.toff((STATE)==E_ENABLE_ON ? chopper_timing_E5.toff : 0)
377
     #define E5_ENABLE_WRITE(STATE) stepperE5.toff((STATE)==E_ENABLE_ON ? chopper_timing_E5.toff : 0)
378
     #define E5_ENABLE_READ() stepperE5.isEnabled()
378
     #define E5_ENABLE_READ() stepperE5.isEnabled()
389
     #define CHOPPER_TIMING_E6 CHOPPER_TIMING_E
389
     #define CHOPPER_TIMING_E6 CHOPPER_TIMING_E
390
   #endif
390
   #endif
391
   static constexpr chopper_timing_t chopper_timing_E6 = CHOPPER_TIMING_E6;
391
   static constexpr chopper_timing_t chopper_timing_E6 = CHOPPER_TIMING_E6;
392
-  #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6)
392
+  #if ENABLED(SOFTWARE_DRIVER_ENABLE)
393
     #define E6_ENABLE_INIT() NOOP
393
     #define E6_ENABLE_INIT() NOOP
394
     #define E6_ENABLE_WRITE(STATE) stepperE6.toff((STATE)==E_ENABLE_ON ? chopper_timing_E6.toff : 0)
394
     #define E6_ENABLE_WRITE(STATE) stepperE6.toff((STATE)==E_ENABLE_ON ? chopper_timing_E6.toff : 0)
395
     #define E6_ENABLE_READ() stepperE6.isEnabled()
395
     #define E6_ENABLE_READ() stepperE6.isEnabled()
406
     #define CHOPPER_TIMING_E7 CHOPPER_TIMING_E
406
     #define CHOPPER_TIMING_E7 CHOPPER_TIMING_E
407
   #endif
407
   #endif
408
   static constexpr chopper_timing_t chopper_timing_E7 = CHOPPER_TIMING_E7;
408
   static constexpr chopper_timing_t chopper_timing_E7 = CHOPPER_TIMING_E7;
409
-  #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7)
409
+  #if ENABLED(SOFTWARE_DRIVER_ENABLE)
410
     #define E7_ENABLE_INIT() NOOP
410
     #define E7_ENABLE_INIT() NOOP
411
     #define E7_ENABLE_WRITE(STATE) stepperE7.toff((STATE)==E_ENABLE_ON ? chopper_timing_E7.toff : 0)
411
     #define E7_ENABLE_WRITE(STATE) stepperE7.toff((STATE)==E_ENABLE_ON ? chopper_timing_E7.toff : 0)
412
     #define E7_ENABLE_READ() stepperE7.isEnabled()
412
     #define E7_ENABLE_READ() stepperE7.isEnabled()

+ 7
- 2
Marlin/src/sd/cardreader.h View File

27
 
27
 
28
 extern const char M23_STR[], M24_STR[];
28
 extern const char M23_STR[], M24_STR[];
29
 
29
 
30
-#if BOTH(SDCARD_SORT_ALPHA, SDSORT_DYNAMIC_RAM)
31
-  #define SD_RESORT 1
30
+#if ENABLED(SDCARD_SORT_ALPHA)
31
+  #if ENABLED(SDSORT_DYNAMIC_RAM)
32
+    #define SD_RESORT 1
33
+  #endif
34
+  #if FOLDER_SORTING || ENABLED(SDSORT_GCODE)
35
+    #define HAS_FOLDER_SORTING 1
36
+  #endif
32
 #endif
37
 #endif
33
 
38
 
34
 #if ENABLED(SDCARD_RATHERRECENTFIRST) && DISABLED(SDCARD_SORT_ALPHA)
39
 #if ENABLED(SDCARD_RATHERRECENTFIRST) && DISABLED(SDCARD_SORT_ALPHA)

Loading…
Cancel
Save