Add some comments and a function to set the alternate settings in an
interface.
This commit is contained in:
parent
8cdf268a45
commit
d6ef9cbb33
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uhci.c,v 1.5 1998/07/23 09:18:37 augustss Exp $ */
|
||||
/* $NetBSD: uhci.c,v 1.6 1998/07/23 13:44:21 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -1216,8 +1216,9 @@ void
|
|||
uhci_device_bulk_abort(reqh)
|
||||
usbd_request_handle reqh;
|
||||
{
|
||||
/* XXX */
|
||||
usbd_delay_ms(2); /* make sure it is finished */
|
||||
/* XXX inactivate */
|
||||
usbd_delay_ms(1); /* make sure it is finished */
|
||||
/* XXX call done */
|
||||
}
|
||||
|
||||
/* Close a device bulk pipe. */
|
||||
|
@ -1330,8 +1331,9 @@ void
|
|||
uhci_device_ctrl_abort(reqh)
|
||||
usbd_request_handle reqh;
|
||||
{
|
||||
/* XXX */
|
||||
usbd_delay_ms(2); /* make sure it is finished */
|
||||
/* XXX inactivate */
|
||||
usbd_delay_ms(1); /* make sure it is finished */
|
||||
/* XXX call done */
|
||||
}
|
||||
|
||||
/* Close a device control pipe. */
|
||||
|
@ -1352,6 +1354,7 @@ uhci_device_intr_abort(reqh)
|
|||
{
|
||||
struct uhci_pipe *upipe;
|
||||
|
||||
/* XXX inactivate */
|
||||
usbd_delay_ms(2); /* make sure it is finished */
|
||||
if (reqh->pipe->intrreqh == reqh) {
|
||||
DPRINTF(("uhci_device_intr_abort: remove\n"));
|
||||
|
@ -2238,6 +2241,7 @@ void
|
|||
uhci_root_ctrl_abort(reqh)
|
||||
usbd_request_handle reqh;
|
||||
{
|
||||
/* Nothing to do, all transfers are syncronous. */
|
||||
}
|
||||
|
||||
/* Close the root pipe. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: usbdi.c,v 1.2 1998/07/22 12:22:09 augustss Exp $ */
|
||||
/* $NetBSD: usbdi.c,v 1.3 1998/07/23 13:44:22 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -60,8 +60,6 @@ extern int usbdebug;
|
|||
#define DPRINTFN(n,x)
|
||||
#endif
|
||||
|
||||
#define X { printf("usbdi: unimplemented\n"); return USBD_XXX; }
|
||||
|
||||
static usbd_status usbd_ar_pipe __P((usbd_pipe_handle pipe));
|
||||
static usbd_status usbd_ar_iface __P((usbd_interface_handle iface));
|
||||
static void usbd_transfer_cb __P((usbd_request_handle reqh));
|
||||
|
@ -766,6 +764,21 @@ usbd_unlock(tok)
|
|||
splx(tok);
|
||||
}
|
||||
|
||||
/* XXX need to check that the interface is idle */
|
||||
usbd_status
|
||||
usbd_set_interface(iface, aiface)
|
||||
usbd_interface_handle iface;
|
||||
int aiface;
|
||||
{
|
||||
usb_device_request_t req;
|
||||
|
||||
req.bmRequestType = UT_WRITE_INTERFACE;
|
||||
req.bRequest = UR_SET_INTERFACE;
|
||||
USETW(req.wValue, aiface);
|
||||
USETW(req.wIndex, iface->idesc->iInterface);
|
||||
USETW(req.wLength, 0);
|
||||
return usbd_do_request(iface->device, &req, 0);
|
||||
}
|
||||
|
||||
/*** Internal routines ***/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: usbdi.h,v 1.1 1998/07/12 19:52:01 augustss Exp $ */
|
||||
/* $NetBSD: usbdi.h,v 1.2 1998/07/23 13:44:22 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -213,6 +213,7 @@ usb_config_descriptor_t *usbd_get_config_descriptor
|
|||
__P((usbd_device_handle dev));
|
||||
usb_device_descriptor_t *usbd_get_device_descriptor
|
||||
__P((usbd_device_handle dev));
|
||||
usbd_status usbd_set_interface __P((usbd_interface_handle, int));
|
||||
|
||||
/* NetBSD attachment information */
|
||||
|
||||
|
|
Loading…
Reference in New Issue