3.4.4.4 USB_HOST_CDC_EventHandlerSet Function

C

USB_HOST_CDC_RESULT USB_HOST_CDC_EventHandlerSet(
    USB_HOST_CDC_HANDLE handle, 
    USB_HOST_CDC_EVENT_HANDLER eventHandler, 
    uintptr_t context
);

Summary

This function registers a client specific CDC Host Client Driver event handler. The CDC Host Client Driver will call this function with relevant event and associated event data, in response to command requests and data transfers that have been scheduled by the client.

Precondition

None.

Parameters

Parameters Description
handle handle to the CDC Host Client Driver.
eventHandler A pointer to event handler function. If NULL, then events will not be generated.
context Application specific context that is returned in the event handler.

Returns

USB_HOST_CDC_RESULT_SUCCESS - The operation was successful.

USB_HOST_CDC_RESULT_HANDLE_INVALID - The specified instance does not exist.

USB_HOST_CDC_RESULT_FAILURE - An unknown failure occurred.

Remarks

None.