USBD_Audio_MU_Assoc
Description
Specify the entities ID connected to this Mixer Unit.
Files
usbd_audio.h / usbd_audio.c
Prototype
void USBD_Audio_MU_Assoc (CPU_INT08U class_nbr, CPU_INT08U mu_id, CPU_INT08U *p_src_entity_id, CPU_INT08U nbr_input_pins, USBD_ERR *p_err);
Arguments
class_nbr
Class instance number.
mu_id
Mixer Unit ID.
p_src_entity_id
Pointer to table containing IDs of Units and/or Terminals to which Input Pins of this Mixer Unit are connected.
nbr_input_pins
Number of input pins.
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_INVALID_ARG
Returned Value
None.
Callers
Application.
Notes / Warnings
The Listing - USBD_Audio_MU_Assoc() Example Usage presents an example of usage:
CPU_INT08U MU11_SrcIdTbl[] = { (1) 0u, 0u, 0u }; MU11_SrcIdTbl[0u] = FU7_ID; (2) MU11_SrcIdTbl[1u] = IT2_ID; MU11_SrcIdTbl[2u] = FU8_ID; USBD_Audio_MU_Assoc(audio_nbr, (3) MU11_ID, &MU11_SrcIdTbl[0u], USBD_MU11_Cfg.NbrInPins, &err); if (err != USBD_ERR_NONE) { /* $$$$ Handle the error. */ }
(1) Declare a table that will contain the ID of terminals and/or units connected to the input pins of the Mixer Unit. The table size correspond to the number of inputs pins of the Mixer Unit.
(2) Initialize the table with all the IDs obtained when calling the functions USBD_Audio_XX_Add()
. In this example, two Input terminals and one Feature unit are connected to the Mixer Unit.
(3) Pass the table address and the number of input pins of the Mixer Unit to the function.