summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-01-27 10:46:19 -0800
committerMike Lockwood <lockwood@android.com>2011-01-27 16:21:56 -0800
commit120b57a3d9703bccba534af335aa94dd3a41be2f (patch)
tree7bbe588d74df0faae29acb1005b99fad30dbd25e /include
parentb42db825e103b1c37107bf8cd9a35fe4b8a07a13 (diff)
downloadsystem_core-120b57a3d9703bccba534af335aa94dd3a41be2f.zip
system_core-120b57a3d9703bccba534af335aa94dd3a41be2f.tar.gz
system_core-120b57a3d9703bccba534af335aa94dd3a41be2f.tar.bz2
libusbhost: Add call for synchronous bulk transfers
Also clean up and add timeout to control request transfer Change-Id: Ibc2d8ac64d0fa90e0a23e6225ce2c49b23bb0d97 Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'include')
-rw-r--r--include/usbhost/usbhost.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/include/usbhost/usbhost.h b/include/usbhost/usbhost.h
index 41e2ddc..c330cab 100644
--- a/include/usbhost/usbhost.h
+++ b/include/usbhost/usbhost.h
@@ -125,15 +125,6 @@ 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,
- int request,
- int value,
- int index,
- int length,
- void* buffer);
-
/* Returns a USB descriptor string for the given string ID.
* Used to implement usb_device_get_manufacturer_name,
* usb_device_get_product_name and usb_device_get_serial.
@@ -184,6 +175,23 @@ 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);
+/* Sends a control message to the specified device on endpoint zero */
+int usb_device_control_transfer(struct usb_device *device,
+ int requestType,
+ int request,
+ int value,
+ int index,
+ void* buffer,
+ int length,
+ unsigned int timeout);
+
+/* Reads or writes on a bulk endpoint */
+int usb_device_bulk_transfer(struct usb_device *device,
+ int endpoint,
+ void* buffer,
+ int length,
+ unsigned int timeout);
+
/* Creates a new usb_request. */
struct usb_request *usb_request_new(struct usb_device *dev,
const struct usb_endpoint_descriptor *ep_desc);