Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

RX and TX Buffers for HardwareSerial are hard coded in size and equal length #1929

Closed
@jantje

Description

Hi
I have many arduino sketches that send out lots of data and hardly receives any data.
I really would like to increase the TX buffer but not the RX buffer. Therefore I would like to modify the HardwareSerial class where it states:

#if (RAMEND < 1000)
 #define SERIAL_BUFFER_SIZE 16
#else
#if ARDUINO_AVR_MEGA2560
#define SERIAL_BUFFER_SIZE 64
#else
 #define SERIAL_BUFFER_SIZE 64
#endif
#endif

to

#if !(defined(SERIAL_TX_BUFFER_SIZE)&&defined(SERIAL_RX_BUFFER_SIZE))
#if (RAMEND < 1000)
#define SERIAL_TX_BUFFER_SIZE 16 
#define SERIAL_RX_BUFFER_SIZE 16 
#else
#if ARDUINO_AVR_MEGA2560
#define SERIAL_TX_BUFFER_SIZE 64 
#define SERIAL_RX_BUFFER_SIZE 64 
#else
#define SERIAL_TX_BUFFER_SIZE 64 
#define SERIAL_RX_BUFFER_SIZE 64 
#endif
#endif

this allows to change the size by using a define and allows for different sizes for RX and TX buffer.
and make all subsequent changes.
Would a change like this be accepted?
jantje

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /