| 570 | } |
| 571 | |
| 572 | bool Xbox360Peripheral::QueueSerialRead(void) |
| 573 | { |
| 574 | IOUSBCompletion complete; |
| 575 | IOReturn err; |
| 576 | |
| 577 | if ((serialInPipe == NULL) || (serialInBuffer == NULL)) |
| 578 | return false; |
| 579 | complete.target = this; |
| 580 | complete.action = SerialReadCompleteInternal; |
| 581 | complete.parameter = serialInBuffer; |
| 582 | err = serialInPipe->Read(serialInBuffer, 0, 0, serialInBuffer->getLength(), &complete); |
| 583 | if (err == kIOReturnSuccess) |
| 584 | { |
| 585 | return true; |
| 586 | } |
| 587 | else |
| 588 | { |
| 589 | IOLog("read - failed to start for chatpad (0x%.8x)\n",err); |
| 590 | return false; |
| 591 | } |
| 592 | } |
| 593 | |
| 594 | // Set up an asynchronous write |
| 595 | bool Xbox360Peripheral::QueueWrite(const void *bytes,UInt32 length) |
nothing calls this directly
no outgoing calls
no test coverage detected