Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
3e5485de92
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 3
    0
      Marlin/MarlinSerial.h

+ 3
- 0
Marlin/MarlinSerial.h Dosyayı Görüntüle

@@ -84,6 +84,9 @@
84 84
   #ifndef RX_BUFFER_SIZE
85 85
     #define RX_BUFFER_SIZE 128
86 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 90
   #ifndef TX_BUFFER_SIZE
88 91
     #define TX_BUFFER_SIZE 32
89 92
   #endif

Loading…
İptal
Kaydet