From 1e946d681da353a70cc1e74055dbbfe78f5e64c1 Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Thu, 15 Mar 2018 21:03:12 -0500
Subject: [PATCH] Update Marlin for newest TMC libraries

- TMC2130Stepper v2.2.0
- TMC2208Stepper v0.0.4
---
 Marlin/src/feature/tmc_util.cpp           | 6 +++---
 Marlin/src/module/stepper_indirection.cpp | 8 ++++----
 platformio.ini                            | 4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp
index e8ad7aee7b..40994d8c7f 100644
--- a/Marlin/src/feature/tmc_util.cpp
+++ b/Marlin/src/feature/tmc_util.cpp
@@ -392,8 +392,8 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
       case TMC_OTPW_TRIGGERED: serialprintPGM(st.getOTPW() ? PSTR("true") : PSTR("false")); break;
       case TMC_TOFF: SERIAL_PRINT(st.toff(), DEC); break;
       case TMC_TBL: SERIAL_PRINT(st.blank_time(), DEC); break;
-      case TMC_HEND: SERIAL_PRINT(st.hysterisis_end(), DEC); break;
-      case TMC_HSTRT: SERIAL_PRINT(st.hysterisis_start(), DEC); break;
+      case TMC_HEND: SERIAL_PRINT(st.hysteresis_end(), DEC); break;
+      case TMC_HSTRT: SERIAL_PRINT(st.hysteresis_start(), DEC); break;
       default: tmc_status(st, i); break;
     }
   }
@@ -545,7 +545,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) {
                "been triggered",     TMC_OTPW_TRIGGERED);
     TMC_REPORT("off time\t",         TMC_TOFF);
     TMC_REPORT("blank time",         TMC_TBL);
-    TMC_REPORT("hysterisis\n-end\t", TMC_HEND);
+    TMC_REPORT("hysteresis\n-end\t", TMC_HEND);
     TMC_REPORT("-start\t",           TMC_HSTRT);
     TMC_REPORT("Stallguard thrs",    TMC_SGT);
 
diff --git a/Marlin/src/module/stepper_indirection.cpp b/Marlin/src/module/stepper_indirection.cpp
index 7caa1fb938..e92ad8826c 100644
--- a/Marlin/src/module/stepper_indirection.cpp
+++ b/Marlin/src/module/stepper_indirection.cpp
@@ -188,8 +188,8 @@
     st.off_time(5); // Only enables the driver if used with stealthChop
     st.interpolate(INTERPOLATE);
     st.power_down_delay(128); // ~2s until driver lowers to hold current
-    st.hysterisis_start(3);
-    st.hysterisis_end(2);
+    st.hysteresis_start(3);
+    st.hysteresis_end(2);
     st.diag1_active_high(1); // For sensorless homing
     #if ENABLED(STEALTHCHOP)
       st.stealth_freq(1); // f_pwm = 2/683 f_clk
@@ -406,8 +406,8 @@
     st.toff(5);
     st.intpol(INTERPOLATE);
     st.TPOWERDOWN(128); // ~2s until driver lowers to hold current
-    st.hysterisis_start(3);
-    st.hysterisis_end(2);
+    st.hysteresis_start(3);
+    st.hysteresis_end(2);
     #if ENABLED(STEALTHCHOP)
       st.pwm_lim(12);
       st.pwm_reg(8);
diff --git a/platformio.ini b/platformio.ini
index 15eaeba5ae..6a4f0a3710 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -31,7 +31,7 @@ lib_deps =
   https://github.com/MarlinFirmware/U8glib-HAL/archive/dev.zip
   LiquidCrystal_I2C@1.1.2
   TMC2130Stepper
-  https://github.com/teemuatlut/TMC2208Stepper/archive/v0.0.3.zip
+  https://github.com/teemuatlut/TMC2208Stepper/archive/v0.0.4.zip
   Adafruit NeoPixel@1.1.3
   https://github.com/lincomatic/LiquidTWI2/archive/30aa480.zip
   https://github.com/ameyer/Arduino-L6470/archive/3cd0993.zip
@@ -110,7 +110,7 @@ lib_ldf_mode    = off
 lib_extra_dirs  = frameworks
 lib_deps        = CMSIS-LPC1768
   https://github.com/MarlinFirmware/U8glib-HAL/archive/dev.zip
-  TMC2130Stepper@>=2.1.1
+  TMC2130Stepper@>=2.2.0
 extra_scripts   = Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py
 src_filter      = ${common.default_src_filter}