Contents

IOHIDDeviceGetReportWithCallback

Obtains a report from the device.

Declaration

IOReturn IOHIDDeviceGetReportWithCallback(IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uint8_t *report, CFIndex *pReportLength, CFTimeInterval timeout, IOHIDReportCallback callback, void *context);

Parameters

  • device:

    Reference to an IOHIDDevice.

  • reportType:

    Type of report being requested.

  • reportID:

    ID of the report being requested.

  • report:

    Pointer to preallocated buffer in which to copy inbound report data.

  • pReportLength:

    Pointer to length of preallocated buffer.

    Pointer to length of preallocated buffer. This value will be modified to refect the length of the returned report.

  • callback:

    Pointer to a callback method of type IOHIDReportCallback.

  • context:

    Pointer to data to be passed to the callback.

Return Value

Returns kIOReturnSuccess if successful.

Discussion

This method behaves asynchronously and will block until the report has been received from the device. This is only intended for feature reports because of sporadic devicesupport for polling input reports. Please defer to using IOHIDDeviceRegisterInputReportCallback for obtaining input reports.

See Also

Miscellaneous