From 0fdf20cf582a931d6293b097b0ffff2b132da964 Mon Sep 17 00:00:00 2001 From: Ihavedone Date: Fri, 17 Jan 2020 15:42:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=99=9A=E6=8B=9F=E4=B8=B2?= =?UTF-8?q?=E5=8F=A3=E6=8E=A5=E6=94=B6=E7=BC=93=E5=AD=98=E7=9A=84=20ENV=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B9=EF=BC=8C=E5=8F=AF=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=8E=A5=E6=94=B6=E7=BC=93=E5=AD=98=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=EF=BC=8C=E9=BB=98=E8=AE=A4=E4=B8=BA128=E5=AD=97?= =?UTF-8?q?=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/drivers/Kconfig | 3 +++ components/drivers/usb/usbdevice/class/cdc_vcom.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/components/drivers/Kconfig b/components/drivers/Kconfig index c567233c84..3995199ac2 100755 --- a/components/drivers/Kconfig +++ b/components/drivers/Kconfig @@ -712,6 +712,9 @@ menu "Using USB" config RT_VCOM_TASK_STK_SIZE int "virtual com thread stack size" default 512 + config RT_CDC_RX_BUFSIZE + int "virtual com rx buffer size" + default 128 config RT_VCOM_TX_USE_DMA bool "Enable to use dma for vcom tx" default n diff --git a/components/drivers/usb/usbdevice/class/cdc_vcom.c b/components/drivers/usb/usbdevice/class/cdc_vcom.c index b6044b37a7..c94a438131 100644 --- a/components/drivers/usb/usbdevice/class/cdc_vcom.c +++ b/components/drivers/usb/usbdevice/class/cdc_vcom.c @@ -28,7 +28,11 @@ #define VCOM_TX_TIMEOUT 1000 #endif /*RT_VCOM_TX_TIMEOUT*/ +#ifdef RT_CDC_RX_BUFSIZE +#define CDC_RX_BUFSIZE RT_CDC_RX_BUFSIZE +#else #define CDC_RX_BUFSIZE 128 +#endif #define CDC_MAX_PACKET_SIZE 64 #define VCOM_DEVICE "vcom"