diff options
| author | Ihavedone <[email protected]> | 2020-01-17 15:42:56 +0800 |
|---|---|---|
| committer | Ihavedone <[email protected]> | 2020-01-17 15:42:56 +0800 |
| commit | 0fdf20cf582a931d6293b097b0ffff2b132da964 (patch) | |
| tree | d56473405d51b6c30b4ac016ced67395b9dd0b05 | |
| parent | caef50f3d152e2d4e59d349a2ad79013032a0f1b (diff) | |
添加虚拟串口接收缓存的 ENV 配置项,可手动配置接收缓存大小,默认为128字节
| -rwxr-xr-x | components/drivers/Kconfig | 3 | ||||
| -rw-r--r-- | components/drivers/usb/usbdevice/class/cdc_vcom.c | 4 |
2 files changed, 7 insertions, 0 deletions
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" |
