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_STREAM_EVENT_HANDLER Type
MPLAB Harmony USB Stack
USB_HOST_AUDIO_V1_STREAM_EVENT_HANDLER Type

USB Host Audio v1.0 Class Driver Stream Event Handler Function Pointer Type. 

This data type defines the required function signature of the USB Host Audio v1.0 Class Driver Stream event handling callback function. The application must register a pointer to the Audio v1.0 Class Driver stream events handling function whose function signature (parameter and return value types) match the types specified by this function pointer to receive event callbacks from the Audio v1.0 Class Driver. The application should use the USB_HOST_AUDIO_V1_StreamEventHandlerSet function to register an audio stream event handler. The class driver will call this function with the relevant event parameters. The descriptions of the stream event handler function parameters are as follows:

  • handle - Handle to the Audio v1.0 stream
  • event - Type of event generated
  • eventData - This parameter should be type casted to an event specific pointer type based on the event that has occurred. Refer to the USB_HOST_AUDIO_V1_STREAM_EVENT enumeration description for more information.
  • context - Value identifying the context of the application that was registered with the event handling function
C
typedef USB_HOST_AUDIO_V1_STREAM_EVENT_RESPONSE (* USB_HOST_AUDIO_V1_STREAM_EVENT_HANDLER)(USB_HOST_AUDIO_V1_STREAM_HANDLE handle, USB_HOST_AUDIO_V1_STREAM_EVENT event, void * eventData, uintptr_t context);
Remarks

None.