Jump to main content

##

# 2.6.4.15 USB_DEVICE_HID_EVENT_HANDLER Type

## C

    typedef USB_DEVICE_HID_EVENT_RESPONSE (* USB_DEVICE_HID_EVENT_HANDLER)(USB_DEVICE_HID_INDEX instanceIndex, USB_DEVICE_HID_EVENT event, void * pData, uintptr_t context);

## Description

USB Device HID Event Handler Function Pointer Type.

This data type defines the required function signature of the USB Device HID Function Driver event handling callback function. The application must register a pointer to a HID Function Driver events handling function whose function signature (parameter and return value types) match the types specified by this function pointer in order to receive event call backs from the HID Function Driver. The function driver will invoke this function with event relevant parameters. The description of the event handler function parameters is given here.

instanceIndex - Instance index of the HID Function Driver that generated the event.

event - Type of event generated.

pData - This parameter should be type casted to a event specific pointer type based on the event that has occurred. Refer to the USB_DEVICE_HID_EVENT enumeration description for more details.

context - Value identifying the context of the application that registered the event handling function.