Просмотр исходного кода

HAS_TRINAMIC => HAS_TRINAMIC_CONFIG

Scott Lahteine 4 лет назад
Родитель
Сommit
b1a50d54e2
31 измененных файлов: 65 добавлений и 65 удалений
  1. 2
    2
      Marlin/Configuration_adv.h
  2. 1
    1
      Marlin/src/HAL/HAL_AVR/inc/SanityCheck.h
  3. 2
    2
      Marlin/src/MarlinCore.cpp
  4. 7
    7
      Marlin/src/core/drivers.h
  5. 1
    1
      Marlin/src/feature/power.cpp
  6. 3
    3
      Marlin/src/feature/tmc_util.cpp
  7. 2
    2
      Marlin/src/feature/tmc_util.h
  8. 1
    1
      Marlin/src/gcode/control/M80_M81.cpp
  9. 2
    2
      Marlin/src/gcode/feature/trinamic/M122.cpp
  10. 2
    2
      Marlin/src/gcode/feature/trinamic/M906.cpp
  11. 2
    2
      Marlin/src/gcode/feature/trinamic/M911-M914.cpp
  12. 1
    1
      Marlin/src/gcode/gcode.cpp
  13. 1
    1
      Marlin/src/gcode/gcode.h
  14. 3
    3
      Marlin/src/inc/Conditionals_adv.h
  15. 1
    1
      Marlin/src/inc/Conditionals_post.h
  16. 5
    5
      Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp
  17. 3
    3
      Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp
  18. 1
    1
      Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.cpp
  19. 1
    1
      Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h
  20. 2
    2
      Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp
  21. 1
    1
      Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp
  22. 2
    2
      Marlin/src/lcd/extensible_ui/ui_api.cpp
  23. 1
    1
      Marlin/src/lcd/extensible_ui/ui_api.h
  24. 1
    1
      Marlin/src/lcd/menu/menu_advanced.cpp
  25. 2
    2
      Marlin/src/lcd/menu/menu_tmc.cpp
  26. 1
    1
      Marlin/src/lcd/ultralcd.cpp
  27. 8
    8
      Marlin/src/module/configuration_store.cpp
  28. 2
    2
      Marlin/src/module/stepper/indirection.cpp
  29. 1
    1
      Marlin/src/module/stepper/indirection.h
  30. 2
    2
      Marlin/src/module/stepper/trinamic.cpp
  31. 1
    1
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h

+ 2
- 2
Marlin/Configuration_adv.h Просмотреть файл

@@ -2015,7 +2015,7 @@
2015 2015
  * TMCStepper library is required to use TMC stepper drivers.
2016 2016
  * https://github.com/teemuatlut/TMCStepper
2017 2017
  */
2018
-#if HAS_TRINAMIC
2018
+#if HAS_TRINAMIC_CONFIG
2019 2019
 
2020 2020
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
2021 2021
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
@@ -2345,7 +2345,7 @@
2345 2345
    */
2346 2346
   #define TMC_ADV() {  }
2347 2347
 
2348
-#endif // HAS_TRINAMIC
2348
+#endif // HAS_TRINAMIC_CONFIG
2349 2349
 
2350 2350
 // @section L64XX
2351 2351
 

+ 1
- 1
Marlin/src/HAL/HAL_AVR/inc/SanityCheck.h Просмотреть файл

@@ -56,7 +56,7 @@
56 56
 /**
57 57
  * The Trinamic library includes SoftwareSerial.h, leading to a compile error.
58 58
  */
59
-#if HAS_TRINAMIC && ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
59
+#if HAS_TRINAMIC_CONFIG && ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
60 60
   #error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
61 61
 #endif
62 62
 

+ 2
- 2
Marlin/src/MarlinCore.cpp Просмотреть файл

@@ -110,7 +110,7 @@
110 110
   #include "feature/I2CPositionEncoder.h"
111 111
 #endif
112 112
 
113
-#if HAS_TRINAMIC && DISABLED(PSU_DEFAULT_OFF)
113
+#if HAS_TRINAMIC_CONFIG && DISABLED(PSU_DEFAULT_OFF)
114 114
   #include "feature/tmc_util.h"
115 115
 #endif
116 116
 
@@ -1162,7 +1162,7 @@ void setup() {
1162 1162
     host_action_prompt_end();
1163 1163
   #endif
1164 1164
 
1165
-  #if HAS_TRINAMIC && DISABLED(PSU_DEFAULT_OFF)
1165
+  #if HAS_TRINAMIC_CONFIG && DISABLED(PSU_DEFAULT_OFF)
1166 1166
     test_tmc_connection(true, true, true, true);
1167 1167
   #endif
1168 1168
 

+ 7
- 7
Marlin/src/core/drivers.h Просмотреть файл

@@ -90,13 +90,13 @@
90 90
 
91 91
 // Test for supported TMC drivers that require advanced configuration
92 92
 // Does not match standalone configurations
93
-#define HAS_TRINAMIC (    HAS_DRIVER(TMC2130) \
94
-                       || HAS_DRIVER(TMC2160) \
95
-                       || HAS_DRIVER(TMC2208) \
96
-                       || HAS_DRIVER(TMC2209) \
97
-                       || HAS_DRIVER(TMC2660) \
98
-                       || HAS_DRIVER(TMC5130) \
99
-                       || HAS_DRIVER(TMC5160) )
93
+#define HAS_TRINAMIC_CONFIG (    HAS_DRIVER(TMC2130) \
94
+                              || HAS_DRIVER(TMC2160) \
95
+                              || HAS_DRIVER(TMC2208) \
96
+                              || HAS_DRIVER(TMC2209) \
97
+                              || HAS_DRIVER(TMC2660) \
98
+                              || HAS_DRIVER(TMC5130) \
99
+                              || HAS_DRIVER(TMC5160) )
100 100
 
101 101
 #define HAS_TRINAMIC_STANDALONE (    HAS_DRIVER(TMC2130_STANDALONE) \
102 102
                                   || HAS_DRIVER(TMC2208_STANDALONE) \

+ 1
- 1
Marlin/src/feature/power.cpp Просмотреть файл

@@ -108,7 +108,7 @@ void Power::power_on() {
108 108
   if (!powersupply_on) {
109 109
     PSU_PIN_ON();
110 110
 
111
-    #if HAS_TRINAMIC
111
+    #if HAS_TRINAMIC_CONFIG
112 112
       delay(PSU_POWERUP_DELAY); // Wait for power to settle
113 113
       restore_stepper_drivers();
114 114
     #endif

+ 3
- 3
Marlin/src/feature/tmc_util.cpp Просмотреть файл

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../inc/MarlinConfig.h"
24 24
 
25
-#if HAS_TRINAMIC
25
+#if HAS_TRINAMIC_CONFIG
26 26
 
27 27
 #include "tmc_util.h"
28 28
 #include "../MarlinCore.h"
@@ -954,7 +954,7 @@
954 954
     static void tmc_get_ic_registers(TMC2208Stepper, const TMC_get_registers_enum) { SERIAL_CHAR('\t'); }
955 955
   #endif
956 956
 
957
-  #if HAS_TRINAMIC
957
+  #if HAS_TRINAMIC_CONFIG
958 958
     template<class TMC>
959 959
     static void tmc_get_registers(TMC &st, const TMC_get_registers_enum i) {
960 960
       switch (i) {
@@ -1257,4 +1257,4 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z
1257 1257
   if (axis_connection) ui.set_status_P(GET_TEXT(MSG_ERROR_TMC));
1258 1258
 }
1259 1259
 
1260
-#endif // HAS_TRINAMIC
1260
+#endif // HAS_TRINAMIC_CONFIG

+ 2
- 2
Marlin/src/feature/tmc_util.h Просмотреть файл

@@ -24,7 +24,7 @@
24 24
 #include "../inc/MarlinConfig.h"
25 25
 #include "../lcd/ultralcd.h"
26 26
 
27
-#if HAS_TRINAMIC
27
+#if HAS_TRINAMIC_CONFIG
28 28
 
29 29
 #include <TMCStepper.h>
30 30
 #include "../module/planner.h"
@@ -400,4 +400,4 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z
400 400
   void tmc_init_cs_pins();
401 401
 #endif
402 402
 
403
-#endif // HAS_TRINAMIC
403
+#endif // HAS_TRINAMIC_CONFIG

+ 1
- 1
Marlin/src/gcode/control/M80_M81.cpp Просмотреть файл

@@ -44,7 +44,7 @@
44 44
   // Could be moved to a feature, but this is all the data
45 45
   bool powersupply_on;
46 46
 
47
-  #if HAS_TRINAMIC
47
+  #if HAS_TRINAMIC_CONFIG
48 48
     #include "../../feature/tmc_util.h"
49 49
   #endif
50 50
 

+ 2
- 2
Marlin/src/gcode/feature/trinamic/M122.cpp Просмотреть файл

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../../../inc/MarlinConfig.h"
24 24
 
25
-#if HAS_TRINAMIC
25
+#if HAS_TRINAMIC_CONFIG
26 26
 
27 27
 #include "../../gcode.h"
28 28
 #include "../../../feature/tmc_util.h"
@@ -53,4 +53,4 @@ void GcodeSuite::M122() {
53 53
   test_tmc_connection(print_axis.x, print_axis.y, print_axis.z, print_axis.e);
54 54
 }
55 55
 
56
-#endif // HAS_TRINAMIC
56
+#endif // HAS_TRINAMIC_CONFIG

+ 2
- 2
Marlin/src/gcode/feature/trinamic/M906.cpp Просмотреть файл

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../../../inc/MarlinConfig.h"
24 24
 
25
-#if HAS_TRINAMIC
25
+#if HAS_TRINAMIC_CONFIG
26 26
 
27 27
 #include "../../gcode.h"
28 28
 #include "../../../feature/tmc_util.h"
@@ -170,4 +170,4 @@ void GcodeSuite::M906() {
170 170
   }
171 171
 }
172 172
 
173
-#endif // HAS_TRINAMIC
173
+#endif // HAS_TRINAMIC_CONFIG

+ 2
- 2
Marlin/src/gcode/feature/trinamic/M911-M914.cpp Просмотреть файл

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../../../inc/MarlinConfig.h"
24 24
 
25
-#if HAS_TRINAMIC
25
+#if HAS_TRINAMIC_CONFIG
26 26
 
27 27
 #include "../../gcode.h"
28 28
 #include "../../../feature/tmc_util.h"
@@ -426,4 +426,4 @@
426 426
   }
427 427
 #endif // USE_SENSORLESS
428 428
 
429
-#endif // HAS_TRINAMIC
429
+#endif // HAS_TRINAMIC_CONFIG

+ 1
- 1
Marlin/src/gcode/gcode.cpp Просмотреть файл

@@ -785,7 +785,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
785 785
         #endif
786 786
       #endif
787 787
 
788
-      #if HAS_TRINAMIC
788
+      #if HAS_TRINAMIC_CONFIG
789 789
         case 122: M122(); break;                                  // M122: Report driver configuration and status
790 790
         case 906: M906(); break;                                  // M906: Set motor current in milliamps using axis codes X, Y, Z, E
791 791
         #if HAS_STEALTHCHOP

+ 1
- 1
Marlin/src/gcode/gcode.h Просмотреть файл

@@ -912,7 +912,7 @@ private:
912 912
     static void M900();
913 913
   #endif
914 914
 
915
-  #if HAS_TRINAMIC
915
+  #if HAS_TRINAMIC_CONFIG
916 916
     static void M122();
917 917
     static void M906();
918 918
     #if HAS_STEALTHCHOP

+ 3
- 3
Marlin/src/inc/Conditionals_adv.h Просмотреть файл

@@ -196,7 +196,7 @@
196 196
     #define MINIMUM_STEPPER_POST_DIR_DELAY 400
197 197
   #elif HAS_DRIVER(A4988)
198 198
     #define MINIMUM_STEPPER_POST_DIR_DELAY 200
199
-  #elif HAS_TRINAMIC || HAS_TRINAMIC_STANDALONE
199
+  #elif HAS_TRINAMIC_CONFIG || HAS_TRINAMIC_STANDALONE
200 200
     #define MINIMUM_STEPPER_POST_DIR_DELAY 20
201 201
   #else
202 202
     #define MINIMUM_STEPPER_POST_DIR_DELAY 0   // Expect at least 10µS since one Stepper ISR must transpire
@@ -216,7 +216,7 @@
216 216
     #define MINIMUM_STEPPER_PULSE 2
217 217
   #elif HAS_DRIVER(A4988) || HAS_DRIVER(A5984)
218 218
     #define MINIMUM_STEPPER_PULSE 1
219
-  #elif HAS_TRINAMIC || HAS_TRINAMIC_STANDALONE
219
+  #elif HAS_TRINAMIC_CONFIG || HAS_TRINAMIC_STANDALONE
220 220
     #define MINIMUM_STEPPER_PULSE 0
221 221
   #elif HAS_DRIVER(LV8729)
222 222
     #define MINIMUM_STEPPER_PULSE 0
@@ -236,7 +236,7 @@
236 236
     #define MAXIMUM_STEPPER_RATE 500000
237 237
   #elif HAS_DRIVER(LV8729)
238 238
     #define MAXIMUM_STEPPER_RATE 1000000
239
-  #elif HAS_TRINAMIC || HAS_TRINAMIC_STANDALONE
239
+  #elif HAS_TRINAMIC_CONFIG || HAS_TRINAMIC_STANDALONE
240 240
     #define MAXIMUM_STEPPER_RATE 5000000
241 241
   #else
242 242
     #define MAXIMUM_STEPPER_RATE 250000

+ 1
- 1
Marlin/src/inc/Conditionals_post.h Просмотреть файл

@@ -1290,7 +1290,7 @@
1290 1290
 #define HAS_SOLENOID_7    (PIN_EXISTS(SOL7))
1291 1291
 
1292 1292
 // Trinamic Stepper Drivers
1293
-#if HAS_TRINAMIC
1293
+#if HAS_TRINAMIC_CONFIG
1294 1294
   #define STEALTHCHOP_ENABLED ANY(STEALTHCHOP_XY, STEALTHCHOP_Z, STEALTHCHOP_E)
1295 1295
   #define USE_SENSORLESS EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
1296 1296
   // Disable Z axis sensorless homing if a probe is used to home the Z axis

+ 5
- 5
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp Просмотреть файл

@@ -58,13 +58,13 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
58 58
       .tag(16).button( BTN_POS(1,6),  BTN_SIZE(1,1), GET_TEXT_F(MSG_CASE_LIGHT))
59 59
       .tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM))
60 60
       .enabled(
61
-        #if HAS_TRINAMIC
61
+        #if HAS_TRINAMIC_CONFIG
62 62
           1
63 63
         #endif
64 64
       )
65 65
       .tag(13).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT))
66 66
       .enabled(
67
-        #if HAS_TRINAMIC
67
+        #if HAS_TRINAMIC_CONFIG
68 68
           1
69 69
         #endif
70 70
       )
@@ -120,13 +120,13 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
120 120
       .enabled(1)
121 121
       .tag(3) .button( BTN_POS(2,1),  BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM))
122 122
       .enabled(
123
-        #if HAS_TRINAMIC
123
+        #if HAS_TRINAMIC_CONFIG
124 124
           1
125 125
         #endif
126 126
       )
127 127
       .tag(13).button( BTN_POS(3,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT))
128 128
       .enabled(
129
-        #if HAS_TRINAMIC
129
+        #if HAS_TRINAMIC_CONFIG
130 130
           1
131 131
         #endif
132 132
       )
@@ -189,7 +189,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
189 189
     case 11: GOTO_SCREEN(FilamentMenu); break;
190 190
     #endif
191 191
     case 12: GOTO_SCREEN(EndstopStatesScreen); break;
192
-    #if HAS_TRINAMIC
192
+    #if HAS_TRINAMIC_CONFIG
193 193
     case 13: GOTO_SCREEN(StepperCurrentScreen); break;
194 194
     case 14: GOTO_SCREEN(StepperBumpSensitivityScreen); break;
195 195
     #endif

+ 3
- 3
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp Просмотреть файл

@@ -45,13 +45,13 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
45 45
 
46 46
       .tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISPLAY_MENU))
47 47
       .enabled(
48
-        #if HAS_TRINAMIC
48
+        #if HAS_TRINAMIC_CONFIG
49 49
           1
50 50
         #endif
51 51
       )
52 52
       .tag(3) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT))
53 53
       .enabled(
54
-        #if HAS_TRINAMIC
54
+        #if HAS_TRINAMIC_CONFIG
55 55
           1
56 56
         #endif
57 57
       )
@@ -100,7 +100,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
100 100
   switch (tag) {
101 101
     case 1: SaveSettingsDialogBox::promptToSaveSettings(); break;
102 102
     case 2: GOTO_SCREEN(DisplayTuningScreen);              break;
103
-    #if HAS_TRINAMIC
103
+    #if HAS_TRINAMIC_CONFIG
104 104
     case 3: GOTO_SCREEN(StepperCurrentScreen);             break;
105 105
     case 4: GOTO_SCREEN(StepperBumpSensitivityScreen);     break;
106 106
     #endif

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.cpp Просмотреть файл

@@ -58,7 +58,7 @@ SCREEN_TABLE {
58 58
 #endif
59 59
   DECL_SCREEN(MoveAxisScreen),
60 60
   DECL_SCREEN(StepsScreen),
61
-#if HAS_TRINAMIC
61
+#if HAS_TRINAMIC_CONFIG
62 62
   DECL_SCREEN(StepperCurrentScreen),
63 63
   DECL_SCREEN(StepperBumpSensitivityScreen),
64 64
 #endif

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h Просмотреть файл

@@ -455,7 +455,7 @@ class StepsScreen : public BaseNumericAdjustmentScreen, public CachedScreen<STEP
455 455
     static bool onTouchHeld(uint8_t tag);
456 456
 };
457 457
 
458
-#if HAS_TRINAMIC
458
+#if HAS_TRINAMIC_CONFIG
459 459
   class StepperCurrentScreen : public BaseNumericAdjustmentScreen, public CachedScreen<STEPPER_CURRENT_SCREEN_CACHE> {
460 460
     public:
461 461
       static void onRedraw(draw_mode_t);

+ 2
- 2
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp Просмотреть файл

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_TRINAMIC
25
+#if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_TRINAMIC_CONFIG
26 26
 
27 27
 #include "screens.h"
28 28
 
@@ -74,4 +74,4 @@ bool StepperBumpSensitivityScreen::onTouchHeld(uint8_t tag) {
74 74
   return true;
75 75
 }
76 76
 
77
-#endif // TOUCH_UI_FTDI_EVE && HAS_TRINAMIC
77
+#endif // TOUCH_UI_FTDI_EVE && HAS_TRINAMIC_CONFIG

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp Просмотреть файл

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_TRINAMIC
25
+#if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_TRINAMIC_CONFIG
26 26
 
27 27
 #include "screens.h"
28 28
 

+ 2
- 2
Marlin/src/lcd/extensible_ui/ui_api.cpp Просмотреть файл

@@ -75,7 +75,7 @@
75 75
   #define IFSD(A,B) (B)
76 76
 #endif
77 77
 
78
-#if HAS_TRINAMIC
78
+#if HAS_TRINAMIC_CONFIG
79 79
   #include "../../feature/tmc_util.h"
80 80
   #include "../../module/stepper/indirection.h"
81 81
 #endif
@@ -445,7 +445,7 @@ namespace ExtUI {
445 445
     void setSoftEndstopState(const bool value) { soft_endstops_enabled = value; }
446 446
   #endif
447 447
 
448
-  #if HAS_TRINAMIC
448
+  #if HAS_TRINAMIC_CONFIG
449 449
     float getAxisCurrent_mA(const axis_t axis) {
450 450
       switch (axis) {
451 451
         #if AXIS_IS_TMC(X)

+ 1
- 1
Marlin/src/lcd/extensible_ui/ui_api.h Просмотреть файл

@@ -97,7 +97,7 @@ namespace ExtUI {
97 97
     void setSoftEndstopState(const bool);
98 98
   #endif
99 99
 
100
-  #if HAS_TRINAMIC
100
+  #if HAS_TRINAMIC_CONFIG
101 101
     float getAxisCurrent_mA(const axis_t);
102 102
     float getAxisCurrent_mA(const extruder_t);
103 103
     void  setAxisCurrent_mA(const float, const axis_t);

+ 1
- 1
Marlin/src/lcd/menu/menu_advanced.cpp Просмотреть файл

@@ -544,7 +544,7 @@ void menu_advanced_settings() {
544 544
     SUBMENU(MSG_DRIVE_STRENGTH, menu_pwm);
545 545
   #endif
546 546
 
547
-  #if HAS_TRINAMIC
547
+  #if HAS_TRINAMIC_CONFIG
548 548
     SUBMENU(MSG_TMC_DRIVERS, menu_tmc);
549 549
   #endif
550 550
 

+ 2
- 2
Marlin/src/lcd/menu/menu_tmc.cpp Просмотреть файл

@@ -26,7 +26,7 @@
26 26
 
27 27
 #include "../../inc/MarlinConfigPre.h"
28 28
 
29
-#if HAS_TRINAMIC && HAS_LCD_MENU
29
+#if HAS_TRINAMIC_CONFIG && HAS_LCD_MENU
30 30
 
31 31
 #include "menu.h"
32 32
 #include "../../module/stepper/indirection.h"
@@ -249,4 +249,4 @@ void menu_tmc() {
249 249
   END_MENU();
250 250
 }
251 251
 
252
-#endif // HAS_TRINAMIC
252
+#endif // HAS_TRINAMIC_CONFIG

+ 1
- 1
Marlin/src/lcd/ultralcd.cpp Просмотреть файл

@@ -103,7 +103,7 @@ MarlinUI ui;
103 103
   #include "../feature/bedlevel/bedlevel.h"
104 104
 #endif
105 105
 
106
-#if HAS_TRINAMIC
106
+#if HAS_TRINAMIC_CONFIG
107 107
   #include "../feature/tmc_util.h"
108 108
 #endif
109 109
 

+ 8
- 8
Marlin/src/module/configuration_store.cpp Просмотреть файл

@@ -113,7 +113,7 @@
113 113
   #include "../feature/bltouch.h"
114 114
 #endif
115 115
 
116
-#if HAS_TRINAMIC
116
+#if HAS_TRINAMIC_CONFIG
117 117
   #include "stepper/indirection.h"
118 118
   #include "../feature/tmc_util.h"
119 119
 #endif
@@ -313,7 +313,7 @@ typedef struct SettingsDataStruct {
313 313
   float planner_filament_size[EXTRUDERS];               // M200 T D  planner.filament_size[]
314 314
 
315 315
   //
316
-  // HAS_TRINAMIC
316
+  // HAS_TRINAMIC_CONFIG
317 317
   //
318 318
   tmc_stepper_current_t tmc_stepper_current;            // M906 X Y Z X2 Y2 Z2 Z3 Z4 E0 E1 E2 E3 E4 E5
319 319
   tmc_hybrid_threshold_t tmc_hybrid_threshold;          // M913 X Y Z X2 Y2 Z2 Z3 Z4 E0 E1 E2 E3 E4 E5
@@ -985,7 +985,7 @@ void MarlinSettings::postprocess() {
985 985
 
986 986
       tmc_stepper_current_t tmc_stepper_current = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
987 987
 
988
-      #if HAS_TRINAMIC
988
+      #if HAS_TRINAMIC_CONFIG
989 989
         #if AXIS_IS_TMC(X)
990 990
           tmc_stepper_current.X = stepperX.getMilliamps();
991 991
         #endif
@@ -1862,7 +1862,7 @@ void MarlinSettings::postprocess() {
1862 1862
         tmc_stepper_current_t currents;
1863 1863
         EEPROM_READ(currents);
1864 1864
 
1865
-        #if HAS_TRINAMIC
1865
+        #if HAS_TRINAMIC_CONFIG
1866 1866
 
1867 1867
           #define SET_CURR(Q) stepper##Q.rms_current(currents.Q ? currents.Q : Q##_CURRENT)
1868 1868
           if (!validating) {
@@ -2034,7 +2034,7 @@ void MarlinSettings::postprocess() {
2034 2034
         tmc_stealth_enabled_t tmc_stealth_enabled;
2035 2035
         EEPROM_READ(tmc_stealth_enabled);
2036 2036
 
2037
-        #if HAS_TRINAMIC
2037
+        #if HAS_TRINAMIC_CONFIG
2038 2038
 
2039 2039
           #define SET_STEPPING_MODE(ST) stepper##ST.stored.stealthChop_enabled = tmc_stealth_enabled.ST; stepper##ST.refresh_stepping_mode();
2040 2040
           if (!validating) {
@@ -2788,7 +2788,7 @@ void MarlinSettings::reset() {
2788 2788
   #define CONFIG_ECHO_MSG(STR)      do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(STR); }while(0)
2789 2789
   #define CONFIG_ECHO_HEADING(STR)  config_heading(forReplay, PSTR(STR))
2790 2790
 
2791
-  #if HAS_TRINAMIC
2791
+  #if HAS_TRINAMIC_CONFIG
2792 2792
     inline void say_M906(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM("  M906"); }
2793 2793
     #if HAS_STEALTHCHOP
2794 2794
       void say_M569(const bool forReplay, const char * const etc=nullptr, const bool newLine = false) {
@@ -3298,7 +3298,7 @@ void MarlinSettings::reset() {
3298 3298
       #endif
3299 3299
     #endif
3300 3300
 
3301
-    #if HAS_TRINAMIC
3301
+    #if HAS_TRINAMIC_CONFIG
3302 3302
 
3303 3303
       /**
3304 3304
        * TMC stepper driver current
@@ -3599,7 +3599,7 @@ void MarlinSettings::reset() {
3599 3599
 
3600 3600
       #endif // HAS_STEALTHCHOP
3601 3601
 
3602
-    #endif // HAS_TRINAMIC
3602
+    #endif // HAS_TRINAMIC_CONFIG
3603 3603
 
3604 3604
     /**
3605 3605
      * Linear Advance

+ 2
- 2
Marlin/src/module/stepper/indirection.cpp Просмотреть файл

@@ -33,7 +33,7 @@
33 33
 #include "indirection.h"
34 34
 
35 35
 void restore_stepper_drivers() {
36
-  #if HAS_TRINAMIC
36
+  #if HAS_TRINAMIC_CONFIG
37 37
     restore_trinamic_drivers();
38 38
   #endif
39 39
 }
@@ -47,7 +47,7 @@ void reset_stepper_drivers() {
47 47
     L64xxManager.init_to_defaults();
48 48
   #endif
49 49
 
50
-  #if HAS_TRINAMIC
50
+  #if HAS_TRINAMIC_CONFIG
51 51
     reset_trinamic_drivers();
52 52
   #endif
53 53
 }

+ 1
- 1
Marlin/src/module/stepper/indirection.h Просмотреть файл

@@ -40,7 +40,7 @@
40 40
   #include "TMC26X.h"
41 41
 #endif
42 42
 
43
-#if HAS_TRINAMIC
43
+#if HAS_TRINAMIC_CONFIG
44 44
   #include "trinamic.h"
45 45
 #endif
46 46
 

+ 2
- 2
Marlin/src/module/stepper/trinamic.cpp Просмотреть файл

@@ -27,7 +27,7 @@
27 27
 
28 28
 #include "../../inc/MarlinConfig.h"
29 29
 
30
-#if HAS_TRINAMIC
30
+#if HAS_TRINAMIC_CONFIG
31 31
 
32 32
 #include "trinamic.h"
33 33
 #include "../stepper.h"
@@ -818,4 +818,4 @@ void reset_trinamic_drivers() {
818 818
   stepper.set_directions();
819 819
 }
820 820
 
821
-#endif // HAS_TRINAMIC
821
+#endif // HAS_TRINAMIC_CONFIG

+ 1
- 1
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h Просмотреть файл

@@ -103,7 +103,7 @@
103 103
 
104 104
 // Trinamic driver support
105 105
 
106
-#if HAS_TRINAMIC
106
+#if HAS_TRINAMIC_CONFIG
107 107
   // Using TMC devices in intelligent mode requires extra connections to each device. Unfortunately
108 108
   // the SKR does not have many free pins (especially if a display is in use). The SPI-based devices
109 109
   // will require 3 connections (clock, mosi, miso), plus a chip select line (CS) for each driver.

Загрузка…
Отмена
Сохранить