diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 60dc4cab7921..0ea13746de31 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h
index 964a2c104aec..d3a406689deb 100644
--- a/Marlin/Configuration_adv.h
+++ b/Marlin/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/HAL/HAL_AVR/SanityCheck.h b/Marlin/src/HAL/HAL_AVR/SanityCheck.h
index f2907205d7c1..f30db8426796 100644
--- a/Marlin/src/HAL/HAL_AVR/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_AVR/SanityCheck.h
@@ -99,7 +99,7 @@
/**
* TMC2208 software UART and ENDSTOP_INTERRUPTS both use pin change interrupts (PCI)
*/
-#if ENABLED(HAVE_TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
+#if HAVE_SPIDRIVER(TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
defined(X_HARDWARE_SERIAL ) \
|| defined(X2_HARDWARE_SERIAL) \
|| defined(Y_HARDWARE_SERIAL ) \
diff --git a/Marlin/src/HAL/HAL_DUE/SanityCheck.h b/Marlin/src/HAL/HAL_DUE/SanityCheck.h
index 16e07bd3b44f..5398a01720cc 100644
--- a/Marlin/src/HAL/HAL_DUE/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_DUE/SanityCheck.h
@@ -41,7 +41,7 @@
*/
#define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == MOSI_PIN || TMC_SW_##P == MISO_PIN || TMC_SW_##P == SCK_PIN))
-#if ENABLED(SDSUPPORT) && ENABLED(HAVE_TMC2130)
+#if ENABLED(SDSUPPORT) && HAVE_SPIDRIVER(TMC2130)
#if ENABLED(TMC_USE_SW_SPI)
#if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
diff --git a/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h b/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h
index a408a6c5877e..15cdaba4e3bf 100644
--- a/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h
@@ -66,7 +66,7 @@
#endif
#endif // SPINDLE_LASER_ENABLE
-#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && ENABLED(HAVE_TMC2130) && DISABLED(TMC_USE_SW_SPI) \
+#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAVE_SPIDRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI) \
&& (MB(RAMPS_14_RE_ARM_EFB) \
|| MB(RAMPS_14_RE_ARM_EEB) \
|| MB(RAMPS_14_RE_ARM_EFF) \
diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp
index 3c9fbc66678d..de3ff27b2026 100644
--- a/Marlin/src/Marlin.cpp
+++ b/Marlin/src/Marlin.cpp
@@ -712,10 +712,10 @@ void setup() {
SERIAL_PROTOCOLLNPGM("start");
SERIAL_ECHO_START();
- #if ENABLED(HAVE_TMC2130)
+ #if HAVE_SPIDRIVER(TMC2130)
tmc_init_cs_pins();
#endif
- #if ENABLED(HAVE_TMC2208)
+ #if HAVE_SPIDRIVER(TMC2208)
tmc2208_serial_begin();
#endif
diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h
index 60dc4cab7921..0ea13746de31 100644
--- a/Marlin/src/config/default/Configuration.h
+++ b/Marlin/src/config/default/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h
index 964a2c104aec..d3a406689deb 100644
--- a/Marlin/src/config/default/Configuration_adv.h
+++ b/Marlin/src/config/default/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
index c3743b06e860..9e9b99fda7ec 100644
--- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
+++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
@@ -571,6 +571,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
index b2dbe6e1c7e8..91f0dca939ac 100644
--- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
+++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
index 13ab19942850..99adaf0973d0 100644
--- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
+++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h
index e48004e6f462..7308fbdcc8e5 100644
--- a/Marlin/src/config/examples/Anet/A6/Configuration.h
+++ b/Marlin/src/config/examples/Anet/A6/Configuration.h
@@ -571,6 +571,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h
index b375a0d7bb46..a22d1da26c74 100644
--- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h
+++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h
index 8c78e4fe6eda..8e2fb91693e8 100644
--- a/Marlin/src/config/examples/Anet/A8/Configuration.h
+++ b/Marlin/src/config/examples/Anet/A8/Configuration.h
@@ -558,6 +558,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h
index 7a502d1b8723..604a899738d0 100644
--- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h
+++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
index c5eeaa3f3a29..792fdc246311 100644
--- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
+++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
index 964a2c104aec..d3a406689deb 100644
--- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
+++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
index 208d670aceae..691a8e864014 100644
--- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
+++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
index 8cfdb518d069..4de1a684dab9 100644
--- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
+++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
index 85588b1e023b..8c5cc844084a 100644
--- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
+++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
index e358b7ff9e3e..33f7d65ff1e6 100644
--- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
+++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h
index abac16fefc1e..11a3981f5293 100644
--- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h
+++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h
@@ -539,6 +539,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
index 0f15c138ffe5..a47b54693ccf 100644
--- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
+++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
index 48393de6334d..6c72b1af9d9b 100644
--- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
+++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
@@ -552,6 +552,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
index 7222f3c55233..b8678e99f488 100644
--- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
+++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
@@ -849,7 +849,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -860,7 +860,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -872,7 +872,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1044,19 +1044,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1102,39 +1091,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1142,22 +1113,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1317,20 +1274,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1376,7 +1320,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h
index a29442498be6..dc4fb10a0684 100644
--- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h
+++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h
@@ -539,6 +539,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
index 0f15c138ffe5..a47b54693ccf 100644
--- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
+++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h
index b5fdfeacdeaa..acd26816a920 100644
--- a/Marlin/src/config/examples/Cartesio/Configuration.h
+++ b/Marlin/src/config/examples/Cartesio/Configuration.h
@@ -550,6 +550,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h
index c10546db2050..88d90957449b 100644
--- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h
+++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h
index fec622a43bc5..9ca819c25cf5 100755
--- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h
+++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h
@@ -561,6 +561,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
index 29367eefbac3..aaf23f4d6f0b 100755
--- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,20 +1036,9 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAVE_SPIDRIVER(TMC26X)
+
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
#define X_MICROSTEPS 16 // number of microsteps
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h
index 95015f867b6f..f3cf354dcaa8 100644
--- a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h
+++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
index e4c439ac0800..f89094df4010 100644
--- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
index 71e3ce268843..a4c7c25bdefd 100644
--- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
+++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
@@ -570,6 +570,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
index 8b2e9103d91f..51460ac69c11 100644
--- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration.h b/Marlin/src/config/examples/Creality/CR-8/Configuration.h
index b6de953e633c..0d227f91ae51 100644
--- a/Marlin/src/config/examples/Creality/CR-8/Configuration.h
+++ b/Marlin/src/config/examples/Creality/CR-8/Configuration.h
@@ -561,6 +561,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
index 6d63e7c8a5a1..2e9576a3ea3c 100644
--- a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h
index 4780b8e8e8c9..59da07adb498 100644
--- a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h
+++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h
@@ -555,6 +555,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
index f273d8c82547..4cde69a93a7d 100644
--- a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h
index 44aacf98ea2f..0f6451416f75 100644
--- a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h
+++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h
@@ -555,6 +555,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
index e46d53e0b853..2563930beedf 100644
--- a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h
index 934a4a7ebe03..4542c4df0a2b 100644
--- a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h
+++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h
@@ -561,6 +561,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
index 6d63e7c8a5a1..2e9576a3ea3c 100644
--- a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h
index 4ea0c4378501..0d0379efbde3 100644
--- a/Marlin/src/config/examples/Felix/Configuration.h
+++ b/Marlin/src/config/examples/Felix/Configuration.h
@@ -532,6 +532,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h
index 2a102f8055bc..8cae03fcc427 100644
--- a/Marlin/src/config/examples/Felix/Configuration_adv.h
+++ b/Marlin/src/config/examples/Felix/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h
index 84aad3480cdb..2d88f000805b 100644
--- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h
+++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h
@@ -532,6 +532,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
index daccf71eef9c..069961b35434 100644
--- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
+++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
@@ -556,6 +556,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
index 8cba5f3e90f6..2195933850eb 100644
--- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
+++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
index daebc694aca9..96110b297244 100644
--- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
@@ -566,6 +566,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
index 5ea7908b370e..5780e0f3885f 100644
--- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
index 3b38eb19d774..226b2a5c10bb 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
@@ -566,6 +566,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
index 32523f1b1fda..f67937bf4731 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
@@ -566,6 +566,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
index 0b99ba967262..73a20345c0fc 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
index 540c4e32faed..758ee6c1dff8 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
index b9cbe01017ec..5735be6318b1 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
index 540c4e32faed..758ee6c1dff8 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
index 1bc7d438d165..12b9460be9ab 100644
--- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
+++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
@@ -555,6 +555,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
index 26fd198fce02..46c5026d0639 100644
--- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
+++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration.h b/Marlin/src/config/examples/JGAurora/A5/Configuration.h
index 9651257427b5..005e1e63674e 100644
--- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h
+++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h
@@ -563,6 +563,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
index 93b9e79008cc..13f15013d2fe 100644
--- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
+++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/MakerParts/Configuration.h b/Marlin/src/config/examples/MakerParts/Configuration.h
index a7ae7132ef14..296108a3810f 100644
--- a/Marlin/src/config/examples/MakerParts/Configuration.h
+++ b/Marlin/src/config/examples/MakerParts/Configuration.h
@@ -571,6 +571,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h
index 8a3cd6eb6006..a9d9bf247d41 100644
--- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h
+++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h
index 48106fcc3258..3ae094e0c19a 100644
--- a/Marlin/src/config/examples/Malyan/M150/Configuration.h
+++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h
@@ -560,6 +560,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
index 3a16ec5b3529..2aa0370d08bf 100644
--- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
+++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration.h b/Marlin/src/config/examples/Malyan/M200/Configuration.h
index 35593de1637d..efdd8cb35489 100644
--- a/Marlin/src/config/examples/Malyan/M200/Configuration.h
+++ b/Marlin/src/config/examples/Malyan/M200/Configuration.h
@@ -550,6 +550,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
index 7ad114f9ca2a..6485844a6393 100644
--- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
+++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
index 671eae619529..35f184076309 100644
--- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
+++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
index 18269784518a..5e2102becf2a 100644
--- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
+++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
index ea352b6a5637..81c9b1818f1c 100644
--- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
+++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h
index 65b0ddb70560..0f5e9f8f1b24 100644
--- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h
+++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
index 6a65760c407b..57b006eb87d0 100644
--- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
+++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
@@ -849,7 +849,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -872,7 +872,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1044,19 +1044,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1102,39 +1091,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1142,22 +1113,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1317,20 +1274,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1376,7 +1320,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
index 006c4a9c6f60..ff2f795a6767 100644
--- a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
+++ b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
index 44ad346d2c04..d87309a26c4c 100644
--- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
+++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h
index 2d68a4f96e2a..950c096706b1 100644
--- a/Marlin/src/config/examples/RigidBot/Configuration.h
+++ b/Marlin/src/config/examples/RigidBot/Configuration.h
@@ -547,6 +547,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h
index 732a8051cbce..b2d752e184ec 100644
--- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h
+++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h
index 0014d865e1a3..13eb1c992dd0 100644
--- a/Marlin/src/config/examples/SCARA/Configuration.h
+++ b/Marlin/src/config/examples/SCARA/Configuration.h
@@ -564,6 +564,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h
index a3d822e8792f..7ae36ad4189a 100644
--- a/Marlin/src/config/examples/SCARA/Configuration_adv.h
+++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/STM32F10/Configuration.h b/Marlin/src/config/examples/STM32F10/Configuration.h
index cd83781bc454..df57a78861be 100644
--- a/Marlin/src/config/examples/STM32F10/Configuration.h
+++ b/Marlin/src/config/examples/STM32F10/Configuration.h
@@ -553,6 +553,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/STM32F4/Configuration.h b/Marlin/src/config/examples/STM32F4/Configuration.h
index 3a45d4c83ba8..51bf45205964 100644
--- a/Marlin/src/config/examples/STM32F4/Configuration.h
+++ b/Marlin/src/config/examples/STM32F4/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h
index a69c25605193..8d245eefc9bf 100644
--- a/Marlin/src/config/examples/Sanguinololu/Configuration.h
+++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
index 363954706b80..31d2f283b763 100644
--- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
+++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/TheBorg/Configuration.h b/Marlin/src/config/examples/TheBorg/Configuration.h
index 61dcbe7858b0..59d39cfcf83e 100644
--- a/Marlin/src/config/examples/TheBorg/Configuration.h
+++ b/Marlin/src/config/examples/TheBorg/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+#define X_DRIVER_TYPE TMC26X + SPI_STEPPER
+//#define X2_DRIVER_TYPE DRV8825
+#define Y_DRIVER_TYPE TMC26X + SPI_STEPPER
+//#define Y2_DRIVER_TYPE DRV8825
+#define Z_DRIVER_TYPE TMC26X + SPI_STEPPER
+#define Z2_DRIVER_TYPE TMC26X + SPI_STEPPER
+#define E0_DRIVER_TYPE TMC26X + SPI_STEPPER
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h
index 44a4b842d635..8e561873f3e5 100644
--- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h
+++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,20 +1036,7 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-#define HAVE_TMC26X
-
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- #define X_IS_TMC26X
- //#define X2_IS_TMC26X
- #define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- #define Z_IS_TMC26X
- #define Z2_IS_TMC26X
- #define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1200 // in mA
#define X_SENSE_RESISTOR 50 // in mOhms
@@ -1095,39 +1082,21 @@
#define E4_SENSE_RESISTOR 50
#define E4_MICROSTEPS 32
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1135,22 +1104,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1310,20 +1265,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1369,7 +1311,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h
index 1140ee4c28e6..565ec0ed1047 100644
--- a/Marlin/src/config/examples/TinyBoy2/Configuration.h
+++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h
@@ -602,6 +602,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
index 31606428e312..4a24541a5bdf 100644
--- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
+++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Tronxy/X1/Configuration.h b/Marlin/src/config/examples/Tronxy/X1/Configuration.h
index ab465fcf7663..b83978916b9b 100644
--- a/Marlin/src/config/examples/Tronxy/X1/Configuration.h
+++ b/Marlin/src/config/examples/Tronxy/X1/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h
index 96013a00f249..c91680a0f16f 100644
--- a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h
+++ b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h
index 98e1d5f2ddb4..1cf3f66c4e8e 100644
--- a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h
+++ b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h
@@ -562,6 +562,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
index 5304e6f4a4a8..4393dd3553c5 100644
--- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
+++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
index 360ea1f2a4c2..841d79b2ce7a 100644
--- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
+++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h
index c2074ad7cc0f..a7f8c20ab69d 100644
--- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h
+++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h
@@ -581,6 +581,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
index 7ff16a271e73..e2ddeaacd142 100644
--- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
+++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
@@ -844,7 +844,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -855,7 +855,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,7 +867,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1039,19 +1039,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1097,39 +1086,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1137,22 +1108,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1312,20 +1269,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1371,7 +1315,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h
index e17be9ac3b1d..ca7fe09620b1 100644
--- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h
+++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
index 7a04202e572e..f9039d8d7927 100644
--- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
+++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
index e821537bbeb1..6d3ceca0aa7b 100644
--- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
+++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
index dd90872bf633..fd6c4e362d90 100644
--- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
+++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
@@ -561,6 +561,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
index 49a4983a37fd..6b747d624fd7 100644
--- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
+++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
@@ -843,7 +843,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -854,7 +854,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -866,7 +866,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1038,19 +1038,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1096,39 +1085,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1136,22 +1107,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1311,20 +1268,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1370,7 +1314,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h
index 3ac914b61ff4..ef266f6a7a0c 100644
--- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h
+++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h
@@ -551,6 +551,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
index 8e2880278f29..6943ea62468a 100644
--- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
+++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
@@ -627,6 +627,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
index 123fe924947f..38584360d3e8 100644
--- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
@@ -843,7 +843,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -854,7 +854,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -866,7 +866,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1038,19 +1038,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1096,39 +1085,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1136,22 +1107,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1311,20 +1268,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1370,7 +1314,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
index 3bc3e90ea04f..685e34268480 100644
--- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
+++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
@@ -627,6 +627,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
index ebce1fe5814c..3d5ff1fcc392 100644
--- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
@@ -843,7 +843,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -854,7 +854,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -866,7 +866,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1038,19 +1038,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1096,39 +1085,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1136,22 +1107,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1311,20 +1268,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1370,7 +1314,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
index 31d45a2ac0c7..0793214bb05e 100644
--- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
+++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
@@ -627,6 +627,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
index 5eedc749abfe..9c6f4d56d8fe 100644
--- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
@@ -843,7 +843,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -854,7 +854,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -866,7 +866,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1038,19 +1038,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1096,39 +1085,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1136,22 +1107,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1311,20 +1268,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1370,7 +1314,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
index 1ece24312511..178b6ee3383f 100644
--- a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
+++ b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
@@ -632,6 +632,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h
index 7f97193dd38f..bec8aaa917a8 100644
--- a/Marlin/src/config/examples/delta/generic/Configuration.h
+++ b/Marlin/src/config/examples/delta/generic/Configuration.h
@@ -617,6 +617,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h
index 5eedc749abfe..9c6f4d56d8fe 100644
--- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h
@@ -843,7 +843,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -854,7 +854,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -866,7 +866,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1038,19 +1038,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1096,39 +1085,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1136,22 +1107,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1311,20 +1268,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1370,7 +1314,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h
index b95f3ab88826..27e83f1e4b28 100644
--- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h
+++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h
@@ -617,6 +617,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
index 5eedc749abfe..9c6f4d56d8fe 100644
--- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
@@ -843,7 +843,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -854,7 +854,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -866,7 +866,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1038,19 +1038,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1096,39 +1085,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1136,22 +1107,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1311,20 +1268,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1370,7 +1314,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h
index 1cdf3174f4b9..08c2ae6357fb 100644
--- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h
+++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h
@@ -603,6 +603,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
index b3d4e887dfeb..577f2bf9df01 100644
--- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
@@ -848,7 +848,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -859,7 +859,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -871,7 +871,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1043,19 +1043,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1101,39 +1090,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1141,22 +1112,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1316,20 +1273,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1375,7 +1319,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h
index 26933a8df02b..5efca13c7cab 100644
--- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h
+++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h
@@ -621,6 +621,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
index 50012d540326..3264e1120de8 100644
--- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
@@ -843,7 +843,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -854,7 +854,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -866,7 +866,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1038,19 +1038,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1096,39 +1085,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1136,22 +1107,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1311,20 +1268,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1370,7 +1314,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
index f89b21f61a54..b65364dce989 100644
--- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
+++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
@@ -564,6 +564,27 @@
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
index 319bb9632cdf..0664aeaeaa96 100644
--- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
+++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h
index b2daa0b7bf07..27c0d1361c72 100644
--- a/Marlin/src/config/examples/makibox/Configuration.h
+++ b/Marlin/src/config/examples/makibox/Configuration.h
@@ -554,6 +554,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h
index ea907a40e117..d2a4d1b381e5 100644
--- a/Marlin/src/config/examples/makibox/Configuration_adv.h
+++ b/Marlin/src/config/examples/makibox/Configuration_adv.h
@@ -841,7 +841,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -852,7 +852,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -864,7 +864,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h
index 3151f62a3dac..e726d6857345 100644
--- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h
+++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h
@@ -553,6 +553,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h
index 57b4ed1b06d3..5ccf37eb45df 100644
--- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h
+++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h
@@ -540,6 +540,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
index 9e85785b787b..e2316bd608b5 100644
--- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
+++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
@@ -1036,19 +1036,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1094,39 +1083,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1134,22 +1105,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1309,20 +1266,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1368,7 +1312,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h
index 5f37d605d6a0..9c49741376fd 100644
--- a/Marlin/src/config/examples/wt150/Configuration.h
+++ b/Marlin/src/config/examples/wt150/Configuration.h
@@ -556,6 +556,27 @@
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+/**
+ * Stepper Drivers for all axes
+ *
+ * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130
+ * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER)
+ * For unspecified drivers, DRV8825 is assumed.
+ *
+ * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER']
+ */
+//#define X_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define E0_DRIVER_TYPE DRV8825
+//#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h
index ff2942212dd8..e09651d05861 100644
--- a/Marlin/src/config/examples/wt150/Configuration_adv.h
+++ b/Marlin/src/config/examples/wt150/Configuration_adv.h
@@ -842,7 +842,7 @@
* 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
*15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
*/
-#define MINIMUM_STEPPER_DIR_DELAY 0
+//#define MINIMUM_STEPPER_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -853,7 +853,7 @@
* 3 : Minimum for TB6600 stepper drivers
* 30 : Minimum for TB6560 stepper drivers
*/
-#define MINIMUM_STEPPER_PULSE 2
+//#define MINIMUM_STEPPER_PULSE 2
/**
* Maximum stepping rate (in Hz) the stepper driver allows
@@ -865,7 +865,7 @@
* 130000 : Maximum for LV8729 stepper driver
* 15000 : Maximum for TB6560 stepper driver
*/
-#define MAXIMUM_STEPPER_RATE 250000
+//#define MAXIMUM_STEPPER_RATE 250000
// @section temperature
@@ -1037,19 +1037,8 @@
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
-//#define HAVE_TMC26X
-#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC26X
- //#define X2_IS_TMC26X
- //#define Y_IS_TMC26X
- //#define Y2_IS_TMC26X
- //#define Z_IS_TMC26X
- //#define Z2_IS_TMC26X
- //#define E0_IS_TMC26X
- //#define E1_IS_TMC26X
- //#define E2_IS_TMC26X
- //#define E3_IS_TMC26X
- //#define E4_IS_TMC26X
+
+#if HAVE_SPIDRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA
#define X_SENSE_RESISTOR 91 // in mOhms
@@ -1095,39 +1084,21 @@
#define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
-#endif
+#endif // TMC26X
// @section tmc_smart
-/**
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
- *
- * You'll also need the TMC2130Stepper Arduino library
- * (https://github.com/teemuatlut/TMC2130Stepper).
- *
+/*
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
* the hardware SPI interface on your board and define the required CS pins
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
- */
-//#define HAVE_TMC2130
-#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2130
- //#define X2_IS_TMC2130
- //#define Y_IS_TMC2130
- //#define Y2_IS_TMC2130
- //#define Z_IS_TMC2130
- //#define Z2_IS_TMC2130
- //#define E0_IS_TMC2130
- //#define E1_IS_TMC2130
- //#define E2_IS_TMC2130
- //#define E3_IS_TMC2130
- //#define E4_IS_TMC2130
-#endif
-
-/**
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
+ *
+ * You'll also need the TMC2130Stepper Arduino library
+ * (https://github.com/teemuatlut/TMC2130Stepper).
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
* to PDN_UART without a resistor.
* The drivers can also be used with hardware serial.
@@ -1135,22 +1106,8 @@
* You'll also need the TMC2208Stepper Arduino library
* (https://github.com/teemuatlut/TMC2208Stepper).
*/
-//#define HAVE_TMC2208
-#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory!
- //#define X_IS_TMC2208
- //#define X2_IS_TMC2208
- //#define Y_IS_TMC2208
- //#define Y2_IS_TMC2208
- //#define Z_IS_TMC2208
- //#define Z2_IS_TMC2208
- //#define E0_IS_TMC2208
- //#define E1_IS_TMC2208
- //#define E2_IS_TMC2208
- //#define E3_IS_TMC2208
- //#define E4_IS_TMC2208
-#endif
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208)
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
@@ -1310,20 +1267,7 @@
* (https://github.com/ameyer/Arduino-L6470)
*/
-//#define HAVE_L6470DRIVER
-#if ENABLED(HAVE_L6470DRIVER)
-
- //#define X_IS_L6470
- //#define X2_IS_L6470
- //#define Y_IS_L6470
- //#define Y2_IS_L6470
- //#define Z_IS_L6470
- //#define Z2_IS_L6470
- //#define E0_IS_L6470
- //#define E1_IS_L6470
- //#define E2_IS_L6470
- //#define E3_IS_L6470
- //#define E4_IS_L6470
+#if HAVE_SPIDRIVER(L6470)
#define X_MICROSTEPS 16 // number of microsteps
#define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1369,7 +1313,7 @@
#define E4_OVERCURRENT 2000
#define E4_STALLCURRENT 1500
-#endif
+#endif // L6470
/**
* TWI/I2C BUS
diff --git a/Marlin/src/core/drivers.h b/Marlin/src/core/drivers.h
new file mode 100644
index 000000000000..4fb28eb5aee4
--- /dev/null
+++ b/Marlin/src/core/drivers.h
@@ -0,0 +1,57 @@
+/**
+* Marlin 3D Printer Firmware
+* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+*
+* Based on Sprinter and grbl.
+* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*
+*/
+
+#ifndef DRIVERS_H
+#define DRIVERS_H
+
+#define A4988 0x00
+#define DRV8825 0x01
+#define LV8729 0x02
+#define L6470 0x03
+#define TB6560 0x04
+#define TB6600 0x05
+#define TMC2100 0x06
+#define TMC2130 0x07
+#define TMC2208 0x08
+#define TMC26X 0x09
+#define TMC2660 0x0A
+#define TMC5130 0x0B
+#define DRIVER_TYPE_MASK 0xFF
+#define SPI_STEPPER 0x100
+
+#define IS_DRIVER_USED(a,t) (defined(a##_DRIVER_TYPE) && (a##_DRIVER_TYPE & DRIVER_TYPE_MASK) == t)
+#define HAVE_DRIVER(t) (IS_DRIVER_USED(X,t) || IS_DRIVER_USED(X2,t) || \
+ IS_DRIVER_USED(Y,t) || IS_DRIVER_USED(Y2,t) || \
+ IS_DRIVER_USED(Z,t) || IS_DRIVER_USED(Z2,t) || \
+ IS_DRIVER_USED(E0,t) || IS_DRIVER_USED(E1,t) || \
+ IS_DRIVER_USED(E2,t) || IS_DRIVER_USED(E3,t) || \
+ IS_DRIVER_USED(E4,t))
+
+#define IS_SPIDRIVER_USED(a,t) (IS_DRIVER_USED(a,t) && (a##_DRIVER_TYPE & SPI_STEPPER))
+#define HAVE_SPIDRIVER(t) (IS_SPIDRIVER_USED(X,t) || IS_SPIDRIVER_USED(X2,t) || \
+ IS_SPIDRIVER_USED(Y,t) || IS_SPIDRIVER_USED(Y2,t) || \
+ IS_SPIDRIVER_USED(Z,t) || IS_SPIDRIVER_USED(Z2,t) || \
+ IS_SPIDRIVER_USED(E0,t) || IS_SPIDRIVER_USED(E1,t) || \
+ IS_SPIDRIVER_USED(E2,t) || IS_SPIDRIVER_USED(E3,t) || \
+ IS_SPIDRIVER_USED(E4,t))
+
+#endif // DRIVERS_H
diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h
index ce464eb4b7b1..115a9721996f 100644
--- a/Marlin/src/core/macros.h
+++ b/Marlin/src/core/macros.h
@@ -23,6 +23,8 @@
#ifndef MACROS_H
#define MACROS_H
+#include "drivers.h"
+
#define NUM_AXIS 4
#define ABCE 4
#define XYZE 4
@@ -269,4 +271,4 @@
#define FMOD(x, y) fmod(x, y)
#define HYPOT(x,y) SQRT(HYPOT2(x,y))
-#endif //__MACROS_H
+#endif // MACROS_H
diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp
index a5dc428592ec..1c077a61e0ac 100644
--- a/Marlin/src/feature/tmc_util.cpp
+++ b/Marlin/src/feature/tmc_util.cpp
@@ -52,7 +52,7 @@ bool report_tmc_status = false;
bool is_ot;
bool is_error;
};
- #if ENABLED(HAVE_TMC2130)
+ #if HAVE_SPIDRIVER(TMC2130)
static uint32_t get_pwm_scale(TMC2130Stepper &st) { return st.PWM_SCALE(); }
static uint8_t get_status_response(TMC2130Stepper &st) { return st.status_response & 0xF; }
static TMC_driver_data get_driver_data(TMC2130Stepper &st) {
@@ -70,7 +70,7 @@ bool report_tmc_status = false;
return data;
}
#endif
- #if ENABLED(HAVE_TMC2208)
+ #if HAVE_SPIDRIVER(TMC2208)
static uint32_t get_pwm_scale(TMC2208Stepper &st) { return st.pwm_scale_sum(); }
static uint8_t get_status_response(TMC2208Stepper &st) {
uint32_t drv_status = st.DRV_STATUS();
@@ -159,7 +159,7 @@ bool report_tmc_status = false;
}
}
- #define HAS_HW_COMMS(ST) ENABLED(ST##_IS_TMC2130)|| (ENABLED(ST##_IS_TMC2208) && defined(ST##_HARDWARE_SERIAL))
+ #define HAS_HW_COMMS(ST) IS_SPIDRIVER_USED(ST, TMC2130) || (IS_SPIDRIVER_USED(ST, TMC2208) && defined(ST##_HARDWARE_SERIAL))
void monitor_tmc_driver() {
static millis_t next_cOT = 0;
@@ -311,7 +311,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
SERIAL_EOL();
}
- #if ENABLED(HAVE_TMC2130)
+ #if HAVE_SPIDRIVER(TMC2130)
static void tmc_status(TMC2130Stepper &st, const TMC_debug_enum i) {
switch (i) {
case TMC_PWM_SCALE: SERIAL_PRINT(st.PWM_SCALE(), DEC); break;
@@ -331,7 +331,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
}
#endif
- #if ENABLED(HAVE_TMC2208)
+ #if HAVE_SPIDRIVER(TMC2208)
static void tmc_status(TMC2208Stepper &st, const TMC_debug_enum i) {
switch (i) {
case TMC_TSTEP: { uint32_t data = 0; st.TSTEP(&data); SERIAL_PROTOCOL(data); break; }
@@ -553,7 +553,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
TMC_REPORT("Stallguard thrs", TMC_SGT);
DRV_REPORT("DRVSTATUS", TMC_DRV_CODES);
- #if ENABLED(HAVE_TMC2130)
+ #if HAVE_SPIDRIVER(TMC2130)
DRV_REPORT("stallguard\t", TMC_STALLGUARD);
DRV_REPORT("sg_result\t", TMC_SG_RESULT);
DRV_REPORT("fsactive\t", TMC_FSACTIVE);
@@ -565,7 +565,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
DRV_REPORT("s2ga\t", TMC_S2GA);
DRV_REPORT("otpw\t", TMC_DRV_OTPW);
DRV_REPORT("ot\t", TMC_OT);
- #if ENABLED(HAVE_TMC2208)
+ #if HAVE_SPIDRIVER(TMC2208)
DRV_REPORT("157C\t", TMC_T157);
DRV_REPORT("150C\t", TMC_T150);
DRV_REPORT("143C\t", TMC_T143);
@@ -591,43 +591,43 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
#endif // SENSORLESS_HOMING
-#if ENABLED(HAVE_TMC2130)
+#if HAVE_SPIDRIVER(TMC2130)
#define SET_CS_PIN(st) OUT_WRITE(st##_CS_PIN, HIGH)
void tmc_init_cs_pins() {
- #if ENABLED(X_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(X, TMC2130)
SET_CS_PIN(X);
#endif
- #if ENABLED(Y_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Y, TMC2130)
SET_CS_PIN(Y);
#endif
- #if ENABLED(Z_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Z, TMC2130)
SET_CS_PIN(Z);
#endif
- #if ENABLED(X2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(X2, TMC2130)
SET_CS_PIN(X2);
#endif
- #if ENABLED(Y2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Y2, TMC2130)
SET_CS_PIN(Y2);
#endif
- #if ENABLED(Z2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Z2, TMC2130)
SET_CS_PIN(Z2);
#endif
- #if ENABLED(E0_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E0, TMC2130)
SET_CS_PIN(E0);
#endif
- #if ENABLED(E1_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E1, TMC2130)
SET_CS_PIN(E1);
#endif
- #if ENABLED(E2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E2, TMC2130)
SET_CS_PIN(E2);
#endif
- #if ENABLED(E3_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E3, TMC2130)
SET_CS_PIN(E3);
#endif
- #if ENABLED(E4_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E4, TMC2130)
SET_CS_PIN(E4);
#endif
}
-#endif // HAVE_TMC2130
+#endif // TMC2130
#endif // HAS_TRINAMIC
diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h
index 094b65e9b7b9..a9452e1808c4 100644
--- a/Marlin/src/feature/tmc_util.h
+++ b/Marlin/src/feature/tmc_util.h
@@ -25,11 +25,11 @@
#include "../inc/MarlinConfigPre.h"
-#if ENABLED(HAVE_TMC2130)
+#if HAVE_SPIDRIVER(TMC2130)
#include
#endif
-#if ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2208)
#include
#endif
@@ -100,7 +100,7 @@ void monitor_tmc_driver();
void tmc_sensorless_homing(TMC2130Stepper &st, const bool enable=true);
#endif
-#if ENABLED(HAVE_TMC2130)
+#if HAVE_SPIDRIVER(TMC2130)
void tmc_init_cs_pins();
#endif
diff --git a/Marlin/src/gcode/feature/trinamic/M911-M915.cpp b/Marlin/src/gcode/feature/trinamic/M911-M915.cpp
index c351eeef35f5..e2af5f184fff 100644
--- a/Marlin/src/gcode/feature/trinamic/M911-M915.cpp
+++ b/Marlin/src/gcode/feature/trinamic/M911-M915.cpp
@@ -30,7 +30,7 @@
#include "../../../module/planner.h"
#include "../../queue.h"
-#define M91x_USE(A) (ENABLED(A##_IS_TMC2130) || (ENABLED(A##_IS_TMC2208) && PIN_EXISTS(A##_SERIAL_RX)))
+#define M91x_USE(A) (IS_SPIDRIVER_USED(A, TMC2130) || (IS_SPIDRIVER_USED(A, TMC2208) && PIN_EXISTS(A##_SERIAL_RX)))
#define M91x_USE_E(N) (E_STEPPERS > N && M91x_USE(E##N))
#define M91x_USE_X (ENABLED(IS_TRAMS) || M91x_USE(X))
#define M91x_USE_Y (ENABLED(IS_TRAMS) || M91x_USE(Y))
@@ -304,30 +304,30 @@ void GcodeSuite::M912() {
if (report) LOOP_XYZ(i) switch (i) {
#if X_SENSORLESS
case X_AXIS:
- #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)
+ #if IS_SPIDRIVER_USED(X, TMC2130) || ENABLED(IS_TRAMS)
TMC_SAY_SGT(X);
#endif
- #if ENABLED(X2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(X2, TMC2130)
TMC_SAY_SGT(X2);
#endif
break;
#endif
#if Y_SENSORLESS
case Y_AXIS:
- #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)
+ #if IS_SPIDRIVER_USED(Y, TMC2130) || ENABLED(IS_TRAMS)
TMC_SAY_SGT(Y);
#endif
- #if ENABLED(Y2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Y2, TMC2130)
TMC_SAY_SGT(Y2);
#endif
break;
#endif
#if Z_SENSORLESS
case Z_AXIS:
- #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)
+ #if IS_SPIDRIVER_USED(Z, TMC2130) || ENABLED(IS_TRAMS)
TMC_SAY_SGT(Z);
#endif
- #if ENABLED(Z2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Z2, TMC2130)
TMC_SAY_SGT(Z2);
#endif
break;
diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h
index 6f847337f456..cfdc9fce15e5 100644
--- a/Marlin/src/gcode/gcode.h
+++ b/Marlin/src/gcode/gcode.h
@@ -132,7 +132,7 @@
* M119 - Report endstops status.
* M120 - Enable endstops detection.
* M121 - Disable endstops detection.
- * M122 - Debug stepper (Requires HAVE_TMC2130 or HAVE_TMC2208)
+ * M122 - Debug stepper (Requires some [AXES]_DRIVER_TYPE defined as TMC2130/TMC2208 + SPI_STEPPER)
* M125 - Save current position and move to filament change position. (Requires PARK_HEAD_ON_PAUSE)
* M126 - Solenoid Air Valve Open. (Requires BARICUDA)
* M127 - Solenoid Air Valve Closed. (Requires BARICUDA)
@@ -219,13 +219,13 @@
* M868 - Report or set position encoder module error correction threshold.
* M869 - Report position encoder module error.
* M900 - Get or Set Linear Advance K-factor. (Requires LIN_ADVANCE)
- * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. (Requires HAVE_TMC2130 or HAVE_TMC2208)
+ * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. (Requires some [AXES]_DRIVER_TYPE defined as TMC2130/TMC2208 + SPI_STEPPER)
* M907 - Set digital trimpot motor current using axis codes. (Requires a board with digital trimpots)
* M908 - Control digital trimpot directly. (Requires DAC_STEPPER_CURRENT or DIGIPOTSS_PIN)
* M909 - Print digipot/DAC current value. (Requires DAC_STEPPER_CURRENT)
* M910 - Commit digipot/DAC value to external EEPROM via I2C. (Requires DAC_STEPPER_CURRENT)
- * M911 - Report stepper driver overtemperature pre-warn condition. (Requires HAVE_TMC2130 or HAVE_TMC2208)
- * M912 - Clear stepper driver overtemperature pre-warn condition flag. (Requires HAVE_TMC2130 or HAVE_TMC2208)
+ * M911 - Report stepper driver overtemperature pre-warn condition. (Requires some [AXES]_DRIVER_TYPE defined as TMC2130/TMC2208 + SPI_STEPPER)
+ * M912 - Clear stepper driver overtemperature pre-warn condition flag. (Requires some [AXES]_DRIVER_TYPE defined as TMC2130/TMC2208 + SPI_STEPPER)
* M913 - Set HYBRID_THRESHOLD speed. (Requires HYBRID_THRESHOLD)
* M914 - Set SENSORLESS_HOMING sensitivity. (Requires SENSORLESS_HOMING)
*
diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h
index 417fc59d96bc..d61ac546d759 100644
--- a/Marlin/src/inc/Conditionals_post.h
+++ b/Marlin/src/inc/Conditionals_post.h
@@ -426,6 +426,63 @@
#define ARRAY_BY_HOTENDS(...) ARRAY_N(HOTENDS, __VA_ARGS__)
#define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1)
+/**
+ * Driver Timings
+ * NOTE: Driver timing order is longest-to-shortest duration.
+ * Preserve this ordering when adding new drivers.
+ */
+#ifndef MINIMUM_STEPPER_DIR_DELAY
+ #if HAVE_DRIVER(TB6560)
+ #define MINIMUM_STEPPER_DIR_DELAY 15000
+ #elif HAVE_DRIVER(TB6600)
+ #define MINIMUM_STEPPER_DIR_DELAY 1500
+ #elif HAVE_DRIVER(DRV8825)
+ #define MINIMUM_STEPPER_DIR_DELAY 650
+ #elif HAVE_DRIVER(LV8729)
+ #define MINIMUM_STEPPER_DIR_DELAY 500
+ #elif HAVE_DRIVER(A4988)
+ #define MINIMUM_STEPPER_DIR_DELAY 200
+ #elif HAVE_DRIVER(TMC2100) || HAVE_DRIVER(TMC2130) || HAVE_DRIVER(TMC2208) || HAVE_DRIVER(TMC26X) || HAVE_DRIVER(TMC2660) || HAVE_DRIVER(TMC5130)
+ #define MINIMUM_STEPPER_DIR_DELAY 20
+ #else
+ #define MINIMUM_STEPPER_DIR_DELAY 0 // Expect at least 10µS since one Stepper ISR must transpire
+ #endif
+#endif
+
+#ifndef MINIMUM_STEPPER_PULSE
+ #if HAVE_DRIVER(TB6560)
+ #define MINIMUM_STEPPER_PULSE 30
+ #elif HAVE_DRIVER(TB6600)
+ #define MINIMUM_STEPPER_PULSE 3
+ #elif HAVE_DRIVER(DRV8825)
+ #define MINIMUM_STEPPER_PULSE 2
+ #elif HAVE_DRIVER(A4988) || HAVE_DRIVER(LV8729)
+ #define MINIMUM_STEPPER_PULSE 1
+ #elif HAVE_DRIVER(TMC2100) || HAVE_DRIVER(TMC2130) || HAVE_DRIVER(TMC2208) || HAVE_DRIVER(TMC26X) || HAVE_DRIVER(TMC2660) || HAVE_DRIVER(TMC5130)
+ #define MINIMUM_STEPPER_PULSE 0
+ #else
+ #define MINIMUM_STEPPER_PULSE 2
+ #endif
+#endif
+
+#ifndef MAXIMUM_STEPPER_RATE
+ #if HAVE_DRIVER(TB6560)
+ #define MAXIMUM_STEPPER_RATE 15000
+ #elif HAVE_DRIVER(LV8729)
+ #define MAXIMUM_STEPPER_RATE 130000
+ #elif HAVE_DRIVER(TB6600)
+ #define MAXIMUM_STEPPER_RATE 150000
+ #elif HAVE_DRIVER(DRV8825)
+ #define MAXIMUM_STEPPER_RATE 250000
+ #elif HAVE_DRIVER(TMC2100) || HAVE_DRIVER(TMC2130) || HAVE_DRIVER(TMC2208) || HAVE_DRIVER(TMC26X) || HAVE_DRIVER(TMC2660) || HAVE_DRIVER(TMC5130)
+ #define MAXIMUM_STEPPER_RATE 400000
+ #elif HAVE_DRIVER(A4988)
+ #define MAXIMUM_STEPPER_RATE 500000
+ #else
+ #define MAXIMUM_STEPPER_RATE 250000
+ #endif
+#endif
+
/**
* X_DUAL_ENDSTOPS endstop reassignment
*/
@@ -711,27 +768,27 @@
#define HAS_SOLENOID_4 (PIN_EXISTS(SOL4))
// Trinamic Stepper Drivers
-#define HAS_TRINAMIC (ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) || ENABLED(IS_TRAMS))
-#define X_IS_TRINAMIC (ENABLED( X_IS_TMC2130) || ENABLED( X_IS_TMC2208) || ENABLED(IS_TRAMS))
-#define X2_IS_TRINAMIC (ENABLED(X2_IS_TMC2130) || ENABLED(X2_IS_TMC2208))
-#define Y_IS_TRINAMIC (ENABLED( Y_IS_TMC2130) || ENABLED( Y_IS_TMC2208) || ENABLED(IS_TRAMS))
-#define Y2_IS_TRINAMIC (ENABLED(Y2_IS_TMC2130) || ENABLED(Y2_IS_TMC2208))
-#define Z_IS_TRINAMIC (ENABLED( Z_IS_TMC2130) || ENABLED( Z_IS_TMC2208) || ENABLED(IS_TRAMS))
-#define Z2_IS_TRINAMIC (ENABLED(Z2_IS_TMC2130) || ENABLED(Z2_IS_TMC2208))
-#define E0_IS_TRINAMIC (ENABLED(E0_IS_TMC2130) || ENABLED(E0_IS_TMC2208) || ENABLED(IS_TRAMS))
-#define E1_IS_TRINAMIC (ENABLED(E1_IS_TMC2130) || ENABLED(E1_IS_TMC2208))
-#define E2_IS_TRINAMIC (ENABLED(E2_IS_TMC2130) || ENABLED(E2_IS_TMC2208))
-#define E3_IS_TRINAMIC (ENABLED(E3_IS_TMC2130) || ENABLED(E3_IS_TMC2208))
-#define E4_IS_TRINAMIC (ENABLED(E4_IS_TMC2130) || ENABLED(E4_IS_TMC2208))
+#define HAS_TRINAMIC (HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) || ENABLED(IS_TRAMS))
+#define X_IS_TRINAMIC (IS_SPIDRIVER_USED(X, TMC2130) || IS_SPIDRIVER_USED(X, TMC2208) || ENABLED(IS_TRAMS))
+#define X2_IS_TRINAMIC (IS_SPIDRIVER_USED(X2, TMC2130) || IS_SPIDRIVER_USED(X2, TMC2208))
+#define Y_IS_TRINAMIC (IS_SPIDRIVER_USED(Y, TMC2130) || IS_SPIDRIVER_USED(Y, TMC2208) || ENABLED(IS_TRAMS))
+#define Y2_IS_TRINAMIC (IS_SPIDRIVER_USED(Y2, TMC2130) || IS_SPIDRIVER_USED(Y2, TMC2208))
+#define Z_IS_TRINAMIC (IS_SPIDRIVER_USED(Z, TMC2130) || IS_SPIDRIVER_USED(Z, TMC2208) || ENABLED(IS_TRAMS))
+#define Z2_IS_TRINAMIC (IS_SPIDRIVER_USED(Z2, TMC2130) || IS_SPIDRIVER_USED(Z2, TMC2208))
+#define E0_IS_TRINAMIC (IS_SPIDRIVER_USED(E0, TMC2130) || IS_SPIDRIVER_USED(E0, TMC2208) || ENABLED(IS_TRAMS))
+#define E1_IS_TRINAMIC (IS_SPIDRIVER_USED(E1, TMC2130) || IS_SPIDRIVER_USED(E1, TMC2208))
+#define E2_IS_TRINAMIC (IS_SPIDRIVER_USED(E2, TMC2130) || IS_SPIDRIVER_USED(E2, TMC2208))
+#define E3_IS_TRINAMIC (IS_SPIDRIVER_USED(E3, TMC2130) || IS_SPIDRIVER_USED(E3, TMC2208))
+#define E4_IS_TRINAMIC (IS_SPIDRIVER_USED(E4, TMC2130) || IS_SPIDRIVER_USED(E4, TMC2208))
#if ENABLED(SENSORLESS_HOMING)
// Disable Z axis sensorless homing if a probe is used to home the Z axis
#if HOMING_Z_WITH_PROBE
#undef Z_HOMING_SENSITIVITY
#endif
- #define X_SENSORLESS (ENABLED(X_IS_TMC2130) && defined(X_HOMING_SENSITIVITY))
- #define Y_SENSORLESS (ENABLED(Y_IS_TMC2130) && defined(Y_HOMING_SENSITIVITY))
- #define Z_SENSORLESS (ENABLED(Z_IS_TMC2130) && defined(Z_HOMING_SENSITIVITY))
+ #define X_SENSORLESS (IS_SPIDRIVER_USED(X, TMC2130) && defined(X_HOMING_SENSITIVITY))
+ #define Y_SENSORLESS (IS_SPIDRIVER_USED(Y, TMC2130) && defined(Y_HOMING_SENSITIVITY))
+ #define Z_SENSORLESS (IS_SPIDRIVER_USED(Z, TMC2130) && defined(Z_HOMING_SENSITIVITY))
#endif
// Endstops and bed probe
diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h
index de9f35c274c1..7756dc33939d 100644
--- a/Marlin/src/inc/SanityCheck.h
+++ b/Marlin/src/inc/SanityCheck.h
@@ -265,10 +265,21 @@
#elif defined(MEASURED_LOWER_LIMIT) || defined(MEASURED_UPPER_LIMIT)
#error "MEASURED_(UPPER|LOWER)_LIMIT is now FILWIDTH_ERROR_MARGIN. Please update your configuration."
#elif defined(HAVE_TMCDRIVER)
- #error "HAVE_TMCDRIVER is now HAVE_TMC26X. Please update your Configuration_adv.h."
+ #error "HAVE_TMCDRIVER is now [AXIS]_DRIVER_TYPE TMC26X + SPI_STEPPER. Please update your Configuration.h."
+#elif defined(HAVE_TMC26X)
+ #error "HAVE_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X + SPI_STEPPER. Please update your Configuration.h."
#elif defined(X_IS_TMC) || defined(X2_IS_TMC) || defined(Y_IS_TMC) || defined(Y2_IS_TMC) || defined(Z_IS_TMC) || defined(Z2_IS_TMC) \
|| defined(E0_IS_TMC) || defined(E1_IS_TMC) || defined(E2_IS_TMC) || defined(E3_IS_TMC) || defined(E4_IS_TMC)
- #error "[AXIS]_IS_TMC is now [AXIS]_IS_TMC26X. Please update your Configuration_adv.h."
+ #error "[AXIS]_IS_TMC is now [AXIS]_DRIVER_TYPE TMC26X + SPI_STEPPER. Please update your Configuration.h."
+#elif defined(X_IS_TMC26X) || defined(X2_IS_TMC26X) || defined(Y_IS_TMC26X) || defined(Y2_IS_TMC26X) || defined(Z_IS_TMC26X) || defined(Z2_IS_TMC26X) \
+ || defined(E0_IS_TMC26X) || defined(E1_IS_TMC26X) || defined(E2_IS_TMC26X) || defined(E3_IS_TMC26X) || defined(E4_IS_TMC26X)
+ #error "[AXIS]_IS_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X + SPI_STEPPER. Please update your Configuration.h."
+#elif defined(X_IS_TMC2130) || defined(X2_IS_TMC2130) || defined(Y_IS_TMC2130) || defined(Y2_IS_TMC2130) || defined(Z_IS_TMC2130) || defined(Z2_IS_TMC2130) \
+ || defined(E0_IS_TMC2130) || defined(E1_IS_TMC2130) || defined(E2_IS_TMC2130) || defined(E3_IS_TMC2130) || defined(E4_IS_TMC2130)
+ #error "[AXIS]_IS_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130 + SPI_STEPPER. Please update your Configuration.h."
+#elif defined(X_IS_TMC2208) || defined(X2_IS_TMC2208) || defined(Y_IS_TMC2208) || defined(Y2_IS_TMC2208) || defined(Z_IS_TMC2208) || defined(Z2_IS_TMC2208) \
+ || defined(E0_IS_TMC2208) || defined(E1_IS_TMC2208) || defined(E2_IS_TMC2208) || defined(E3_IS_TMC2208) || defined(E4_IS_TMC2208)
+#error "[AXIS]_IS_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208 + SPI_STEPPER. Please update your Configuration.h."
#elif defined(AUTOMATIC_CURRENT_CONTROL)
#error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration."
#elif defined(FILAMENT_CHANGE_LOAD_LENGTH)
@@ -1455,66 +1466,35 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#endif
/**
- * Make sure HAVE_TMC26X is warranted
+ * Make sure TMC2130 is warranted
*/
-#if ENABLED(HAVE_TMC26X) && !( \
- ENABLED( X_IS_TMC26X ) \
- || ENABLED( X2_IS_TMC26X ) \
- || ENABLED( Y_IS_TMC26X ) \
- || ENABLED( Y2_IS_TMC26X ) \
- || ENABLED( Z_IS_TMC26X ) \
- || ENABLED( Z2_IS_TMC26X ) \
- || ENABLED( E0_IS_TMC26X ) \
- || ENABLED( E1_IS_TMC26X ) \
- || ENABLED( E2_IS_TMC26X ) \
- || ENABLED( E3_IS_TMC26X ) \
- || ENABLED( E4_IS_TMC26X ) \
- )
- #error "HAVE_TMC26X requires at least one TMC26X stepper to be set."
-#endif
-
-/**
- * Make sure HAVE_TMC2130 is warranted
- */
-#if ENABLED(HAVE_TMC2130)
- #if !( ENABLED( X_IS_TMC2130 ) \
- || ENABLED( X2_IS_TMC2130 ) \
- || ENABLED( Y_IS_TMC2130 ) \
- || ENABLED( Y2_IS_TMC2130 ) \
- || ENABLED( Z_IS_TMC2130 ) \
- || ENABLED( Z2_IS_TMC2130 ) \
- || ENABLED( E0_IS_TMC2130 ) \
- || ENABLED( E1_IS_TMC2130 ) \
- || ENABLED( E2_IS_TMC2130 ) \
- || ENABLED( E3_IS_TMC2130 ) \
- || ENABLED( E4_IS_TMC2130 ) )
- #error "HAVE_TMC2130 requires at least one TMC2130 stepper to be set."
- #elif ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
+#if HAVE_SPIDRIVER(TMC2130)
+ #if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
#error "Enable STEALTHCHOP to use HYBRID_THRESHOLD."
#endif
- #if ENABLED(X_IS_TMC2130) && !PIN_EXISTS(X_CS)
- #error "X_CS_PIN is required for X_IS_TMC2130. Define X_CS_PIN in Configuration_adv.h."
- #elif ENABLED(X2_IS_TMC2130) && !PIN_EXISTS(X2_CS)
- #error "X2_CS_PIN is required for X2_IS_TMC2130. Define X2_CS_PIN in Configuration_adv.h."
- #elif ENABLED(Y_IS_TMC2130) && !PIN_EXISTS(Y_CS)
- #error "Y_CS_PIN is required for Y_IS_TMC2130. Define Y_CS_PIN in Configuration_adv.h."
- #elif ENABLED(Y2_IS_TMC2130) && !PIN_EXISTS(Y2_CS)
- #error "Y2_CS_PIN is required for Y2_IS_TMC2130. Define Y2_CS_PIN in Configuration_adv.h."
- #elif ENABLED(Z_IS_TMC2130) && !PIN_EXISTS(Z_CS)
- #error "Z_CS_PIN is required for Z_IS_TMC2130. Define Z_CS_PIN in Configuration_adv.h."
- #elif ENABLED(Z2_IS_TMC2130) && !PIN_EXISTS(Z2_CS)
- #error "Z2_CS_PIN is required for Z2_IS_TMC2130. Define Z2_CS_PIN in Configuration_adv.h."
- #elif ENABLED(E0_IS_TMC2130) && !PIN_EXISTS(E0_CS)
- #error "E0_CS_PIN is required for E0_IS_TMC2130. Define E0_CS_PIN in Configuration_adv.h."
- #elif ENABLED(E1_IS_TMC2130) && !PIN_EXISTS(E1_CS)
- #error "E1_CS_PIN is required for E1_IS_TMC2130. Define E1_CS_PIN in Configuration_adv.h."
- #elif ENABLED(E2_IS_TMC2130) && !PIN_EXISTS(E2_CS)
- #error "E2_CS_PIN is required for E2_IS_TMC2130. Define E2_CS_PIN in Configuration_adv.h."
- #elif ENABLED(E3_IS_TMC2130) && !PIN_EXISTS(E3_CS)
- #error "E3_CS_PIN is required for E3_IS_TMC2130. Define E3_CS_PIN in Configuration_adv.h."
- #elif ENABLED(E4_IS_TMC2130) && !PIN_EXISTS(E4_CS)
- #error "E4_CS_PIN is required for E4_IS_TMC2130. Define E4_CS_PIN in Configuration_adv.h."
+ #if IS_SPIDRIVER_USED(X, TMC2130) && !PIN_EXISTS(X_CS)
+ #error "X_CS_PIN is required for TMC2130. Define X_CS_PIN in Configuration_adv.h."
+ #elif IS_SPIDRIVER_USED(X2, TMC2130) && !PIN_EXISTS(X2_CS)
+ #error "X2_CS_PIN is required for X2. Define X2_CS_PIN in Configuration_adv.h."
+ #elif IS_SPIDRIVER_USED(Y, TMC2130) && !PIN_EXISTS(Y_CS)
+ #error "Y_CS_PIN is required for TMC2130. Define Y_CS_PIN in Configuration_adv.h."
+ #elif IS_SPIDRIVER_USED(Y2, TMC2130) && !PIN_EXISTS(Y2_CS)
+ #error "Y2_CS_PIN is required for TMC2130. Define Y2_CS_PIN in Configuration_adv.h."
+ #elif IS_SPIDRIVER_USED(Z, TMC2130) && !PIN_EXISTS(Z_CS)
+ #error "Z_CS_PIN is required for TMC2130. Define Z_CS_PIN in Configuration_adv.h."
+ #elif IS_SPIDRIVER_USED(Z2, TMC2130) && !PIN_EXISTS(Z2_CS)
+ #error "Z2_CS_PIN is required for TMC2130. Define Z2_CS_PIN in Configuration_adv.h."
+ #elif IS_SPIDRIVER_USED(E0, TMC2130) && !PIN_EXISTS(E0_CS)
+ #error "E0_CS_PIN is required for TMC2130. Define E0_CS_PIN in Configuration_adv.h."
+ #elif IS_SPIDRIVER_USED(E1, TMC2130) && !PIN_EXISTS(E1_CS)
+ #error "E1_CS_PIN is required for TMC2130. Define E1_CS_PIN in Configuration_adv.h."
+ #elif IS_SPIDRIVER_USED(E2, TMC2130) && !PIN_EXISTS(E2_CS)
+ #error "E2_CS_PIN is required for TMC2130. Define E2_CS_PIN in Configuration_adv.h."
+ #elif IS_SPIDRIVER_USED(E3, TMC2130) && !PIN_EXISTS(E3_CS)
+ #error "E3_CS_PIN is required for TMC2130. Define E3_CS_PIN in Configuration_adv.h."
+ #elif IS_SPIDRIVER_USED(E4, TMC2130) && !PIN_EXISTS(E4_CS)
+ #error "E4_CS_PIN is required for TMC2130. Define E4_CS_PIN in Configuration_adv.h."
#endif
#if ENABLED(SENSORLESS_HOMING)
@@ -1556,27 +1536,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#endif
-/**
- * Make sure HAVE_TMC2208 is warranted
- */
-#if ENABLED(HAVE_TMC2208) && !( \
- ENABLED( X_IS_TMC2208 ) \
- || ENABLED( X2_IS_TMC2208 ) \
- || ENABLED( Y_IS_TMC2208 ) \
- || ENABLED( Y2_IS_TMC2208 ) \
- || ENABLED( Z_IS_TMC2208 ) \
- || ENABLED( Z2_IS_TMC2208 ) \
- || ENABLED( E0_IS_TMC2208 ) \
- || ENABLED( E1_IS_TMC2208 ) \
- || ENABLED( E2_IS_TMC2208 ) \
- || ENABLED( E3_IS_TMC2208 ) )
- #error "HAVE_TMC2208 requires at least one TMC2208 stepper to be set."
-#endif
-
/**
* TMC2208 software UART and ENDSTOP_INTERRUPTS both use pin change interrupts (PCI)
*/
-#if ENABLED(HAVE_TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
+#if HAVE_SPIDRIVER(TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
defined(X_HARDWARE_SERIAL ) \
|| defined(X2_HARDWARE_SERIAL) \
|| defined(Y_HARDWARE_SERIAL ) \
@@ -1599,106 +1562,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#error "TMC_Z_CALIBRATION requires at least one TMC driver on Z axis"
#endif
-/**
- * Make sure HAVE_L6470DRIVER is warranted
- */
-#if ENABLED(HAVE_L6470DRIVER) && !( \
- ENABLED( X_IS_L6470 ) \
- || ENABLED( X2_IS_L6470 ) \
- || ENABLED( Y_IS_L6470 ) \
- || ENABLED( Y2_IS_L6470 ) \
- || ENABLED( Z_IS_L6470 ) \
- || ENABLED( Z2_IS_L6470 ) \
- || ENABLED( E0_IS_L6470 ) \
- || ENABLED( E1_IS_L6470 ) \
- || ENABLED( E2_IS_L6470 ) \
- || ENABLED( E3_IS_L6470 ) \
- || ENABLED( E4_IS_L6470 ) \
- )
- #error "HAVE_L6470DRIVER requires at least one L6470 stepper to be set."
-#endif
-
-/**
- * Check that each axis has only one driver selected
- */
-#if 1 < 0 \
- + ENABLED(X_IS_TMC26X) \
- + ENABLED(X_IS_TMC2130) \
- + ENABLED(X_IS_TMC2208) \
- + ENABLED(X_IS_L6470)
- #error "Please enable only one stepper driver for the X axis."
-#endif
-#if 1 < 0 \
- + ENABLED(X2_IS_TMC26X) \
- + ENABLED(X2_IS_TMC2130) \
- + ENABLED(X2_IS_TMC2208) \
- + ENABLED(X2_IS_L6470)
- #error "Please enable only one stepper driver for the X2 axis."
-#endif
-#if 1 < 0 \
- + ENABLED(Y_IS_TMC26X) \
- + ENABLED(Y_IS_TMC2130) \
- + ENABLED(Y_IS_TMC2208) \
- + ENABLED(Y_IS_L6470)
- #error "Please enable only one stepper driver for the Y axis."
-#endif
-#if 1 < 0 \
- + ENABLED(Y2_IS_TMC26X) \
- + ENABLED(Y2_IS_TMC2130) \
- + ENABLED(Y2_IS_TMC2208) \
- + ENABLED(Y2_IS_L6470)
- #error "Please enable only one stepper driver for the Y2 axis."
-#endif
-#if 1 < 0 \
- + ENABLED(Z_IS_TMC26X) \
- + ENABLED(Z_IS_TMC2130) \
- + ENABLED(Z_IS_TMC2208) \
- + ENABLED(Z_IS_L6470)
- #error "Please enable only one stepper driver for the Z axis."
-#endif
-#if 1 < 0 \
- + ENABLED(Z2_IS_TMC26X) \
- + ENABLED(Z2_IS_TMC2130) \
- + ENABLED(Z2_IS_TMC2208) \
- + ENABLED(Z2_IS_L6470)
- #error "Please enable only one stepper driver for the Z2 axis."
-#endif
-#if 1 < 0 \
- + ENABLED(E0_IS_TMC26X) \
- + ENABLED(E0_IS_TMC2130) \
- + ENABLED(E0_IS_TMC2208) \
- + ENABLED(E0_IS_L6470)
- #error "Please enable only one stepper driver for the E0 axis."
-#endif
-#if 1 < 0 \
- + ENABLED(E1_IS_TMC26X) \
- + ENABLED(E1_IS_TMC2130) \
- + ENABLED(E1_IS_TMC2208) \
- + ENABLED(E1_IS_L6470)
- #error "Please enable only one stepper driver for the E1 axis."
-#endif
-#if 1 < 0 \
- + ENABLED(E2_IS_TMC26X) \
- + ENABLED(E2_IS_TMC2130) \
- + ENABLED(E2_IS_TMC2208) \
- + ENABLED(E2_IS_L6470)
- #error "Please enable only one stepper driver for the E2 axis."
-#endif
-#if 1 < 0 \
- + ENABLED(E3_IS_TMC26X) \
- + ENABLED(E3_IS_TMC2130) \
- + ENABLED(E3_IS_TMC2208) \
- + ENABLED(E3_IS_L6470)
- #error "Please enable only one stepper driver for the E3 axis."
-#endif
-#if 1 < 0 \
- + ENABLED(E4_IS_TMC26X) \
- + ENABLED(E4_IS_TMC2130) \
- + ENABLED(E4_IS_TMC2208) \
- + ENABLED(E4_IS_L6470)
- #error "Please enable only one stepper driver for the E4 axis."
-#endif
-
/**
* Digipot requirement
*/
@@ -1760,4 +1623,8 @@ static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too m
#error "FAST_PWM_FAN only supported by 8 bit CPUs."
#endif
+#if HAVE_SPIDRIVER(A4988) || HAVE_SPIDRIVER(DRV8825) || HAVE_SPIDRIVER(DRV8825) || HAVE_SPIDRIVER(LV8729) || HAVE_SPIDRIVER(TB6560) || HAVE_SPIDRIVER(TB6600) || HAVE_SPIDRIVER(TMC2100)
+ #error "A4988, DRV8825, LV8729, TB6560, TB6600 and TMC2100 don't support SPI control"
+#endif
+
#endif // _SANITYCHECK_H_
diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp
index d58382de8341..510bcd1a2eb0 100644
--- a/Marlin/src/module/configuration_store.cpp
+++ b/Marlin/src/module/configuration_store.cpp
@@ -818,17 +818,17 @@ void MarlinSettings::postprocess() {
//
int16_t tmc_sgt[XYZ] = {
#if ENABLED(SENSORLESS_HOMING)
- #if defined(X_HOMING_SENSITIVITY) && (ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS))
+ #if defined(X_HOMING_SENSITIVITY) && (IS_SPIDRIVER_USED(X, TMC2130) || ENABLED(IS_TRAMS))
stepperX.sgt(),
#else
0,
#endif
- #if defined(Y_HOMING_SENSITIVITY) && (ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS))
+ #if defined(Y_HOMING_SENSITIVITY) && (IS_SPIDRIVER_USED(Y, TMC2130) || ENABLED(IS_TRAMS))
stepperY.sgt(),
#else
0,
#endif
- #if defined(Z_HOMING_SENSITIVITY) && (ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS))
+ #if defined(Z_HOMING_SENSITIVITY) && (IS_SPIDRIVER_USED(Z, TMC2130) || ENABLED(IS_TRAMS))
stepperZ.sgt()
#else
0
@@ -1405,26 +1405,26 @@ void MarlinSettings::postprocess() {
#if ENABLED(SENSORLESS_HOMING)
if (!validating) {
#ifdef X_HOMING_SENSITIVITY
- #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)
+ #if IS_SPIDRIVER_USED(X, TMC2130) || ENABLED(IS_TRAMS)
stepperX.sgt(tmc_sgt[0]);
#endif
- #if ENABLED(X2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(X2, TMC2130)
stepperX2.sgt(tmc_sgt[0]);
#endif
#endif
#ifdef Y_HOMING_SENSITIVITY
- #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)
+ #if IS_SPIDRIVER_USED(Y, TMC2130) || ENABLED(IS_TRAMS)
stepperY.sgt(tmc_sgt[1]);
#endif
- #if ENABLED(Y2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Y2, TMC2130)
stepperY2.sgt(tmc_sgt[1]);
#endif
#endif
#ifdef Z_HOMING_SENSITIVITY
- #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)
+ #if IS_SPIDRIVER_USED(Z, TMC2130) || ENABLED(IS_TRAMS)
stepperZ.sgt(tmc_sgt[2]);
#endif
- #if ENABLED(Z2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Z2, TMC2130)
stepperZ2.sgt(tmc_sgt[2]);
#endif
#endif
@@ -2577,9 +2577,9 @@ void MarlinSettings::reset(PORTARG_SOLO) {
SERIAL_ECHOLNPGM_P(port, "Sensorless homing threshold:");
}
CONFIG_ECHO_START;
- #define HAS_X_SENSORLESS (defined(X_HOMING_SENSITIVITY) && (ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)))
- #define HAS_Y_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && (ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)))
- #define HAS_Z_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && (ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)))
+ #define HAS_X_SENSORLESS (defined(X_HOMING_SENSITIVITY) && (IS_SPIDRIVER_USED(X, TMC2130) || ENABLED(IS_TRAMS)))
+ #define HAS_Y_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && (IS_SPIDRIVER_USED(Y, TMC2130) || ENABLED(IS_TRAMS)))
+ #define HAS_Z_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && (IS_SPIDRIVER_USED(Z, TMC2130) || ENABLED(IS_TRAMS)))
#if HAS_X_SENSORLESS || HAS_Y_SENSORLESS || HAS_Z_SENSORLESS
say_M914(PORTVAR_SOLO);
#if HAS_X_SENSORLESS
@@ -2594,9 +2594,9 @@ void MarlinSettings::reset(PORTARG_SOLO) {
SERIAL_EOL_P(port);
#endif
- #define HAS_X2_SENSORLESS (defined(X_HOMING_SENSITIVITY) && ENABLED(X2_IS_TMC2130))
- #define HAS_Y2_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && ENABLED(Y2_IS_TMC2130))
- #define HAS_Z2_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && ENABLED(Z2_IS_TMC2130))
+ #define HAS_X2_SENSORLESS (defined(X_HOMING_SENSITIVITY) && IS_SPIDRIVER_USED(X2, TMC2130))
+ #define HAS_Y2_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && IS_SPIDRIVER_USED(Y2, TMC2130))
+ #define HAS_Z2_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && IS_SPIDRIVER_USED(Z2, TMC2130))
#if HAS_X2_SENSORLESS || HAS_Y2_SENSORLESS || HAS_Z2_SENSORLESS
say_M914(PORTVAR_SOLO);
SERIAL_ECHOPGM_P(port, " I1");
diff --git a/Marlin/src/module/stepper_indirection.cpp b/Marlin/src/module/stepper_indirection.cpp
index bf63e61b6d1e..1ca62b090c45 100644
--- a/Marlin/src/module/stepper_indirection.cpp
+++ b/Marlin/src/module/stepper_indirection.cpp
@@ -38,7 +38,7 @@
//
// TMC26X Driver objects and inits
//
-#if ENABLED(HAVE_TMC26X)
+#if HAVE_SPIDRIVER(TMC26X)
#include
#ifdef STM32F7
@@ -49,37 +49,37 @@
#define _TMC26X_DEFINE(ST) TMC26XStepper stepper##ST(200, ST##_CS_PIN, ST##_STEP_PIN, ST##_DIR_PIN, ST##_MAX_CURRENT, ST##_SENSE_RESISTOR)
- #if ENABLED(X_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(X, TMC26X)
_TMC26X_DEFINE(X);
#endif
- #if ENABLED(X2_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(X2, TMC26X)
_TMC26X_DEFINE(X2);
#endif
- #if ENABLED(Y_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(Y, TMC26X)
_TMC26X_DEFINE(Y);
#endif
- #if ENABLED(Y2_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(Y2, TMC26X)
_TMC26X_DEFINE(Y2);
#endif
- #if ENABLED(Z_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(Z, TMC26X)
_TMC26X_DEFINE(Z);
#endif
- #if ENABLED(Z2_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(Z2, TMC26X)
_TMC26X_DEFINE(Z2);
#endif
- #if ENABLED(E0_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E0, TMC26X)
_TMC26X_DEFINE(E0);
#endif
- #if ENABLED(E1_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E1, TMC26X)
_TMC26X_DEFINE(E1);
#endif
- #if ENABLED(E2_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E2, TMC26X)
_TMC26X_DEFINE(E2);
#endif
- #if ENABLED(E3_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E3, TMC26X)
_TMC26X_DEFINE(E3);
#endif
- #if ENABLED(E4_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E4, TMC26X)
_TMC26X_DEFINE(E4);
#endif
@@ -89,46 +89,46 @@
}while(0)
void tmc26x_init_to_defaults() {
- #if ENABLED(X_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(X, TMC26X)
_TMC26X_INIT(X);
#endif
- #if ENABLED(X2_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(X2, TMC26X)
_TMC26X_INIT(X2);
#endif
- #if ENABLED(Y_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(Y, TMC26X)
_TMC26X_INIT(Y);
#endif
- #if ENABLED(Y2_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(Y2, TMC26X)
_TMC26X_INIT(Y2);
#endif
- #if ENABLED(Z_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(Z, TMC26X)
_TMC26X_INIT(Z);
#endif
- #if ENABLED(Z2_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(Z2, TMC26X)
_TMC26X_INIT(Z2);
#endif
- #if ENABLED(E0_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E0, TMC26X)
_TMC26X_INIT(E0);
#endif
- #if ENABLED(E1_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E1, TMC26X)
_TMC26X_INIT(E1);
#endif
- #if ENABLED(E2_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E2, TMC26X)
_TMC26X_INIT(E2);
#endif
- #if ENABLED(E3_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E3, TMC26X)
_TMC26X_INIT(E3);
#endif
- #if ENABLED(E4_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E4, TMC26X)
_TMC26X_INIT(E4);
#endif
}
-#endif // HAVE_TMC26X
+#endif // TMC26X
//
// TMC2130 Driver objects and inits
//
-#if ENABLED(HAVE_TMC2130)
+#if HAVE_SPIDRIVER(TMC2130)
#include
#include
@@ -146,37 +146,37 @@
#endif
// Stepper objects of TMC2130 steppers used
- #if ENABLED(X_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(X, TMC2130)
_TMC2130_DEFINE(X);
#endif
- #if ENABLED(X2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(X2, TMC2130)
_TMC2130_DEFINE(X2);
#endif
- #if ENABLED(Y_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Y, TMC2130)
_TMC2130_DEFINE(Y);
#endif
- #if ENABLED(Y2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Y2, TMC2130)
_TMC2130_DEFINE(Y2);
#endif
- #if ENABLED(Z_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Z, TMC2130)
_TMC2130_DEFINE(Z);
#endif
- #if ENABLED(Z2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Z2, TMC2130)
_TMC2130_DEFINE(Z2);
#endif
- #if ENABLED(E0_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E0, TMC2130)
_TMC2130_DEFINE(E0);
#endif
- #if ENABLED(E1_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E1, TMC2130)
_TMC2130_DEFINE(E1);
#endif
- #if ENABLED(E2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E2, TMC2130)
_TMC2130_DEFINE(E2);
#endif
- #if ENABLED(E3_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E3, TMC2130)
_TMC2130_DEFINE(E3);
#endif
- #if ENABLED(E4_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E4, TMC2130)
_TMC2130_DEFINE(E4);
#endif
@@ -213,74 +213,74 @@
#define _TMC2130_INIT(ST, SPMM) tmc2130_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, SPMM)
void tmc2130_init_to_defaults() {
- #if ENABLED(X_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(X, TMC2130)
_TMC2130_INIT( X, planner.axis_steps_per_mm[X_AXIS]);
#endif
- #if ENABLED(X2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(X2, TMC2130)
_TMC2130_INIT(X2, planner.axis_steps_per_mm[X_AXIS]);
#endif
- #if ENABLED(Y_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Y, TMC2130)
_TMC2130_INIT( Y, planner.axis_steps_per_mm[Y_AXIS]);
#endif
- #if ENABLED(Y2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Y2, TMC2130)
_TMC2130_INIT(Y2, planner.axis_steps_per_mm[Y_AXIS]);
#endif
- #if ENABLED(Z_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Z, TMC2130)
_TMC2130_INIT( Z, planner.axis_steps_per_mm[Z_AXIS]);
#endif
- #if ENABLED(Z2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Z2, TMC2130)
_TMC2130_INIT(Z2, planner.axis_steps_per_mm[Z_AXIS]);
#endif
- #if ENABLED(E0_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E0, TMC2130)
_TMC2130_INIT(E0, planner.axis_steps_per_mm[E_AXIS]);
#endif
- #if ENABLED(E1_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E1, TMC2130)
{ constexpr int extruder = 1; _TMC2130_INIT(E1, planner.axis_steps_per_mm[E_AXIS_N]); }
#endif
- #if ENABLED(E2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E2, TMC2130)
{ constexpr int extruder = 2; _TMC2130_INIT(E2, planner.axis_steps_per_mm[E_AXIS_N]); }
#endif
- #if ENABLED(E3_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E3, TMC2130)
{ constexpr int extruder = 3; _TMC2130_INIT(E3, planner.axis_steps_per_mm[E_AXIS_N]); }
#endif
- #if ENABLED(E4_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E4, TMC2130)
{ constexpr int extruder = 4; _TMC2130_INIT(E4, planner.axis_steps_per_mm[E_AXIS_N]); }
#endif
#if ENABLED(SENSORLESS_HOMING)
#define TMC_INIT_SGT(P,Q) stepper##Q.sgt(P##_HOMING_SENSITIVITY);
#if X_SENSORLESS
- #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)
+ #if IS_SPIDRIVER_USED(X, TMC2130) || ENABLED(IS_TRAMS)
stepperX.sgt(X_HOMING_SENSITIVITY);
#endif
- #if ENABLED(X2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(X2, TMC2130)
stepperX2.sgt(X_HOMING_SENSITIVITY);
#endif
#endif
#if Y_SENSORLESS
- #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)
+ #if IS_SPIDRIVER_USED(Y, TMC2130) || ENABLED(IS_TRAMS)
stepperY.sgt(Y_HOMING_SENSITIVITY);
#endif
- #if ENABLED(Y2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Y2, TMC2130)
stepperY2.sgt(Y_HOMING_SENSITIVITY);
#endif
#endif
#if Z_SENSORLESS
- #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)
+ #if IS_SPIDRIVER_USED(Z, TMC2130) || ENABLED(IS_TRAMS)
stepperZ.sgt(Z_HOMING_SENSITIVITY);
#endif
- #if ENABLED(Z2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Z2, TMC2130)
stepperZ2.sgt(Z_HOMING_SENSITIVITY);
#endif
#endif
#endif
}
-#endif // HAVE_TMC2130
+#endif // TMC2130
//
// TMC2208 Driver objects and inits
//
-#if ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2208)
#include
#include
@@ -296,77 +296,77 @@
TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL, ST##_SERIAL_RX_PIN > -1)
// Stepper objects of TMC2208 steppers used
- #if ENABLED(X_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(X, TMC2208)
#ifdef X_HARDWARE_SERIAL
_TMC2208_DEFINE_HARDWARE(X);
#else
_TMC2208_DEFINE_SOFTWARE(X);
#endif
#endif
- #if ENABLED(X2_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(X2, TMC2208)
#ifdef X2_HARDWARE_SERIAL
_TMC2208_DEFINE_HARDWARE(X2);
#else
_TMC2208_DEFINE_SOFTWARE(X2);
#endif
#endif
- #if ENABLED(Y_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(Y, TMC2208)
#ifdef Y_HARDWARE_SERIAL
_TMC2208_DEFINE_HARDWARE(Y);
#else
_TMC2208_DEFINE_SOFTWARE(Y);
#endif
#endif
- #if ENABLED(Y2_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(Y2, TMC2208)
#ifdef Y2_HARDWARE_SERIAL
_TMC2208_DEFINE_HARDWARE(Y2);
#else
_TMC2208_DEFINE_SOFTWARE(Y2);
#endif
#endif
- #if ENABLED(Z_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(Z, TMC2208)
#ifdef Z_HARDWARE_SERIAL
_TMC2208_DEFINE_HARDWARE(Z);
#else
_TMC2208_DEFINE_SOFTWARE(Z);
#endif
#endif
- #if ENABLED(Z2_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(Z2, TMC2208)
#ifdef Z2_HARDWARE_SERIAL
_TMC2208_DEFINE_HARDWARE(Z2);
#else
_TMC2208_DEFINE_SOFTWARE(Z2);
#endif
#endif
- #if ENABLED(E0_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E0, TMC2208)
#ifdef E0_HARDWARE_SERIAL
_TMC2208_DEFINE_HARDWARE(E0);
#else
_TMC2208_DEFINE_SOFTWARE(E0);
#endif
#endif
- #if ENABLED(E1_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E1, TMC2208)
#ifdef E1_HARDWARE_SERIAL
_TMC2208_DEFINE_HARDWARE(E1);
#else
_TMC2208_DEFINE_SOFTWARE(E1);
#endif
#endif
- #if ENABLED(E2_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E2, TMC2208)
#ifdef E2_HARDWARE_SERIAL
_TMC2208_DEFINE_HARDWARE(E2);
#else
_TMC2208_DEFINE_SOFTWARE(E2);
#endif
#endif
- #if ENABLED(E3_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E3, TMC2208)
#ifdef E3_HARDWARE_SERIAL
_TMC2208_DEFINE_HARDWARE(E3);
#else
_TMC2208_DEFINE_SOFTWARE(E3);
#endif
#endif
- #if ENABLED(E4_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E4, TMC2208)
#ifdef E4_HARDWARE_SERIAL
_TMC2208_DEFINE_HARDWARE(E4);
#else
@@ -375,37 +375,37 @@
#endif
void tmc2208_serial_begin() {
- #if ENABLED(X_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(X, TMC2208)
X_HARDWARE_SERIAL.begin(115200);
#endif
- #if ENABLED(X2_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(X2, TMC2208)
X2_HARDWARE_SERIAL.begin(115200);
#endif
- #if ENABLED(Y_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(Y, TMC2208)
Y_HARDWARE_SERIAL.begin(115200);
#endif
- #if ENABLED(Y2_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(Y2, TMC2208)
Y2_HARDWARE_SERIAL.begin(115200);
#endif
- #if ENABLED(Z_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(Z, TMC2208)
Z_HARDWARE_SERIAL.begin(115200);
#endif
- #if ENABLED(Z2_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(Z2, TMC2208)
Z2_HARDWARE_SERIAL.begin(115200);
#endif
- #if ENABLED(E0_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E0, TMC2208)
E0_HARDWARE_SERIAL.begin(115200);
#endif
- #if ENABLED(E1_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E1, TMC2208)
E1_HARDWARE_SERIAL.begin(115200);
#endif
- #if ENABLED(E2_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E2, TMC2208)
E2_HARDWARE_SERIAL.begin(115200);
#endif
- #if ENABLED(E3_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E3, TMC2208)
E3_HARDWARE_SERIAL.begin(115200);
#endif
- #if ENABLED(E4_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E4, TMC2208)
E4_HARDWARE_SERIAL.begin(115200);
#endif
}
@@ -449,41 +449,41 @@
#define _TMC2208_INIT(ST, SPMM) tmc2208_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, SPMM)
void tmc2208_init_to_defaults() {
- #if ENABLED(X_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(X, TMC2208)
_TMC2208_INIT(X, planner.axis_steps_per_mm[X_AXIS]);
#endif
- #if ENABLED(X2_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(X2, TMC2208)
_TMC2208_INIT(X2, planner.axis_steps_per_mm[X_AXIS]);
#endif
- #if ENABLED(Y_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(Y, TMC2208)
_TMC2208_INIT(Y, planner.axis_steps_per_mm[Y_AXIS]);
#endif
- #if ENABLED(Y2_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(Y2, TMC2208)
_TMC2208_INIT(Y2, planner.axis_steps_per_mm[Y_AXIS]);
#endif
- #if ENABLED(Z_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(Z, TMC2208)
_TMC2208_INIT(Z, planner.axis_steps_per_mm[Z_AXIS]);
#endif
- #if ENABLED(Z2_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(Z2, TMC2208)
_TMC2208_INIT(Z2, planner.axis_steps_per_mm[Z_AXIS]);
#endif
- #if ENABLED(E0_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E0, TMC2208)
_TMC2208_INIT(E0, planner.axis_steps_per_mm[E_AXIS]);
#endif
- #if ENABLED(E1_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E1, TMC2208)
{ constexpr int extruder = 1; _TMC2208_INIT(E1, planner.axis_steps_per_mm[E_AXIS_N]); }
#endif
- #if ENABLED(E2_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E2, TMC2208)
{ constexpr int extruder = 2; _TMC2208_INIT(E2, planner.axis_steps_per_mm[E_AXIS_N]); }
#endif
- #if ENABLED(E3_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E3, TMC2208)
{ constexpr int extruder = 3; _TMC2208_INIT(E3, planner.axis_steps_per_mm[E_AXIS_N]); }
#endif
- #if ENABLED(E4_IS_TMC2208)
+ #if IS_SPIDRIVER_USED(E4, TMC2208)
{ constexpr int extruder = 4; _TMC2208_INIT(E4, planner.axis_steps_per_mm[E_AXIS_N]); }
#endif
}
-#endif // HAVE_TMC2208
+#endif // TMC2208
void restore_stepper_drivers() {
#if X_IS_TRINAMIC
@@ -522,21 +522,21 @@ void restore_stepper_drivers() {
}
void reset_stepper_drivers() {
- #if ENABLED(HAVE_TMC26X)
+ #if HAVE_SPIDRIVER(TMC26X)
tmc26x_init_to_defaults();
#endif
- #if ENABLED(HAVE_TMC2130)
+ #if HAVE_SPIDRIVER(TMC2130)
delay(100);
tmc2130_init_to_defaults();
#endif
- #if ENABLED(HAVE_TMC2208)
+ #if HAVE_SPIDRIVER(TMC2208)
delay(100);
tmc2208_init_to_defaults();
#endif
#ifdef TMC_ADV
TMC_ADV()
#endif
- #if ENABLED(HAVE_L6470DRIVER)
+ #if HAVE_SPIDRIVER(L6470)
L6470_init_to_defaults();
#endif
}
@@ -544,7 +544,7 @@ void reset_stepper_drivers() {
//
// L6470 Driver objects and inits
//
-#if ENABLED(HAVE_L6470DRIVER)
+#if HAVE_SPIDRIVER(L6470)
#include
#include
@@ -552,37 +552,37 @@ void reset_stepper_drivers() {
#define _L6470_DEFINE(ST) L6470 stepper##ST(ST##_ENABLE_PIN)
// L6470 Stepper objects
- #if ENABLED(X_IS_L6470)
+ #if IS_SPIDRIVER_USED(X, L6470)
_L6470_DEFINE(X);
#endif
- #if ENABLED(X2_IS_L6470)
+ #if IS_SPIDRIVER_USED(X2, L6470)
_L6470_DEFINE(X2);
#endif
- #if ENABLED(Y_IS_L6470)
+ #if IS_SPIDRIVER_USED(Y, L6470)
_L6470_DEFINE(Y);
#endif
- #if ENABLED(Y2_IS_L6470)
+ #if IS_SPIDRIVER_USED(Y2, L6470)
_L6470_DEFINE(Y2);
#endif
- #if ENABLED(Z_IS_L6470)
+ #if IS_SPIDRIVER_USED(Z, L6470)
_L6470_DEFINE(Z);
#endif
- #if ENABLED(Z2_IS_L6470)
+ #if IS_SPIDRIVER_USED(Z2, L6470)
_L6470_DEFINE(Z2);
#endif
- #if ENABLED(E0_IS_L6470)
+ #if IS_SPIDRIVER_USED(E0, L6470)
_L6470_DEFINE(E0);
#endif
- #if ENABLED(E1_IS_L6470)
+ #if IS_SPIDRIVER_USED(E1, L6470)
_L6470_DEFINE(E1);
#endif
- #if ENABLED(E2_IS_L6470)
+ #if IS_SPIDRIVER_USED(E2, L6470)
_L6470_DEFINE(E2);
#endif
- #if ENABLED(E3_IS_L6470)
+ #if IS_SPIDRIVER_USED(E3, L6470)
_L6470_DEFINE(E3);
#endif
- #if ENABLED(E4_IS_L6470)
+ #if IS_SPIDRIVER_USED(E4, L6470)
_L6470_DEFINE(E4);
#endif
@@ -595,39 +595,39 @@ void reset_stepper_drivers() {
}while(0)
void L6470_init_to_defaults() {
- #if ENABLED(X_IS_L6470)
+ #if IS_SPIDRIVER_USED(X, L6470)
_L6470_INIT(X);
#endif
- #if ENABLED(X2_IS_L6470)
+ #if IS_SPIDRIVER_USED(X2, L6470)
_L6470_INIT(X2);
#endif
- #if ENABLED(Y_IS_L6470)
+ #if IS_SPIDRIVER_USED(Y, L6470)
_L6470_INIT(Y);
#endif
- #if ENABLED(Y2_IS_L6470)
+ #if IS_SPIDRIVER_USED(Y2, L6470)
_L6470_INIT(Y2);
#endif
- #if ENABLED(Z_IS_L6470)
+ #if IS_SPIDRIVER_USED(Z, L6470)
_L6470_INIT(Z);
#endif
- #if ENABLED(Z2_IS_L6470)
+ #if IS_SPIDRIVER_USED(Z2, L6470)
_L6470_INIT(Z2);
#endif
- #if ENABLED(E0_IS_L6470)
+ #if IS_SPIDRIVER_USED(E0, L6470)
_L6470_INIT(E0);
#endif
- #if ENABLED(E1_IS_L6470)
+ #if IS_SPIDRIVER_USED(E1, L6470)
_L6470_INIT(E1);
#endif
- #if ENABLED(E2_IS_L6470)
+ #if IS_SPIDRIVER_USED(E2, L6470)
_L6470_INIT(E2);
#endif
- #if ENABLED(E3_IS_L6470)
+ #if IS_SPIDRIVER_USED(E3, L6470)
_L6470_INIT(E3);
#endif
- #if ENABLED(E4_IS_L6470)
+ #if IS_SPIDRIVER_USED(E4, L6470)
_L6470_INIT(E4);
#endif
}
-#endif // HAVE_L6470DRIVER
+#endif // L6470
diff --git a/Marlin/src/module/stepper_indirection.h b/Marlin/src/module/stepper_indirection.h
index 7b80a459bf7b..cdcebcdc1f5f 100644
--- a/Marlin/src/module/stepper_indirection.h
+++ b/Marlin/src/module/stepper_indirection.h
@@ -47,7 +47,7 @@
#include "../inc/MarlinConfig.h"
// TMC26X drivers have STEP/DIR on normal pins, but ENABLE via SPI
-#if ENABLED(HAVE_TMC26X)
+#if HAVE_SPIDRIVER(TMC26X)
#include
#ifdef STM32F7
#include "../HAL/HAL_STM32F7/TMC2660.h"
@@ -57,19 +57,19 @@
void tmc26x_init_to_defaults();
#endif
-#if ENABLED(HAVE_TMC2130)
+#if HAVE_SPIDRIVER(TMC2130)
#include
void tmc2130_init_to_defaults();
#endif
-#if ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2208)
#include
void tmc2208_serial_begin();
void tmc2208_init_to_defaults();
#endif
// L6470 has STEP on normal pins, but DIR/ENABLE via SPI
-#if ENABLED(HAVE_L6470DRIVER)
+#if HAVE_SPIDRIVER(L6470)
#include
#include
void L6470_init_to_defaults();
@@ -79,7 +79,7 @@ void restore_stepper_drivers(); // Called by PSU_ON
void reset_stepper_drivers(); // Called by settings.load / settings.reset
// X Stepper
-#if ENABLED(X_IS_L6470)
+#if IS_SPIDRIVER_USED(X, L6470)
extern L6470 stepperX;
#define X_ENABLE_INIT NOOP
#define X_ENABLE_WRITE(STATE) do{ if (STATE) stepperX.Step_Clock(stepperX.getStatus() & STATUS_HIZ); else stepperX.softFree(); }while(0)
@@ -88,15 +88,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define X_DIR_WRITE(STATE) stepperX.Step_Clock(STATE)
#define X_DIR_READ (stepperX.getStatus() & STATUS_DIR)
#else
- #if ENABLED(X_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(X, TMC26X)
extern TMC26XStepper stepperX;
#define X_ENABLE_INIT NOOP
#define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE)
#define X_ENABLE_READ stepperX.isEnabled()
#else
- #if ENABLED(X_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(X, TMC2130)
extern TMC2130Stepper stepperX;
- #elif ENABLED(X_IS_TMC2208)
+ #elif IS_SPIDRIVER_USED(X, TMC2208)
extern TMC2208Stepper stepperX;
#endif
#define X_ENABLE_INIT SET_OUTPUT(X_ENABLE_PIN)
@@ -112,7 +112,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define X_STEP_READ READ(X_STEP_PIN)
// Y Stepper
-#if ENABLED(Y_IS_L6470)
+#if IS_SPIDRIVER_USED(Y, L6470)
extern L6470 stepperY;
#define Y_ENABLE_INIT NOOP
#define Y_ENABLE_WRITE(STATE) do{ if (STATE) stepperY.Step_Clock(stepperY.getStatus() & STATUS_HIZ); else stepperY.softFree(); }while(0)
@@ -121,15 +121,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define Y_DIR_WRITE(STATE) stepperY.Step_Clock(STATE)
#define Y_DIR_READ (stepperY.getStatus() & STATUS_DIR)
#else
- #if ENABLED(Y_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(Y, TMC26X)
extern TMC26XStepper stepperY;
#define Y_ENABLE_INIT NOOP
#define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE)
#define Y_ENABLE_READ stepperY.isEnabled()
#else
- #if ENABLED(Y_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Y, TMC2130)
extern TMC2130Stepper stepperY;
- #elif ENABLED(Y_IS_TMC2208)
+ #elif IS_SPIDRIVER_USED(Y, TMC2208)
extern TMC2208Stepper stepperY;
#endif
#define Y_ENABLE_INIT SET_OUTPUT(Y_ENABLE_PIN)
@@ -145,7 +145,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define Y_STEP_READ READ(Y_STEP_PIN)
// Z Stepper
-#if ENABLED(Z_IS_L6470)
+#if IS_SPIDRIVER_USED(Z, L6470)
extern L6470 stepperZ;
#define Z_ENABLE_INIT NOOP
#define Z_ENABLE_WRITE(STATE) do{ if (STATE) stepperZ.Step_Clock(stepperZ.getStatus() & STATUS_HIZ); else stepperZ.softFree(); }while(0)
@@ -154,15 +154,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define Z_DIR_WRITE(STATE) stepperZ.Step_Clock(STATE)
#define Z_DIR_READ (stepperZ.getStatus() & STATUS_DIR)
#else
- #if ENABLED(Z_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(Z, TMC26X)
extern TMC26XStepper stepperZ;
#define Z_ENABLE_INIT NOOP
#define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE)
#define Z_ENABLE_READ stepperZ.isEnabled()
#else
- #if ENABLED(Z_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Z, TMC2130)
extern TMC2130Stepper stepperZ;
- #elif ENABLED(Z_IS_TMC2208)
+ #elif IS_SPIDRIVER_USED(Z, TMC2208)
extern TMC2208Stepper stepperZ;
#endif
#define Z_ENABLE_INIT SET_OUTPUT(Z_ENABLE_PIN)
@@ -179,7 +179,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
// X2 Stepper
#if HAS_X2_ENABLE
- #if ENABLED(X2_IS_L6470)
+ #if IS_SPIDRIVER_USED(X2, L6470)
extern L6470 stepperX2;
#define X2_ENABLE_INIT NOOP
#define X2_ENABLE_WRITE(STATE) do{ if (STATE) stepperX2.Step_Clock(stepperX2.getStatus() & STATUS_HIZ); else stepperX2.softFree(); }while(0)
@@ -188,15 +188,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define X2_DIR_WRITE(STATE) stepperX2.Step_Clock(STATE)
#define X2_DIR_READ (stepperX2.getStatus() & STATUS_DIR)
#else
- #if ENABLED(X2_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(X2, TMC26X)
extern TMC26XStepper stepperX2;
#define X2_ENABLE_INIT NOOP
#define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE)
#define X2_ENABLE_READ stepperX2.isEnabled()
#else
- #if ENABLED(X2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(X2, TMC2130)
extern TMC2130Stepper stepperX2;
- #elif ENABLED(X2_IS_TMC2208)
+ #elif IS_SPIDRIVER_USED(X2, TMC2208)
extern TMC2208Stepper stepperX2;
#endif
#define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN)
@@ -214,7 +214,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
// Y2 Stepper
#if HAS_Y2_ENABLE
- #if ENABLED(Y2_IS_L6470)
+ #if IS_SPIDRIVER_USED(Y2, L6470)
extern L6470 stepperY2;
#define Y2_ENABLE_INIT NOOP
#define Y2_ENABLE_WRITE(STATE) do{ if (STATE) stepperY2.Step_Clock(stepperY2.getStatus() & STATUS_HIZ); else stepperY2.softFree(); }while(0)
@@ -223,15 +223,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define Y2_DIR_WRITE(STATE) stepperY2.Step_Clock(STATE)
#define Y2_DIR_READ (stepperY2.getStatus() & STATUS_DIR)
#else
- #if ENABLED(Y2_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(Y2, TMC26X)
extern TMC26XStepper stepperY2;
#define Y2_ENABLE_INIT NOOP
#define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE)
#define Y2_ENABLE_READ stepperY2.isEnabled()
#else
- #if ENABLED(Y2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Y2, TMC2130)
extern TMC2130Stepper stepperY2;
- #elif ENABLED(Y2_IS_TMC2208)
+ #elif IS_SPIDRIVER_USED(Y2, TMC2208)
extern TMC2208Stepper stepperY2;
#endif
#define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN)
@@ -249,7 +249,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
// Z2 Stepper
#if HAS_Z2_ENABLE
- #if ENABLED(Z2_IS_L6470)
+ #if IS_SPIDRIVER_USED(Z2, L6470)
extern L6470 stepperZ2;
#define Z2_ENABLE_INIT NOOP
#define Z2_ENABLE_WRITE(STATE) do{ if (STATE) stepperZ2.Step_Clock(stepperZ2.getStatus() & STATUS_HIZ); else stepperZ2.softFree(); }while(0)
@@ -258,15 +258,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define Z2_DIR_WRITE(STATE) stepperZ2.Step_Clock(STATE)
#define Z2_DIR_READ (stepperZ2.getStatus() & STATUS_DIR)
#else
- #if ENABLED(Z2_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(Z2, TMC26X)
extern TMC26XStepper stepperZ2;
#define Z2_ENABLE_INIT NOOP
#define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE)
#define Z2_ENABLE_READ stepperZ2.isEnabled()
#else
- #if ENABLED(Z2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(Z2, TMC2130)
extern TMC2130Stepper stepperZ2;
- #elif ENABLED(Z2_IS_TMC2208)
+ #elif IS_SPIDRIVER_USED(Z2, TMC2208)
extern TMC2208Stepper stepperZ2;
#endif
#define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN)
@@ -283,7 +283,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#endif
// E0 Stepper
-#if ENABLED(E0_IS_L6470)
+#if IS_SPIDRIVER_USED(E0, L6470)
extern L6470 stepperE0;
#define E0_ENABLE_INIT NOOP
#define E0_ENABLE_WRITE(STATE) do{ if (STATE) stepperE0.Step_Clock(stepperE0.getStatus() & STATUS_HIZ); else stepperE0.softFree(); }while(0)
@@ -292,15 +292,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define E0_DIR_WRITE(STATE) stepperE0.Step_Clock(STATE)
#define E0_DIR_READ (stepperE0.getStatus() & STATUS_DIR)
#else
- #if ENABLED(E0_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E0, TMC26X)
extern TMC26XStepper stepperE0;
#define E0_ENABLE_INIT NOOP
#define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE)
#define E0_ENABLE_READ stepperE0.isEnabled()
#else
- #if ENABLED(E0_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E0, TMC2130)
extern TMC2130Stepper stepperE0;
- #elif ENABLED(E0_IS_TMC2208)
+ #elif IS_SPIDRIVER_USED(E0, TMC2208)
extern TMC2208Stepper stepperE0;
#endif
#define E0_ENABLE_INIT SET_OUTPUT(E0_ENABLE_PIN)
@@ -316,7 +316,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define E0_STEP_READ READ(E0_STEP_PIN)
// E1 Stepper
-#if ENABLED(E1_IS_L6470)
+#if IS_SPIDRIVER_USED(E1, L6470)
extern L6470 stepperE1;
#define E1_ENABLE_INIT NOOP
#define E1_ENABLE_WRITE(STATE) do{ if (STATE) stepperE1.Step_Clock(stepperE1.getStatus() & STATUS_HIZ); else stepperE1.softFree(); }while(0)
@@ -325,15 +325,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define E1_DIR_WRITE(STATE) stepperE1.Step_Clock(STATE)
#define E1_DIR_READ (stepperE1.getStatus() & STATUS_DIR)
#else
- #if ENABLED(E1_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E1, TMC26X)
extern TMC26XStepper stepperE1;
#define E1_ENABLE_INIT NOOP
#define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE)
#define E1_ENABLE_READ stepperE1.isEnabled()
#else
- #if ENABLED(E1_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E1, TMC2130)
extern TMC2130Stepper stepperE1;
- #elif ENABLED(E1_IS_TMC2208)
+ #elif IS_SPIDRIVER_USED(E1, TMC2208)
extern TMC2208Stepper stepperE1;
#endif
#define E1_ENABLE_INIT SET_OUTPUT(E1_ENABLE_PIN)
@@ -349,7 +349,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define E1_STEP_READ READ(E1_STEP_PIN)
// E2 Stepper
-#if ENABLED(E2_IS_L6470)
+#if IS_SPIDRIVER_USED(E2, L6470)
extern L6470 stepperE2;
#define E2_ENABLE_INIT NOOP
#define E2_ENABLE_WRITE(STATE) do{ if (STATE) stepperE2.Step_Clock(stepperE2.getStatus() & STATUS_HIZ); else stepperE2.softFree(); }while(0)
@@ -358,15 +358,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define E2_DIR_WRITE(STATE) stepperE2.Step_Clock(STATE)
#define E2_DIR_READ (stepperE2.getStatus() & STATUS_DIR)
#else
- #if ENABLED(E2_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E2, TMC26X)
extern TMC26XStepper stepperE2;
#define E2_ENABLE_INIT NOOP
#define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE)
#define E2_ENABLE_READ stepperE2.isEnabled()
#else
- #if ENABLED(E2_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E2, TMC2130)
extern TMC2130Stepper stepperE2;
- #elif ENABLED(E2_IS_TMC2208)
+ #elif IS_SPIDRIVER_USED(E2, TMC2208)
extern TMC2208Stepper stepperE2;
#endif
#define E2_ENABLE_INIT SET_OUTPUT(E2_ENABLE_PIN)
@@ -382,7 +382,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define E2_STEP_READ READ(E2_STEP_PIN)
// E3 Stepper
-#if ENABLED(E3_IS_L6470)
+#if IS_SPIDRIVER_USED(E3, L6470)
extern L6470 stepperE3;
#define E3_ENABLE_INIT NOOP
#define E3_ENABLE_WRITE(STATE) do{ if (STATE) stepperE3.Step_Clock(stepperE3.getStatus() & STATUS_HIZ); else stepperE3.softFree(); }while(0)
@@ -391,15 +391,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define E3_DIR_WRITE(STATE) stepperE3.Step_Clock(STATE)
#define E3_DIR_READ (stepperE3.getStatus() & STATUS_DIR)
#else
- #if ENABLED(E3_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E3, TMC26X)
extern TMC26XStepper stepperE3;
#define E3_ENABLE_INIT NOOP
#define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE)
#define E3_ENABLE_READ stepperE3.isEnabled()
#else
- #if ENABLED(E3_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E3, TMC2130)
extern TMC2130Stepper stepperE3;
- #elif ENABLED(E3_IS_TMC2208)
+ #elif IS_SPIDRIVER_USED(E3, TMC2208)
extern TMC2208Stepper stepperE3;
#endif
#define E3_ENABLE_INIT SET_OUTPUT(E3_ENABLE_PIN)
@@ -415,7 +415,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define E3_STEP_READ READ(E3_STEP_PIN)
// E4 Stepper
-#if ENABLED(E4_IS_L6470)
+#if IS_SPIDRIVER_USED(E4, L6470)
extern L6470 stepperE4;
#define E4_ENABLE_INIT NOOP
#define E4_ENABLE_WRITE(STATE) do{ if (STATE) stepperE4.Step_Clock(stepperE4.getStatus() & STATUS_HIZ); else stepperE4.softFree(); }while(0)
@@ -424,15 +424,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define E4_DIR_WRITE(STATE) stepperE4.Step_Clock(STATE)
#define E4_DIR_READ (stepperE4.getStatus() & STATUS_DIR)
#else
- #if ENABLED(E4_IS_TMC26X)
+ #if IS_SPIDRIVER_USED(E4, TMC26X)
extern TMC26XStepper stepperE4;
#define E4_ENABLE_INIT NOOP
#define E4_ENABLE_WRITE(STATE) stepperE4.setEnabled(STATE)
#define E4_ENABLE_READ stepperE4.isEnabled()
#else
- #if ENABLED(E4_IS_TMC2130)
+ #if IS_SPIDRIVER_USED(E4, TMC2130)
extern TMC2130Stepper stepperE4;
- #elif ENABLED(E4_IS_TMC2208)
+ #elif IS_SPIDRIVER_USED(E4, TMC2208)
extern TMC2208Stepper stepperE4;
#endif
#define E4_ENABLE_INIT SET_OUTPUT(E4_ENABLE_PIN)
diff --git a/Marlin/src/pins/pins_EINSY_RAMBO.h b/Marlin/src/pins/pins_EINSY_RAMBO.h
index b3c1d1caa010..213622839aa1 100644
--- a/Marlin/src/pins/pins_EINSY_RAMBO.h
+++ b/Marlin/src/pins/pins_EINSY_RAMBO.h
@@ -33,10 +33,8 @@
//
// TMC2130 Configuration_adv defaults for EinsyRambo
//
-#if DISABLED(HAVE_TMC2130)
- #error "You must enable TMC2130 support in Configuration_adv.h for EinsyRambo."
-#elif DISABLED(X_IS_TMC2130) || DISABLED(Y_IS_TMC2130) || DISABLED(Z_IS_TMC2130) || DISABLED(E0_IS_TMC2130)
- #error "You must enable ([XYZ]|E0)_IS_TMC2130 in Configuration_adv.h for EinsyRambo."
+#if !IS_SPIDRIVER_USED(X,TMC2130) || !IS_SPIDRIVER_USED(Y,TMC2130) || !IS_SPIDRIVER_USED(Z,TMC2130) || !IS_SPIDRIVER_USED(E0,TMC2130)
+ #error "You must define ([XYZ]|E0)_DRIVER_TYPE TMC2130 + SPI_STEPPER in Configuration.h for EinsyRambo."
#endif
// TMC2130 Diag Pins (currently just for reference)
diff --git a/Marlin/src/pins/pins_EINSY_RETRO.h b/Marlin/src/pins/pins_EINSY_RETRO.h
index df4f1c20beba..458c5b919fc5 100644
--- a/Marlin/src/pins/pins_EINSY_RETRO.h
+++ b/Marlin/src/pins/pins_EINSY_RETRO.h
@@ -33,10 +33,8 @@
//
// TMC2130 Configuration_adv defaults for EinsyRetro
//
-#if DISABLED(HAVE_TMC2130)
- #error "You must enable TMC2130 support in Configuration_adv.h for EinsyRetro."
-#elif DISABLED(X_IS_TMC2130) || DISABLED(Y_IS_TMC2130) || DISABLED(Z_IS_TMC2130) || DISABLED(E0_IS_TMC2130)
- #error "You must enable ([XYZ]|E0)_IS_TMC2130 in Configuration_adv.h for EinsyRetro."
+#if !IS_SPIDRIVER_USED(X,TMC2130) || !IS_SPIDRIVER_USED(Y,TMC2130) || !IS_SPIDRIVER_USED(Z,TMC2130) || !IS_SPIDRIVER_USED(E0,TMC2130)
+ #error "You must define ([XYZ]|E0)_DRIVER_TYPE TMC2130 + SPI_STEPPER in Configuration.h for EinsyRetro."
#endif
// TMC2130 Diag Pins (currently just for reference)
diff --git a/Marlin/src/pins/pins_RAMPS.h b/Marlin/src/pins/pins_RAMPS.h
index a85f3b604947..3c06f5e4d5bc 100644
--- a/Marlin/src/pins/pins_RAMPS.h
+++ b/Marlin/src/pins/pins_RAMPS.h
@@ -146,7 +146,7 @@
#endif
#endif
-#if ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2208)
/**
* TMC2208 stepper drivers
*
diff --git a/Marlin/src/pins/pins_RAMPS_FD_V1.h b/Marlin/src/pins/pins_RAMPS_FD_V1.h
index d8cdeb54f949..d7bfc457ae7a 100644
--- a/Marlin/src/pins/pins_RAMPS_FD_V1.h
+++ b/Marlin/src/pins/pins_RAMPS_FD_V1.h
@@ -178,7 +178,7 @@
#endif // ULTRA_LCD
-#if ENABLED(HAVE_TMC2208)
+#if HAVE_SPIDRIVER(TMC2208)
/**
* TMC2208 stepper drivers
*