Description
Specify the entities ID connected to this Selector Unit.
...
usbd_audio.h / usbd_audio.c
Prototype
Code Block | ||
---|---|---|
| ||
void USBD_Audio_SU_Assoc (CPU_INT08U class_nbr,
CPU_INT08U su_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 presents an example of usage: Listing - USBD_Audio_SU_Assoc() Example Usage presents an example of usage:
Anchor | ||||
---|---|---|---|---|
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
CPU_INT08U SU12_SrcIdTbl[] = { (1)
0u,
0u
};
SU12_SrcIdTbl[0u] = FU6_ID; (2)
SU12_SrcIdTbl[1u] = FU9_ID;
USBD_Audio_SU_Assoc(audio_nbr, (3)
SU12_ID,
&SU12_SrcIdTbl[0u],
USBD_SU12_Cfg.NbrInPins,
&err);
if (err != USBD_ERR_NONE) {
/* $$$$ Handle the error. */
} |
Panel | ||
---|---|---|
| ||
(1) Declare a table that will contain the ID of terminals and/or units connected to the input pins of the Selector Unit. The table size correspond to the number of inputs pins of the Selector Unit. (2) Initialize the table with all the IDs obtained when calling the functions (3) Pass the table address and the number of input pins of the Selector Unit to the function. |