MCPcopy Create free account
hub / github.com/360Controller/360Controller / QueueSerialRead

Method QueueSerialRead

360Controller/_60Controller.cpp:572–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570}
571
572bool 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
595bool Xbox360Peripheral::QueueWrite(const void *bytes,UInt32 length)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected