Improve TMC config organization, naming
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user