Contents

IOUserUSBHostHIDDevice

A provider object for USB devices that support HID interactions.

Declaration

class IOUserUSBHostHIDDevice;

Overview

An IOUserUSBHostHIDDevice object is a fully functional provider object that represents a USB-based HID device. Typically, you don’t create IOUserUSBHostHIDDevice objects directly. Instead, you specify that your driver relies on an IOUserUSBHostHIDDevice as its provider, and the system creates the interface object for you during the matching process.

When implementing a custom driver, use this provider object to manage the connection to the underlying device. Specifically, use it to get reports from the device and to manage the device’s configuration. For example, use the object to configure the USB device’s idle policy.

Subclass IOUserUSBHostHIDDevice only when you want to customize the interactions with the USB device. For example, you might use a custom subclass to initialize the USB device in a particular way or support a custom transport mechanism. You can also use a custom subclass to perform additional processing on the report data.

Specify the Driver’s Personality Information

When you subclass IOUserUSBHostHIDDevice, update the IOKitPersonalities key of your driver extension’s Info.plist file with information to match your driver to appropriate hardware. For this class, always include the keys and values in the following table.

Key

Discussion

IOClass

The value AppleUserHIDDevice.

IOProviderClass

The provider class information. For a USB-based HID device, specify Iousbhostinterface.

IOUserClass

The name of your custom subclass.

Cfbundleidentifier

The bundle identifier of your driver.

You may add other keys to assist with the matching process. For example, you might include the VendorID, ProductID, PrimaryUsagePage, and PrimaryUsage keys to match against specific USB devices and HID usage types. The USB specification defines which keys to include when matching your driver to a USB device. For information about the specific key combinations, see Universal Serial Bus Common Class Specification at https://www.usb.org.

Topics

Running the Service

Getting the Device Description

Managing Device Reports

Configuring the Device

Configuring Private Settings

Instance Methods

See Also

Providers