From 928cabff50dec9a0c9f395cf9fdd4f3ff4e02443 Mon Sep 17 00:00:00 2001 From: heyuanjie87 Date: Wed, 9 Jan 2013 18:07:59 +0800 Subject: [PATCH] allows the user custom PID and VID --- components/drivers/usb/usbdevice/core/usbdevice.c | 9 ++++++--- 1 file 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 #include #include +#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