diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index ede35a561..261ef90ad 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2015,7 +2015,7 @@ * TMCStepper library is required to use TMC stepper drivers. * https://github.com/teemuatlut/TMCStepper */ -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 @@ -2345,7 +2345,7 @@ */ #define TMC_ADV() { } -#endif // HAS_TRINAMIC +#endif // HAS_TRINAMIC_CONFIG // @section L64XX diff --git a/Marlin/src/HAL/HAL_AVR/inc/SanityCheck.h b/Marlin/src/HAL/HAL_AVR/inc/SanityCheck.h index 87864bcaf..1c7c68f21 100644 --- a/Marlin/src/HAL/HAL_AVR/inc/SanityCheck.h +++ b/Marlin/src/HAL/HAL_AVR/inc/SanityCheck.h @@ -56,7 +56,7 @@ /** * The Trinamic library includes SoftwareSerial.h, leading to a compile error. */ -#if HAS_TRINAMIC && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) +#if HAS_TRINAMIC_CONFIG && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) #error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 124fb6f03..a8bff9a79 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -110,7 +110,7 @@ #include "feature/I2CPositionEncoder.h" #endif -#if HAS_TRINAMIC && DISABLED(PSU_DEFAULT_OFF) +#if HAS_TRINAMIC_CONFIG && DISABLED(PSU_DEFAULT_OFF) #include "feature/tmc_util.h" #endif @@ -1162,7 +1162,7 @@ void setup() { host_action_prompt_end(); #endif - #if HAS_TRINAMIC && DISABLED(PSU_DEFAULT_OFF) + #if HAS_TRINAMIC_CONFIG && DISABLED(PSU_DEFAULT_OFF) test_tmc_connection(true, true, true, true); #endif diff --git a/Marlin/src/core/drivers.h b/Marlin/src/core/drivers.h index 306329d6f..9ffedd911 100644 --- a/Marlin/src/core/drivers.h +++ b/Marlin/src/core/drivers.h @@ -90,13 +90,13 @@ // Test for supported TMC drivers that require advanced configuration // Does not match standalone configurations -#define HAS_TRINAMIC ( HAS_DRIVER(TMC2130) \ - || HAS_DRIVER(TMC2160) \ - || HAS_DRIVER(TMC2208) \ - || HAS_DRIVER(TMC2209) \ - || HAS_DRIVER(TMC2660) \ - || HAS_DRIVER(TMC5130) \ - || HAS_DRIVER(TMC5160) ) +#define HAS_TRINAMIC_CONFIG ( HAS_DRIVER(TMC2130) \ + || HAS_DRIVER(TMC2160) \ + || HAS_DRIVER(TMC2208) \ + || HAS_DRIVER(TMC2209) \ + || HAS_DRIVER(TMC2660) \ + || HAS_DRIVER(TMC5130) \ + || HAS_DRIVER(TMC5160) ) #define HAS_TRINAMIC_STANDALONE ( HAS_DRIVER(TMC2130_STANDALONE) \ || HAS_DRIVER(TMC2208_STANDALONE) \ diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index f1979c376..cf18e2130 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -108,7 +108,7 @@ void Power::power_on() { if (!powersupply_on) { PSU_PIN_ON(); - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG delay(PSU_POWERUP_DELAY); // Wait for power to settle restore_stepper_drivers(); #endif diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index a2723fd39..e5e69eed5 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -22,7 +22,7 @@ #include "../inc/MarlinConfig.h" -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG #include "tmc_util.h" #include "../MarlinCore.h" @@ -954,7 +954,7 @@ static void tmc_get_ic_registers(TMC2208Stepper, const TMC_get_registers_enum) { SERIAL_CHAR('\t'); } #endif - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG template static void tmc_get_registers(TMC &st, const TMC_get_registers_enum i) { switch (i) { @@ -1257,4 +1257,4 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z if (axis_connection) ui.set_status_P(GET_TEXT(MSG_ERROR_TMC)); } -#endif // HAS_TRINAMIC +#endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h index 5102a9d5b..ccae8b660 100644 --- a/Marlin/src/feature/tmc_util.h +++ b/Marlin/src/feature/tmc_util.h @@ -24,7 +24,7 @@ #include "../inc/MarlinConfig.h" #include "../lcd/ultralcd.h" -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG #include #include "../module/planner.h" @@ -400,4 +400,4 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z void tmc_init_cs_pins(); #endif -#endif // HAS_TRINAMIC +#endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/gcode/control/M80_M81.cpp b/Marlin/src/gcode/control/M80_M81.cpp index f9c40a20a..e8d9aa2fd 100644 --- a/Marlin/src/gcode/control/M80_M81.cpp +++ b/Marlin/src/gcode/control/M80_M81.cpp @@ -44,7 +44,7 @@ // Could be moved to a feature, but this is all the data bool powersupply_on; - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG #include "../../feature/tmc_util.h" #endif diff --git a/Marlin/src/gcode/feature/trinamic/M122.cpp b/Marlin/src/gcode/feature/trinamic/M122.cpp index bba6e7e75..0eb93a800 100644 --- a/Marlin/src/gcode/feature/trinamic/M122.cpp +++ b/Marlin/src/gcode/feature/trinamic/M122.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfig.h" -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG #include "../../gcode.h" #include "../../../feature/tmc_util.h" @@ -53,4 +53,4 @@ void GcodeSuite::M122() { test_tmc_connection(print_axis.x, print_axis.y, print_axis.z, print_axis.e); } -#endif // HAS_TRINAMIC +#endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/gcode/feature/trinamic/M906.cpp b/Marlin/src/gcode/feature/trinamic/M906.cpp index bb2659913..95ad310ed 100644 --- a/Marlin/src/gcode/feature/trinamic/M906.cpp +++ b/Marlin/src/gcode/feature/trinamic/M906.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfig.h" -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG #include "../../gcode.h" #include "../../../feature/tmc_util.h" @@ -170,4 +170,4 @@ void GcodeSuite::M906() { } } -#endif // HAS_TRINAMIC +#endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp index 4629bccab..582e779cc 100644 --- a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp +++ b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfig.h" -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG #include "../../gcode.h" #include "../../../feature/tmc_util.h" @@ -426,4 +426,4 @@ } #endif // USE_SENSORLESS -#endif // HAS_TRINAMIC +#endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index f6b8e6f59..f5df73763 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -785,7 +785,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { #endif #endif - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG case 122: M122(); break; // M122: Report driver configuration and status case 906: M906(); break; // M906: Set motor current in milliamps using axis codes X, Y, Z, E #if HAS_STEALTHCHOP diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index c44c17081..0fb4a4e8e 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -912,7 +912,7 @@ private: static void M900(); #endif - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG static void M122(); static void M906(); #if HAS_STEALTHCHOP diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index b042c5e96..155258be4 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -196,7 +196,7 @@ #define MINIMUM_STEPPER_POST_DIR_DELAY 400 #elif HAS_DRIVER(A4988) #define MINIMUM_STEPPER_POST_DIR_DELAY 200 - #elif HAS_TRINAMIC || HAS_TRINAMIC_STANDALONE + #elif HAS_TRINAMIC_CONFIG || HAS_TRINAMIC_STANDALONE #define MINIMUM_STEPPER_POST_DIR_DELAY 20 #else #define MINIMUM_STEPPER_POST_DIR_DELAY 0 // Expect at least 10µS since one Stepper ISR must transpire @@ -216,7 +216,7 @@ #define MINIMUM_STEPPER_PULSE 2 #elif HAS_DRIVER(A4988) || HAS_DRIVER(A5984) #define MINIMUM_STEPPER_PULSE 1 - #elif HAS_TRINAMIC || HAS_TRINAMIC_STANDALONE + #elif HAS_TRINAMIC_CONFIG || HAS_TRINAMIC_STANDALONE #define MINIMUM_STEPPER_PULSE 0 #elif HAS_DRIVER(LV8729) #define MINIMUM_STEPPER_PULSE 0 @@ -236,7 +236,7 @@ #define MAXIMUM_STEPPER_RATE 500000 #elif HAS_DRIVER(LV8729) #define MAXIMUM_STEPPER_RATE 1000000 - #elif HAS_TRINAMIC || HAS_TRINAMIC_STANDALONE + #elif HAS_TRINAMIC_CONFIG || HAS_TRINAMIC_STANDALONE #define MAXIMUM_STEPPER_RATE 5000000 #else #define MAXIMUM_STEPPER_RATE 250000 diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index d40e92869..32243afc3 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -1290,7 +1290,7 @@ #define HAS_SOLENOID_7 (PIN_EXISTS(SOL7)) // Trinamic Stepper Drivers -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG #define STEALTHCHOP_ENABLED ANY(STEALTHCHOP_XY, STEALTHCHOP_Z, STEALTHCHOP_E) #define USE_SENSORLESS EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) // Disable Z axis sensorless homing if a probe is used to home the Z axis diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp index 103dcc036..602938283 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp +++ b/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) { .tag(16).button( BTN_POS(1,6), BTN_SIZE(1,1), GET_TEXT_F(MSG_CASE_LIGHT)) .tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM)) .enabled( - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG 1 #endif ) .tag(13).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT)) .enabled( - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG 1 #endif ) @@ -120,13 +120,13 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { .enabled(1) .tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM)) .enabled( - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG 1 #endif ) .tag(13).button( BTN_POS(3,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT)) .enabled( - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG 1 #endif ) @@ -189,7 +189,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { case 11: GOTO_SCREEN(FilamentMenu); break; #endif case 12: GOTO_SCREEN(EndstopStatesScreen); break; - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG case 13: GOTO_SCREEN(StepperCurrentScreen); break; case 14: GOTO_SCREEN(StepperBumpSensitivityScreen); break; #endif diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp index 0c53dca61..6c9f74f93 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp +++ b/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) { .tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISPLAY_MENU)) .enabled( - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG 1 #endif ) .tag(3) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT)) .enabled( - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG 1 #endif ) @@ -100,7 +100,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; case 2: GOTO_SCREEN(DisplayTuningScreen); break; - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG case 3: GOTO_SCREEN(StepperCurrentScreen); break; case 4: GOTO_SCREEN(StepperBumpSensitivityScreen); break; #endif diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.cpp index bc9280005..69c1cf142 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.cpp @@ -58,7 +58,7 @@ SCREEN_TABLE { #endif DECL_SCREEN(MoveAxisScreen), DECL_SCREEN(StepsScreen), -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG DECL_SCREEN(StepperCurrentScreen), DECL_SCREEN(StepperBumpSensitivityScreen), #endif diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h index 176c8145e..02c5b1483 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h @@ -455,7 +455,7 @@ class StepsScreen : public BaseNumericAdjustmentScreen, public CachedScreen { public: static void onRedraw(draw_mode_t); diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp index 9aa28aff3..2e05ad5c5 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp @@ -22,7 +22,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_TRINAMIC +#if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_TRINAMIC_CONFIG #include "screens.h" @@ -74,4 +74,4 @@ bool StepperBumpSensitivityScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE && HAS_TRINAMIC +#endif // TOUCH_UI_FTDI_EVE && HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp index acc94684e..5abcea7a6 100644 --- a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp @@ -22,7 +22,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_TRINAMIC +#if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_TRINAMIC_CONFIG #include "screens.h" diff --git a/Marlin/src/lcd/extensible_ui/ui_api.cpp b/Marlin/src/lcd/extensible_ui/ui_api.cpp index 7ef7614b8..759d290af 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.cpp +++ b/Marlin/src/lcd/extensible_ui/ui_api.cpp @@ -75,7 +75,7 @@ #define IFSD(A,B) (B) #endif -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG #include "../../feature/tmc_util.h" #include "../../module/stepper/indirection.h" #endif @@ -445,7 +445,7 @@ namespace ExtUI { void setSoftEndstopState(const bool value) { soft_endstops_enabled = value; } #endif - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG float getAxisCurrent_mA(const axis_t axis) { switch (axis) { #if AXIS_IS_TMC(X) diff --git a/Marlin/src/lcd/extensible_ui/ui_api.h b/Marlin/src/lcd/extensible_ui/ui_api.h index 10df2bc72..61fecaed4 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.h +++ b/Marlin/src/lcd/extensible_ui/ui_api.h @@ -97,7 +97,7 @@ namespace ExtUI { void setSoftEndstopState(const bool); #endif - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG float getAxisCurrent_mA(const axis_t); float getAxisCurrent_mA(const extruder_t); void setAxisCurrent_mA(const float, const axis_t); diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 03bcedb73..2a53f9490 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -544,7 +544,7 @@ void menu_advanced_settings() { SUBMENU(MSG_DRIVE_STRENGTH, menu_pwm); #endif - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG SUBMENU(MSG_TMC_DRIVERS, menu_tmc); #endif diff --git a/Marlin/src/lcd/menu/menu_tmc.cpp b/Marlin/src/lcd/menu/menu_tmc.cpp index 0350d788e..296a132e1 100644 --- a/Marlin/src/lcd/menu/menu_tmc.cpp +++ b/Marlin/src/lcd/menu/menu_tmc.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if HAS_TRINAMIC && HAS_LCD_MENU +#if HAS_TRINAMIC_CONFIG && HAS_LCD_MENU #include "menu.h" #include "../../module/stepper/indirection.h" @@ -249,4 +249,4 @@ void menu_tmc() { END_MENU(); } -#endif // HAS_TRINAMIC +#endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 87d061c90..47cd8df80 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -103,7 +103,7 @@ MarlinUI ui; #include "../feature/bedlevel/bedlevel.h" #endif -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG #include "../feature/tmc_util.h" #endif diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index 3fe38d4ad..346fd64de 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -113,7 +113,7 @@ #include "../feature/bltouch.h" #endif -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG #include "stepper/indirection.h" #include "../feature/tmc_util.h" #endif @@ -313,7 +313,7 @@ typedef struct SettingsDataStruct { float planner_filament_size[EXTRUDERS]; // M200 T D planner.filament_size[] // - // HAS_TRINAMIC + // HAS_TRINAMIC_CONFIG // tmc_stepper_current_t tmc_stepper_current; // M906 X Y Z X2 Y2 Z2 Z3 Z4 E0 E1 E2 E3 E4 E5 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() { tmc_stepper_current_t tmc_stepper_current = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG #if AXIS_IS_TMC(X) tmc_stepper_current.X = stepperX.getMilliamps(); #endif @@ -1862,7 +1862,7 @@ void MarlinSettings::postprocess() { tmc_stepper_current_t currents; EEPROM_READ(currents); - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG #define SET_CURR(Q) stepper##Q.rms_current(currents.Q ? currents.Q : Q##_CURRENT) if (!validating) { @@ -2034,7 +2034,7 @@ void MarlinSettings::postprocess() { tmc_stealth_enabled_t tmc_stealth_enabled; EEPROM_READ(tmc_stealth_enabled); - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG #define SET_STEPPING_MODE(ST) stepper##ST.stored.stealthChop_enabled = tmc_stealth_enabled.ST; stepper##ST.refresh_stepping_mode(); if (!validating) { @@ -2788,7 +2788,7 @@ void MarlinSettings::reset() { #define CONFIG_ECHO_MSG(STR) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(STR); }while(0) #define CONFIG_ECHO_HEADING(STR) config_heading(forReplay, PSTR(STR)) - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG inline void say_M906(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M906"); } #if HAS_STEALTHCHOP void say_M569(const bool forReplay, const char * const etc=nullptr, const bool newLine = false) { @@ -3298,7 +3298,7 @@ void MarlinSettings::reset() { #endif #endif - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG /** * TMC stepper driver current @@ -3599,7 +3599,7 @@ void MarlinSettings::reset() { #endif // HAS_STEALTHCHOP - #endif // HAS_TRINAMIC + #endif // HAS_TRINAMIC_CONFIG /** * Linear Advance diff --git a/Marlin/src/module/stepper/indirection.cpp b/Marlin/src/module/stepper/indirection.cpp index d468a2afd..2ddbfe62e 100644 --- a/Marlin/src/module/stepper/indirection.cpp +++ b/Marlin/src/module/stepper/indirection.cpp @@ -33,7 +33,7 @@ #include "indirection.h" void restore_stepper_drivers() { - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG restore_trinamic_drivers(); #endif } @@ -47,7 +47,7 @@ void reset_stepper_drivers() { L64xxManager.init_to_defaults(); #endif - #if HAS_TRINAMIC + #if HAS_TRINAMIC_CONFIG reset_trinamic_drivers(); #endif } diff --git a/Marlin/src/module/stepper/indirection.h b/Marlin/src/module/stepper/indirection.h index 295c3aca2..99a224c72 100644 --- a/Marlin/src/module/stepper/indirection.h +++ b/Marlin/src/module/stepper/indirection.h @@ -40,7 +40,7 @@ #include "TMC26X.h" #endif -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG #include "trinamic.h" #endif diff --git a/Marlin/src/module/stepper/trinamic.cpp b/Marlin/src/module/stepper/trinamic.cpp index 0b14aaf64..14598f9c7 100644 --- a/Marlin/src/module/stepper/trinamic.cpp +++ b/Marlin/src/module/stepper/trinamic.cpp @@ -27,7 +27,7 @@ #include "../../inc/MarlinConfig.h" -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG #include "trinamic.h" #include "../stepper.h" @@ -818,4 +818,4 @@ void reset_trinamic_drivers() { stepper.set_directions(); } -#endif // HAS_TRINAMIC +#endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h index 15b634940..104f40fdf 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -103,7 +103,7 @@ // Trinamic driver support -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG // Using TMC devices in intelligent mode requires extra connections to each device. Unfortunately // the SKR does not have many free pins (especially if a display is in use). The SPI-based devices // will require 3 connections (clock, mosi, miso), plus a chip select line (CS) for each driver.