From 24c8bf8081e110a81267b5b67b3bf033f1f017fc Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Wed, 29 Aug 2012 20:52:30 -0400 Subject: [PATCH] Fixing ATmega8 breakage from flush() change. (WestFW) http://code.google.com/p/arduino/issues/detail?id=1019 --- hardware/arduino/cores/arduino/HardwareSerial.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hardware/arduino/cores/arduino/HardwareSerial.h b/hardware/arduino/cores/arduino/HardwareSerial.h index 9a4277377..eadaaa76e 100644 --- a/hardware/arduino/cores/arduino/HardwareSerial.h +++ b/hardware/arduino/cores/arduino/HardwareSerial.h @@ -81,6 +81,15 @@ class HardwareSerial : public Stream extern HardwareSerial Serial3; #endif +/* + * on ATmega8, the uart and its bits are not numbered, so there is no "TXC0" + * definition. It is slightly cleaner to define this here instead of having + * conditional code in the cpp module. + */ +#if !defined(TXC0) +#define TXC0 TXC +#endif + extern void serialEventRun(void) __attribute__((weak)); #endif