浏览代码

Merge pull request #8634 from fiveangle/bf2_report_xonxoff

[2.0.x] Report SERIAL_XON_XOFF in M115
Scott Lahteine 7 年前
父节点
当前提交
f9327534f8
没有帐户链接到提交者的电子邮件

+ 1
- 1
Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h 查看文件

64
 #endif
64
 #endif
65
 
65
 
66
 #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
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
 #endif
68
 #endif
69
 
69
 
70
 #if RX_BUFFER_SIZE > 256
70
 #if RX_BUFFER_SIZE > 256

+ 7
- 0
Marlin/src/gcode/host/M115.cpp 查看文件

31
 
31
 
32
   #if ENABLED(EXTENDED_CAPABILITIES_REPORT)
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
     // EEPROM (M500, M501)
41
     // EEPROM (M500, M501)
35
     #if ENABLED(EEPROM_SETTINGS)
42
     #if ENABLED(EEPROM_SETTINGS)
36
       SERIAL_PROTOCOLLNPGM("Cap:EEPROM:1");
43
       SERIAL_PROTOCOLLNPGM("Cap:EEPROM:1");

+ 3
- 1
Marlin/src/inc/Conditionals_adv.h 查看文件

30
 
30
 
31
   #ifndef USBCON
31
   #ifndef USBCON
32
     // Define constants and variables for buffering incoming serial data.
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
     #ifndef RX_BUFFER_SIZE
35
     #ifndef RX_BUFFER_SIZE
35
       #define RX_BUFFER_SIZE 128
36
       #define RX_BUFFER_SIZE 128
36
     #endif
37
     #endif
38
+    // 256 is the max TX buffer climit due to uint8_t head and tail.
37
     #ifndef TX_BUFFER_SIZE
39
     #ifndef TX_BUFFER_SIZE
38
       #define TX_BUFFER_SIZE 32
40
       #define TX_BUFFER_SIZE 32
39
     #endif
41
     #endif

+ 1
- 1
Marlin/src/inc/SanityCheck.h 查看文件

262
 
262
 
263
   // 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
263
   // 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
264
   #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
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
   #endif
266
   #endif
267
 #endif
267
 #endif
268
 
268
 

正在加载...
取消
保存