USBD_Audio_SU_Add
Description
Add a Selector Unit to the specified class instance (i.e. audio function).
Files
usbd_audio.h / usbd_audio.c
Prototype
CPU_INT08U USBD_Audio_SU_Add ( CPU_INT08U class_nbr, const USBD_AUDIO_SU_CFG *p_su_cfg, const USBD_AUDIO_DRV_AC_SU_API *p_su_api, USBD_ERR *p_err);
Arguments
class_nbr
Class instance number.
p_su_cfg
Pointer to the Selector Unit configuration structure.
p_su_api
Pointer to the audio codec API associated to this Selector Unit.
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_SU_ALLOC
Returned Value
Unit ID assigned by audio class, if NO error(s).
0, otherwise
Callers
Application.
Notes / Warnings
- This function is enabled by setting the configuration constant
USBD_AUDIO_CFG_MAX_NBR_SU
to a value different from zero. Audio 1.0 specification indicates that ID #0 is reserved for undefined ID. Thus it indicates an error.
p_su_api
can NOT beDEF_NULL
.