Forgot this in my last commit.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18497 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2006-08-12 12:50:53 +00:00
parent b8c6a85136
commit 8be9a75c4e

View File

@ -0,0 +1,61 @@
/*
* Copyright 2004-2006, Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Michael Lotz <mmlr@mlotz.ch>
*/
#include "usb_p.h"
Interface::Interface(Device *device)
: ControlPipe(device,
device->LowSpeed() ? Pipe::LowSpeed : Pipe::NormalSpeed, 0, 8)
{
}
status_t
Interface::SetFeature(uint16 selector)
{
return SendRequest(
USB_REQTYPE_STANDARD | USB_REQTYPE_INTERFACE_OUT,
USB_REQUEST_SET_FEATURE,
selector,
0,
0,
NULL,
0,
NULL);
}
status_t
Interface::ClearFeature(uint16 selector)
{
return SendRequest(
USB_REQTYPE_STANDARD | USB_REQTYPE_INTERFACE_OUT,
USB_REQUEST_CLEAR_FEATURE,
selector,
0,
0,
NULL,
0,
NULL);
}
status_t
Interface::GetStatus(uint16 *status)
{
return SendRequest(
USB_REQTYPE_STANDARD | USB_REQTYPE_INTERFACE_IN,
USB_REQUEST_GET_STATUS,
0,
0,
2,
(void *)status,
2,
NULL);
}