mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Merge from NetBSD: usbdi.c rev 1.77, usbdi.h rev 1.44
date: 2000/09/23 21:02:04; author: augustss; Add a way to do control transfers on other pipes than the default pipe.
This commit is contained in:
parent
b588f0eca0
commit
d262a59fb2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=93553
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: usbdi.c,v 1.76 2000/06/06 11:36:21 augustss Exp $ */
|
||||
/* $NetBSD: usbdi.c,v 1.77 2000/09/23 21:02:04 augustss Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/*
|
||||
@ -882,6 +882,14 @@ usbd_do_request(usbd_device_handle dev, usb_device_request_t *req, void *data)
|
||||
usbd_status
|
||||
usbd_do_request_flags(usbd_device_handle dev, usb_device_request_t *req,
|
||||
void *data, u_int16_t flags, int *actlen)
|
||||
{
|
||||
return (usbd_do_request_flags_pipe(dev, dev->default_pipe, req,
|
||||
data, flags, actlen));
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
usbd_xfer_handle xfer;
|
||||
usbd_status err;
|
||||
@ -901,7 +909,8 @@ usbd_do_request_flags(usbd_device_handle dev, usb_device_request_t *req,
|
||||
if (xfer == NULL)
|
||||
return (USBD_NOMEM);
|
||||
usbd_setup_default_xfer(xfer, dev, 0, USBD_DEFAULT_TIMEOUT, req,
|
||||
data, UGETW(req->wLength), flags, 0);
|
||||
data, UGETW(req->wLength), flags, 0);
|
||||
xfer->pipe = pipe;
|
||||
err = usbd_sync_transfer(xfer);
|
||||
#if defined(USB_DEBUG) || defined(DIAGNOSTIC)
|
||||
if (xfer->actlen > xfer->length)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: usbdi.h,v 1.40 2000/02/02 07:34:00 augustss Exp $ */
|
||||
/* $NetBSD: usbdi.h,v 1.44 2000/09/23 21:02:04 augustss Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/*
|
||||
@ -151,6 +151,9 @@ usbd_status usbd_do_request_async
|
||||
usbd_status usbd_do_request_flags
|
||||
(usbd_device_handle pipe, usb_device_request_t *req,
|
||||
void *data, u_int16_t flags, int *);
|
||||
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);
|
||||
usb_interface_descriptor_t *usbd_get_interface_descriptor
|
||||
(usbd_interface_handle iface);
|
||||
usb_config_descriptor_t *usbd_get_config_descriptor
|
||||
|
Loading…
Reference in New Issue
Block a user