hidd_funcs_t

HID event callback functions

Synopsis:

#include <sys/hiddi.h>

typedef struct hidd_funcs {
	_Uint32t nentries;

	void (*insertion) (struct hidd_connection *connection,
	                   hidd_device_instance_t *instance);

	void (*removal)   (struct hidd_connection *connection,
	                   hidd_device_instance_t *instance);

	void (*report)    (struct hidd_connection *connection,
	                   struct hidd_report *handle,
	                   void *report_data,
	                   _Uint32t report_len,
	                   _Uint32t flags,
	                   void *user);

	void (*event)     (struct hidd_connection *connection,
	                   hidd_device_instance_t *instance,
	                   _Uint16t type);

} hidd_funcs_t;

Description:

Contains the pointers to the HID event callback functions implementation.

The members include:

nentries
The number of functions in the structure. Set to _HIDDI_NFUNCS.
insertion
Called when a device matching defined filter is detected.
void myhidd_insertion( struct hidd_connection *connection,
	                   hidd_device_instance_t *instance );
connection
The HID server connection handle.
instance
The HID device instance handle.
removal
Called when a device is removed.
void myhidd_removal( struct hidd_connection *connection,
	                 hidd_device_instance_t *instance );
connection
The HID server connection handle.
instance
The HID device instance handle.
report
Called when a device sends an input report you have registered for.
void myhidd_report( struct hidd_connection *connection,
	                struct hidd_report *handle,
	                void *report_data,
	                _Uint32t report_len,
	                _Uint32t flags,
	                void *user );
connection
The HID server connection handle.
handle
The report handle.
report_data
Pointer to the buffer containing raw report data.
report_len
Length of the report data in bytes.
flags
Report flags.
user
Pointer to the extra data allocated by hidd_report_attach().
event
A future extension for various other event notifications.
void event( struct hidd_connection *connection,
	        hidd_device_instance_t *instance,
	        _Uint16t type );
connection
The HID server connection handle.
instance
The HID device instance handle.
type
The HID event type.
Page updated: