USB Libraries Help > USB Host Libraries > USB Audio v1.0 Host Client Driver Library > Library Interface > d) Data Types and Constants > USB_HOST_AUDIO_V1_0_CONTROL_CALLBACK Type
MPLAB Harmony USB Stack
USB_HOST_AUDIO_V1_0_CONTROL_CALLBACK Type

USB Host Audio v1.0 Class driver Control Transfer Complete Callback Function Pointer type 

This data type defines the required function signature of the USB Host Audio v1.0 Class Driver control transfer complete callback function. The client must provide a pointer to a control transfer complete callback function whose function signature (parameter and return value types) must match the types specified by this function pointer to receive notification when a control transfer has completed. The pointer to the callback function must be specified in USB_HOST_AUDIO_V1_0_ControlRequest function. The Audio v1.0 client driver will invoke this function with event relevant parameters. The descriptions of the event handler function parameters are as follows:

  • audioObj - Audio v1.0 client driver object associated with this event
  • requestHandle - Request handle of the control transfer request that caused this event
  • result - Completion result of the control transfer. This will be USB_HOST_AUDIO_V1_0_RESULT_SUCCESS if the control transfer completed successfully, USB_HOST_AUDIO_V1_0_RESULT_FAILURE if an unknown failure occurred, or USB_HOST_AUDIO_V1_0_RESULT_REQUEST_STALLED if the request was stalled.

size - Size of the data stage that was transferred context - Value identifying the context of the application that was provided when the USB_HOST_AUDIO_V1_0_ControlRequest function was called.

C
typedef void (* USB_HOST_AUDIO_V1_0_CONTROL_CALLBACK)(USB_HOST_AUDIO_V1_0_OBJ audioObj, USB_HOST_AUDIO_V1_0_REQUEST_HANDLE requestHandle, USB_HOST_AUDIO_V1_0_RESULT result, size_t size, uintptr_t context);
Remarks

None.