🔧 Merge TMC26X with TMC config (#24373)

This commit is contained in:
Manuel McLure
2022-11-26 18:30:59 -08:00
committed by Scott Lahteine
parent 6185b50dbe
commit 360e03797f
7 changed files with 74 additions and 192 deletions

View File

@ -34,7 +34,7 @@
#include "TMC26X.h"
#define _TMC26X_DEFINE(ST) TMC26XStepper stepper##ST(200, ST##_CS_PIN, ST##_STEP_PIN, ST##_DIR_PIN, ST##_MAX_CURRENT, ST##_SENSE_RESISTOR)
#define _TMC26X_DEFINE(ST) TMC26XStepper stepper##ST(200, ST##_CS_PIN, ST##_STEP_PIN, ST##_DIR_PIN, ST##_CURRENT, int(ST##_RSENSE * 1000))
#if AXIS_DRIVER_TYPE_X(TMC26X)
_TMC26X_DEFINE(X);

View File

@ -1023,8 +1023,6 @@ void reset_trinamic_drivers() {
// 2. For each axis in use, static_assert using a constexpr function, which counts the
// number of matching/conflicting axis. If the value is not exactly 1, fail.
#define ALL_AXIS_NAMES X, X2, Y, Y2, Z, Z2, Z3, Z4, I, J, K, U, V, W, E0, E1, E2, E3, E4, E5, E6, E7
#if ANY_AXIS_HAS(HW_SERIAL)
// Hardware serial names are compared as strings, since actually resolving them cannot occur in a constexpr.
// Using a fixed-length character array for the port name allows this to be constexpr compatible.