| 88 | } |
| 89 | |
| 90 | bool Xbox360Peripheral::SendSwitch(bool sendOut) |
| 91 | { |
| 92 | IOUSBDevRequest controlReq; |
| 93 | |
| 94 | controlReq.bmRequestType = USBmakebmRequestType(sendOut ? kUSBOut : kUSBIn, kUSBVendor, kUSBDevice); |
| 95 | controlReq.bRequest = 0xa1; |
| 96 | controlReq.wValue = 0x0000; |
| 97 | controlReq.wIndex = 0xe416; |
| 98 | controlReq.wLength = sizeof(chatpadInit); |
| 99 | controlReq.pData = chatpadInit; |
| 100 | IOReturn err = device->DeviceRequest(&controlReq, 100, 100, NULL); |
| 101 | if (err == kIOReturnSuccess) |
| 102 | return true; |
| 103 | |
| 104 | const char *errStr = device->stringFromReturn(err); |
| 105 | IOLog("start - failed to %s chatpad setting (%x): %s\n", |
| 106 | sendOut ? "write" : "read", err, errStr); |
| 107 | return false; |
| 108 | } |
| 109 | |
| 110 | void Xbox360Peripheral::SendToggle(void) |
| 111 | { |
nothing calls this directly
no outgoing calls
no test coverage detected