Skip to content

Commit b1308a8

Browse files
committed
2 parents ada3067 + a1cf6cf commit b1308a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

avr/cores/arduino/HardwareSerial.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@
4040
// often work, but occasionally a race condition can occur that makes
4141
// Serial behave erratically. See https://github.com/arduino/Arduino/issues/2405
4242
#if !defined(SERIAL_TX_BUFFER_SIZE)
43-
#if (RAMEND < 1000)
43+
#if ((RAMEND - RAMSTART) < 1023)
4444
#define SERIAL_TX_BUFFER_SIZE 16
4545
#else
4646
#define SERIAL_TX_BUFFER_SIZE 64
4747
#endif
4848
#endif
4949
#if !defined(SERIAL_RX_BUFFER_SIZE)
50-
#if (RAMEND < 1000)
50+
#if ((RAMEND - RAMSTART) < 1023)
5151
#define SERIAL_RX_BUFFER_SIZE 16
5252
#else
5353
#define SERIAL_RX_BUFFER_SIZE 64

avr/cores/arduino/USBAPI.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ extern USBDevice_ USBDevice;
7575
struct ring_buffer;
7676

7777
#ifndef SERIAL_BUFFER_SIZE
78-
#if (RAMEND < 1000)
78+
#if ((RAMEND - RAMSTART) < 1023)
7979
#define SERIAL_BUFFER_SIZE 16
8080
#else
8181
#define SERIAL_BUFFER_SIZE 64

0 commit comments

Comments
 (0)