Skip to content

2.0.0-rc2 - Serial.setRxBufferSize() is missing #5580

@szerwi

Description

@szerwi

Hardware:

Board: ESP32 Dev Module
Core Installation version: 2.0.0-rc2
IDE name: Arduino IDE
Flash Frequency: 40Mhz
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Windows 10

Description:

Serial.setRxBufferSize() function is missing in HardwareSerial library in 2.0.0-rc2.

Activity

added this to the 2.0.0 milestone on Aug 23, 2021
SuGlider

SuGlider commented on Aug 23, 2021

@SuGlider
Collaborator

@szerwi buffer size can be set using begin(...) Function.

It is one of the parameters.
Default RX buffer size is 256 bytes.

It has not been included because UART is now implemented using IDF. There is no IDF API to change RX internal buffer size.

One work around is to end() it and then begin(...) It using a new RX buffer size in the begin parameters.

szerwi

szerwi commented on Aug 23, 2021

@szerwi
Author

@SuGlider how can I set it in the begin() function?
From HardwareSerial.h: void begin(unsigned long baud, uint32_t config=SERIAL_8N1, int8_t rxPin=-1, int8_t txPin=-1, bool invert=false, unsigned long timeout_ms = 20000UL, uint8_t rxfifo_full_thrhd = 112);
Is that a rxfifo_full_thrhd parameter?

atanisoft

atanisoft commented on Aug 23, 2021

@atanisoft
Collaborator

@szerwi It's not currently exposed in HardwareSerial. @SuGlider can you add another parameter to expose it?

SuGlider

SuGlider commented on Aug 23, 2021

@SuGlider
Collaborator

@szerwi, @atanisoft parameter exposed in PR #5583
new interface:

void begin(unsigned long baud, uint32_t config=SERIAL_8N1, int8_t rxPin=-1, int8_t txPin=-1, bool invert=false, unsigned long timeout_ms = 20000UL, uint8_t rxfifo_full_thrhd = 112, size_t rxBufferSize = 256);

SuGlider

SuGlider commented on Aug 23, 2021

@SuGlider
Collaborator

HardwareSerial::setRxBufferSize(size_t newSize) has been added and commited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

    Development

    Participants

    @atanisoft@me-no-dev@szerwi@SuGlider

    Issue actions

      2.0.0-rc2 - Serial.setRxBufferSize() is missing · Issue #5580 · espressif/arduino-esp32