hidd_get_protocol()

Get the device protocol

Synopsis:

#include <sys/hiddi.h>

int hidd_get_protocol( struct hidd_connection *connection,
                       struct hidd_device_instance *device_instance,
                       _Uint8t *protocol );

Arguments:

connection

The HID stack connection handle (from hidd_connect()).

device_instance

A pointer to a hidd_device_instance_t instance containing the number of the device.

protocol

A pointer to memory where to store the device protocol. After a successful return, protocol contains either HID_PROTOCOL_BOOT (0) or HID_PROTOCOL_REPORT (1).

Description:

The hidd_get_protocol() function checks if a device is using a report or boot protocol.

Returns:

EOK
Success.
ENOTCONN
The connection is NULL.
EINVAL
The device_instance is NULL.
ENODEV
The device was removed.
ENOTSUP
The device doesn't support getting the protocol.

This function can also return a device-specific error code.

Classification:

QNX OS

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