typedef struct IOUSBCompletion { void * target; IOUSBCompletionAction action; void * parameter; } IOUSBCompletion;();
Struct spefifying action to perform when a USB I/O completes
Name Description target The target to pass to the action function. action The function to call. parameter The parameter to pass to the action function. bufferSizeRemaining bytes left to be transferred
typedef void (*IOUSBCompletionAction)( void * target, void * parameter, IOReturn status, UInt32 bufferSizeRemaining);
Function called when USB I/O completes
Name Description target The target specified in the IOUSBCompletion struct. parameter The parameter specified in the IOUSBCompletion struct. status Completion status bufferSizeRemaining bytes left to be transferred
typedef struct { UInt8 type; // kUSBAnyType = don't care UInt8 direction; // kUSBAnyDirn = don't care UInt16 maxPacketSize; UInt8 interval; } IOUSBFindEndpointRequest;
Struct used to find endpoints of an interface type and direction are used to match endpoints, type, direction, maxPacketSize and interval are updated with the properties of the found endpoint.
Name Description type Type of endpoint: kUSBControl, kUSBIsoc, kUSBBulk, kUSBInterrupt, kUSBAnyType direction Direction of endpoint: kUSBOut, kUSBIn, kUSBAnyDirn maxPacketSize maximum packet size of endpoint. interval Polling interval in mSec for endpoint.
typedef struct USBWord { UInt8 loByte; UInt8 hiByte; } USBWord;
A 16 bit value in little-endian format, best accessed using the OSRead/WriteLittleInt16 functions
Name Description loByte least significant byte hiByte most significant byte
© 2000 Apple Computer, Inc. (Last Updated 2/23/2000)