forked from len0rd/rockbox
endpoint address was only set in fs descriptor, but we need it in hs too. Update storage device descriptor dynamic based on dcd
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14507 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4ecd9716bd
commit
17f2dd5c13
4 changed files with 18 additions and 6 deletions
|
|
@ -53,7 +53,6 @@ static struct usb_device_descriptor storage_device_desc = {
|
|||
.bDeviceClass = 0,
|
||||
.bDeviceSubClass = 0,
|
||||
.bDeviceProtocol = 0,
|
||||
.bMaxPacketSize0 = 64,
|
||||
.idVendor = 0xffff,
|
||||
.idProduct = 0x0001,
|
||||
.iManufacturer = 0,
|
||||
|
|
@ -181,6 +180,13 @@ int usb_storage_driver_bind(void* controler_ops)
|
|||
dev.out->claimed = true;
|
||||
logf("usb storage: out: %s", dev.out->name);
|
||||
|
||||
/* update device decsriptor */
|
||||
storage_device_desc.bMaxPacketSize0 = ops->ep0->maxpacket;
|
||||
|
||||
/* update hs descriptors as we asume that endpoints are the same for fs and hs */
|
||||
storage_hs_bulk_in_desc.bEndpointAddress = storage_fs_bulk_in_desc.bEndpointAddress;
|
||||
storage_hs_bulk_out_desc.bEndpointAddress = storage_fs_bulk_out_desc.bEndpointAddress;
|
||||
|
||||
return 0;
|
||||
|
||||
autoconf_fail:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue