ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference
|
IOUSBInterfaceInterface190 |
Inherits from: | IOUSBInterfaceInterface183 |
Declared In: |
The object you use to access a USB device interface from user space, returned by the IOUSBFamily version 1.9 and above.
The functions listed here include all of the functions defined for the IOUSBInterfaceInterface, IOUSBInterfaceInterface182, IOUSBInterfaceInterface183, and some new functions that are available on Mac OS X version 10.2 and later.
Equivalent to ClearPipeStall .
Returns the amount of bandwidth available (in bytes per 1ms frame) on the bus for allocation to isochronous pipes.
Returns the transfer type, max packet size, and interval of a specified endpoint, whether or not the endpoint has a pipe currently established.
Changes the size of the reserved bandwidth for an isochronous pipe.
ClearPipeStallBothEnds |
Equivalent to ClearPipeStall.
IOReturn ( *ClearPipeStallBothEnds)( void *self, UInt8 pipeRef);
self
Pointer to the IOUSBInterfaceInterface.
pipeRef
Index for the desired pipe (1 - GetNumEndpoints ).
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen if the interface is not open for exclusive access.
This function is equivalent to ClearPipeStall except that it also attempts to clear the halt and toggle bits on the device's endpoint for the pipe by sending a ClearFeature(ENDPOINT_HALT) to the default control pipe in the device, specifying the endpoint for the pipe represented by pipeRef. For most devices, this resynchronizes the data toggle between the two endpoints to ensure that there is no loss of data.
GetBandwidthAvailable |
Returns the amount of bandwidth available (in bytes per 1ms frame) on the bus for allocation to isochronous pipes.
IOReturn ( *GetBandwidthAvailable)( void *self, UInt32 *bandwidth);
self
Pointer to the IOUSBInterfaceInterface.
bandwidth
Pointer to UInt32 to hold the amount of bandwidth available (in bytes per 1ms frame).
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
This function is useful for determining the correct AltInterface setting as well as for using SetPipePolicy .
The interface does not have to be open to use this function.
GetEndpointProperties |
Returns the transfer type, max packet size, and interval of a specified endpoint, whether or not the endpoint has a pipe currently established.
IOReturn ( *GetEndpointProperties)( void *self, UInt8 alternateSetting, UInt8 endpointNumber, UInt8 direction, UInt8 *transferType, UInt16 *maxPacketSize, UInt8 *interval);
self
Pointer to the IOUSBInterfaceInterface.
alternateSetting
Specifies the alternate setting within the current interface.
endpointNumber
Specifies the desired endpoint number.
direction
Specifies the desired direction.
transferType
Pointer to UInt8 to hold the endpoint's transfer type (kUSBControl, kUSBIsoc, etc).
maxPacketSize
Pointer to UInt16 to hold the maxPacketSize of the endpoint.
interval
Pointer to UInt8 to hold the polling interval for interrupt endpoints.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService.
This function may be useful for determining which alternate interface to select when trying to balance bandwidth allocations among isochronous pipes.
The interface does not have to be open to use this function.
SetPipePolicy |
Changes the size of the reserved bandwidth for an isochronous pipe.
IOReturn ( *SetPipePolicy)( void *self, UInt8 pipeRef, UInt16 maxPacketSize, UInt8 maxInterval);
self
Pointer to the IOUSBInterfaceInterface.
pipeRef
Index for the desired pipe (1 - GetNumEndpoints ).
maxPacketSize
The desired size for the isochronous pipe. Valid values are 0 through the maxPacketSize defined in the endpoint descriptor.
maxInterval
Currently ignored.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNotOpen if the interface is not open for exclusive access. May also return kIOReturnNoBandwidth if there is not enough bandwidth available on the bus, or kIOReturnBadArgument if the desired maxPacketSize is outside of the allowed range.
The pipe may be made smaller or larger (up to the maxPacketSize specified in the endpoint descriptor). When an interface is first opened, all pipes are created with their descriptor-supplied maxPacketSize. For isochronous pipes, if there is not enough bandwidth on the bus to allocate to the pipe, the pipe is created with a reserved bandwidth of zero. Any attempts to transfer data on a pipe with zero bandwidth will result in a kIOReturnNoBandwidth error. The pipe must first be given some bandwidth using this call.
The interface must be open for the pipe to exist.
|
Last Updated: 2009-02-23