Add TX-buffer for MarlinSerial

Similar to the current Arduino HardwareSerial
but with max. 256 byte buffer-size.

Deactivated by default.

The boards with AT90USB processor (USBCON) already use a TX-buffer.
This commit is contained in:
AnHardt
2016-07-08 17:25:21 +02:00
parent 98d0167a57
commit 4b44a23a36
20 changed files with 280 additions and 48 deletions

View File

@ -520,6 +520,12 @@ const unsigned int dropsegments = 5; //everything with less than this number of
#define MAX_CMD_SIZE 96
#define BUFSIZE 26
// Set Transfer-Buffer-Size by uncommenting the next define. Default size is 32byte.
// :[0,2,4,8,16,32,64,128,256]. To save 386byte of PROGMEM and (3 + TX_BUFFER_SIZE) bytes of RAM set TX_BUFFER_SIZE to 0
// To buffer a simple "ok" you need 4 byte, for ADVANCED_OK/M105 you need 32 and for debug-echo: 128 byte to get the optimal speed.
// Any other output does not need to be that speedy.
#define TX_BUFFER_SIZE 0
// Enable an emergency-command parser to intercept certain commands as they
// enter the serial receive buffer, so they cannot be blocked.
// Currently handles M108, M112, M410