hidd_report_attach()
Attach to a HID device report
Synopsis:
#include <sys/hiddi.h>
int hidd_report_attach( struct hidd_connection *connection,
struct hidd_device_instance *device_instance,
struct hidd_report_instance *report_instance,
_Uint32t flags,
size_t extra,
struct hidd_report **report );Arguments:
- connection
- The HID stack connection handle (from hidd_connect()).
- device_instance
- A pointer to a hidd_device_instance_t instance.
- report_instance
- The handle of a report instance, as returned by hidd_get_report_instance().
- flags
0, or one or both OR’ed together:- HIDD_REPORT_EXCLUSIVE - Prevent future clients from attaching to this report.
- HIDD_REPORT_FILTER - Normally, only the latest client to attach receives reports. This flag allows other clients to receive them in parallel.
- extra
- The size of additional memory you'd like allocated with the report. You can use hidd_report_extra() later to get a pointer to this additional memory. Typically, the class driver would store various status/config/device-specific details in here (if needed).
- report
- Where to store the opaque handle used to identify the report in later calls.
Description:
The hidd_report_attach() function attaches to a report from a HID device. Typically, you do this out of the insertion callback, which gives you the connection and instance parameters involved after finding the report you're interested in.
Returns:
- EOK
- Success.
- EINVAL
- The connection, device_instance, report_instance, or report argument is NULL.
- ENOENT
- The specified report or device doesn't exist.
- ENODEV
-
If in a loop, then there's nothing at that report. If from a callback, then the device has since been removed.
- EBUSY
-
A shared or exclusive conflict occurred. Some other client has exclusive access to the report.
- ENOMEM
- No memory for internal structures.
- EALREADY
- The report is already attached.
- EIO
- Device-specific error.
Classification:
QNX OS
| Safety: | |
|---|---|
| Cancellation point | Yes |
| Signal handler | No |
| Thread | Yes |
Page updated:
