diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2012-08-30 07:44:25 -0400 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2012-08-30 07:44:25 -0400 |
commit | 70b6f11d632d9549cd2ec20b9a7fbd1136c79d72 (patch) | |
tree | 3622d1dc4f005a3544f608b64c54bc545e272cd4 | |
parent | 912092b03fddf38789ec680da4e619bedccaf559 (diff) |
Fixing Serial.flush() breakage on Leonardo (WestFW).
http://code.google.com/p/arduino/issues/detail?id=1020
-rw-r--r-- | cores/arduino/HardwareSerial.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cores/arduino/HardwareSerial.h b/cores/arduino/HardwareSerial.h index eadaaa7..d4ccbec 100644 --- a/cores/arduino/HardwareSerial.h +++ b/cores/arduino/HardwareSerial.h @@ -87,7 +87,14 @@ class HardwareSerial : public Stream * conditional code in the cpp module. */ #if !defined(TXC0) +#if defined(TXC) #define TXC0 TXC +#elif defined(TXC1) +// Some devices have uart1 but no uart0 +#define TXC0 TXC1 +#else +#error TXC0 not definable in HardwareSerial.h +#endif #endif extern void serialEventRun(void) __attribute__((weak)); |