Bläddra i källkod

Enforcing requirements so XON/XOFF software handshake works and no drops of data are experienced while transferring data to an SD Card. I tested this with a CH340 USB to serial adapter (quite typical) at baudrates as high as 1000000 on a Atmega2560 running at 16Mhz, with no problems at all. We need a 1024 byte RX buffer. Less than that and we will have drops, higher than that is not needed

etagle 7 år sedan
förälder
incheckning
3e5485de92
1 ändrade filer med 3 tillägg och 0 borttagningar
  1. 3
    0
      Marlin/MarlinSerial.h

+ 3
- 0
Marlin/MarlinSerial.h Visa fil

84
   #ifndef RX_BUFFER_SIZE
84
   #ifndef RX_BUFFER_SIZE
85
     #define RX_BUFFER_SIZE 128
85
     #define RX_BUFFER_SIZE 128
86
   #endif
86
   #endif
87
+  #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
88
+	#error "XON/XOFF requires a 1024 or greater RX_BUFFER_SIZE for allowing reliable transfers without drops"
89
+  #endif
87
   #ifndef TX_BUFFER_SIZE
90
   #ifndef TX_BUFFER_SIZE
88
     #define TX_BUFFER_SIZE 32
91
     #define TX_BUFFER_SIZE 32
89
   #endif
92
   #endif

Laddar…
Avbryt
Spara