Merge "libusbhost: Add accessor for the USB device descriptor"
This commit is contained in:
commit
ec34ef5880
|
@ -109,6 +109,8 @@ uint16_t usb_device_get_vendor_id(struct usb_device *device);
|
|||
/* Returns the USB product ID from the device descriptor for the USB device */
|
||||
uint16_t usb_device_get_product_id(struct usb_device *device);
|
||||
|
||||
const struct usb_device_descriptor* usb_device_get_device_descriptor(struct usb_device *device);
|
||||
|
||||
/* Sends a control message to the specified device on endpoint zero */
|
||||
int usb_device_send_control(struct usb_device *device,
|
||||
int requestType,
|
||||
|
|
|
@ -325,6 +325,11 @@ uint16_t usb_device_get_product_id(struct usb_device *device)
|
|||
return __le16_to_cpu(desc->idProduct);
|
||||
}
|
||||
|
||||
const struct usb_device_descriptor* usb_device_get_device_descriptor(struct usb_device *device)
|
||||
{
|
||||
return (struct usb_device_descriptor*)device->desc;
|
||||
}
|
||||
|
||||
int usb_device_send_control(struct usb_device *device,
|
||||
int requestType,
|
||||
int request,
|
||||
|
|
Loading…
Reference in New Issue