Functions



GetBandwidthAvailable

public:

virtual UInt32 GetBandwidthAvailable();

Returns the available bandwidth (in bytes) per frame for isochronous transfers.

Result: maximum number of bytes that a new iso pipe could transfer per frame given current allocations.

GetConfiguration

public:

virtual IOReturn GetConfiguration(UInt8 *configNumber);

Gets the current configuration from the device

Parameters

NameDescription
configNumPointer to place to store configuration value

GetConfiguration

public:

virtual IOReturn GetDeviceStatus(USBStatus *status);

Gets the current configuration from the device

Parameters

NameDescription
configNumPointer to place to store configuration value

GetFrameNumber

public:

virtual UInt64 GetFrameNumber();

Returns the full current frame number of the bus the device is attached to

Result: The frame number.

GetStringDescriptor

public:

virtual IOReturn GetStringDescriptor(UInt8 index, char *buf, int maxLen, UInt16 lang=0x409);

Get a string descriptor as ASCII, in the specified language (default is US English)

Parameters

NameDescription
indexIndex of the string descriptor to get.
bufPointer to place to store ASCII string
maxLenSize of buffer pointed to by buf
langLanguage to get string in (default is US English)

address

public:

virtual USBDeviceAddress address(void);

returns the bus address of the device


bus

public:

virtual IOUSBController * bus(void);

returns a pointer to the bus object for the device


busPowerAvailable

public:

virtual UInt32 busPowerAvailable( void );

returns the power available to the device, in units of 2mA


deviceDescriptor

public:

virtual const IOUSBDeviceDescriptor *deviceDescriptor(void);

returns a pointer to the device descriptor


deviceRequest

Abstract: execute a device request
public:

virtual IOReturn deviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion = 0);

Parameters

NameDescription
requestThe parameter block to send to the device

findNextDescriptor

Abstract: find next descriptor in configuration list of given type (kUSBAnyDesc matches any type).
public:

static const IOUSBDescriptorHeader *findNextDescriptor(const void *cur, UInt8 descType);

call this function with a pointer to a descriptor in a descriptor list, for example the descriptor list returned by IOUSBDevice::getFullConfigurationDescriptor(). Returns NULL if no more descriptors match descType.

Parameters

NameDescription
curcurrent descriptor in list
descTypedescriptor type to return (kUSBAnyDesc to match any type)
Result: Pointer to the next matching descriptor, or NULL if no more match.

pipeZero

public:

virtual IOUSBPipe * pipeZero();

returns a pointer to the device's default pipe


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