Hi Isaac
This is what i don't understand.
All this things are already specified in the descriptor, The Host has the config descriptor with all needed information,
so why making it one more time ? :-) What is the reason for this structures?
Ok, so I have 2 Endpoints (actually one but send and receive with same number), 3 interfaces and 5 audio units.
This code should be Ok, right?
****************************************************************************************************************************************************************************
usb_ep_struct_t ep[AUDIO_DESC_ENDPOINT_COUNT] = // 2 two endpoints with same number
{
{
AUDIO_ENDPOINT, // Endpoint Number
USB_ISOCHRONOUS_PIPE,
USB_SEND,
FS_ISO_OUT_ENDP_PACKET_SIZE
},
{
AUDIO_ENDPOINT,
USB_ISOCHRONOUS_PIPE,
USB_RECV,
FS_ISO_OUT_ENDP_PACKET_SIZE
}
};
usb_endpoints_t usb_desc_ep =
{
(AUDIO_DESC_ENDPOINT_COUNT),
ep
};
static usb_if_struct_t usb_if[3];
usb_class_struct_t usb_dec_class =
{
USB_CLASS_AUDIO,
{
3,
usb_if
}
};
/* *********************************************************************
* definition a struct of Input/output or Feature Unit
************************************************************************ */
audio_ut_struct_t ut[AUDIO_UNIT_COUNT] =
{
{ 0x01, AUDIO_CONTROL_INPUT_TERMINAL },
{ 0x02, AUDIO_CONTROL_FEATURE_UNIT },
{ 0x03, AUDIO_CONTROL_OUTPUT_TERMINAL },
{ 0x04, AUDIO_CONTROL_INPUT_TERMINAL },
{ 0x05, AUDIO_CONTROL_OUTPUT_TERMINAL }//,
};
audio_units_struct_t usb_audio_unit =
{
AUDIO_UNIT_COUNT, // =5
ut
};