MCPcopy Create free account
hub / github.com/acidanthera/BrcmPatchRAM / continuousRead

Method continuousRead

BrcmPatchRAM/BrcmPatchRAM3.cpp:511–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511bool BrcmPatchRAM::continuousRead()
512{
513 IOReturn result;
514
515 if ((result = mInterruptPipe.read(mReadBuffer, 0, 0, mReadBuffer->getLength(), &mInterruptCompletion)) != kIOReturnSuccess) {
516 AlwaysLog("[%04x:%04x]: continuousRead - Failed to queue read (0x%08x)\n", mVendorId, mProductId, result);
517 /*
518 * As a retry of the read operation has never been successful
519 * in case of an error during my tests, it's better to give up
520 * immediately, so that the next attempt can start all over.
521 */
522 if (result == kIOUSBPipeStalled)
523 mInterruptPipe.clearStall();
524
525 return false;
526 }
527 return true;
528}
529
530void BrcmPatchRAM::readCompletion(void* target, void* parameter, IOReturn status, uint32_t bytesTransferred)
531{

Callers

nothing calls this directly

Calls 2

readMethod · 0.45
clearStallMethod · 0.45

Tested by

no test coverage detected