Browse Source

Fix `sq`/`min`/`max` macros after platform headers

Scott Lahteine 7 years ago
parent
commit
8836623e0f
2 changed files with 10 additions and 1 deletions
  1. 6
    1
      Marlin/src/HAL/HAL_LPC1768/HAL.h
  2. 4
    0
      Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h

+ 6
- 1
Marlin/src/HAL/HAL_LPC1768/HAL.h View File

@@ -35,6 +35,10 @@
35 35
 
36 36
 #include <stdint.h>
37 37
 #include <stdarg.h>
38
+
39
+#undef min
40
+#undef max
41
+
38 42
 #include <algorithm>
39 43
 
40 44
 void _printf (const  char *format, ...);
@@ -52,7 +56,8 @@ extern "C" volatile uint32_t _millis;
52 56
 #define B01 1
53 57
 #define B10 2
54 58
 
55
-#include "arduino.h"
59
+#include "include/arduino.h"
60
+
56 61
 #include "pinmapping.h"
57 62
 #include "fastio.h"
58 63
 #include "watchdog.h"

+ 4
- 0
Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h View File

@@ -32,6 +32,10 @@
32 32
 
33 33
 #include <Arduino.h>
34 34
 
35
+// Redefine sq macro defined by teensy3/wiring.h
36
+#undef sq
37
+#define sq(x) ((x)*(x))
38
+
35 39
 #include "fastio_Teensy.h"
36 40
 #include "watchdog_Teensy.h"
37 41
 

Loading…
Cancel
Save