IOUSBHIDDriver

Inherits from
IOHIDDevice
Availability
Available in OS X v10.2 and later.
Declared in
IOUSBHIDDriver.h

Overview

Driver that matches to USB HID devices.

This class can be overriden to provide for specific behaviors.

Tasks

Miscellaneous

Instance Methods

SuspendPort

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

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.