Fix drivers.h dependency, defer macro evaluation (#11449)
This commit is contained in:
parent
4c4fffc503
commit
86d9af1108
@ -25,10 +25,10 @@
|
||||
|
||||
#include "boards.h"
|
||||
#include "macros.h"
|
||||
#include "drivers.h"
|
||||
#include "Version.h"
|
||||
#include "Configuration.h"
|
||||
#include "Conditionals_LCD.h"
|
||||
#include "drivers.h"
|
||||
#include "Configuration_adv.h"
|
||||
|
||||
#if USE_MARLINSERIAL
|
||||
|
@ -45,47 +45,14 @@
|
||||
#define AXIS_DRIVER_TYPE_X(T) AXIS_DRIVER_TYPE(X,T)
|
||||
#define AXIS_DRIVER_TYPE_Y(T) AXIS_DRIVER_TYPE(Y,T)
|
||||
#define AXIS_DRIVER_TYPE_Z(T) AXIS_DRIVER_TYPE(Z,T)
|
||||
|
||||
#if ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE)
|
||||
#define AXIS_DRIVER_TYPE_X2(T) AXIS_DRIVER_TYPE(X2,T)
|
||||
#else
|
||||
#define AXIS_DRIVER_TYPE_X2(T) false
|
||||
#endif
|
||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
|
||||
#define AXIS_DRIVER_TYPE_Y2(T) AXIS_DRIVER_TYPE(Y2,T)
|
||||
#else
|
||||
#define AXIS_DRIVER_TYPE_Y2(T) false
|
||||
#endif
|
||||
#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
|
||||
#define AXIS_DRIVER_TYPE_Z2(T) AXIS_DRIVER_TYPE(Z2,T)
|
||||
#else
|
||||
#define AXIS_DRIVER_TYPE_Z2(T) false
|
||||
#endif
|
||||
#if E_STEPPERS > 0
|
||||
#define AXIS_DRIVER_TYPE_E0(T) AXIS_DRIVER_TYPE(E0,T)
|
||||
#else
|
||||
#define AXIS_DRIVER_TYPE_E0(T) false
|
||||
#endif
|
||||
#if E_STEPPERS > 1
|
||||
#define AXIS_DRIVER_TYPE_E1(T) AXIS_DRIVER_TYPE(E1,T)
|
||||
#else
|
||||
#define AXIS_DRIVER_TYPE_E1(T) false
|
||||
#endif
|
||||
#if E_STEPPERS > 2
|
||||
#define AXIS_DRIVER_TYPE_E2(T) AXIS_DRIVER_TYPE(E2,T)
|
||||
#else
|
||||
#define AXIS_DRIVER_TYPE_E2(T) false
|
||||
#endif
|
||||
#if E_STEPPERS > 3
|
||||
#define AXIS_DRIVER_TYPE_E3(T) AXIS_DRIVER_TYPE(E3,T)
|
||||
#else
|
||||
#define AXIS_DRIVER_TYPE_E3(T) false
|
||||
#endif
|
||||
#if E_STEPPERS > 4
|
||||
#define AXIS_DRIVER_TYPE_E4(T) AXIS_DRIVER_TYPE(E4,T)
|
||||
#else
|
||||
#define AXIS_DRIVER_TYPE_E4(T) false
|
||||
#endif
|
||||
#define AXIS_DRIVER_TYPE_X2(T) (ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE)) && AXIS_DRIVER_TYPE(X2,T)
|
||||
#define AXIS_DRIVER_TYPE_Y2(T) (ENABLED(Y_DUAL_STEPPER_DRIVERS) && AXIS_DRIVER_TYPE(Y2,T))
|
||||
#define AXIS_DRIVER_TYPE_Z2(T) (ENABLED(Z_DUAL_STEPPER_DRIVERS) && AXIS_DRIVER_TYPE(Z2,T))
|
||||
#define AXIS_DRIVER_TYPE_E0(T) (E_STEPPERS > 0 && AXIS_DRIVER_TYPE(E0,T))
|
||||
#define AXIS_DRIVER_TYPE_E1(T) (E_STEPPERS > 1 && AXIS_DRIVER_TYPE(E1,T))
|
||||
#define AXIS_DRIVER_TYPE_E2(T) (E_STEPPERS > 2 && AXIS_DRIVER_TYPE(E2,T))
|
||||
#define AXIS_DRIVER_TYPE_E3(T) (E_STEPPERS > 3 && AXIS_DRIVER_TYPE(E3,T))
|
||||
#define AXIS_DRIVER_TYPE_E4(T) (E_STEPPERS > 4 && AXIS_DRIVER_TYPE(E4,T))
|
||||
|
||||
#define HAS_DRIVER(T) (AXIS_DRIVER_TYPE_X(T) || AXIS_DRIVER_TYPE_X2(T) || \
|
||||
AXIS_DRIVER_TYPE_Y(T) || AXIS_DRIVER_TYPE_Y2(T) || \
|
||||
|
Loading…
Reference in New Issue
Block a user