ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference

 


IOUSBHIDDriver.h

Includes:

Overview



Functions

SuspendPort

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


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.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2008-12-19