mirror of
https://review.haiku-os.org/haiku
synced 2025-01-22 06:16:03 +01:00
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:
parent
b8c6a85136
commit
8be9a75c4e
61
src/add-ons/kernel/bus_managers/usb/Interface.cpp
Normal file
61
src/add-ons/kernel/bus_managers/usb/Interface.cpp
Normal 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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user