Contents

IOHIDDeviceSetReportWithCallback

Sends a report to the device.

Declaration

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

Parameters

  • device:

    Reference to an IOHIDDevice.

  • reportType:

    Type of report being sent.

  • reportID:

    ID of the report being sent. If the device supports multiple reports, this should also be set in the first byte of the report.

  • report:

    The report bytes to be sent to the device.

  • reportLength:

    The length of the report to be sent to the device.

  • timeout:

    CFTimeInterval containing the timeout.

  • 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 issued to the device. It is only relevent for either output or feature type reports.

See Also

Miscellaneous