3.5.4.1 USB_HOST_HID_MOUSE_EventHandlerSet Function

C

USB_HOST_HID_MOUSE_RESULT USB_HOST_HID_MOUSE_EventHandlerSet(
    USB_HOST_HID_MOUSE_EVENT_HANDLER appMouseEventHandler
);

Summary

This function registers application callback function with the mouse driver. Any subsequent mouse events is passed to the application by calling the registered application function. The function prototype should be of the USB_HOST_HID_MOUSE_EVENT_HANDLER.

Description

Description of the function.

Precondition

This function should be called before the USB bus is enabled.

Parameters

Parameters Description
appMouseEventHandler Function pointer to the application function.

Returns

Returns data structure of USB_HOST_HID_MOUSE_RESULT type.

USB_HOST_HID_MOUSE_RESULT_INVALID_PARAMETER: Invalid Parameter

USB_HOST_HID_MOUSE_RESULT_FAILURE: On failure

USB_HOST_HID_MOUSE_RESULT_SUCCESS: On success

Remarks

This function should be called before the USB bus is enabled.