[Mod] Linux USB Gadget 支持WinUSB免驱
[详细说明] 1. 新增 调试宏:CONFIG_GAOYANG; 2. 开启 调试宏:DEBUG,打印USB控制器寄存器信息
This commit is contained in:
@ -1685,7 +1685,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
|
||||
if (gadget->lpm_capable)
|
||||
cdev->desc.bcdUSB = cpu_to_le16(0x0201);
|
||||
else
|
||||
cdev->desc.bcdUSB = cpu_to_le16(0x0200);
|
||||
cdev->desc.bcdUSB = cpu_to_le16(0x0201);
|
||||
}
|
||||
|
||||
value = min(w_length, (u16) sizeof cdev->desc);
|
||||
@ -1716,11 +1716,16 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
|
||||
value = min(w_length, (u16) value);
|
||||
break;
|
||||
case USB_DT_BOS:
|
||||
#if !defined (CONFIG_GAOYANG)
|
||||
if (gadget_is_superspeed(gadget) ||
|
||||
gadget->lpm_capable) {
|
||||
value = bos_desc(cdev);
|
||||
value = min(w_length, (u16) value);
|
||||
}
|
||||
#else
|
||||
value = bos_desc(cdev);
|
||||
value = min(w_length, (u16) value);
|
||||
#endif // defined (CONFIG_GAOYANG)
|
||||
break;
|
||||
case USB_DT_OTG:
|
||||
if (gadget_is_otg(gadget)) {
|
||||
|
||||
Reference in New Issue
Block a user