Mac Developer Library

Developer

IOUSBHIDDriver Class Reference

Options
Deployment Target:

On This Page
Language:

IOUSBHIDDriver

Inheritance


  • IOUSBHIDDriver

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import Kernel;

Availability


Available in OS X v10.2 and later.

Driver that matches to USB HID devices.

This class can be overriden to provide for specific behaviors.

  • Suspends the port for this device or optionally sets a timeout to suspend after a period of inactivity.

    Declaration

    C++

    virtual IOReturn SuspendPort( bool suspendPort, UInt32 timeoutMS = 0);

    Parameters

    suspendPort

    Boolean value. true = suspend the port, false = resume the port.

    timeoutMS

    Value in milliseconds If value is non-zero, the port will be suspended after the timeout milliseconds have passed without any read completions.

    Return Value

    The IOReturn value from the IOUSBDevice::Suspend() call.

    Discussion

    This call can be used to immediately suspend/resume a port or to enable the suspension of the port after a period of inactivity. If called with suspendPort = true (no timeout parameter), the HID driver will immediately suspend the port, after aborting any outstanding reads on the interrupt pipe. If called with suspendPort = true and timeout != 0, it will suspend the port after the timeout number of ms have passed without any read completions. If called with suspendPort = false, the port will be immediately resumed and the reads will be re-issued. If a timeout was enabled, it will be cancelled.