From 738a8495ad06f9f4903e83c4276089723f74572a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 13 Mar 2018 02:09:27 -0500 Subject: [PATCH] Improve TMC config organization, naming --- Marlin/Configuration_adv.h | 65 +++--- Marlin/SanityCheck.h | 202 ++++++++++++++++-- .../AlephObjects/TAZ4/Configuration_adv.h | 65 +++--- .../Anet/A6/Configuration_adv.h | 65 +++--- .../Anet/A8/Configuration_adv.h | 65 +++--- .../BIBO/TouchX/Configuration_adv.h | 65 +++--- .../BQ/Hephestos/Configuration_adv.h | 65 +++--- .../BQ/Hephestos_2/Configuration_adv.h | 65 +++--- .../BQ/WITBOX/Configuration_adv.h | 65 +++--- .../Cartesio/Configuration_adv.h | 65 +++--- .../Creality/CR-10/Configuration_adv.h | 65 +++--- .../Creality/CR-10S/Configuration_adv.h | 65 +++--- .../Creality/CR-10mini/Configuration_adv.h | 65 +++--- .../Creality/Ender-2/Configuration_adv.h | 65 +++--- .../Creality/Ender-4/Configuration_adv.h | 65 +++--- .../Felix/Configuration_adv.h | 65 +++--- .../FolgerTech/i3-2020/Configuration_adv.h | 65 +++--- .../Infitary/i3-M508/Configuration_adv.h | 65 +++--- .../JGAurora/A5/Configuration_adv.h | 65 +++--- .../Malyan/M150/Configuration_adv.h | 65 +++--- .../Micromake/C1/enhanced/Configuration_adv.h | 65 +++--- .../RigidBot/Configuration_adv.h | 65 +++--- .../SCARA/Configuration_adv.h | 65 +++--- .../Sanguinololu/Configuration_adv.h | 65 +++--- .../TinyBoy2/Configuration_adv.h | 65 +++--- .../Velleman/K8200/Configuration_adv.h | 65 +++--- .../Velleman/K8400/Configuration_adv.h | 65 +++--- .../Wanhao/Duplicator 6/Configuration_adv.h | 65 +++--- .../FLSUN/auto_calibrate/Configuration_adv.h | 65 +++--- .../delta/FLSUN/kossel/Configuration_adv.h | 65 +++--- .../FLSUN/kossel_mini/Configuration_adv.h | 65 +++--- .../delta/generic/Configuration_adv.h | 65 +++--- .../delta/kossel_mini/Configuration_adv.h | 65 +++--- .../delta/kossel_pro/Configuration_adv.h | 65 +++--- .../delta/kossel_xl/Configuration_adv.h | 65 +++--- .../gCreate/gMax1.5+/Configuration_adv.h | 65 +++--- .../makibox/Configuration_adv.h | 65 +++--- .../tvrrug/Round2/Configuration_adv.h | 65 +++--- .../wt150/Configuration_adv.h | 66 +++--- Marlin/stepper.cpp | 2 +- Marlin/stepper_indirection.cpp | 49 +++-- Marlin/stepper_indirection.h | 24 +-- 42 files changed, 1366 insertions(+), 1382 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 89a054859..4f2d9e0a8 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -944,21 +944,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1006,7 +1004,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1020,6 +1018,19 @@ * 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. @@ -1032,22 +1043,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1059,10 +1055,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 6f7d17771..e99b188d7 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -247,6 +247,11 @@ #error "LCD_I2C_SAINSMART_YWROBOT is now LCD_SAINSMART_I2C_(1602|2004). Please update your configuration." #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." +#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." #elif defined(AUTOMATIC_CURRENT_CONTROL) #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration." #endif @@ -1465,22 +1470,22 @@ static_assert(1 >= 0 ); /** - * Make sure HAVE_TMCDRIVER is warranted + * Make sure HAVE_TMC26X is warranted */ -#if ENABLED(HAVE_TMCDRIVER) && !( \ - ENABLED( X_IS_TMC ) \ - || ENABLED( X2_IS_TMC ) \ - || ENABLED( Y_IS_TMC ) \ - || ENABLED( Y2_IS_TMC ) \ - || ENABLED( Z_IS_TMC ) \ - || ENABLED( Z2_IS_TMC ) \ - || ENABLED( E0_IS_TMC ) \ - || ENABLED( E1_IS_TMC ) \ - || ENABLED( E2_IS_TMC ) \ - || ENABLED( E3_IS_TMC ) \ - || ENABLED( E4_IS_TMC ) \ +#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_TMCDRIVER requires at least one TMC stepper to be set." + #error "HAVE_TMC26X requires at least one TMC26X stepper to be set." #endif /** @@ -1612,6 +1617,175 @@ static_assert(1 >= 0 #error "HAVE_L6470DRIVER requires at least one L6470 stepper to be set." #endif +/** + * Check that each axis has only one driver selected + */ +static_assert(1 >= 0 + #if ENABLED(X_IS_TMC26X) + + 1 + #endif + #if ENABLED(X_IS_TMC2130) + + 1 + #endif + #if ENABLED(X_IS_TMC2208) + + 1 + #endif + #if ENABLED(X_IS_L6470) + + 1 + #endif + , "Please enable only one stepper driver for the X axis." +); +static_assert(1 >= 0 + #if ENABLED(X2_IS_TMC26X) + + 1 + #endif + #if ENABLED(X2_IS_TMC2130) + + 1 + #endif + #if ENABLED(X2_IS_TMC2208) + + 1 + #endif + #if ENABLED(X2_IS_L6470) + + 1 + #endif + , "Please enable only one stepper driver for the X2 axis." +); +static_assert(1 >= 0 + #if ENABLED(Y_IS_TMC26X) + + 1 + #endif + #if ENABLED(Y_IS_TMC2130) + + 1 + #endif + #if ENABLED(Y_IS_TMC2208) + + 1 + #endif + #if ENABLED(Y_IS_L6470) + + 1 + #endif + , "Please enable only one stepper driver for the Y axis." +); +static_assert(1 >= 0 + #if ENABLED(Y2_IS_TMC26X) + + 1 + #endif + #if ENABLED(Y2_IS_TMC2130) + + 1 + #endif + #if ENABLED(Y2_IS_TMC2208) + + 1 + #endif + #if ENABLED(Y2_IS_L6470) + + 1 + #endif + , "Please enable only one stepper driver for the Y2 axis." +); +static_assert(1 >= 0 + #if ENABLED(Z_IS_TMC26X) + + 1 + #endif + #if ENABLED(Z_IS_TMC2130) + + 1 + #endif + #if ENABLED(Z_IS_TMC2208) + + 1 + #endif + #if ENABLED(Z_IS_L6470) + + 1 + #endif + , "Please enable only one stepper driver for the Z axis." +); +static_assert(1 >= 0 + #if ENABLED(Z2_IS_TMC26X) + + 1 + #endif + #if ENABLED(Z2_IS_TMC2130) + + 1 + #endif + #if ENABLED(Z2_IS_TMC2208) + + 1 + #endif + #if ENABLED(Z2_IS_L6470) + + 1 + #endif + , "Please enable only one stepper driver for the Z2 axis." +); +static_assert(1 >= 0 + #if ENABLED(E0_IS_TMC26X) + + 1 + #endif + #if ENABLED(E0_IS_TMC2130) + + 1 + #endif + #if ENABLED(E0_IS_TMC2208) + + 1 + #endif + #if ENABLED(E0_IS_L6470) + + 1 + #endif + , "Please enable only one stepper driver for the E0 axis." +); +static_assert(1 >= 0 + #if ENABLED(E1_IS_TMC26X) + + 1 + #endif + #if ENABLED(E1_IS_TMC2130) + + 1 + #endif + #if ENABLED(E1_IS_TMC2208) + + 1 + #endif + #if ENABLED(E1_IS_L6470) + + 1 + #endif + , "Please enable only one stepper driver for the E1 axis." +); +static_assert(1 >= 0 + #if ENABLED(E2_IS_TMC26X) + + 1 + #endif + #if ENABLED(E2_IS_TMC2130) + + 1 + #endif + #if ENABLED(E2_IS_TMC2208) + + 1 + #endif + #if ENABLED(E2_IS_L6470) + + 1 + #endif + , "Please enable only one stepper driver for the E2 axis." +); +static_assert(1 >= 0 + #if ENABLED(E3_IS_TMC26X) + + 1 + #endif + #if ENABLED(E3_IS_TMC2130) + + 1 + #endif + #if ENABLED(E3_IS_TMC2208) + + 1 + #endif + #if ENABLED(E3_IS_L6470) + + 1 + #endif + , "Please enable only one stepper driver for the E3 axis." +); +static_assert(1 >= 0 + #if ENABLED(E4_IS_TMC26X) + + 1 + #endif + #if ENABLED(E4_IS_TMC2130) + + 1 + #endif + #if ENABLED(E4_IS_TMC2208) + + 1 + #endif + #if ENABLED(E4_IS_L6470) + + 1 + #endif + , "Please enable only one stepper driver for the E4 axis." +); + /** * Digipot requirement */ diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h index 7440091dc..89881e6eb 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Anet/A6/Configuration_adv.h b/Marlin/example_configurations/Anet/A6/Configuration_adv.h index 4f71298f7..9196c7dd9 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A6/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Anet/A8/Configuration_adv.h b/Marlin/example_configurations/Anet/A8/Configuration_adv.h index ce1c27f17..0e9723331 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A8/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h b/Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h index 601b483e3..a3160b117 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h index 0c82c1753..90c5f2414 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h index 3431cfef1..7167b42b4 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h index 0c82c1753..90c5f2414 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index efbde1647..98a65be37 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h index aae4aebcf..b9482b1a1 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h index af5d97466..91d13b06b 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h index 1ecd36420..230ff3e71 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h index b3ab5cdf0..ea94aa1eb 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h index 4173776a2..1234e1a2d 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index e4200a3da..b5a01ce4a 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h index 21791732d..00283a6b5 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h @@ -942,21 +942,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1004,7 +1002,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1018,6 +1016,19 @@ * 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. @@ -1030,22 +1041,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1057,10 +1053,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h index 46ab1c195..7ebcba387 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h index 78f42750f..7b19b9575 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h index e3fb32897..593acc4eb 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h index 5b59a3a10..d6ab38ea3 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index 20097dda1..c4e198e02 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 11e9f920b..86496afa7 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h index 9553c98ba..1ed231d29 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index db6e4d71d..af409936e 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h index af3f2a19c..ff4eb9d9f 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h @@ -956,21 +956,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1018,7 +1016,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1032,6 +1030,19 @@ * 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. @@ -1044,22 +1055,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1071,10 +1067,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h index 752fc09e2..8159e535f 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h index 768f20dda..44c1794f7 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h @@ -945,21 +945,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1007,7 +1005,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1021,6 +1019,19 @@ * 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. @@ -1033,22 +1044,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1060,10 +1056,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index 13c99f44f..fa283e6d3 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -945,21 +945,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1007,7 +1005,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1021,6 +1019,19 @@ * 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. @@ -1033,22 +1044,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1060,10 +1056,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h index 06b401e42..a1267c826 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h @@ -945,21 +945,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1007,7 +1005,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1021,6 +1019,19 @@ * 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. @@ -1033,22 +1044,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1060,10 +1056,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index adfc30421..6a37f3bb7 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -945,21 +945,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1007,7 +1005,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1021,6 +1019,19 @@ * 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. @@ -1033,22 +1044,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1060,10 +1056,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index adfc30421..6a37f3bb7 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -945,21 +945,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1007,7 +1005,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1021,6 +1019,19 @@ * 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. @@ -1033,22 +1044,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1060,10 +1056,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index adfc30421..6a37f3bb7 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -945,21 +945,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1007,7 +1005,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1021,6 +1019,19 @@ * 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. @@ -1033,22 +1044,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1060,10 +1056,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index e68581894..019207777 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -950,21 +950,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1012,7 +1010,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1026,6 +1024,19 @@ * 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. @@ -1038,22 +1049,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1065,10 +1061,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 47f26ab64..77f55908d 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -945,21 +945,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1007,7 +1005,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1021,6 +1019,19 @@ * 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. @@ -1033,22 +1044,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1060,10 +1056,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h index d5dd41888..57df98576 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 90bc3fe49..c71706718 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 839cdba77..f330477fa 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -943,21 +943,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1005,7 +1003,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1019,6 +1017,19 @@ * 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. @@ -1031,22 +1042,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1058,10 +1054,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index dfdb35096..10f47d310 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -944,21 +944,19 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMCDRIVER - -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - //#define X2_IS_TMC - //#define Y_IS_TMC - //#define Y2_IS_TMC - //#define Z_IS_TMC - //#define Z2_IS_TMC - //#define E0_IS_TMC - //#define E1_IS_TMC - //#define E2_IS_TMC - //#define E3_IS_TMC - //#define E4_IS_TMC +//#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 #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1006,7 +1004,7 @@ #endif -// @section TMC2130, TMC2208 +// @section tmc_smart /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -1020,6 +1018,20 @@ * 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. @@ -1032,22 +1044,7 @@ * (https://github.com/teemuatlut/TMC2208Stepper). */ //#define HAVE_TMC2208 - -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) - - // CHOOSE YOUR MOTORS 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 - +#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! //#define X_IS_TMC2208 //#define X2_IS_TMC2208 //#define Y_IS_TMC2208 @@ -1059,10 +1056,9 @@ //#define E2_IS_TMC2208 //#define E3_IS_TMC2208 //#define E4_IS_TMC2208 +#endif - /** - * Stepper driver settings - */ +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 623685aa2..aec07431d 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -949,7 +949,7 @@ void Stepper::init() { #endif // Init TMC Steppers - #if ENABLED(HAVE_TMCDRIVER) + #if ENABLED(HAVE_TMC26X) tmc_init(); #endif diff --git a/Marlin/stepper_indirection.cpp b/Marlin/stepper_indirection.cpp index 14ae556f7..79e413ae7 100644 --- a/Marlin/stepper_indirection.cpp +++ b/Marlin/stepper_indirection.cpp @@ -38,44 +38,43 @@ // // TMC26X Driver objects and inits // -#if ENABLED(HAVE_TMCDRIVER) - +#if ENABLED(HAVE_TMC26X) #include #include #define _TMC_DEFINE(ST) TMC26XStepper stepper##ST(200, ST##_ENABLE_PIN, ST##_STEP_PIN, ST##_DIR_PIN, ST##_MAX_CURRENT, ST##_SENSE_RESISTOR) - #if ENABLED(X_IS_TMC) + #if ENABLED(X_IS_TMC26X) _TMC_DEFINE(X); #endif - #if ENABLED(X2_IS_TMC) + #if ENABLED(X2_IS_TMC26X) _TMC_DEFINE(X2); #endif - #if ENABLED(Y_IS_TMC) + #if ENABLED(Y_IS_TMC26X) _TMC_DEFINE(Y); #endif - #if ENABLED(Y2_IS_TMC) + #if ENABLED(Y2_IS_TMC26X) _TMC_DEFINE(Y2); #endif - #if ENABLED(Z_IS_TMC) + #if ENABLED(Z_IS_TMC26X) _TMC_DEFINE(Z); #endif - #if ENABLED(Z2_IS_TMC) + #if ENABLED(Z2_IS_TMC26X) _TMC_DEFINE(Z2); #endif - #if ENABLED(E0_IS_TMC) + #if ENABLED(E0_IS_TMC26X) _TMC_DEFINE(E0); #endif - #if ENABLED(E1_IS_TMC) + #if ENABLED(E1_IS_TMC26X) _TMC_DEFINE(E1); #endif - #if ENABLED(E2_IS_TMC) + #if ENABLED(E2_IS_TMC26X) _TMC_DEFINE(E2); #endif - #if ENABLED(E3_IS_TMC) + #if ENABLED(E3_IS_TMC26X) _TMC_DEFINE(E3); #endif - #if ENABLED(E4_IS_TMC) + #if ENABLED(E4_IS_TMC26X) _TMC_DEFINE(E4); #endif @@ -85,42 +84,42 @@ }while(0) void tmc_init() { - #if ENABLED(X_IS_TMC) + #if ENABLED(X_IS_TMC26X) _TMC_INIT(X); #endif - #if ENABLED(X2_IS_TMC) + #if ENABLED(X2_IS_TMC26X) _TMC_INIT(X2); #endif - #if ENABLED(Y_IS_TMC) + #if ENABLED(Y_IS_TMC26X) _TMC_INIT(Y); #endif - #if ENABLED(Y2_IS_TMC) + #if ENABLED(Y2_IS_TMC26X) _TMC_INIT(Y2); #endif - #if ENABLED(Z_IS_TMC) + #if ENABLED(Z_IS_TMC26X) _TMC_INIT(Z); #endif - #if ENABLED(Z2_IS_TMC) + #if ENABLED(Z2_IS_TMC26X) _TMC_INIT(Z2); #endif - #if ENABLED(E0_IS_TMC) + #if ENABLED(E0_IS_TMC26X) _TMC_INIT(E0); #endif - #if ENABLED(E1_IS_TMC) + #if ENABLED(E1_IS_TMC26X) _TMC_INIT(E1); #endif - #if ENABLED(E2_IS_TMC) + #if ENABLED(E2_IS_TMC26X) _TMC_INIT(E2); #endif - #if ENABLED(E3_IS_TMC) + #if ENABLED(E3_IS_TMC26X) _TMC_INIT(E3); #endif - #if ENABLED(E4_IS_TMC) + #if ENABLED(E4_IS_TMC26X) _TMC_INIT(E4); #endif } -#endif // HAVE_TMCDRIVER +#endif // HAVE_TMC26X // // TMC2130 Driver objects and inits diff --git a/Marlin/stepper_indirection.h b/Marlin/stepper_indirection.h index 2fdf590a3..0f1e98d17 100644 --- a/Marlin/stepper_indirection.h +++ b/Marlin/stepper_indirection.h @@ -47,7 +47,7 @@ #include "MarlinConfig.h" // TMC26X drivers have STEP/DIR on normal pins, but ENABLE via SPI -#if ENABLED(HAVE_TMCDRIVER) +#if ENABLED(HAVE_TMC26X) #include #include void tmc_init(); @@ -81,7 +81,7 @@ #define X_DIR_WRITE(STATE) stepperX.Step_Clock(STATE) #define X_DIR_READ (stepperX.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(X_IS_TMC) + #if ENABLED(HAVE_TMC26X) && ENABLED(X_IS_TMC26X) extern TMC26XStepper stepperX; #define X_ENABLE_INIT NOOP #define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE) @@ -114,7 +114,7 @@ #define Y_DIR_WRITE(STATE) stepperY.Step_Clock(STATE) #define Y_DIR_READ (stepperY.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(Y_IS_TMC) + #if ENABLED(HAVE_TMC26X) && ENABLED(Y_IS_TMC26X) extern TMC26XStepper stepperY; #define Y_ENABLE_INIT NOOP #define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE) @@ -147,7 +147,7 @@ #define Z_DIR_WRITE(STATE) stepperZ.Step_Clock(STATE) #define Z_DIR_READ (stepperZ.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(Z_IS_TMC) + #if ENABLED(HAVE_TMC26X) && ENABLED(Z_IS_TMC26X) extern TMC26XStepper stepperZ; #define Z_ENABLE_INIT NOOP #define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE) @@ -181,7 +181,7 @@ #define X2_DIR_WRITE(STATE) stepperX2.Step_Clock(STATE) #define X2_DIR_READ (stepperX2.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(X2_IS_TMC) + #if ENABLED(HAVE_TMC26X) && ENABLED(X2_IS_TMC26X) extern TMC26XStepper stepperX2; #define X2_ENABLE_INIT NOOP #define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE) @@ -216,7 +216,7 @@ #define Y2_DIR_WRITE(STATE) stepperY2.Step_Clock(STATE) #define Y2_DIR_READ (stepperY2.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(Y2_IS_TMC) + #if ENABLED(HAVE_TMC26X) && ENABLED(Y2_IS_TMC26X) extern TMC26XStepper stepperY2; #define Y2_ENABLE_INIT NOOP #define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE) @@ -251,7 +251,7 @@ #define Z2_DIR_WRITE(STATE) stepperZ2.Step_Clock(STATE) #define Z2_DIR_READ (stepperZ2.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(Z2_IS_TMC) + #if ENABLED(HAVE_TMC26X) && ENABLED(Z2_IS_TMC26X) extern TMC26XStepper stepperZ2; #define Z2_ENABLE_INIT NOOP #define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE) @@ -285,7 +285,7 @@ #define E0_DIR_WRITE(STATE) stepperE0.Step_Clock(STATE) #define E0_DIR_READ (stepperE0.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(E0_IS_TMC) + #if ENABLED(HAVE_TMC26X) && ENABLED(E0_IS_TMC26X) extern TMC26XStepper stepperE0; #define E0_ENABLE_INIT NOOP #define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE) @@ -318,7 +318,7 @@ #define E1_DIR_WRITE(STATE) stepperE1.Step_Clock(STATE) #define E1_DIR_READ (stepperE1.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(E1_IS_TMC) + #if ENABLED(HAVE_TMC26X) && ENABLED(E1_IS_TMC26X) extern TMC26XStepper stepperE1; #define E1_ENABLE_INIT NOOP #define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE) @@ -351,7 +351,7 @@ #define E2_DIR_WRITE(STATE) stepperE2.Step_Clock(STATE) #define E2_DIR_READ (stepperE2.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(E2_IS_TMC) + #if ENABLED(HAVE_TMC26X) && ENABLED(E2_IS_TMC26X) extern TMC26XStepper stepperE2; #define E2_ENABLE_INIT NOOP #define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE) @@ -384,7 +384,7 @@ #define E3_DIR_WRITE(STATE) stepperE3.Step_Clock(STATE) #define E3_DIR_READ (stepperE3.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(E3_IS_TMC) + #if ENABLED(HAVE_TMC26X) && ENABLED(E3_IS_TMC26X) extern TMC26XStepper stepperE3; #define E3_ENABLE_INIT NOOP #define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE) @@ -417,7 +417,7 @@ #define E4_DIR_WRITE(STATE) stepperE4.Step_Clock(STATE) #define E4_DIR_READ (stepperE4.getStatus() & STATUS_DIR) #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(E4_IS_TMC) + #if ENABLED(HAVE_TMC26X) && ENABLED(E4_IS_TMC26X) extern TMC26XStepper stepperE4; #define E4_ENABLE_INIT NOOP #define E4_ENABLE_WRITE(STATE) stepperE4.setEnabled(STATE)