USB.h



Typedefs

IOUSBCompletion

typedef struct IOUSBCompletion { void * target; IOUSBCompletionAction action; void * parameter; } IOUSBCompletion;();

Struct spefifying action to perform when a USB I/O completes

Parameters

NameDescription
targetThe target to pass to the action function.
actionThe function to call.
parameterThe parameter to pass to the action function.
bufferSizeRemainingbytes left to be transferred

IOUSBCompletionAction

typedef void (*IOUSBCompletionAction)(
                void *			target,
                void *			parameter,
                IOReturn		status,
                UInt32			bufferSizeRemaining);

Function called when USB I/O completes

Parameters

NameDescription
targetThe target specified in the IOUSBCompletion struct.
parameterThe parameter specified in the IOUSBCompletion struct.
statusCompletion status
bufferSizeRemainingbytes left to be transferred

IOUSBFindEndpointRequest

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.

Fields

NameDescription
typeType of endpoint: kUSBControl, kUSBIsoc, kUSBBulk, kUSBInterrupt, kUSBAnyType
directionDirection of endpoint: kUSBOut, kUSBIn, kUSBAnyDirn
maxPacketSizemaximum packet size of endpoint.
intervalPolling interval in mSec for endpoint.

USBWord

typedef  struct  USBWord  {
  UInt8  loByte;
  UInt8  hiByte;
}  USBWord;

A 16 bit value in little-endian format, best accessed using the OSRead/WriteLittleInt16 functions

Fields

NameDescription
loByteleast significant byte
hiBytemost significant byte

© 2000 Apple Computer, Inc. — (Last Updated 2/23/2000)