From 678e3ff6467b88b64c418e1e37633e88afa95612 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 18 Oct 2021 09:49:37 +0200 Subject: [PATCH] UART: restore default buffer size to 256 bytes Fixes #650 --- cores/arduino/Uart.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cores/arduino/Uart.h b/cores/arduino/Uart.h index 6aa847839..8f2e812bb 100644 --- a/cores/arduino/Uart.h +++ b/cores/arduino/Uart.h @@ -22,7 +22,11 @@ #include "SERCOM.h" #include "SafeRingBuffer.h" -#define SERIAL_BUFFER_SIZE 64 +#ifdef SERIAL_BUFFER_SIZE +#undef SERIAL_BUFFER_SIZE +#endif + +#define SERIAL_BUFFER_SIZE 256 class Uart : public arduino::HardwareSerial { @@ -46,8 +50,9 @@ class Uart : public arduino::HardwareSerial private: SERCOM *sercom; - arduino::SafeRingBuffer rxBuffer; - arduino::SafeRingBuffer txBuffer; + + arduino::SafeRingBufferN rxBuffer; + arduino::SafeRingBufferN txBuffer; uint8_t uc_pinRX; uint8_t uc_pinTX;