jw0k / serial2ti83

A program for Arduino Uno that makes it possible to connect a TI-83 calculator to a computer
MIT License
68 stars 25 forks source link

suggestion: redefine serial buffer constants in sketch #2

Open scruss opened 4 years ago

scruss commented 4 years ago

Hi - thanks for making and documenting this project!

Rather than editing the Arduino system header HardwareSerial.h, maybe put the revised values in the code itself:

#define SERIAL_TX_BUFFER_SIZE 256
#define SERIAL_RX_BUFFER_SIZE 256

While this does generate a couple of warnings like this one:

 … /serial2ti83/serial2ti83.ino:13:0: warning: "SERIAL_TX_BUFFER_SIZE" redefined
 #define SERIAL_TX_BUFFER_SIZE 256

In file included from  … /hardware/arduino/avr/cores/arduino/Arduino.h:232:0,
                 from sketch/serial2ti83.ino.cpp:1:
 … /hardware/arduino/avr/cores/arduino/HardwareSerial.h:46:0: note: this is the location of the previous definition
 #define SERIAL_TX_BUFFER_SIZE 64

it does appear to redefine the buffer sizes properly.