Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ReadPipeT0 always wrong!



Hi, I'm developing the USB dirver for my SmartCard Reader for Mac OS  10.4.
When I  starts  pcsclite service first time, the driver can work well.
But when I stop the service pcsc(use ctrl+c) and restart pcsclite,
I have the wrong messeges about the ReadPipeT0.
 
my ReadUSB function:
UInt32 ReadUSB(reader * globalData, unsigned char *buffer, UInt32 ReadTimeOut)
{
    IOReturn iorv;
    UInt32  recvLen;
    UInt32      noDataTO, completeTO;

/* Make sure the pipe is OK */
 
 iorv = (*globalData->io.iface)->GetPipeStatus( globalData->io.iface,
                                                       globalData->io.inPipeRef );
    if ( iorv != kIOReturnSuccess )
    {
        return -1;
    }
    recvLen = globalData->ReadEpMaxPacketSize;
    completeTO = ReadTimeOut; //ReadTimeOut
    noDataTO   = ReadTimeOut; //ReadTimeOut
    iorv = (*globalData->io.iface)->ReadPipeTO( globalData->io.iface,
                                                    globalData->io.inPipeRef,
                                                    buffer, &recvLen, noDataTO, completeTO);
 
    if ( iorv != 0 )
 {
        iorv = (*globalData->io.iface)->ClearPipeStall( globalData->io.iface,
                                                    globalData->io.inPipeRef);
             
  AgmLog2(AGM_LOG_INFO," iorv = %x\n", iorv);           
        return -1;
    }
   
    return recvLen;
}
 
 
Do my ReadUSB function have some problem? any advice, Thank you!!


TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.