diff options
author | Nico <NicoHood@users.noreply.github.com> | 2015-09-20 11:07:19 +0200 |
---|---|---|
committer | Nico <NicoHood@users.noreply.github.com> | 2015-09-20 11:07:19 +0200 |
commit | edcfdba42da5a02b8af9152591999323260b4425 (patch) | |
tree | f9da63a7bada71c1f3242c60b2fe68a60b56bfae /cores/arduino/HardwareSerial.h | |
parent | e4f0bb22dac44b727ec6dd148f57ad4ef63b45cf (diff) |
Fix HW Serial buffer size determination
Diffstat (limited to 'cores/arduino/HardwareSerial.h')
-rw-r--r-- | cores/arduino/HardwareSerial.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cores/arduino/HardwareSerial.h b/cores/arduino/HardwareSerial.h index 1beafc5..8a5bf95 100644 --- a/cores/arduino/HardwareSerial.h +++ b/cores/arduino/HardwareSerial.h @@ -40,14 +40,14 @@ // often work, but occasionally a race condition can occur that makes // Serial behave erratically. See https://github.com/arduino/Arduino/issues/2405 #if !defined(SERIAL_TX_BUFFER_SIZE) -#if (RAMEND < 1000) +#if ((RAMEND - RAMSTART) < 1023) #define SERIAL_TX_BUFFER_SIZE 16 #else #define SERIAL_TX_BUFFER_SIZE 64 #endif #endif #if !defined(SERIAL_RX_BUFFER_SIZE) -#if (RAMEND < 1000) +#if ((RAMEND - RAMSTART) < 1023) #define SERIAL_RX_BUFFER_SIZE 16 #else #define SERIAL_RX_BUFFER_SIZE 64 |