2 * Copyright 2006, Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Michael Lotz <mmlr@mlotz.ch>
9 #include "usb_private.h"
12 Interface::Interface(Object
*parent
, uint8 interfaceIndex
)
14 fInterfaceIndex(interfaceIndex
)
16 TRACE("creating interface\n");
21 Interface::SetFeature(uint16 selector
)
23 TRACE("set feature %u\n", selector
);
24 return ((Device
*)Parent())->DefaultPipe()->SendRequest(
25 USB_REQTYPE_STANDARD
| USB_REQTYPE_INTERFACE_OUT
,
26 USB_REQUEST_SET_FEATURE
,
37 Interface::ClearFeature(uint16 selector
)
39 TRACE("clear feature %u\n", selector
);
40 return ((Device
*)Parent())->DefaultPipe()->SendRequest(
41 USB_REQTYPE_STANDARD
| USB_REQTYPE_INTERFACE_OUT
,
42 USB_REQUEST_CLEAR_FEATURE
,
53 Interface::GetStatus(uint16
*status
)
55 TRACE("get status\n");
56 return ((Device
*)Parent())->DefaultPipe()->SendRequest(
57 USB_REQTYPE_STANDARD
| USB_REQTYPE_INTERFACE_IN
,
58 USB_REQUEST_GET_STATUS
,