summaryrefslogtreecommitdiff
path: root/apps/include
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-07-14 17:01:23 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-07-14 17:01:23 -0600
commita9ac8ee92de976a5450e3a060a561e22094f4d60 (patch)
tree8b1201d325c23a980f2f67617dfdf8b502f99932 /apps/include
parentebc9e1858b5c0d534cbd9fe0e52ceeebecabe241 (diff)
downloadnuttx-a9ac8ee92de976a5450e3a060a561e22094f4d60.tar.gz
nuttx-a9ac8ee92de976a5450e3a060a561e22094f4d60.tar.bz2
nuttx-a9ac8ee92de976a5450e3a060a561e22094f4d60.zip
Fix some Zmodem buffer sizing issues
Diffstat (limited to 'apps/include')
-rw-r--r--apps/include/zmodem.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/include/zmodem.h b/apps/include/zmodem.h
index 668875fd5..bc85ba0a1 100644
--- a/apps/include/zmodem.h
+++ b/apps/include/zmodem.h
@@ -62,14 +62,22 @@
# define CONFIG_SYSTEM_ZMODEM_DEVNAME "/dev/console"
#endif
-/* The size of one buffer used to read data from the remote peer */
+/* The size of one buffer used to read data from the remote peer. The total
+ * buffering capability is SYSTEM_ZMODEM_RCVBUFSIZE plus the size of the RX
+ * buffer in the device driver. If you are using a serial driver with, say,
+ * USART0. That that buffering capability includes USART0_RXBUFFERSIZE.
+ * This total buffering capability must be significantly larger than
+ * SYSTEM_ZMODEM_PKTBUFSIZE (larger due streaming race conditions, data
+ * expansion due to escaping, and possible protocol overhead).
+ */
#ifndef CONFIG_SYSTEM_ZMODEM_RCVBUFSIZE
# define CONFIG_SYSTEM_ZMODEM_RCVBUFSIZE 512
#endif
/* Data may be received in gulps of varying size and alignment. Received
- * packets data is properly packed into a packet buffer of this size.
+ * packets data is properly unescaped, aligned and packed nto a packet
+ * buffer of this size.
*/
#ifndef CONFIG_SYSTEM_ZMODEM_PKTBUFSIZE