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

Method QueueRead

360Controller/_60Controller.cpp:554–570  ·  view source on GitHub ↗

Set up an asynchronous read

Source from the content-addressed store, hash-verified

552
553// Set up an asynchronous read
554bool Xbox360Peripheral::QueueRead(void)
555{
556 IOUSBCompletion complete;
557 IOReturn err;
558
559 if ((inPipe == NULL) || (inBuffer == NULL))
560 return false;
561 complete.target=this;
562 complete.action=ReadCompleteInternal;
563 complete.parameter=inBuffer;
564 err=inPipe->Read(inBuffer,0,0,inBuffer->getLength(),&complete);
565 if(err==kIOReturnSuccess) return true;
566 else {
567 IOLog("read - failed to start (0x%.8x)\n",err);
568 return false;
569 }
570}
571
572bool Xbox360Peripheral::QueueSerialRead(void)
573{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected