Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Specify the entities ID connected to this Mixer Unit.

...

usbd_audio.h / usbd_audio.c

Prototype

Code Block
languagecpp
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.

...

Application.

Notes / Warnings

The listing The Listing - USBD_Audio_MU_Assoc() Example Usage presents an example of usage:

Anchor
Listing - USBD_Audio_MU_Assoc() Example Usage
Listing - USBD_Audio_MU_Assoc() Example Usage

Code Block
languagecpp
titleListing - USBD_Audio_MU_Assoc() Example Usage
linenumberstrue
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. */
}


Panel
bgColor#f0f0f0

(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.