18be9a75cSMichael Lotz /* 2*02ce23a1SMichael Lotz * Copyright 2006, Haiku Inc. All rights reserved. 38be9a75cSMichael Lotz * Distributed under the terms of the MIT License. 48be9a75cSMichael Lotz * 58be9a75cSMichael Lotz * Authors: 68be9a75cSMichael Lotz * Michael Lotz <mmlr@mlotz.ch> 78be9a75cSMichael Lotz */ 88be9a75cSMichael Lotz 98be9a75cSMichael Lotz #include "usb_p.h" 108be9a75cSMichael Lotz 118be9a75cSMichael Lotz 128be9a75cSMichael Lotz Interface::Interface(Device *device) 135b0ec61fSMichael Lotz : ControlPipe(device, device->Speed(), 0, 8) 148be9a75cSMichael Lotz { 158be9a75cSMichael Lotz } 168be9a75cSMichael Lotz 178be9a75cSMichael Lotz 188be9a75cSMichael Lotz status_t 198be9a75cSMichael Lotz Interface::SetFeature(uint16 selector) 208be9a75cSMichael Lotz { 218be9a75cSMichael Lotz return SendRequest( 228be9a75cSMichael Lotz USB_REQTYPE_STANDARD | USB_REQTYPE_INTERFACE_OUT, 238be9a75cSMichael Lotz USB_REQUEST_SET_FEATURE, 248be9a75cSMichael Lotz selector, 258be9a75cSMichael Lotz 0, 268be9a75cSMichael Lotz 0, 278be9a75cSMichael Lotz NULL, 288be9a75cSMichael Lotz 0, 298be9a75cSMichael Lotz NULL); 308be9a75cSMichael Lotz } 318be9a75cSMichael Lotz 328be9a75cSMichael Lotz 338be9a75cSMichael Lotz status_t 348be9a75cSMichael Lotz Interface::ClearFeature(uint16 selector) 358be9a75cSMichael Lotz { 368be9a75cSMichael Lotz return SendRequest( 378be9a75cSMichael Lotz USB_REQTYPE_STANDARD | USB_REQTYPE_INTERFACE_OUT, 388be9a75cSMichael Lotz USB_REQUEST_CLEAR_FEATURE, 398be9a75cSMichael Lotz selector, 408be9a75cSMichael Lotz 0, 418be9a75cSMichael Lotz 0, 428be9a75cSMichael Lotz NULL, 438be9a75cSMichael Lotz 0, 448be9a75cSMichael Lotz NULL); 458be9a75cSMichael Lotz } 468be9a75cSMichael Lotz 478be9a75cSMichael Lotz 488be9a75cSMichael Lotz status_t 498be9a75cSMichael Lotz Interface::GetStatus(uint16 *status) 508be9a75cSMichael Lotz { 518be9a75cSMichael Lotz return SendRequest( 528be9a75cSMichael Lotz USB_REQTYPE_STANDARD | USB_REQTYPE_INTERFACE_IN, 538be9a75cSMichael Lotz USB_REQUEST_GET_STATUS, 548be9a75cSMichael Lotz 0, 558be9a75cSMichael Lotz 0, 568be9a75cSMichael Lotz 2, 578be9a75cSMichael Lotz (void *)status, 588be9a75cSMichael Lotz 2, 598be9a75cSMichael Lotz NULL); 608be9a75cSMichael Lotz } 61