libusbhost: Add usb_device_get_version()
Change-Id: If2161178e9fe94a94faf01c102ef64f2a72d093b
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 @@
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;