summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorheyuanjie87 <[email protected]>2013-01-09 18:07:59 +0800
committerheyuanjie87 <[email protected]>2013-01-09 18:07:59 +0800
commit928cabff50dec9a0c9f395cf9fdd4f3ff4e02443 (patch)
tree5c90f2d143ee05ec5dd2a001ffe3f6e01acf7b20 /components
parent58317f5bd2c6a9197983107e5af596ee6df11e28 (diff)
allows the user custom PID and VID
Diffstat (limited to 'components')
-rw-r--r--components/drivers/usb/usbdevice/core/usbdevice.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/components/drivers/usb/usbdevice/core/usbdevice.c b/components/drivers/usb/usbdevice/core/usbdevice.c
index 328fd6c686..01ee065a2b 100644
--- a/components/drivers/usb/usbdevice/core/usbdevice.c
+++ b/components/drivers/usb/usbdevice/core/usbdevice.c
@@ -9,13 +9,15 @@
*
* Change Logs:
* Date Author Notes
- * 2012-10-02 Yi Qiu first version
+ * 2012-10-02 Yi Qiu first version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <rtservice.h>
+#ifdef RT_USING_USB_DEVICE
+
const static char* ustring[] =
{
"Language",
@@ -36,8 +38,8 @@ static struct udevice_descriptor compsit_desc =
0x02, //bDeviceSubClass;
0x01, //bDeviceProtocol;
0x40, //bMaxPacketSize0;
- USB_VENDOR_ID, //idVendor;
- 0xbacf, //idProduct;
+ _VENDOR_ID, //idVendor;
+ _PRODUCT_ID, //idProduct;
USB_BCD_DEVICE, //bcdDevice;
USB_STRING_MANU_INDEX, //iManufacturer;
USB_STRING_PRODUCT_INDEX, //iProduct;
@@ -115,3 +117,4 @@ rt_err_t rt_usb_device_init(const char* udc_name)
return RT_EOK;
}
+#endif