Skip to content

Commit cd43ca3

Browse files
committed
Fixing Serial.flush() breakage on Leonardo (WestFW).
http://code.google.com/p/arduino/issues/detail?id=1020
1 parent 24c8bf8 commit cd43ca3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

hardware/arduino/cores/arduino/HardwareSerial.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,14 @@ class HardwareSerial : public Stream
8787
* conditional code in the cpp module.
8888
*/
8989
#if !defined(TXC0)
90+
#if defined(TXC)
9091
#define TXC0 TXC
92+
#elif defined(TXC1)
93+
// Some devices have uart1 but no uart0
94+
#define TXC0 TXC1
95+
#else
96+
#error TXC0 not definable in HardwareSerial.h
97+
#endif
9198
#endif
9299

93100
extern void serialEventRun(void) __attribute__((weak));

0 commit comments

Comments
 (0)