aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2012-08-30 07:44:25 -0400
committerDavid A. Mellis <d.mellis@arduino.cc>2012-08-30 07:44:25 -0400
commit70b6f11d632d9549cd2ec20b9a7fbd1136c79d72 (patch)
tree3622d1dc4f005a3544f608b64c54bc545e272cd4 /cores/arduino
parent912092b03fddf38789ec680da4e619bedccaf559 (diff)
Fixing Serial.flush() breakage on Leonardo (WestFW).
http://code.google.com/p/arduino/issues/detail?id=1020
Diffstat (limited to 'cores/arduino')
-rw-r--r--cores/arduino/HardwareSerial.h7
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));