From bc5744b1ba0dc5af6fc392fdd3ad5d2a00aca0c5 Mon Sep 17 00:00:00 2001 From: mazhiyuan Date: Thu, 14 Oct 2021 10:58:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dcdc=5Fvcom.c=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E4=BA=9B=E7=BC=96=E8=AF=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/drivers/usb/usbdevice/class/cdc_vcom.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/drivers/usb/usbdevice/class/cdc_vcom.c b/components/drivers/usb/usbdevice/class/cdc_vcom.c index 3564330578..a8440bf15f 100644 --- a/components/drivers/usb/usbdevice/class/cdc_vcom.c +++ b/components/drivers/usb/usbdevice/class/cdc_vcom.c @@ -10,11 +10,11 @@ * 2013-06-25 heyuanjie87 remove SOF mechinism * 2013-07-20 Yi Qiu do more test * 2016-02-01 Urey Fix some error + * 2021-10-14 mazhiyuan Fix some error */ #include #include -#include #include "drivers/usb_device.h" #include "cdc.h" @@ -738,7 +738,7 @@ static rt_size_t _vcom_rb_block_put(struct vcom *data, const rt_uint8_t *buf, rt return size; } -static rt_size_t _vcom_tx(struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size,int direction) +static rt_size_t _vcom_tx(struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size,rt_uint32_t direction) { struct ufunction *func; struct vcom *data; @@ -939,7 +939,8 @@ static void rt_usb_vcom_init(struct ufunction *func) config.parity = PARITY_NONE; config.bit_order = BIT_ORDER_LSB; config.invert = NRZ_NORMAL; - config.bufsz = CDC_RX_BUFSIZE; + config.rx_bufsz = CDC_RX_BUFSIZE; + config.tx_bufsz = CDC_TX_BUFSIZE; data->serial.ops = &usb_vcom_ops; data->serial.serial_rx = RT_NULL;