libusbhost: Add usb_device_get_version()
Change-Id: If2161178e9fe94a94faf01c102ef64f2a72d093b
This commit is contained in:
parent
28e84a147f
commit
f68600abfc
2 changed files with 10 additions and 0 deletions
|
@ -156,6 +156,10 @@ char* usb_device_get_manufacturer_name(struct usb_device *device);
|
|||
*/
|
||||
char* usb_device_get_product_name(struct usb_device *device);
|
||||
|
||||
/* Returns the version number for the USB device.
|
||||
*/
|
||||
int usb_device_get_version(struct usb_device *device);
|
||||
|
||||
/* Returns the USB serial number for the USB device.
|
||||
* Call free() to free the result when you are done with it.
|
||||
*/
|
||||
|
|
|
@ -498,6 +498,12 @@ char* usb_device_get_product_name(struct usb_device *device)
|
|||
return usb_device_get_string(device, desc->iProduct);
|
||||
}
|
||||
|
||||
int usb_device_get_version(struct usb_device *device)
|
||||
{
|
||||
struct usb_device_descriptor *desc = (struct usb_device_descriptor *)device->desc;
|
||||
return desc->bcdUSB;
|
||||
}
|
||||
|
||||
char* usb_device_get_serial(struct usb_device *device)
|
||||
{
|
||||
struct usb_device_descriptor *desc = (struct usb_device_descriptor *)device->desc;
|
||||
|
|
Loading…
Reference in a new issue