Contents

IOHIDDeviceSetValueWithCallback

Sets a value for an element and returns status via a completion callback.

Declaration

IOReturn IOHIDDeviceSetValueWithCallback(IOHIDDeviceRef device, IOHIDElementRef element, IOHIDValueRef value, CFTimeInterval timeout, IOHIDValueCallback callback, void *context);

Parameters

  • device:

    Reference to an IOHIDDevice.

  • element:

    IOHIDElementRef whose value is to be modified.

  • value:

    IOHIDValueRef containing value to be set.

  • timeout:

    CFTimeInterval containing the timeout.

  • callback:

    Pointer to a callback method of type IOHIDValueCallback.

  • context:

    Pointer to data to be passed to the callback.

Return Value

Returns kIOReturnSuccess if successful.

Discussion

This method behaves asynchronously and will invoke the callback once the report has been issued to the device. It is only relevent for either output or feature type elements. If setting values for multiple elements you may want to consider using IOHIDDeviceSetValueWithCallback or IOHIDTransaction.

See Also

Miscellaneous