Преглед на файлове

[2.0.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
-Update error message conditions
Unknown преди 7 години
родител
ревизия
4c5ffd2349
променени са 4 файла, в които са добавени 12 реда и са изтрити 3 реда
  1. 1
    1
      Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h
  2. 7
    0
      Marlin/src/gcode/host/M115.cpp
  3. 3
    1
      Marlin/src/inc/Conditionals_adv.h
  4. 1
    1
      Marlin/src/inc/SanityCheck.h

+ 1
- 1
Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h Целия файл

@@ -64,7 +64,7 @@
64 64
 #endif
65 65
 
66 66
 #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
67
-  #error "TX_BUFFER_SIZE must be 0 or a power of 2 greater than 1."
67
+  #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
68 68
 #endif
69 69
 
70 70
 #if RX_BUFFER_SIZE > 256

+ 7
- 0
Marlin/src/gcode/host/M115.cpp Целия файл

@@ -31,6 +31,13 @@ void GcodeSuite::M115() {
31 31
 
32 32
   #if ENABLED(EXTENDED_CAPABILITIES_REPORT)
33 33
 
34
+    // SERIAL_XON_XOFF
35
+    #if ENABLED(SERIAL_XON_XOFF)
36
+      SERIAL_PROTOCOLLNPGM("Cap:SERIAL_XON_XOFF:1");
37
+    #else
38
+      SERIAL_PROTOCOLLNPGM("Cap:SERIAL_XON_XOFF:0");
39
+    #endif
40
+
34 41
     // EEPROM (M500, M501)
35 42
     #if ENABLED(EEPROM_SETTINGS)
36 43
       SERIAL_PROTOCOLLNPGM("Cap:EEPROM:1");

+ 3
- 1
Marlin/src/inc/Conditionals_adv.h Целия файл

@@ -30,10 +30,12 @@
30 30
 
31 31
   #ifndef USBCON
32 32
     // Define constants and variables for buffering incoming serial data.
33
-    // 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
33
+    // Use only powers of 2.
34
+    // : [0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...]
34 35
     #ifndef RX_BUFFER_SIZE
35 36
       #define RX_BUFFER_SIZE 128
36 37
     #endif
38
+    // 256 is the max TX buffer climit due to uint8_t head and tail.
37 39
     #ifndef TX_BUFFER_SIZE
38 40
       #define TX_BUFFER_SIZE 32
39 41
     #endif

+ 1
- 1
Marlin/src/inc/SanityCheck.h Целия файл

@@ -262,7 +262,7 @@
262 262
 
263 263
   // 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
264 264
   #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
265
-    #error "TX_BUFFER_SIZE must be 0 or a power of 2 greater than 1."
265
+    #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
266 266
   #endif
267 267
 #endif
268 268
 

Loading…
Отказ
Запис