diff options
| author | uestczyh222 <[email protected]> | 2018-01-22 13:13:23 +0800 |
|---|---|---|
| committer | uestczyh222 <[email protected]> | 2018-01-22 13:13:23 +0800 |
| commit | 8b1eedf73efdcbd0f67a5127ad52178c48789899 (patch) | |
| tree | 542cde444527345d2f3147e2d45ecc15c8c6047b /components/drivers | |
| parent | bcfade9a862dd1c0a7e3c5c1a4ded6d311a11c66 (diff) | |
| parent | 765df5b4795968740ea73640ad500ec368f682a3 (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'components/drivers')
| -rw-r--r-- | components/drivers/usb/usbdevice/class/cdc_vcom.c | 3 |
1 files changed, 2 insertions, 1 deletions
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: |
