Coolstep for TMC2130, 2209, 5130, 5160 (#16790)

This commit is contained in:
Fabio Santos
2020-02-08 19:01:57 -08:00
committed by GitHub
parent f0cbc85a07
commit 894762259b
25 changed files with 473 additions and 86 deletions

View File

@ -2040,6 +2040,62 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "LED_USER_PRESET_STARTUP is required for FYSETC_MINI_12864 2.x displays."
#endif
/**
* Make sure CoolStep settings exist
*/
#if HAS_COOLSTEP
#define NEEDS_COOLSTEP(A) AXIS_HAS_COOLSTEP(A) && !(defined(A##_COOLSTEP_SPEED_THRESHOLD) && defined(A##_COOLSTEP_LOWER_LOAD_THRESHOLD) && defined(A##_COOLSTEP_UPPER_LOAD_THRESHOLD) && defined(A##_COOLSTEP_SEUP) && defined(A##_COOLSTEP_SEDN) && defined(A##_COOLSTEP_SEIMIN))
#if NEEDS_COOLSTEP(X)
#error "X COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(X2)
#error "X2 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(Y)
#error "Y COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(Y2)
#error "Y2 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(Z)
#error "Z COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(Z2)
#error "Z2 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(Z3)
#error "Z3 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(Z4)
#error "Z4 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(E0)
#error "E0 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(E1)
#error "E1 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(E2)
#error "E2 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(E3)
#error "E3 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(E4)
#error "E4 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(E5)
#error "E5 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(E6)
#error "E6 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#if NEEDS_COOLSTEP(E7)
#error "E7 COOLSTEP settings must be defined in Configuration_adv.h."
#endif
#undef NEEDS_COOLSTEP
#endif
/**
* Check existing CS pins against enabled TMC SPI drivers.
*/
@ -2650,6 +2706,6 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
* Check to make sure MONITOR_DRIVER_STATUS isn't enabled
* on boards where TMC drivers share the SPI bus with SD.
*/
#if TMC_HAS_SPI && ALL(MONITOR_DRIVER_STATUS, SDSUPPORT, USES_SHARED_SPI)
#if HAS_TMC_SPI && ALL(MONITOR_DRIVER_STATUS, SDSUPPORT, USES_SHARED_SPI)
#error "MONITOR_DRIVER_STATUS and SDSUPPORT cannot be used together on boards with shared SPI."
#endif