Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix SERIAL_BUFFER_SIZE for SAMD & nRF5x (Adafruit) #459

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions utility/SerialFirmata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@

#include "SerialFirmata.h"

// The RX and TX hardware FIFOs of the ESP8266 hold 128 bytes that can be
// extended using interrupt handlers. The Arduino constants are not available
// for the ESP8266 platform.
#if !defined(SERIAL_RX_BUFFER_SIZE) && defined(UART_TX_FIFO_SIZE)
#define SERIAL_RX_BUFFER_SIZE UART_TX_FIFO_SIZE
#if !defined(SERIAL_RX_BUFFER_SIZE)
#if defined(UART_TX_FIFO_SIZE)
// The RX and TX hardware FIFOs of the ESP8266 hold 128 bytes that can be
// extended using interrupt handlers. The Arduino constants are not available
// for the ESP8266 platform.
#define SERIAL_RX_BUFFER_SIZE UART_TX_FIFO_SIZE
#elif defined(SERIAL_BUFFER_SIZE)
// For SAMD and nRF5x core
#define SERIAL_RX_BUFFER_SIZE SERIAL_BUFFER_SIZE
#endif
#endif


Expand Down