summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usbdi.h
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2005-03-01 08:01:22 +0000
committersobomax <sobomax@FreeBSD.org>2005-03-01 08:01:22 +0000
commit44978948efb3d9610fc5cc98fc805f42b2892c1f (patch)
tree9b51c4b8fdee6491a8b90ff163e3f4e93683cca1 /sys/dev/usb/usbdi.h
parent98882623fab78f1911e3766a957313f134e24205 (diff)
downloadFreeBSD-src-44978948efb3d9610fc5cc98fc805f42b2892c1f.zip
FreeBSD-src-44978948efb3d9610fc5cc98fc805f42b2892c1f.tar.gz
Merge from NetBSD.
o usb_subr.c, add delta 1.119: Move usb_get_string() and make it public. o usbdi.c, bring on par with 1.106, this includes: - Make an iterator abstraction for looping through all descriptors. - Whine about not being able to figure out default language if we are debugging. - Move usb_get_string() and make it public. o usbdi.h, bring on par with 1.64, this includes: - Make an iterator abstraction for looping through all descriptors. - Move usb_get_string() and make it public. o usbdi_util.c, bring on par with 1.42, this includes: - Add usbd_get_protocol(). - Use NULL instead of 0. - Fix (mostly harmless) typo. - Move utility routine from uirda.c to usbdi_util.c. o usbdi_util.h, bring on par with 1.31, this includes: - Add usbd_get_protocol(). - Move utility routine from uirda.c to usbdi_util.c. MFC after: 3 days
Diffstat (limited to 'sys/dev/usb/usbdi.h')
-rw-r--r--sys/dev/usb/usbdi.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index 4e062bb..b238b17 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -170,6 +170,16 @@ usbd_status usbd_reload_device_desc(usbd_device_handle);
int usbd_ratecheck(struct timeval *last);
+usbd_status usbd_get_string(usbd_device_handle dev, int si, char *buf);
+
+/* An iterator for descriptors. */
+typedef struct {
+ const uByte *cur;
+ const uByte *end;
+} usbd_desc_iter_t;
+void usb_desc_iter_init(usbd_device_handle dev, usbd_desc_iter_t *iter);
+const usb_descriptor_t *usb_desc_iter_next(usbd_desc_iter_t *iter);
+
/*
* The usb_task structs form a queue of things to run in the USB event
* thread. Normally this is just device discovery when a connect/disconnect
OpenPOWER on IntegriCloud