From 52108192d1181da5275ab5edcaff0e0c6495f3a4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 20 Jan 2019 00:32:56 -0600 Subject: [PATCH] Prevent L6470 class name conflict with drivers.h define Fix #12824 --- Marlin/src/core/drivers.h | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/Marlin/src/core/drivers.h b/Marlin/src/core/drivers.h index ce2d913b8..65413b14a 100644 --- a/Marlin/src/core/drivers.h +++ b/Marlin/src/core/drivers.h @@ -23,24 +23,25 @@ #include "../inc/MarlinConfigPre.h" -#define A4988 0x001 -#define A5984 0x002 -#define DRV8825 0x003 -#define LV8729 0x004 -#define L6470 0x105 -#define TB6560 0x006 -#define TB6600 0x007 -#define TMC2100 0x008 -#define TMC2130 2130 -#define TMC2130_STANDALONE 0x009 -#define TMC2208 2208 -#define TMC2208_STANDALONE 0x00A -#define TMC26X 0x10B -#define TMC26X_STANDALONE 0x00B -#define TMC2660 2660 -#define TMC2660_STANDALONE 0x00C +#define _A4988 0x001 +#define _A5984 0x002 +#define _DRV8825 0x003 +#define _LV8729 0x004 +#define _L6470 0x105 +#define _TB6560 0x006 +#define _TB6600 0x007 +#define _TMC2100 0x008 +#define _TMC2130 2130 +#define _TMC2130_STANDALONE 0x009 +#define _TMC2208 2208 +#define _TMC2208_STANDALONE 0x00A +#define _TMC26X 0x10B +#define _TMC26X_STANDALONE 0x00B +#define _TMC2660 2660 +#define _TMC2660_STANDALONE 0x00C -#define _AXIS_DRIVER_TYPE(A,T) (defined(A##_DRIVER_TYPE) && (A##_DRIVER_TYPE == T)) +#define _ACTUAL(V) _CAT(_, V) +#define _AXIS_DRIVER_TYPE(A,T) (defined(A##_DRIVER_TYPE) && _ACTUAL(A##_DRIVER_TYPE) == _CAT(_, T)) #define AXIS_DRIVER_TYPE_X(T) _AXIS_DRIVER_TYPE(X,T) #define AXIS_DRIVER_TYPE_Y(T) _AXIS_DRIVER_TYPE(Y,T)