diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index ede35a561e08bdfc3563576c6af20e4808a28f9a..261ef90ad677ec79b56901cfb08fae253e8dfc65 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 87864bcaf67b39864884f0b381c40ecdfa084953..1c7c68f2169c2a1fb5904bf0763b3535df703554 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 124fb6f038fcced74080c57bf692f29b1954b61e..a8bff9a7907d319e49a3c90c578cab715fbde0e2 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 306329d6fe988269627cf8bf76e430485d6b6eee..9ffedd9111e64e85a2bb698d8bfb0dd317681c86 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 f1979c376192a4c16a644f38a6be044be973a7e9..cf18e2130c7c871061d26c794adb9e58d7e4e95c 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 a2723fd3935b1856eed0a8dddf72cd0fd1fcbcfe..e5e69eed50b36f47db39cb8b8c5833a3be73a5af 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<class TMC> 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 5102a9d5bfa0774b0441e1c4afad7424874ec03c..ccae8b660ca4abee6dbfd5ebc332d8d4abf633f1 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 <TMCStepper.h> #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 f9c40a20a9cef506baf2b961ff93aaf932c4e69d..e8d9aa2fdf0c2240f53f7cb4f680f3551512f693 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 bba6e7e752aa7b0ab7b37004a1f0e47f315b8186..0eb93a8006d7aece44f1395f0d9db67a10454f73 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 bb2659913ac712c33f75492d3d64f711d869e11b..95ad310ed0e0ff62a8e68d144c9c3c5e81541164 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 4629bccab0cfda26f8ed41f6ef7f152a100f9491..582e779cc2d6674690fd575477c0bd1fa1f5d9f0 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 f6b8e6f59ba5a187f7f23496e8c2acbf58d0e715..f5df73763069fe6899d6e39c7091b2050bd08536 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 c44c1708113172cc2364f93d3f6229de1e65ea7e..0fb4a4e8ed8e96641455aaf402dd4e32d9c707e2 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 b042c5e96e3ea1af12c4e0a8bee17d496dc6e960..155258be43449a189049beb9ef97815bfa871be4 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 d40e92869318c011ccced5d45912d91a1556a7a5..32243afc3754715d33857e1f92e85d374d8316df 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 103dcc03648135cab40acd2b078d7797ffbe6461..6029382838e645a35b56e96fa536ef4e7faeac4c 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 0c53dca61b4e1ebd8da9e5d978b7e44dde88024e..6c9f74f93f09463f40ca43a177ff228cd8f8c86a 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 bc928000540013b83b88d4d45dab2bb6e3ea15ee..69c1cf1420b7c8dfc55a10ba9d65c8c015fdc1e2 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 176c8145e34ea42799d70cf56bc40adad345599b..02c5b148310d71e5984614908cb831c9c7b1a941 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<STEP static bool onTouchHeld(uint8_t tag); }; -#if HAS_TRINAMIC +#if HAS_TRINAMIC_CONFIG class StepperCurrentScreen : public BaseNumericAdjustmentScreen, public CachedScreen<STEPPER_CURRENT_SCREEN_CACHE> { 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 9aa28aff39d846c34c8b2ab3df74fe97c546fb14..2e05ad5c57282e844aceccbc53bb639fe48293df 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 acc94684e09673b6693ac3667df5134a3b0ef08a..5abcea7a674851fd8c438ea661fd8f8159589ec3 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 7ef7614b8df8ab4597cf78d59db051ec41c9ada3..759d290af6f0b96c879d3945231881a3acfbff32 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 10df2bc72d99833e7b2c39cfad3dd1e0b19dddff..61fecaed46a8c148097241a3ddd787176fc6242c 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 03bcedb7305a918edd38017dbc28f1d53d3afbc6..2a53f9490eec421bc1dfcae7674dcccbfe9daee8 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 0350d788eb15d6b626db5fefc130b10435506d00..296a132e149a34d55a2f19c26c1a5d517886402c 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 87d061c908b395e5bfd749b345c1563b7abd7f84..47cd8df80ef612b9a75328fcf2a0eb077938652e 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 3fe38d4ade8f55e0c37fbf25616e4b36762cd510..346fd64de36123bb956072406c92f72fbc1d10aa 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 d468a2afdd622155146cbd07e50f7a6bf18a03da..2ddbfe62e390ad2e71102c9a14948e5b0a71987f 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 295c3aca2e90ccc995ed9489f242aafa56e80889..99a224c7276c75d3509240948500823e1ccb3ab8 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 0b14aaf64779bc7eb77e5c302edb827f3e4c712b..14598f9c73dc42527f35266561cc1c8ea6d4d194 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 15b63494094bb23ccba12679d452d5d2e3bc2250..104f40fdf16ce6a8fa3ba047c46105d852933cd9 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.