USBD_Audio_OT_Add

Description

Add an Output Terminal to the specified class instance (i.e. audio function).

Files

usbd_audio.h / usbd_audio.c

Prototype

CPU_INT08U  USBD_Audio_OT_Add (       CPU_INT08U                 class_nbr,
                               const  USBD_AUDIO_OT_CFG         *p_ot_cfg,
                               const  USBD_AUDIO_DRV_AC_OT_API  *p_ot_api,
                                      USBD_ERR                  *p_err);


Arguments

class_nbr

Class instance number.

p_ot_cfg

Pointer to the Output Terminal configuration structure.

p_ot_api

Pointer to the audio codec API associated to this Output Terminal.

p_err

Pointer to variable that will receive the return error code from this function.

USBD_ERR_NONE 
USBD_ERR_CLASS_INVALID_NBR
USBD_ERR_NULL_PTR
USBD_ERR_AUDIO_OT_ALLOC

Returned Value

Terminal ID assigned by audio class, if NO error(s).

0, otherwise

Callers

Application.

Notes / Warnings

  1. Audio 1.0 specification indicates that ID #0 is reserved for undefined ID. Thus it indicates an error.

  2. p_ot_api can be DEF_NULL if the Output Terminal does not support the Copy Protection control.