Skip to content

Commit bc5744b

Browse files
author
mazhiyuan
committed
修复cdc_vcom.c中的一些编译问题
1 parent 0a7280f commit bc5744b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/drivers/usb/usbdevice/class/cdc_vcom.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
* 2013-06-25 heyuanjie87 remove SOF mechinism
1111
* 2013-07-20 Yi Qiu do more test
1212
* 2016-02-01 Urey Fix some error
13+
* 2021-10-14 mazhiyuan Fix some error
1314
*/
1415

1516
#include <rthw.h>
1617
#include <rtdevice.h>
17-
#include <drivers/serial.h>
1818
#include "drivers/usb_device.h"
1919
#include "cdc.h"
2020

@@ -738,7 +738,7 @@ static rt_size_t _vcom_rb_block_put(struct vcom *data, const rt_uint8_t *buf, rt
738738
return size;
739739
}
740740

741-
static rt_size_t _vcom_tx(struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size,int direction)
741+
static rt_size_t _vcom_tx(struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size,rt_uint32_t direction)
742742
{
743743
struct ufunction *func;
744744
struct vcom *data;
@@ -939,7 +939,8 @@ static void rt_usb_vcom_init(struct ufunction *func)
939939
config.parity = PARITY_NONE;
940940
config.bit_order = BIT_ORDER_LSB;
941941
config.invert = NRZ_NORMAL;
942-
config.bufsz = CDC_RX_BUFSIZE;
942+
config.rx_bufsz = CDC_RX_BUFSIZE;
943+
config.tx_bufsz = CDC_TX_BUFSIZE;
943944

944945
data->serial.ops = &usb_vcom_ops;
945946
data->serial.serial_rx = RT_NULL;

0 commit comments

Comments
 (0)