Skip to content

Commit

Permalink
Merge pull request #69 from mcci-catena/issue68
Browse files Browse the repository at this point in the history
Fix #68: Increased Serial Buffer Size
  • Loading branch information
terrillmoore authored Feb 2, 2019
2 parents 7d12b8a + e0d75f8 commit 373996b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cores/arduino/HardwareSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,21 @@
// 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)
#define SERIAL_TX_BUFFER_SIZE 64
#define SERIAL_TX_BUFFER_SIZE 256
#endif
#if !defined(SERIAL_RX_BUFFER_SIZE)
#define SERIAL_RX_BUFFER_SIZE 64
#define SERIAL_RX_BUFFER_SIZE 256
#endif
#if (SERIAL_TX_BUFFER_SIZE>256)
#if (SERIAL_TX_BUFFER_SIZE > 0xFFFF)
typedef uint32_t tx_buffer_index_t;
#elif (SERIAL_TX_BUFFER_SIZE > 0xFF)
typedef uint16_t tx_buffer_index_t;
#else
typedef uint8_t tx_buffer_index_t;
#endif
#if (SERIAL_RX_BUFFER_SIZE>256)
#if (SERIAL_RX_BUFFER_SIZE > 0xFFFF)
typedef uint32_t rx_buffer_index_t;
#elif (SERIAL_RX_BUFFER_SIZE > 0xFF)
typedef uint16_t rx_buffer_index_t;
#else
typedef uint8_t rx_buffer_index_t;
Expand Down

0 comments on commit 373996b

Please sign in to comment.