Enforce minimum TMC2130 / TMC2208 libs

This commit is contained in:
Scott Lahteine 2018-03-23 18:01:55 -04:00
parent 8870f9b1da
commit 3ac135cef3

View File

@ -1409,7 +1409,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#endif
/**
* Make sure HAVE_TMC2130 is warranted
* TMC2130 Requirements
*/
#if ENABLED(HAVE_TMC2130)
#if !( ENABLED( X_IS_TMC2130) \
@ -1424,6 +1424,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
|| ENABLED(E3_IS_TMC2130) \
|| ENABLED(E4_IS_TMC2130) )
#error "HAVE_TMC2130 requires at least one TMC2130 stepper to be set."
#elif TMC2130STEPPER_VERSION < 0x020201
#error "Update TMC2130Stepper library to 2.2.1 or newer."
#elif ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
#error "Enable STEALTHCHOP to use HYBRID_THRESHOLD."
#endif
@ -1476,10 +1478,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
#endif
/**
* Make sure HAVE_TMC2208 is warranted
* TMC2208 Requirements
*/
#if ENABLED(HAVE_TMC2208) && !( \
ENABLED( X_IS_TMC2208 ) \
#if ENABLED(HAVE_TMC2208)
#if !( ENABLED( X_IS_TMC2208) \
|| ENABLED(X2_IS_TMC2208) \
|| ENABLED( Y_IS_TMC2208) \
|| ENABLED(Y2_IS_TMC2208) \
@ -1488,15 +1490,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
|| ENABLED(E0_IS_TMC2208) \
|| ENABLED(E1_IS_TMC2208) \
|| ENABLED(E2_IS_TMC2208) \
|| ENABLED( E3_IS_TMC2208 ) )
|| ENABLED(E3_IS_TMC2208) \
|| ENABLED(E4_IS_TMC2208 ) )
#error "HAVE_TMC2208 requires at least one TMC2208 stepper to be set."
#endif
/**
* TMC2208 software UART and ENDSTOP_INTERRUPTS both use pin change interrupts (PCI)
*/
#if ENABLED(HAVE_TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
defined(X_HARDWARE_SERIAL ) \
#elif ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && \ // Software UART and ENDSTOP_INTERRUPTS both use Pin Change interrupts (PCI)
!( defined( X_HARDWARE_SERIAL) \
|| defined(X2_HARDWARE_SERIAL) \
|| defined( Y_HARDWARE_SERIAL) \
|| defined(Y2_HARDWARE_SERIAL) \
@ -1507,7 +1505,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
|| defined(E2_HARDWARE_SERIAL) \
|| defined(E3_HARDWARE_SERIAL) \
|| defined(E4_HARDWARE_SERIAL) )
#error "select hardware UART for TMC2208 to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE."
#error "Select *_HARDWARE_SERIAL to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE."
#elif TMC2208STEPPER_VERSION < 0x000101
#error "Update TMC2130Stepper library to 0.1.1 or newer."
#endif
#endif
#if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)