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

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

32
 
32
 
33
 #include <Arduino.h>
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
 #include "fastio_Teensy.h"
39
 #include "fastio_Teensy.h"
36
 #include "watchdog_Teensy.h"
40
 #include "watchdog_Teensy.h"
37
 
41
 

Loading…
Cancel
Save