From 2e295759f2d2f12c251a4b930dd7903ea0d2e877 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 2 Dec 2017 21:02:02 -0800 Subject: [PATCH] [1.1.x] Report SERIAL_XON_XOFF in M115 -Report SERIAL_XON_XOFF in Extended Capabilites M115 report for hosts -Remove outdated 256 size limitation from comments on RX_BUFFER_SIZE defines config updates -Update error checking conditions --- Marlin/MarlinSerial.h | 6 ++++-- Marlin/Marlin_main.cpp | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Marlin/MarlinSerial.h b/Marlin/MarlinSerial.h index 6282c8943..a986ae61f 100644 --- a/Marlin/MarlinSerial.h +++ b/Marlin/MarlinSerial.h @@ -80,10 +80,12 @@ // using a ring buffer (I think), in which rx_buffer_head is the index of the // location to which to write the next incoming character and rx_buffer_tail // is the index of the location from which to read. - // 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256) + // Use only powers of 2. + // : [0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...] #ifndef RX_BUFFER_SIZE #define RX_BUFFER_SIZE 128 #endif + // 256 is the max TX buffer climit due to uint8_t head and tail. #ifndef TX_BUFFER_SIZE #define TX_BUFFER_SIZE 32 #endif @@ -95,7 +97,7 @@ #error "RX_BUFFER_SIZE must be a power of 2 greater than 1." #endif #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE)) - #error "TX_BUFFER_SIZE must be 0 or a power of 2 greater than 1." + #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256." #endif #if RX_BUFFER_SIZE > 256 diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 7c950fc4a..6425c5c5a 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -8490,6 +8490,13 @@ inline void gcode_M115() { #if ENABLED(EXTENDED_CAPABILITIES_REPORT) + // SERIAL_XON_XOFF + #if ENABLED(SERIAL_XON_XOFF) + SERIAL_PROTOCOLLNPGM("Cap:SERIAL_XON_XOFF:1"); + #else + SERIAL_PROTOCOLLNPGM("Cap:SERIAL_XON_XOFF:0"); + #endif + // EEPROM (M500, M501) #if ENABLED(EEPROM_SETTINGS) SERIAL_PROTOCOLLNPGM("Cap:EEPROM:1");