From 8836623e0f5286b630043c31ceb05841e382b8e8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 19 Nov 2017 14:01:05 -0600 Subject: [PATCH] Fix `sq`/`min`/`max` macros after platform headers --- Marlin/src/HAL/HAL_LPC1768/HAL.h | 7 ++++++- Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL.h b/Marlin/src/HAL/HAL_LPC1768/HAL.h index 907b550c3c..cf54cb1d71 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL.h +++ b/Marlin/src/HAL/HAL_LPC1768/HAL.h @@ -35,6 +35,10 @@ #include #include + +#undef min +#undef max + #include void _printf (const char *format, ...); @@ -52,7 +56,8 @@ extern "C" volatile uint32_t _millis; #define B01 1 #define B10 2 -#include "arduino.h" +#include "include/arduino.h" + #include "pinmapping.h" #include "fastio.h" #include "watchdog.h" diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h index 379b363dda..f4de615a6d 100644 --- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h +++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h @@ -32,6 +32,10 @@ #include +// Redefine sq macro defined by teensy3/wiring.h +#undef sq +#define sq(x) ((x)*(x)) + #include "fastio_Teensy.h" #include "watchdog_Teensy.h"