Browse Source

Fix Gen7 compile if you have avr-libc version 1.7.1 or higher. See http://code.google.com/p/arduino/issues/detail?id=604

Daid 12 years ago
parent
commit
caa2b25b40
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      Marlin/Gen7/cores/arduino/wiring.h

+ 2
- 0
Marlin/Gen7/cores/arduino/wiring.h View File

70
 #define max(a,b) ((a)>(b)?(a):(b))
70
 #define max(a,b) ((a)>(b)?(a):(b))
71
 #define abs(x) ((x)>0?(x):-(x))
71
 #define abs(x) ((x)>0?(x):-(x))
72
 #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
72
 #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
73
+#if __AVR_LIBC_VERSION__ < 10701UL
73
 #define round(x)     ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
74
 #define round(x)     ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
75
+#endif
74
 #define radians(deg) ((deg)*DEG_TO_RAD)
76
 #define radians(deg) ((deg)*DEG_TO_RAD)
75
 #define degrees(rad) ((rad)*RAD_TO_DEG)
77
 #define degrees(rad) ((rad)*RAD_TO_DEG)
76
 #define sq(x) ((x)*(x))
78
 #define sq(x) ((x)*(x))

Loading…
Cancel
Save