HAS_TRINAMIC => HAS_TRINAMIC_CONFIG

This commit is contained in:
Scott Lahteine 2020-03-02 12:03:43 -06:00
parent 736521a3f1
commit b1a50d54e2
31 changed files with 65 additions and 65 deletions

View file

@ -2015,7 +2015,7 @@
* TMCStepper library is required to use TMC stepper drivers. * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper * 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 HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
@ -2345,7 +2345,7 @@
*/ */
#define TMC_ADV() { } #define TMC_ADV() { }
#endif // HAS_TRINAMIC #endif // HAS_TRINAMIC_CONFIG
// @section L64XX // @section L64XX

View file

@ -56,7 +56,7 @@
/** /**
* The Trinamic library includes SoftwareSerial.h, leading to a compile error. * 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." #error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
#endif #endif

View file

@ -110,7 +110,7 @@
#include "feature/I2CPositionEncoder.h" #include "feature/I2CPositionEncoder.h"
#endif #endif
#if HAS_TRINAMIC && DISABLED(PSU_DEFAULT_OFF) #if HAS_TRINAMIC_CONFIG && DISABLED(PSU_DEFAULT_OFF)
#include "feature/tmc_util.h" #include "feature/tmc_util.h"
#endif #endif
@ -1162,7 +1162,7 @@ void setup() {
host_action_prompt_end(); host_action_prompt_end();
#endif #endif
#if HAS_TRINAMIC && DISABLED(PSU_DEFAULT_OFF) #if HAS_TRINAMIC_CONFIG && DISABLED(PSU_DEFAULT_OFF)
test_tmc_connection(true, true, true, true); test_tmc_connection(true, true, true, true);
#endif #endif

View file

@ -90,13 +90,13 @@
// Test for supported TMC drivers that require advanced configuration // Test for supported TMC drivers that require advanced configuration
// Does not match standalone configurations // Does not match standalone configurations
#define HAS_TRINAMIC ( HAS_DRIVER(TMC2130) \ #define HAS_TRINAMIC_CONFIG ( HAS_DRIVER(TMC2130) \
|| HAS_DRIVER(TMC2160) \ || HAS_DRIVER(TMC2160) \
|| HAS_DRIVER(TMC2208) \ || HAS_DRIVER(TMC2208) \
|| HAS_DRIVER(TMC2209) \ || HAS_DRIVER(TMC2209) \
|| HAS_DRIVER(TMC2660) \ || HAS_DRIVER(TMC2660) \
|| HAS_DRIVER(TMC5130) \ || HAS_DRIVER(TMC5130) \
|| HAS_DRIVER(TMC5160) ) || HAS_DRIVER(TMC5160) )
#define HAS_TRINAMIC_STANDALONE ( HAS_DRIVER(TMC2130_STANDALONE) \ #define HAS_TRINAMIC_STANDALONE ( HAS_DRIVER(TMC2130_STANDALONE) \
|| HAS_DRIVER(TMC2208_STANDALONE) \ || HAS_DRIVER(TMC2208_STANDALONE) \

View file

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

View file

@ -22,7 +22,7 @@
#include "../inc/MarlinConfig.h" #include "../inc/MarlinConfig.h"
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
#include "tmc_util.h" #include "tmc_util.h"
#include "../MarlinCore.h" #include "../MarlinCore.h"
@ -954,7 +954,7 @@
static void tmc_get_ic_registers(TMC2208Stepper, const TMC_get_registers_enum) { SERIAL_CHAR('\t'); } static void tmc_get_ic_registers(TMC2208Stepper, const TMC_get_registers_enum) { SERIAL_CHAR('\t'); }
#endif #endif
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
template<class TMC> template<class TMC>
static void tmc_get_registers(TMC &st, const TMC_get_registers_enum i) { static void tmc_get_registers(TMC &st, const TMC_get_registers_enum i) {
switch (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)); if (axis_connection) ui.set_status_P(GET_TEXT(MSG_ERROR_TMC));
} }
#endif // HAS_TRINAMIC #endif // HAS_TRINAMIC_CONFIG

View file

@ -24,7 +24,7 @@
#include "../inc/MarlinConfig.h" #include "../inc/MarlinConfig.h"
#include "../lcd/ultralcd.h" #include "../lcd/ultralcd.h"
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
#include <TMCStepper.h> #include <TMCStepper.h>
#include "../module/planner.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(); void tmc_init_cs_pins();
#endif #endif
#endif // HAS_TRINAMIC #endif // HAS_TRINAMIC_CONFIG

View file

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

View file

@ -22,7 +22,7 @@
#include "../../../inc/MarlinConfig.h" #include "../../../inc/MarlinConfig.h"
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
#include "../../gcode.h" #include "../../gcode.h"
#include "../../../feature/tmc_util.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); test_tmc_connection(print_axis.x, print_axis.y, print_axis.z, print_axis.e);
} }
#endif // HAS_TRINAMIC #endif // HAS_TRINAMIC_CONFIG

View file

@ -22,7 +22,7 @@
#include "../../../inc/MarlinConfig.h" #include "../../../inc/MarlinConfig.h"
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
#include "../../gcode.h" #include "../../gcode.h"
#include "../../../feature/tmc_util.h" #include "../../../feature/tmc_util.h"
@ -170,4 +170,4 @@ void GcodeSuite::M906() {
} }
} }
#endif // HAS_TRINAMIC #endif // HAS_TRINAMIC_CONFIG

View file

@ -22,7 +22,7 @@
#include "../../../inc/MarlinConfig.h" #include "../../../inc/MarlinConfig.h"
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
#include "../../gcode.h" #include "../../gcode.h"
#include "../../../feature/tmc_util.h" #include "../../../feature/tmc_util.h"
@ -426,4 +426,4 @@
} }
#endif // USE_SENSORLESS #endif // USE_SENSORLESS
#endif // HAS_TRINAMIC #endif // HAS_TRINAMIC_CONFIG

View file

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

View file

@ -912,7 +912,7 @@ private:
static void M900(); static void M900();
#endif #endif
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
static void M122(); static void M122();
static void M906(); static void M906();
#if HAS_STEALTHCHOP #if HAS_STEALTHCHOP

View file

@ -196,7 +196,7 @@
#define MINIMUM_STEPPER_POST_DIR_DELAY 400 #define MINIMUM_STEPPER_POST_DIR_DELAY 400
#elif HAS_DRIVER(A4988) #elif HAS_DRIVER(A4988)
#define MINIMUM_STEPPER_POST_DIR_DELAY 200 #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 #define MINIMUM_STEPPER_POST_DIR_DELAY 20
#else #else
#define MINIMUM_STEPPER_POST_DIR_DELAY 0 // Expect at least 10µS since one Stepper ISR must transpire #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 #define MINIMUM_STEPPER_PULSE 2
#elif HAS_DRIVER(A4988) || HAS_DRIVER(A5984) #elif HAS_DRIVER(A4988) || HAS_DRIVER(A5984)
#define MINIMUM_STEPPER_PULSE 1 #define MINIMUM_STEPPER_PULSE 1
#elif HAS_TRINAMIC || HAS_TRINAMIC_STANDALONE #elif HAS_TRINAMIC_CONFIG || HAS_TRINAMIC_STANDALONE
#define MINIMUM_STEPPER_PULSE 0 #define MINIMUM_STEPPER_PULSE 0
#elif HAS_DRIVER(LV8729) #elif HAS_DRIVER(LV8729)
#define MINIMUM_STEPPER_PULSE 0 #define MINIMUM_STEPPER_PULSE 0
@ -236,7 +236,7 @@
#define MAXIMUM_STEPPER_RATE 500000 #define MAXIMUM_STEPPER_RATE 500000
#elif HAS_DRIVER(LV8729) #elif HAS_DRIVER(LV8729)
#define MAXIMUM_STEPPER_RATE 1000000 #define MAXIMUM_STEPPER_RATE 1000000
#elif HAS_TRINAMIC || HAS_TRINAMIC_STANDALONE #elif HAS_TRINAMIC_CONFIG || HAS_TRINAMIC_STANDALONE
#define MAXIMUM_STEPPER_RATE 5000000 #define MAXIMUM_STEPPER_RATE 5000000
#else #else
#define MAXIMUM_STEPPER_RATE 250000 #define MAXIMUM_STEPPER_RATE 250000

View file

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

View file

@ -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(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)) .tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM))
.enabled( .enabled(
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
1 1
#endif #endif
) )
.tag(13).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT)) .tag(13).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT))
.enabled( .enabled(
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
1 1
#endif #endif
) )
@ -120,13 +120,13 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
.enabled(1) .enabled(1)
.tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM)) .tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM))
.enabled( .enabled(
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
1 1
#endif #endif
) )
.tag(13).button( BTN_POS(3,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT)) .tag(13).button( BTN_POS(3,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT))
.enabled( .enabled(
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
1 1
#endif #endif
) )
@ -189,7 +189,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
case 11: GOTO_SCREEN(FilamentMenu); break; case 11: GOTO_SCREEN(FilamentMenu); break;
#endif #endif
case 12: GOTO_SCREEN(EndstopStatesScreen); break; case 12: GOTO_SCREEN(EndstopStatesScreen); break;
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
case 13: GOTO_SCREEN(StepperCurrentScreen); break; case 13: GOTO_SCREEN(StepperCurrentScreen); break;
case 14: GOTO_SCREEN(StepperBumpSensitivityScreen); break; case 14: GOTO_SCREEN(StepperBumpSensitivityScreen); break;
#endif #endif

View file

@ -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)) .tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISPLAY_MENU))
.enabled( .enabled(
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
1 1
#endif #endif
) )
.tag(3) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT)) .tag(3) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT))
.enabled( .enabled(
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
1 1
#endif #endif
) )
@ -100,7 +100,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
switch (tag) { switch (tag) {
case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; case 1: SaveSettingsDialogBox::promptToSaveSettings(); break;
case 2: GOTO_SCREEN(DisplayTuningScreen); break; case 2: GOTO_SCREEN(DisplayTuningScreen); break;
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
case 3: GOTO_SCREEN(StepperCurrentScreen); break; case 3: GOTO_SCREEN(StepperCurrentScreen); break;
case 4: GOTO_SCREEN(StepperBumpSensitivityScreen); break; case 4: GOTO_SCREEN(StepperBumpSensitivityScreen); break;
#endif #endif

View file

@ -58,7 +58,7 @@ SCREEN_TABLE {
#endif #endif
DECL_SCREEN(MoveAxisScreen), DECL_SCREEN(MoveAxisScreen),
DECL_SCREEN(StepsScreen), DECL_SCREEN(StepsScreen),
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
DECL_SCREEN(StepperCurrentScreen), DECL_SCREEN(StepperCurrentScreen),
DECL_SCREEN(StepperBumpSensitivityScreen), DECL_SCREEN(StepperBumpSensitivityScreen),
#endif #endif

View file

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

View file

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

View file

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_TRINAMIC #if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_TRINAMIC_CONFIG
#include "screens.h" #include "screens.h"

View file

@ -75,7 +75,7 @@
#define IFSD(A,B) (B) #define IFSD(A,B) (B)
#endif #endif
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
#include "../../feature/tmc_util.h" #include "../../feature/tmc_util.h"
#include "../../module/stepper/indirection.h" #include "../../module/stepper/indirection.h"
#endif #endif
@ -445,7 +445,7 @@ namespace ExtUI {
void setSoftEndstopState(const bool value) { soft_endstops_enabled = value; } void setSoftEndstopState(const bool value) { soft_endstops_enabled = value; }
#endif #endif
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
float getAxisCurrent_mA(const axis_t axis) { float getAxisCurrent_mA(const axis_t axis) {
switch (axis) { switch (axis) {
#if AXIS_IS_TMC(X) #if AXIS_IS_TMC(X)

View file

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

View file

@ -544,7 +544,7 @@ void menu_advanced_settings() {
SUBMENU(MSG_DRIVE_STRENGTH, menu_pwm); SUBMENU(MSG_DRIVE_STRENGTH, menu_pwm);
#endif #endif
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
SUBMENU(MSG_TMC_DRIVERS, menu_tmc); SUBMENU(MSG_TMC_DRIVERS, menu_tmc);
#endif #endif

View file

@ -26,7 +26,7 @@
#include "../../inc/MarlinConfigPre.h" #include "../../inc/MarlinConfigPre.h"
#if HAS_TRINAMIC && HAS_LCD_MENU #if HAS_TRINAMIC_CONFIG && HAS_LCD_MENU
#include "menu.h" #include "menu.h"
#include "../../module/stepper/indirection.h" #include "../../module/stepper/indirection.h"
@ -249,4 +249,4 @@ void menu_tmc() {
END_MENU(); END_MENU();
} }
#endif // HAS_TRINAMIC #endif // HAS_TRINAMIC_CONFIG

View file

@ -103,7 +103,7 @@ MarlinUI ui;
#include "../feature/bedlevel/bedlevel.h" #include "../feature/bedlevel/bedlevel.h"
#endif #endif
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
#include "../feature/tmc_util.h" #include "../feature/tmc_util.h"
#endif #endif

View file

@ -113,7 +113,7 @@
#include "../feature/bltouch.h" #include "../feature/bltouch.h"
#endif #endif
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
#include "stepper/indirection.h" #include "stepper/indirection.h"
#include "../feature/tmc_util.h" #include "../feature/tmc_util.h"
#endif #endif
@ -313,7 +313,7 @@ typedef struct SettingsDataStruct {
float planner_filament_size[EXTRUDERS]; // M200 T D planner.filament_size[] 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_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 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 }; 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) #if AXIS_IS_TMC(X)
tmc_stepper_current.X = stepperX.getMilliamps(); tmc_stepper_current.X = stepperX.getMilliamps();
#endif #endif
@ -1862,7 +1862,7 @@ void MarlinSettings::postprocess() {
tmc_stepper_current_t currents; tmc_stepper_current_t currents;
EEPROM_READ(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) #define SET_CURR(Q) stepper##Q.rms_current(currents.Q ? currents.Q : Q##_CURRENT)
if (!validating) { if (!validating) {
@ -2034,7 +2034,7 @@ void MarlinSettings::postprocess() {
tmc_stealth_enabled_t tmc_stealth_enabled; tmc_stealth_enabled_t tmc_stealth_enabled;
EEPROM_READ(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(); #define SET_STEPPING_MODE(ST) stepper##ST.stored.stealthChop_enabled = tmc_stealth_enabled.ST; stepper##ST.refresh_stepping_mode();
if (!validating) { 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_MSG(STR) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(STR); }while(0)
#define CONFIG_ECHO_HEADING(STR) config_heading(forReplay, PSTR(STR)) #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"); } inline void say_M906(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M906"); }
#if HAS_STEALTHCHOP #if HAS_STEALTHCHOP
void say_M569(const bool forReplay, const char * const etc=nullptr, const bool newLine = false) { void say_M569(const bool forReplay, const char * const etc=nullptr, const bool newLine = false) {
@ -3298,7 +3298,7 @@ void MarlinSettings::reset() {
#endif #endif
#endif #endif
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
/** /**
* TMC stepper driver current * TMC stepper driver current
@ -3599,7 +3599,7 @@ void MarlinSettings::reset() {
#endif // HAS_STEALTHCHOP #endif // HAS_STEALTHCHOP
#endif // HAS_TRINAMIC #endif // HAS_TRINAMIC_CONFIG
/** /**
* Linear Advance * Linear Advance

View file

@ -33,7 +33,7 @@
#include "indirection.h" #include "indirection.h"
void restore_stepper_drivers() { void restore_stepper_drivers() {
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
restore_trinamic_drivers(); restore_trinamic_drivers();
#endif #endif
} }
@ -47,7 +47,7 @@ void reset_stepper_drivers() {
L64xxManager.init_to_defaults(); L64xxManager.init_to_defaults();
#endif #endif
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
reset_trinamic_drivers(); reset_trinamic_drivers();
#endif #endif
} }

View file

@ -40,7 +40,7 @@
#include "TMC26X.h" #include "TMC26X.h"
#endif #endif
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
#include "trinamic.h" #include "trinamic.h"
#endif #endif

View file

@ -27,7 +27,7 @@
#include "../../inc/MarlinConfig.h" #include "../../inc/MarlinConfig.h"
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
#include "trinamic.h" #include "trinamic.h"
#include "../stepper.h" #include "../stepper.h"
@ -818,4 +818,4 @@ void reset_trinamic_drivers() {
stepper.set_directions(); stepper.set_directions();
} }
#endif // HAS_TRINAMIC #endif // HAS_TRINAMIC_CONFIG

View file

@ -103,7 +103,7 @@
// Trinamic driver support // Trinamic driver support
#if HAS_TRINAMIC #if HAS_TRINAMIC_CONFIG
// Using TMC devices in intelligent mode requires extra connections to each device. Unfortunately // 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 // 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. // will require 3 connections (clock, mosi, miso), plus a chip select line (CS) for each driver.