Enforce minimum TMC2130 / TMC2208 libs

This commit is contained in:
Scott Lahteine 2018-03-23 18:00:25 -04:00
parent 2c79faede9
commit 71c05f1b57

View File

@ -130,6 +130,10 @@
#include "planner.h" #include "planner.h"
#include "enum.h" #include "enum.h"
#if TMC2130STEPPER_VERSION < 0x020201
#error "Update TMC2130Stepper library to 2.2.1 or newer."
#endif
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN, TMC_SW_MOSI, TMC_SW_MISO, TMC_SW_SCK) #define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN, TMC_SW_MOSI, TMC_SW_MISO, TMC_SW_SCK)
#else #else
@ -282,6 +286,10 @@
#include <TMC2208Stepper.h> #include <TMC2208Stepper.h>
#include "planner.h" #include "planner.h"
#if TMC2208STEPPER_VERSION < 0x000101
#error "Update TMC2208Stepper library to 0.1.1 or newer."
#endif
#define _TMC2208_DEFINE_HARDWARE(ST) TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL) #define _TMC2208_DEFINE_HARDWARE(ST) TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL)
#define _TMC2208_DEFINE_SOFTWARE(ST) SoftwareSerial ST##_HARDWARE_SERIAL = SoftwareSerial(ST##_SERIAL_RX_PIN, ST##_SERIAL_TX_PIN); \ #define _TMC2208_DEFINE_SOFTWARE(ST) SoftwareSerial ST##_HARDWARE_SERIAL = SoftwareSerial(ST##_SERIAL_RX_PIN, ST##_SERIAL_TX_PIN); \
TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL, ST##_SERIAL_RX_PIN > -1) TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL, ST##_SERIAL_RX_PIN > -1)