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;