mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
add missing get configuration request handling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14530 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6fd7573d32
commit
c7b3f8be9b
1 changed files with 9 additions and 0 deletions
|
@ -151,6 +151,7 @@ struct device {
|
|||
struct usb_ep* in;
|
||||
struct usb_ep* out;
|
||||
struct usb_ep* intr;
|
||||
uint32_t used_config;
|
||||
struct usb_descriptor_header** descriptors;
|
||||
};
|
||||
|
||||
|
@ -253,6 +254,12 @@ int usb_storage_driver_request(struct usb_ctrlrequest* request)
|
|||
ret = set_config(request->wValue);
|
||||
break;
|
||||
|
||||
case USB_REQ_GET_CONFIGURATION:
|
||||
logf("usb storage: get configuration");
|
||||
ret = 1;
|
||||
res.buf = &dev.used_config;
|
||||
break;
|
||||
|
||||
case USB_REQ_SET_INTERFACE:
|
||||
logf("usb storage: set interface");
|
||||
ret = 0;
|
||||
|
@ -326,6 +333,8 @@ static int set_config(int config)
|
|||
logf("setup %s", dev.out->name);
|
||||
ops->enable(dev.out, (struct usb_endpoint_descriptor*)dev.descriptors[2]);
|
||||
|
||||
dev.used_config = config;
|
||||
|
||||
/* setup buffers */
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue