Mac Developer Library

Developer

IOUSBControllerV3 Class Reference

Options
Deployment Target:

On This Page
Language:

IOUSBControllerV3

subclass of the IOUSBControllerV2 to provide support for new USB Power Management techniques.

With Leopard, we are providing more information to USB Device Drivers in the IOPower tree to allow for more efficient Power Management. This controller class encapulates many of the changes needed for that, without disturbing third party subclasses of IOUSBController or IOUSBControllerV2

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import Kernel;

Availability


Available in OS X v10.5 and later.
  • UIM function, return the hub descriptor of the simulated root hub device As GET_DESCRIPTOR control request for hub descrptor

    Declaration

    C++

    virtual IOReturn GetRootHub3Descriptor( IOUSB3HubDescriptor *desc );

    Parameters

    desc

    Descriptor structure to return data in

  • UIM function, retrun the BOS descriptor of the simulated root hub device As GET_DESCRIPTOR control request for configuration descrptor

    Declaration

    C++

    virtual IOReturn GetRootHubBOSDescriptor( OSData *desc );

    Parameters

    desc

    Descriptor structure to return data in

  • UIM function, return the hub descriptor of the simulated root hub device As GET_DESCRIPTOR control request for hub descrptor

    Declaration

    C++

    virtual IOReturn GetRootHub3Descriptor( IOUSB3HubDescriptor *desc );

    Parameters

    desc

    Descriptor structure to return data in

  • UIM function, returns the port error count of the simulated root hub device (GET_PORT_ERROR_COUNT from the USB 3.0 spec)

    Declaration

    C++

    virtual IOReturn GetRootHubPortErrorCount( UInt16port, UInt16 *count );

    Parameters

    port

    Port Number

    count

    Pointer to a UInt16 to store the actual link error count

  • Declaration

    C++

    virtual IOReturn Read( UInt32streamID, IOMemoryDescriptor *buffer, USBDeviceAddressaddress, Endpoint *endpoint, IOUSBCompletion *completion, UInt32noDataTimeout, UInt32completionTimeout, IOByteCountreqCount );

    Parameters

    streamID

    stream ID of the stream to read from

    buffer

    place to put the transferred data

    address

    Address of the device on the USB bus

    endpoint

    description of endpoint

    completion

    describes action to take when buffer has been filled

    noDataTimeout

    number of milliseconds of no data movement before the request is aborted

    completionTimeout

    number of milliseonds after the command is on the bus in which it must complete

    reqCount

    number of bytes requested for the transfer (must not be greater than the length of the buffer)

    Discussion

    Read from a stream on a bulk endpoint

  • UIM function Abort the specified endpoint or stream, return all transactions queued on it.

    Declaration

    C++

    virtual IOReturn UIMAbortStream( UInt32streamID, shortfunctionNumber, shortendpointNumber, shortdirection);

    Parameters

    streamID

    If zero, abort the endpoint, if non zero abort the stream on the endpoint

    functionNumber

    The USB device ID of the device to Abort

    endpointNumber

    The endpoint number to Abort

    direction

    Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut.

  • UIM function Abort the specified endpoint or stream, return all transactions queued on it.

    Declaration

    C++

    virtual IOReturn UIMAbortStream( UInt32streamID, shortfunctionNumber, shortendpointNumber, shortdirection);

    Parameters

    streamID

    If zero, abort the endpoint, if non zero abort the stream on the endpoint

    functionNumber

    The USB device ID of the device to Abort

    endpointNumber

    The endpoint number to Abort

    direction

    Specifies direction of the endpoint for uniqueness. kUSBIn or KUSBOut.

  • Create an endpoint in the controller with superspeed streams and/or maxburst capabilities if controller does not support superspeed, this method should not be overridden

    Declaration

    C++

    virtual IOReturn UIMCreateSSBulkEndpoint( UInt8functionNumber, UInt8endpointNumber, UInt8direction, UInt8speed, UInt16maxPacketSize, UInt32maxStreams, UInt32maxBurst);

    Parameters

    functionNumber

    USB device ID of device

    endpointNumber

    endpoint address of the endpoint in the device

    direction

    Direction of data flow. kUSBIn or kUSBOut

    speed

    speed of the device kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh, kUSBDeviceSuper

    maxPacketSize

    maximum packet size of this endpoint

    maxStreams

    Maximum stream number that this endpoint can use

    maxBurst

    number of extra packets in a burst transfer

  • Create an endpoint in the controller with superspeed streams and/or maxburst capabilities if controller does not support superspeed, this method should not be overridden

    Declaration

    C++

    virtual IOReturn UIMCreateSSBulkEndpoint( UInt8functionNumber, UInt8endpointNumber, UInt8direction, UInt8speed, UInt16maxPacketSize, UInt32maxStreams, UInt32maxBurst);

    Parameters

    functionNumber

    USB device ID of device

    endpointNumber

    endpoint address of the endpoint in the device

    direction

    Direction of data flow. kUSBIn or kUSBOut

    speed

    speed of the device kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh, kUSBDeviceSuper

    maxPacketSize

    maximum packet size of this endpoint

    maxStreams

    Maximum stream number that this endpoint can use

    maxBurst

    number of extra packets in a burst transfer

  • Create an endpoint in the controller with maxburst capabilities if controller does not support superspeed, this method should not be overridden

    Declaration

    C++

    virtual IOReturn UIMCreateSSInterruptEndpoint( shortfunctionNumber, shortendpointNumber, UInt8direction, shortspeed, UInt16maxPacketSize, shortpollingRate, UInt32maxBurst);

    Parameters

    functionNumber

    USB device ID of device

    endpointNumber

    endpoint address of the endpoint in the device

    direction

    Direction of data flow. kUSBIn or kUSBOut

    speed

    speed of the device kUSBDeviceSpeedFull, kUSBDeviceSpeedHigh, kUSBDeviceSpeedSuper

    maxPacketSize

    maximum packet size of this endpoint

    pollingRate
    maxBurst

    number of extra packets in a burst transfer

  • Create an endpoint in the controller with maxburst capabilities if controller does not support superspeed, this method should not be overridden

    Declaration

    C++

    virtual IOReturn UIMCreateSSIsochEndpoint( shortfunctionNumber, shortendpointNumber, UInt32maxPacketSize, UInt8direction, UInt8interval, UInt32maxBurstAndMult);

    Parameters

    functionNumber

    USB device ID of device

    endpointNumber

    endpoint address of the endpoint in the device

    maxPacketSize

    maximum packet size of this endpoint

    direction

    Direction of data flow. kUSBIn or kUSBOut

    interval
    maxBurstAndMult

    number of extra packets in a burst transfer and burst multiplier

  • Create streams on an endpoint if controller does not support superspeed, this method should not be overridden

    Declaration

    C++

    virtual IOReturn UIMCreateStreams( UInt8functionNumber, UInt8endpointNumber, UInt8direction, UInt32maxStreams);

    Parameters

    functionNumber

    USB device ID of device

    endpointNumber

    endpoint address of the endpoint in the device

    direction

    Direction of data flow. kUSBIn or kUSBOut

    maxStreams

    Number of streams to create

  • Tell the UIM that the device will be reset.

    Declaration

    C++

    virtual IOReturn UIMDeviceToBeReset( shortfunctionAddress);

    Parameters

    functionAddress

    USB device ID of device

    Return Value

    Return kIOReturnSuccess if pipes have been deleted and need to be setup again.

  • UIM function Returns how many streams per endpoint are supported by the USB controller. This call does not go through the workloop gate.

    Declaration

    C++

    virtual UInt32 UIMMaxSupportedStream( void);

    Return Value

    The number of streams per endpont that are supported by the USB controller. A value of 0 indicates that streams are not supported.

  • Declaration

    C++

    virtual IOReturn Write( UInt32streamID, IOMemoryDescriptor *buffer, USBDeviceAddressaddress, Endpoint *endpoint, IOUSBCompletion *completion, UInt32noDataTimeout, UInt32completionTimeout, IOByteCountreqCount );

    Parameters

    streamID

    stream ID of the stream to write to

    buffer

    place to get the transferred data

    address

    Address of the device on the USB bus

    endpoint

    description of endpoint

    completion

    describes action to take when buffer has been emptied

    noDataTimeout

    number of milliseconds of no data movement before the request is aborted

    completionTimeout

    number of milliseonds after the command is on the bus in which it must complete

    reqCount

    number of bytes requested for the transfer (must not be greater than the length of the buffer)

    Discussion

    Write to a stream on a bulk endpoint