hidd_get_buttons()
Get buttons that are currently activated
Synopsis:
#include <sys/hiddi.h>
int hidd_get_buttons( struct hidd_report_instance *report_instance,
struct hidd_collection *collection,
_Uint16t usage_page,
void *report_data,
_Uint16t *usages,
_Uint16t *len );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().
- usage_page
-
The usage page of a collection (see HID spec and HID usage tables).
- report_data
-
The raw report data as returned in the report callback.
- usages
-
A pointer to a buffer to return the array of usages.
- len
-
The size of the provided buffer. On return it will contain the number usages filled in the provided buffer.
Description:
The hidd_get_all_buttons() function gets all buttons that are currently activated defined in usage_page. You'd typically use this function in the report callback to get button values for a keyboard, mouse, or joystick.
Returns:
- EOK
- Success.
- EINVAL
- One of the arguments is NULL.
Classification:
QNX OS
| Safety: | |
|---|---|
| Cancellation point | Yes |
| Signal handler | No |
| Thread | Yes |
