Skip to content

Commit 6b09021

Browse files
committed
Merge remote-tracking branch 'arduino/ide-1.5.x' into ide-1.5.x
2 parents b918faf + a1582fe commit 6b09021

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

hardware/arduino/avr/cores/arduino/HardwareSerial.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@
3434

3535
#include "HardwareSerial.h"
3636

37+
/*
38+
* on ATmega8, the uart and its bits are not numbered, so there is no "TXC0"
39+
* definition. It is slightly cleaner to define this here instead of having
40+
* conditional code in the cpp module.
41+
*/
42+
#if !defined(TXC0)
43+
#if defined(TXC)
44+
#define TXC0 TXC
45+
#elif defined(TXC1)
46+
// Some devices have uart1 but no uart0
47+
#define TXC0 TXC1
48+
#else
49+
#error TXC0 not definable in HardwareSerial.h
50+
#endif
51+
#endif
52+
3753
// Define constants and variables for buffering incoming serial data. We're
3854
// using a ring buffer (I think), in which head is the index of the location
3955
// to which to write the next incoming character and tail is the index of the

hardware/arduino/avr/cores/arduino/HardwareSerial.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,6 @@ class HardwareSerial : public Stream
110110
extern HardwareSerial Serial3;
111111
#endif
112112

113-
/*
114-
* on ATmega8, the uart and its bits are not numbered, so there is no "TXC0"
115-
* definition. It is slightly cleaner to define this here instead of having
116-
* conditional code in the cpp module.
117-
*/
118-
#if !defined(TXC0)
119-
#if defined(TXC)
120-
#define TXC0 TXC
121-
#elif defined(TXC1)
122-
// Some devices have uart1 but no uart0
123-
#define TXC0 TXC1
124-
#else
125-
#error TXC0 not definable in HardwareSerial.h
126-
#endif
127-
#endif
128-
129113
extern void serialEventRun(void) __attribute__((weak));
130114

131115
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy