diff options
author | Shigeru KANEMOTO <sgk@switch-science.com> | 2012-06-22 11:27:56 +0900 |
---|---|---|
committer | Shigeru KANEMOTO <sgk@switch-science.com> | 2012-08-08 18:27:40 +0900 |
commit | 4293079076b319f1762481bb31c5fce74c97dc7a (patch) | |
tree | 1866502fe12c24c900837da0cf883a75b1b1860c /cores/arduino/Arduino.h | |
parent | ef7a66b84596267e91ee98a39d653ada60be2175 (diff) |
Fix for tone() on Leonardo.
Diffstat (limited to 'cores/arduino/Arduino.h')
-rwxr-xr-x | cores/arduino/Arduino.h | 65 |
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 |