Skip to content

Commit

Permalink
Merge pull request #651 from facchinm/uart_ringbuffer_256
Browse files Browse the repository at this point in the history
UART: restore default buffer size to 256 bytes
  • Loading branch information
facchinm authored Oct 20, 2021
2 parents dda98e5 + 678e3ff commit 3b9a5e7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cores/arduino/Uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -46,8 +50,9 @@ class Uart : public arduino::HardwareSerial

private:
SERCOM *sercom;
arduino::SafeRingBuffer rxBuffer;
arduino::SafeRingBuffer txBuffer;

arduino::SafeRingBufferN<SERIAL_BUFFER_SIZE> rxBuffer;
arduino::SafeRingBufferN<SERIAL_BUFFER_SIZE> txBuffer;

uint8_t uc_pinRX;
uint8_t uc_pinTX;
Expand Down

0 comments on commit 3b9a5e7

Please sign in to comment.