diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 6a3565123..ddd5f98c0 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -8378,6 +8378,7 @@ Sigma_Exit: } break; +#ifndef TMC2130 /*! ### M351 - Toggle Microstep Pins M351: Toggle MS1 MS2 pins directly Toggle MS1 MS2 pins directly. @@ -8411,6 +8412,7 @@ Sigma_Exit: #endif } break; +#endif // !TMC2130 /*! ### M701 - Load filament to extruder M701: Load filament diff --git a/Firmware/stepper.cpp b/Firmware/stepper.cpp index cf51c88ff..758e0dcdb 100644 --- a/Firmware/stepper.cpp +++ b/Firmware/stepper.cpp @@ -1073,10 +1073,10 @@ void st_init() { #ifdef TMC2130 tmc2130_init(TMCInitParams(false, FarmOrUserECool())); -#endif //TMC2130 - +#else st_current_init(); //Initialize Digipot Motor Current microstep_init(); //Initialize Microstepping Pins +#endif //TMC2130 //Initialize Dir Pins #if defined(X_DIR_PIN) && X_DIR_PIN > -1 @@ -1513,6 +1513,7 @@ void digitalPotWrite(int address, int value) // From Arduino DigitalPotControl e } #endif +#ifndef TMC2130 void st_current_init() //Initialize Digipot Motor Current { #ifdef MOTOR_CURRENT_PWM_XY_PIN @@ -1542,8 +1543,6 @@ void st_current_init() //Initialize Digipot Motor Current #endif } - - #ifdef MOTOR_CURRENT_PWM_XY_PIN void st_current_set(uint8_t driver, int current) { @@ -1577,9 +1576,6 @@ void microstep_init() #endif } - -#ifndef TMC2130 - void microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2) { if(ms1 > -1) switch(driver) @@ -1637,4 +1633,4 @@ void microstep_readings() SERIAL_PROTOCOLLN( READ(E1_MS2_PIN)); #endif } -#endif //TMC2130 +#endif //!TMC2130 diff --git a/Firmware/stepper.h b/Firmware/stepper.h index 0fa2811cb..944403fe4 100644 --- a/Firmware/stepper.h +++ b/Firmware/stepper.h @@ -76,12 +76,15 @@ void quickStop(); #if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 void digitalPotWrite(int address, int value); #endif //defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 + +#ifndef TMC2130 void microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2); void microstep_mode(uint8_t driver, uint8_t stepping); void st_current_init(); void st_current_set(uint8_t driver, int current); void microstep_init(); void microstep_readings(); +#endif //!TMC2130 #ifdef BABYSTEPPING void babystep(const uint8_t axis,const bool direction); // perform a short step with a single stepper motor, outside of any convention diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index af936f0ee..6f7c2328e 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -3454,8 +3454,10 @@ static void lcd_silent_mode_set() { // Be safe than sorry, reset the stepper timer before re-enabling interrupts. st_reset_timer(); sei(); +#else + st_current_init(); #endif //TMC2130 - st_current_init(); + #ifdef TMC2130 if (lcd_crash_detect_enabled() && (SilentModeMenu != SILENT_MODE_NORMAL)) menu_submenu(lcd_crash_mode_info2);