| 346 | } |
| 347 | |
| 348 | IOReturn Wireless360Controller::setReport(IOMemoryDescriptor *report, IOHIDReportType reportType, IOOptionBits options) |
| 349 | { |
| 350 | char data[2]; |
| 351 | |
| 352 | // IOLog("setReport(%p, %d, %d)\n", report, reportType, options); |
| 353 | if (report->readBytes(0, data, 2) < 2) |
| 354 | return kIOReturnUnsupported; |
| 355 | |
| 356 | // Rumble |
| 357 | if (data[0] == 0x00) |
| 358 | { |
| 359 | if ((data[1] != report->getLength()) || (data[1] != 0x04)) |
| 360 | return kIOReturnUnsupported; |
| 361 | report->readBytes(2, data, 2); |
| 362 | SetRumbleMotors(data[0], data[1]); |
| 363 | return kIOReturnSuccess; |
| 364 | } |
| 365 | |
| 366 | return super::setReport(report, reportType, options); |
| 367 | } |
| 368 | |
| 369 | IOReturn Wireless360Controller::newReportDescriptor(IOMemoryDescriptor ** descriptor ) const |
| 370 | { |
nothing calls this directly
no outgoing calls
no test coverage detected