Browse Source

Merge pull request #8635 from fiveangle/bf1_report_xonxoff

[1.1.x] Report SERIAL_XON_XOFF in M115
Scott Lahteine 7 years ago
parent
commit
1600f7d4ee
No account linked to committer's email address
2 changed files with 11 additions and 2 deletions
  1. 4
    2
      Marlin/MarlinSerial.h
  2. 7
    0
      Marlin/Marlin_main.cpp

+ 4
- 2
Marlin/MarlinSerial.h View File

80
   // using a ring buffer (I think), in which rx_buffer_head is the index of the
80
   // using a ring buffer (I think), in which rx_buffer_head is the index of the
81
   // location to which to write the next incoming character and rx_buffer_tail
81
   // location to which to write the next incoming character and rx_buffer_tail
82
   // is the index of the location from which to read.
82
   // is the index of the location from which to read.
83
-  // 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
83
+  // Use only powers of 2.
84
+  // : [0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...]
84
   #ifndef RX_BUFFER_SIZE
85
   #ifndef RX_BUFFER_SIZE
85
     #define RX_BUFFER_SIZE 128
86
     #define RX_BUFFER_SIZE 128
86
   #endif
87
   #endif
88
+  // 256 is the max TX buffer climit due to uint8_t head and tail.
87
   #ifndef TX_BUFFER_SIZE
89
   #ifndef TX_BUFFER_SIZE
88
     #define TX_BUFFER_SIZE 32
90
     #define TX_BUFFER_SIZE 32
89
   #endif
91
   #endif
95
     #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
97
     #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
96
   #endif
98
   #endif
97
   #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
99
   #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
98
-    #error "TX_BUFFER_SIZE must be 0 or a power of 2 greater than 1."
100
+    #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
99
   #endif
101
   #endif
100
 
102
 
101
   #if RX_BUFFER_SIZE > 256
103
   #if RX_BUFFER_SIZE > 256

+ 7
- 0
Marlin/Marlin_main.cpp View File

8490
 
8490
 
8491
   #if ENABLED(EXTENDED_CAPABILITIES_REPORT)
8491
   #if ENABLED(EXTENDED_CAPABILITIES_REPORT)
8492
 
8492
 
8493
+    // SERIAL_XON_XOFF
8494
+    #if ENABLED(SERIAL_XON_XOFF)
8495
+      SERIAL_PROTOCOLLNPGM("Cap:SERIAL_XON_XOFF:1");
8496
+    #else
8497
+      SERIAL_PROTOCOLLNPGM("Cap:SERIAL_XON_XOFF:0");
8498
+    #endif
8499
+
8493
     // EEPROM (M500, M501)
8500
     // EEPROM (M500, M501)
8494
     #if ENABLED(EEPROM_SETTINGS)
8501
     #if ENABLED(EEPROM_SETTINGS)
8495
       SERIAL_PROTOCOLLNPGM("Cap:EEPROM:1");
8502
       SERIAL_PROTOCOLLNPGM("Cap:EEPROM:1");

Loading…
Cancel
Save