hidd_set_buttons()

Set buttons in a report

Synopsis:

#include <sys/hiddi.h>

int hidd_set_buttons( struct hidd_report_instance *report_instance,
                      struct hidd_collection *collection,
                      _Uint16t usage_page,
                      _Uint16t *usage_list,
                      _Uint16t usage_len,
                      _Uint8t *report_data,
                      _Uint16t buff_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 (refer to the HID spec and HID usage tables).

usage_list

An array of usages you wish to set (refer to the HID spec and HID usage tables).

usage_len

The number of elements in the usages. On return, contains the number of usages filled in.

report_data

The report buffer you wish to fill in.

buff_len

The length of the provided report buffer.

Description:

The hidd_set_buttons() function sets the buttons to activate for the usages defined in usage_page in the provided report buffer. You would typically use this function to fill in a output or feature report before sending it to a HID device.

Returns:

EOK
Success.
ENOSPC

The provided report buffer isn't large enough.

ENOENT

One or more of the usages provided does not exist in the report.

EINVAL

The report_instance, report_data, or usage_list argument is NULL.

Classification:

QNX OS

Safety:
Cancellation point Yes
Signal handler No
Thread Yes
Page updated: