Structs



IOUSBDevRequest

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.

Fields

NameDescription
rdDirectionDirection of data part of request: kUSBIn or kUSBOut
rqTypeRequest type: kUSBStandard, kUSBClass or kUSBVendor
rqRecipientTarget of the request: kUSBDevice, kUSBInterface, kUSBEndpoint or kUSBOther
bRequestRequest code
wValue16 bit parameter for request, low byte first
wIndex16 bit parameter for request, low byte first
wLengthLength of data part of request, 16 bits, low byte first
pDataPointer to data for request
wLenDoneSet by standard completion routine to number of data bytes actually transferred

IOUSBDevRequestDesc

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

Fields

NameDescription
rdDirectionDirection of data part of request: kUSBIn or kUSBOut
rqTypeRequest type: kUSBStandard, kUSBClass or kUSBVendor
rqRecipientTarget of the request: kUSBDevice, kUSBInterface, kUSBEndpoint or kUSBOther
bRequestRequest code
wValue16 bit parameter for request, low byte first
wIndex16 bit parameter for request, low byte first
wLengthLength of data part of request, 16 bits, low byte first
pDataPointer to memory descriptor for data for request
wLenDoneSet by standard completion routine to number of data bytes actually transferred

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