From 31dcce45c81e7a204f773704ce202c591f90660f Mon Sep 17 00:00:00 2001 From: ChunfengMu Date: Fri, 19 Jan 2018 01:23:28 +0800 Subject: [PATCH] =?UTF-8?q?1:=E4=BF=AE=E5=A4=8Dcdc=5Fvcom=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E5=A4=84=E7=90=86=E9=94=99=E8=AF=AF=EF=BC=8CSetLineCo?= =?UTF-8?q?ding=E5=91=BD=E4=BB=A4=E7=94=A8=E4=BA=8E=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=80=E4=BA=9Bvcom=E5=8F=82=E6=95=B0=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E6=AD=A4=E5=A4=84=E5=88=A4=E5=AE=9Avcom=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=8D=E5=90=88=E9=80=82=EF=BC=8C=E5=9B=A0?= =?UTF-8?q?=E9=80=9A=E8=BF=87SetControlLineState=E5=91=BD=E4=BB=A4wValue?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=9C=80=E4=BD=8E=E4=BD=8D=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/drivers/usb/usbdevice/class/cdc_vcom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/drivers/usb/usbdevice/class/cdc_vcom.c b/components/drivers/usb/usbdevice/class/cdc_vcom.c index 62f3bdcb28..a2eb5e66a0 100644 --- a/components/drivers/usb/usbdevice/class/cdc_vcom.c +++ b/components/drivers/usb/usbdevice/class/cdc_vcom.c @@ -400,12 +400,13 @@ static rt_err_t _interface_handler(ufunction_t func, ureq_t setup) break; case CDC_SET_LINE_CODING: _cdc_set_line_coding(func->device, setup); - data->connected = RT_TRUE; break; case CDC_GET_LINE_CODING: _cdc_get_line_coding(func->device, setup); break; case CDC_SET_CONTROL_LINE_STATE: + data->connected = (setup->wValue & 0x01) > 0?RT_TRUE:RT_FALSE; + RT_DEBUG_LOG(RT_DEBUG_USB, ("vcom state:%d \n", data->connected)); dcd_ep0_send_status(func->device->dcd); break; case CDC_SEND_BREAK: