You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
@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?
Activity
SuGlider commentedon Aug 23, 2021
@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 commentedon Aug 23, 2021
@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 commentedon Aug 23, 2021
@szerwi It's not currently exposed in HardwareSerial. @SuGlider can you add another parameter to expose it?
SuGlider commentedon Aug 23, 2021
@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 commentedon Aug 23, 2021
HardwareSerial::setRxBufferSize(size_t newSize) has been added and commited.