提交 f04941c9 编写于 作者: M mazhiyuan

[cdc_vcom.c]adapt to both v1 and v2 of serial

上级 bc5744b1
......@@ -939,9 +939,12 @@ static void rt_usb_vcom_init(struct ufunction *func)
config.parity = PARITY_NONE;
config.bit_order = BIT_ORDER_LSB;
config.invert = NRZ_NORMAL;
#if defined(RT_USING_SERIAL_V1)
config.bufsz = CDC_RX_BUFSIZE;
#elif defined(RT_USING_SERIAL_V2)
config.rx_bufsz = CDC_RX_BUFSIZE;
config.tx_bufsz = CDC_TX_BUFSIZE;
#endif
data->serial.ops = &usb_vcom_ops;
data->serial.serial_rx = RT_NULL;
data->serial.config = config;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册