1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 15:26:18 +00:00

Enforcing requirements so XON/XOFF software handshake works and no drops of data are experienced while transferring data to an SD Card. I tested this with a CH340 USB to serial adapter (quite typical) at baudrates as high as 1000000 on a Atmega2560 running at 16Mhz, with no problems at all. We need a 1024 byte RX buffer. Less than that and we will have drops, higher than that is not needed

This commit is contained in:
etagle 2017-08-08 02:30:04 -03:00
parent 9e147e9ac4
commit 3e5485de92

View File

@ -84,6 +84,9 @@
#ifndef RX_BUFFER_SIZE #ifndef RX_BUFFER_SIZE
#define RX_BUFFER_SIZE 128 #define RX_BUFFER_SIZE 128
#endif #endif
#if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
#error "XON/XOFF requires a 1024 or greater RX_BUFFER_SIZE for allowing reliable transfers without drops"
#endif
#ifndef TX_BUFFER_SIZE #ifndef TX_BUFFER_SIZE
#define TX_BUFFER_SIZE 32 #define TX_BUFFER_SIZE 32
#endif #endif