Skip to content

Commit 987b9bf

Browse files
committed
Merge branch 'patch-7' of https://github.com/NicoHood/Arduino
2 parents 2453337 + 7f2ca6e commit 987b9bf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

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)