diff options
Diffstat (limited to 'sys/dev/usb/usbdi.h')
-rw-r--r-- | sys/dev/usb/usbdi.h | 62 |
1 files changed, 28 insertions, 34 deletions
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index ba995871b1b..e26b1a5c13f 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi.h,v 1.28 2007/06/15 11:41:48 mbalmer Exp $ */ +/* $OpenBSD: usbdi.h,v 1.29 2007/06/18 11:37:04 mbalmer Exp $ */ /* $NetBSD: usbdi.h,v 1.62 2002/07/11 21:14:35 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */ @@ -92,26 +92,24 @@ typedef void (*usbd_callback)(usbd_xfer_handle, usbd_private_handle, #define DEVINFOSIZE 1024 usbd_status usbd_open_pipe(usbd_interface_handle iface, u_int8_t address, - u_int8_t flags, usbd_pipe_handle *pipe); + u_int8_t flags, usbd_pipe_handle *pipe); usbd_status usbd_close_pipe(usbd_pipe_handle pipe); usbd_status usbd_transfer(usbd_xfer_handle req); usbd_xfer_handle usbd_alloc_xfer(usbd_device_handle); usbd_status usbd_free_xfer(usbd_xfer_handle xfer); void usbd_setup_xfer(usbd_xfer_handle xfer, usbd_pipe_handle pipe, - usbd_private_handle priv, void *buffer, - u_int32_t length, u_int16_t flags, u_int32_t timeout, - usbd_callback); + usbd_private_handle priv, void *buffer, u_int32_t length, u_int16_t flags, + u_int32_t timeout, usbd_callback); void usbd_setup_default_xfer(usbd_xfer_handle xfer, usbd_device_handle dev, - usbd_private_handle priv, u_int32_t timeout, - usb_device_request_t *req, void *buffer, - u_int32_t length, u_int16_t flags, usbd_callback); + usbd_private_handle priv, u_int32_t timeout, usb_device_request_t *req, + void *buffer, u_int32_t length, u_int16_t flags, usbd_callback); void usbd_setup_isoc_xfer(usbd_xfer_handle xfer, usbd_pipe_handle pipe, - usbd_private_handle priv, u_int16_t *frlengths, - u_int32_t nframes, u_int16_t flags, usbd_callback); + usbd_private_handle priv, u_int16_t *frlengths, u_int32_t nframes, + u_int16_t flags, usbd_callback); void usbd_get_xfer_status(usbd_xfer_handle xfer, usbd_private_handle *priv, - void **buffer, u_int32_t *count, usbd_status *status); -usb_endpoint_descriptor_t *usbd_interface2endpoint_descriptor - (usbd_interface_handle iface, u_int8_t address); + void **buffer, u_int32_t *count, usbd_status *status); +usb_endpoint_descriptor_t *usbd_interface2endpoint_descriptor( + usbd_interface_handle iface, u_int8_t address); usbd_status usbd_abort_pipe(usbd_pipe_handle pipe); usbd_status usbd_clear_endpoint_stall(usbd_pipe_handle pipe); usbd_status usbd_clear_endpoint_stall_async(usbd_pipe_handle pipe); @@ -119,9 +117,9 @@ void usbd_clear_endpoint_toggle(usbd_pipe_handle pipe); usbd_status usbd_endpoint_count(usbd_interface_handle dev, u_int8_t *count); usbd_status usbd_interface_count(usbd_device_handle dev, u_int8_t *count); void usbd_interface2device_handle(usbd_interface_handle iface, - usbd_device_handle *dev); + usbd_device_handle *dev); usbd_status usbd_device2interface_handle(usbd_device_handle dev, - u_int8_t ifaceno, usbd_interface_handle *iface); + u_int8_t ifaceno, usbd_interface_handle *iface); usbd_device_handle usbd_pipe2device_handle(usbd_pipe_handle); void *usbd_alloc_buffer(usbd_xfer_handle xfer, u_int32_t size); @@ -129,22 +127,19 @@ void usbd_free_buffer(usbd_xfer_handle xfer); void *usbd_get_buffer(usbd_xfer_handle xfer); usbd_status usbd_sync_transfer(usbd_xfer_handle req); usbd_status usbd_open_pipe_intr(usbd_interface_handle iface, u_int8_t address, - u_int8_t flags, usbd_pipe_handle *pipe, - usbd_private_handle priv, void *buffer, - u_int32_t length, usbd_callback, int); + u_int8_t flags, usbd_pipe_handle *pipe, usbd_private_handle priv, + void *buffer, u_int32_t length, usbd_callback, int); usbd_status usbd_do_request(usbd_device_handle pipe, usb_device_request_t *req, - void *data); + void *data); usbd_status usbd_do_request_async(usbd_device_handle pipe, - usb_device_request_t *req, void *data); + usb_device_request_t *req, void *data); usbd_status usbd_do_request_flags(usbd_device_handle pipe, - usb_device_request_t *req, - void *data, u_int16_t flags, int*, u_int32_t); -usbd_status usbd_do_request_flags_pipe( - usbd_device_handle dev, usbd_pipe_handle pipe, - usb_device_request_t *req, void *data, u_int16_t flags, int *actlen, - u_int32_t); -usb_interface_descriptor_t *usbd_get_interface_descriptor - (usbd_interface_handle iface); + usb_device_request_t *req, void *data, u_int16_t flags, int*, u_int32_t); +usbd_status usbd_do_request_flags_pipe( usbd_device_handle dev, + usbd_pipe_handle pipe, usb_device_request_t *req, void *data, + u_int16_t flags, int *actlen, u_int32_t); +usb_interface_descriptor_t *usbd_get_interface_descriptor( + usbd_interface_handle iface); usb_config_descriptor_t *usbd_get_config_descriptor(usbd_device_handle dev); usb_device_descriptor_t *usbd_get_device_descriptor(usbd_device_handle dev); usbd_status usbd_set_interface(usbd_interface_handle, int); @@ -154,10 +149,9 @@ void usbd_fill_deviceinfo(usbd_device_handle, struct usb_device_info *, int); int usbd_get_interface_altindex(usbd_interface_handle iface); usb_interface_descriptor_t *usbd_find_idesc(usb_config_descriptor_t *cd, - int iindex, int ano); + int iindex, int ano); usb_endpoint_descriptor_t *usbd_find_edesc(usb_config_descriptor_t *cd, - int ifaceidx, int altidx, - int endptidx); + int ifaceidx, int altidx, int endptidx); void usbd_dopoll(usbd_interface_handle); void usbd_set_polling(usbd_device_handle iface, int on); @@ -171,8 +165,8 @@ char *usbd_devinfo_alloc(usbd_device_handle dev, int showclass); void usbd_devinfo_free(char *devinfop); const struct usbd_quirks *usbd_get_quirks(usbd_device_handle); -usb_endpoint_descriptor_t *usbd_get_endpoint_descriptor - (usbd_interface_handle iface, u_int8_t address); +usb_endpoint_descriptor_t *usbd_get_endpoint_descriptor( + usbd_interface_handle iface, u_int8_t address); usbd_status usbd_reload_device_desc(usbd_device_handle); @@ -208,7 +202,7 @@ struct usb_devno { u_int16_t ud_product; }; const struct usb_devno *usb_match_device(const struct usb_devno *tbl, - u_int nentries, u_int sz, u_int16_t vendor, u_int16_t product); + u_int nentries, u_int sz, u_int16_t vendor, u_int16_t product); #define usb_lookup(tbl, vendor, product) \ usb_match_device((const struct usb_devno *)(tbl), sizeof (tbl) / sizeof ((tbl)[0]), sizeof ((tbl)[0]), (vendor), (product)) #define USB_PRODUCT_ANY 0xffff |