Add usbd_set_hub_feature() and usbd_clear_hub_feature().

This commit is contained in:
augustss 1999-08-07 23:14:17 +00:00
parent 3766555455
commit 38de172f03
2 changed files with 34 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: usbdi_util.c,v 1.15 1999/08/02 19:50:30 augustss Exp $ */
/* $NetBSD: usbdi_util.c,v 1.16 1999/08/07 23:14:17 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -182,6 +182,36 @@ usbd_get_port_status(dev, port, ps)
return (usbd_do_request(dev, &req, ps));
}
usbd_status
usbd_clear_hub_feature(dev, sel)
usbd_device_handle dev;
int sel;
{
usb_device_request_t req;
req.bmRequestType = UT_WRITE_CLASS_DEVICE;
req.bRequest = UR_CLEAR_FEATURE;
USETW(req.wValue, sel);
USETW(req.wIndex, 0);
USETW(req.wLength, 0);
return (usbd_do_request(dev, &req, 0));
}
usbd_status
usbd_set_hub_feature(dev, sel)
usbd_device_handle dev;
int sel;
{
usb_device_request_t req;
req.bmRequestType = UT_WRITE_CLASS_DEVICE;
req.bRequest = UR_SET_FEATURE;
USETW(req.wValue, sel);
USETW(req.wIndex, 0);
USETW(req.wLength, 0);
return (usbd_do_request(dev, &req, 0));
}
usbd_status
usbd_clear_port_feature(dev, port, sel)
usbd_device_handle dev;

View File

@ -1,4 +1,4 @@
/* $NetBSD: usbdi_util.h,v 1.13 1999/06/30 06:44:23 augustss Exp $ */
/* $NetBSD: usbdi_util.h,v 1.14 1999/08/07 23:14:17 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -48,6 +48,8 @@ usbd_status usbd_get_device_desc __P((usbd_device_handle dev,
usbd_status usbd_set_address __P((usbd_device_handle dev, int addr));
usbd_status usbd_get_port_status __P((usbd_device_handle,
int, usb_port_status_t *));
usbd_status usbd_set_hub_feature __P((usbd_device_handle dev, int));
usbd_status usbd_clear_hub_feature __P((usbd_device_handle, int));
usbd_status usbd_set_port_feature __P((usbd_device_handle dev, int, int));
usbd_status usbd_clear_port_feature __P((usbd_device_handle, int, int));
usbd_status usbd_get_device_status __P((usbd_device_handle,usb_status_t*));