From 4a01b84cabd20f063b59cf5a543317a690751861 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Thu, 29 Nov 2012 13:48:01 -0500 Subject: Moving TXCO definition into HardwareSerial.cpp from HardwareSerial.h. Otherwise, you get an error when compiling for processors with no serial port because the header file is always compiled. See, for an example of the problem: https://github.com/damellis/attiny/issues/8 --- cores/arduino/HardwareSerial.cpp | 16 ++++++++++++++++ cores/arduino/HardwareSerial.h | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'cores/arduino') diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index 2e64acb..719f3f6 100644 --- a/cores/arduino/HardwareSerial.cpp +++ b/cores/arduino/HardwareSerial.cpp @@ -34,6 +34,22 @@ #include "HardwareSerial.h" +/* + * 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) +#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 + // Define constants and variables for buffering incoming serial data. We're // using a ring buffer (I think), in which head is the index of the location // to which to write the next incoming character and tail is the index of the diff --git a/cores/arduino/HardwareSerial.h b/cores/arduino/HardwareSerial.h index 2b1de91..a73117f 100644 --- a/cores/arduino/HardwareSerial.h +++ b/cores/arduino/HardwareSerial.h @@ -110,22 +110,6 @@ 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) -#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)); #endif -- cgit v1.2.3-18-g5258 From 9d638ca052d97843a9ba47040f6f60804a9d0dfe Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Thu, 29 Nov 2012 13:55:59 -0500 Subject: Clarifying comment. --- cores/arduino/HardwareSerial.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cores/arduino') diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index 719f3f6..794a7be 100644 --- a/cores/arduino/HardwareSerial.cpp +++ b/cores/arduino/HardwareSerial.cpp @@ -36,8 +36,7 @@ /* * 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. + * definition. */ #if !defined(TXC0) #if defined(TXC) -- cgit v1.2.3-18-g5258 From 1668039101ddee651f9b8e9b763134e0a5aebf59 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Fri, 7 Dec 2012 18:11:07 +0100 Subject: Added support for Arduino Esplora --- cores/arduino/USBCore.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cores/arduino') diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp index dfc0f21..d3e0170 100644 --- a/cores/arduino/USBCore.cpp +++ b/cores/arduino/USBCore.cpp @@ -55,6 +55,8 @@ const u16 STRING_IPRODUCT[17] = { 'A','r','d','u','i','n','o',' ','L','e','o','n','a','r','d','o' #elif USB_PID == 0x8037 'A','r','d','u','i','n','o',' ','M','i','c','r','o',' ',' ',' ' +#elif USB_PID == 0x803C + 'A','r','d','u','i','n','o',' ','E','s','p','l','o','r','a',' ' #elif USB_PID == 0x9208 'L','i','l','y','P','a','d','U','S','B',' ',' ',' ',' ',' ',' ' #else -- cgit v1.2.3-18-g5258