summaryrefslogtreecommitdiffstats
path: root/include/usbhost
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@google.com>2014-01-13 09:54:13 -0800
committerMike Lockwood <lockwood@google.com>2014-01-13 09:54:13 -0800
commitd2e798b53039f35967705acd5f6c399742f97e72 (patch)
tree0e0c8e6e08788fddbca2d67cb77e1fe9996f8e43 /include/usbhost
parentf922380f9ab3fcb0f1ac27c85bbb2dd394f8d2a5 (diff)
downloadcore-d2e798b53039f35967705acd5f6c399742f97e72.tar.gz
core-d2e798b53039f35967705acd5f6c399742f97e72.tar.bz2
core-d2e798b53039f35967705acd5f6c399742f97e72.zip
libusbhost: Add usb_device_set_configuration and usb_device_set_interface
usb_device_set_configuration is to support devices with multiple configurations usb_device_set_interface supports switching between interfaces with alternate settings Also moved zero string index checking to usb_device_get_string Change-Id: I34610b25f135894a0cf752a33e5738d4314d7122
Diffstat (limited to 'include/usbhost')
-rw-r--r--include/usbhost/usbhost.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/usbhost/usbhost.h b/include/usbhost/usbhost.h
index 1d67c12a9..d26e93175 100644
--- a/include/usbhost/usbhost.h
+++ b/include/usbhost/usbhost.h
@@ -189,6 +189,13 @@ int usb_device_release_interface(struct usb_device *device, unsigned int interfa
int usb_device_connect_kernel_driver(struct usb_device *device,
unsigned int interface, int connect);
+/* Sets the current configuration for the device to the specified configuration */
+int usb_device_set_configuration(struct usb_device *device, int configuration);
+
+/* Sets the specified interface of a USB device */
+int usb_device_set_interface(struct usb_device *device, unsigned int interface,
+ unsigned int alt_setting);
+
/* Sends a control message to the specified device on endpoint zero */
int usb_device_control_transfer(struct usb_device *device,
int requestType,