Fixing Serial.flush() breakage on Leonardo (WestFW).

http://code.google.com/p/arduino/issues/detail?id=1020
This commit is contained in:
David A. Mellis 2012-08-30 07:44:25 -04:00
parent 912092b03f
commit 70b6f11d63
1 changed files with 7 additions and 0 deletions

View File

@ -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));