summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruestczyh222 <[email protected]>2018-03-09 15:21:33 +0800
committeruestczyh222 <[email protected]>2018-03-09 15:21:33 +0800
commit55a1c11abc81f0b3c9e743aa1d244ba3da86c5e2 (patch)
tree63a7759235144f82e59fc7e2c2f15a2c17b47fdf
parenteb78535604011ae0f398daa1d898402d8e43b883 (diff)
[Components][WINUSB]Add Guid config to Kconfig Add VID PID config
-rwxr-xr-xcomponents/drivers/Kconfig12
-rw-r--r--components/drivers/usb/usbdevice/class/winusb.c2
2 files changed, 13 insertions, 1 deletions
diff --git a/components/drivers/Kconfig b/components/drivers/Kconfig
index 197710d5aa..4cff653fe2 100755
--- a/components/drivers/Kconfig
+++ b/components/drivers/Kconfig
@@ -181,6 +181,13 @@ menu "Using USB"
default n
if RT_USING_USB_DEVICE
+ config CONFIG_USB_VENDOR_ID
+ hex "USB Vendor ID"
+ default 0x0FFE
+ config CONFIG_USB_PRODUCT_ID
+ hex "USB Product ID"
+ default 0x0001
+
config RT_USB_DEVICE_COMPOSITE
bool "Enable composite device"
default n
@@ -231,6 +238,11 @@ menu "Using USB"
bool "Enable to use device as winusb device"
default n
endif
+ if RT_USB_DEVICE_WINUSB
+ config RT_WINUSB_GUID
+ string "Guid for winusb"
+ default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
+ endif
if RT_USB_DEVICE_MSTORAGE
config RT_USB_MSTORAGE_DISK_NAME
string "msc class disk name"
diff --git a/components/drivers/usb/usbdevice/class/winusb.c b/components/drivers/usb/usbdevice/class/winusb.c
index 25c14afac8..93a3a08e8b 100644
--- a/components/drivers/usb/usbdevice/class/winusb.c
+++ b/components/drivers/usb/usbdevice/class/winusb.c
@@ -105,7 +105,7 @@ const static char* _ustring[] =
};
struct usb_os_proerty winusb_proerty[] =
{
- USB_OS_PROERTY_DESC(USB_OS_PROERTY_TYPE_REG_SZ,"DeviceInterfaceGUID","{6860DC3C-C05F-4807-8807-1CA861CC1D66}"),
+ USB_OS_PROERTY_DESC(USB_OS_PROERTY_TYPE_REG_SZ,"DeviceInterfaceGUID",RT_WINUSB_GUID),
};
struct usb_os_function_comp_id_descriptor winusb_func_comp_id_desc =