Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec34ef58 authored by Mike Lockwood's avatar Mike Lockwood Committed by Android (Google) Code Review
Browse files

Merge "libusbhost: Add accessor for the USB device descriptor"

parents 11549b08 50372073
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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,
+5 −0
Original line number Diff line number Diff line
@@ -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,