diff options
| author | heyuanjie87 <[email protected]> | 2013-01-09 12:18:00 +0800 |
|---|---|---|
| committer | heyuanjie87 <[email protected]> | 2013-01-09 12:18:13 +0800 |
| commit | d20974b9d2b1d216cd01e0f70d440b1081b380c1 (patch) | |
| tree | d2bf45b9a11089ad25c4750d46fc6a3b754c3ae8 /components | |
| parent | 6119136596d7f2d809da1996d9a7aa35f74ec1bf (diff) | |
allows the user custom PID and VID
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/usb/usbdevice/class/cdc_vcom.c | 7 | ||||
| -rw-r--r-- | components/drivers/usb/usbdevice/class/mstorage.c | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/components/drivers/usb/usbdevice/class/cdc_vcom.c b/components/drivers/usb/usbdevice/class/cdc_vcom.c index addbb66c8e..44c48a4400 100644 --- a/components/drivers/usb/usbdevice/class/cdc_vcom.c +++ b/components/drivers/usb/usbdevice/class/cdc_vcom.c @@ -39,8 +39,8 @@ static struct udevice_descriptor dev_desc = 0x00, //bDeviceSubClass; 0x00, //bDeviceProtocol; 0x40, //bMaxPacketSize0; - USB_VENDOR_ID, //idVendor; - USB_CDC_PRODUCT_ID, //idProduct; + _VENDOR_ID, //idVendor; + _PRODUCT_ID, //idProduct; USB_BCD_DEVICE, //bcdDevice; USB_STRING_MANU_INDEX, //iManufacturer; USB_STRING_PRODUCT_INDEX, //iProduct; @@ -300,7 +300,7 @@ static rt_err_t _interface_handler(udevice_t device, uclass_t cls, ureq_t setup) _cdc_get_line_coding(device, setup); break; case CDC_SET_CONTROL_LINE_STATE: - rt_device_control((rt_device_t)device->dcd, CONTROL_SEND_STATUS, RT_NULL); + dcd_send_status(device->dcd); break; case CDC_SEND_BREAK: break; @@ -588,4 +588,3 @@ void rt_usb_vcom_init(void) } #endif - diff --git a/components/drivers/usb/usbdevice/class/mstorage.c b/components/drivers/usb/usbdevice/class/mstorage.c index 389c2ea479..ebd6342ec8 100644 --- a/components/drivers/usb/usbdevice/class/mstorage.c +++ b/components/drivers/usb/usbdevice/class/mstorage.c @@ -43,8 +43,8 @@ static struct udevice_descriptor dev_desc = 0x00, //bDeviceSubClass; 0x00, //bDeviceProtocol; 0x40, //bMaxPacketSize0; - USB_VENDOR_ID, //idVendor; - USB_MASS_STORAGE_PRODUCT_ID,//idProduct; + _VENDOR_ID, //idVendor; + _PRODUCT_ID, //idProduct; USB_BCD_DEVICE, //bcdDevice; USB_STRING_MANU_INDEX, //iManufacturer; USB_STRING_PRODUCT_INDEX, //iProduct; |
