From 70b6f11d632d9549cd2ec20b9a7fbd1136c79d72 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Thu, 30 Aug 2012 07:44:25 -0400 Subject: Fixing Serial.flush() breakage on Leonardo (WestFW). http://code.google.com/p/arduino/issues/detail?id=1020 --- cores/arduino/HardwareSerial.h | 7 +++++++ 1 file changed, 7 insertions(+) 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)); -- cgit v1.2.3-18-g5258