|
@@ -12,9 +12,9 @@ const struct usb_device_descriptor usb_mtp_dev_descr = {
|
|
|
.bDescriptorType = USB_DTYPE_DEVICE,
|
|
.bDescriptorType = USB_DTYPE_DEVICE,
|
|
|
.bcdUSB = VERSION_BCD(2, 0, 0),
|
|
.bcdUSB = VERSION_BCD(2, 0, 0),
|
|
|
.bDeviceClass = USB_CLASS_STILL_IMAGE, // MTP falls under Still Image class
|
|
.bDeviceClass = USB_CLASS_STILL_IMAGE, // MTP falls under Still Image class
|
|
|
- .bDeviceSubClass = 1, // Subclass for MTP
|
|
|
|
|
- .bDeviceProtocol = 1, // Protocol for MTP
|
|
|
|
|
- .bMaxPacketSize0 = USB_EP0_SIZE,
|
|
|
|
|
|
|
+ .bDeviceSubClass = USB_SUBCLASS_MTP, // Subclass for MTP
|
|
|
|
|
+ .bDeviceProtocol = USB_PROTO_MTP, // Protocol for MTP
|
|
|
|
|
+ .bMaxPacketSize0 = MTP_MAX_PACKET_SIZE,
|
|
|
.idVendor = 0x0483, // STMicroelectronics
|
|
.idVendor = 0x0483, // STMicroelectronics
|
|
|
.idProduct = 0x5741, // Custom Product ID
|
|
.idProduct = 0x5741, // Custom Product ID
|
|
|
.bcdDevice = VERSION_BCD(1, 0, 0),
|
|
.bcdDevice = VERSION_BCD(1, 0, 0),
|
|
@@ -31,8 +31,8 @@ const struct MtpDescriptor usb_mtp_cfg_descr = {
|
|
|
.bDescriptorType = USB_DTYPE_CONFIGURATION,
|
|
.bDescriptorType = USB_DTYPE_CONFIGURATION,
|
|
|
.wTotalLength = sizeof(struct MtpDescriptor),
|
|
.wTotalLength = sizeof(struct MtpDescriptor),
|
|
|
.bNumInterfaces = 1,
|
|
.bNumInterfaces = 1,
|
|
|
- .bConfigurationValue = 1,
|
|
|
|
|
- .iConfiguration = NO_DESCRIPTOR,
|
|
|
|
|
|
|
+ .bConfigurationValue = USB_CONF_VAL_MTP,
|
|
|
|
|
+ .iConfiguration = UsbDevHighSpeed,
|
|
|
.bmAttributes = USB_CFG_ATTR_RESERVED | USB_CFG_ATTR_SELFPOWERED,
|
|
.bmAttributes = USB_CFG_ATTR_RESERVED | USB_CFG_ATTR_SELFPOWERED,
|
|
|
.bMaxPower = USB_CFG_POWER_MA(100),
|
|
.bMaxPower = USB_CFG_POWER_MA(100),
|
|
|
},
|
|
},
|