aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/Arduino.h
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2012-09-13 06:07:10 -0700
committerDavid A. Mellis <d.mellis@arduino.cc>2012-09-13 06:07:10 -0700
commit999619579b0291a7e2714b77d2d60b7c43be9510 (patch)
treea1f02114c656edbea5f3f37bc64c1632d74399a6 /cores/arduino/Arduino.h
parentdc86d26a11ffe3e1ac9add8fb2d397fbee20984b (diff)
parent4293079076b319f1762481bb31c5fce74c97dc7a (diff)
Merge pull request #102 from sgk/leonardoTone
Fix for tone() on Leonardo.
Diffstat (limited to 'cores/arduino/Arduino.h')
-rwxr-xr-xcores/arduino/Arduino.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h
index 830c995..d592aab 100755
--- a/cores/arduino/Arduino.h
+++ b/cores/arduino/Arduino.h
@@ -11,6 +11,71 @@
#include "binary.h"
+// Workaround for wrong definitions in "iom32u4.h".
+// This should be fixed in the AVR toolchain.
+#ifdef __AVR_ATmega32U4__
+#undef UHCON
+#undef UHINT
+#undef UHIEN
+#undef UHADDR
+#undef UHFNUM
+#undef UHFNUML
+#undef UHFNUMH
+#undef UHFLEN
+#undef UPINRQX
+#undef UPINTX
+#undef UPNUM
+#undef UPRST
+#undef UPCONX
+#undef UPCFG0X
+#undef UPCFG1X
+#undef UPSTAX
+#undef UPCFG2X
+#undef UPIENX
+#undef UPDATX
+#undef TCCR2A
+#undef WGM20
+#undef WGM21
+#undef COM2B0
+#undef COM2B1
+#undef COM2A0
+#undef COM2A1
+#undef TCCR2B
+#undef CS20
+#undef CS21
+#undef CS22
+#undef WGM22
+#undef FOC2B
+#undef FOC2A
+#undef TCNT2
+#undef TCNT2_0
+#undef TCNT2_1
+#undef TCNT2_2
+#undef TCNT2_3
+#undef TCNT2_4
+#undef TCNT2_5
+#undef TCNT2_6
+#undef TCNT2_7
+#undef OCR2A
+#undef OCR2_0
+#undef OCR2_1
+#undef OCR2_2
+#undef OCR2_3
+#undef OCR2_4
+#undef OCR2_5
+#undef OCR2_6
+#undef OCR2_7
+#undef OCR2B
+#undef OCR2_0
+#undef OCR2_1
+#undef OCR2_2
+#undef OCR2_3
+#undef OCR2_4
+#undef OCR2_5
+#undef OCR2_6
+#undef OCR2_7
+#endif
+
#ifdef __cplusplus
extern "C"{
#endif