typedef struct { UInt8 rqDirection:1; // bmRequestType:7 UInt8 rqType:2; // bmRequestType:6..5 UInt8 rqRecipient:5; // bmRequestType:4..0 UInt8 bRequest; USBWord wValue; USBWord wIndex; USBWord wLength; void * pData; // data pointer UInt32 wLenDone; // # bytes transferred } IOUSBDevRequest;
parameter block for control requests, using a simple pointer for the data to be transferred.
Name Description rdDirection Direction of data part of request: kUSBIn or kUSBOut rqType Request type: kUSBStandard, kUSBClass or kUSBVendor rqRecipient Target of the request: kUSBDevice, kUSBInterface, kUSBEndpoint or kUSBOther bRequest Request code wValue 16 bit parameter for request, low byte first wIndex 16 bit parameter for request, low byte first wLength Length of data part of request, 16 bits, low byte first pData Pointer to data for request wLenDone Set by standard completion routine to number of data bytes actually transferred
typedef struct { UInt8 rqDirection:1; // bmRequestType:7 UInt8 rqType:2; // bmRequestType:6..5 UInt8 rqRecipient:5; // bmRequestType:4..0 UInt8 bRequest; USBWord wValue; USBWord wIndex; USBWord wLength; IOMemoryDescriptor *pData; // data pointer UInt32 wLenDone; // # bytes transferred } IOUSBDevRequestDesc;
parameter block for control requests, using a memory descriptor for the data to be transferred
Name Description rdDirection Direction of data part of request: kUSBIn or kUSBOut rqType Request type: kUSBStandard, kUSBClass or kUSBVendor rqRecipient Target of the request: kUSBDevice, kUSBInterface, kUSBEndpoint or kUSBOther bRequest Request code wValue 16 bit parameter for request, low byte first wIndex 16 bit parameter for request, low byte first wLength Length of data part of request, 16 bits, low byte first pData Pointer to memory descriptor for data for request wLenDone Set by standard completion routine to number of data bytes actually transferred
© 2000 Apple Computer, Inc. (Last Updated 2/23/2000)