Skip to content

Commit 3b9a5e7

Browse files
authored
Merge pull request #651 from facchinm/uart_ringbuffer_256
UART: restore default buffer size to 256 bytes
2 parents dda98e5 + 678e3ff commit 3b9a5e7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cores/arduino/Uart.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
#include "SERCOM.h"
2323
#include "SafeRingBuffer.h"
2424

25-
#define SERIAL_BUFFER_SIZE 64
25+
#ifdef SERIAL_BUFFER_SIZE
26+
#undef SERIAL_BUFFER_SIZE
27+
#endif
28+
29+
#define SERIAL_BUFFER_SIZE 256
2630

2731
class Uart : public arduino::HardwareSerial
2832
{
@@ -46,8 +50,9 @@ class Uart : public arduino::HardwareSerial
4650

4751
private:
4852
SERCOM *sercom;
49-
arduino::SafeRingBuffer rxBuffer;
50-
arduino::SafeRingBuffer txBuffer;
53+
54+
arduino::SafeRingBufferN<SERIAL_BUFFER_SIZE> rxBuffer;
55+
arduino::SafeRingBufferN<SERIAL_BUFFER_SIZE> txBuffer;
5156

5257
uint8_t uc_pinRX;
5358
uint8_t uc_pinTX;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy