Skip to content

Commit a1229e8

Browse files
committed
Merge pull request #2145 from matthijskooijman/ide-1.5.x-hardwareserial-atmega8
Support Atmega8 (and similar that define PE instead of UPE) again
2 parents 1a305cd + 10a89a1 commit a1229e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hardware/arduino/avr/cores/arduino/HardwareSerial_private.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
// slower.
3535
#if !defined(TXC0)
3636
#if defined(TXC)
37+
// Some chips like ATmega8 don't have UPE, only PE. The other bits are
38+
// named as expected.
39+
#if !defined(UPE) && defined(PE)
40+
#define UPE PE
41+
#endif
3742
// On ATmega8, the uart and its bits are not numbered, so there is no TXC0 etc.
3843
#define TXC0 TXC
3944
#define RXEN0 RXEN

0 commit comments

Comments
 (0)