hidd_get_usage_value()
Get value from report for usage page and usage
Synopsis:
#include <sys/hiddi.h>
int hidd_get_usage_value( struct hidd_report_instance *report_instance,
struct hidd_collection *collection,
_Uint16t usage_page,
_Uint16t usage,
void *report_data,
_Uint32t *usage_value );Arguments:
- report_instance
-
The handle of a report (from hidd_report_attach()).
- collection
- The handle of the collection, as returned by hidd_get_collections() or by hidd_report_collection(). If collection is NULL, all collections are searched. Otherwise, only the collection specified is searched.
- usage_page
-
The usage page of the report (refer to the HID spec and HID usage tables).
- usage
- The usage of the report (refer to the HID spec and HID usage tables).
- report_data
- The raw report data as returned in the report callback.
- usage_value
- A pointer to a memory where to store report’s usage value.
Description:
The hidd_get_usage_value() function gets the value from the report for a usage_page and usage. You would typically use this function in the report callback to get values such as x/y movements of a mouse.
Returns:
- EOK
- Success.
- EINVAL
- The report_instance, report_data, or usage_value is NULL.
- ENOENT
- There's no entry in the report for usage_page or usage.
Classification:
QNX OS
| Safety: | |
|---|---|
| Cancellation point | Yes |
| Signal handler | No |
| Thread | Yes |
Page updated:
