summaryrefslogtreecommitdiffstats
path: root/libusbhost
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@google.com>2015-04-29 13:04:10 -0700
committerMike Lockwood <lockwood@google.com>2015-04-29 13:04:10 -0700
commitf68600abfc7f1e2d64a4737630feea43bdaa85dc (patch)
treee1f034acc9d08a3f9869b0fc1c2cfc1b5bd9d1b9 /libusbhost
parent28e84a147f7f88db0f2e24b81b1280ea22604184 (diff)
downloadsystem_core-f68600abfc7f1e2d64a4737630feea43bdaa85dc.zip
system_core-f68600abfc7f1e2d64a4737630feea43bdaa85dc.tar.gz
system_core-f68600abfc7f1e2d64a4737630feea43bdaa85dc.tar.bz2
libusbhost: Add usb_device_get_version()
Change-Id: If2161178e9fe94a94faf01c102ef64f2a72d093b
Diffstat (limited to 'libusbhost')
-rw-r--r--libusbhost/usbhost.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libusbhost/usbhost.c b/libusbhost/usbhost.c
index 684f401..40b8b9f 100644
--- a/libusbhost/usbhost.c
+++ b/libusbhost/usbhost.c
@@ -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;