AN050
GD32 USBFS&USBHS Firmware Library User Guide
30
Descriptor name
Functional description
usb_desc_input_terminal
input terminal descriptor
usb_desc_mono_feature_unit
mono feature unit descriptor
usb_desc_output_terminal
output terminal descriptor
usb_desc_AS_itf
AS interface descriptor
usb_desc_format_type
format type descriptor
usb_desc_std_ep
standard endpoint descriptor
usb_desc_AS_ep
AS endpoint descriptor
AUDIO device class interface
AUDIO device class interface is shown as below struct, the function of struct is referred to
Table 5-5. AUDIO device class interface function
usb_class_core usbd_audio_cb
=
{
.
init
=
audio_init
,
.
deinit
=
audio_deinit
,
.
req_proc
=
audio_req_handler
,
.
ctlx_out
=
audio_ctlx_out
,
.
data_in
=
audio_data_in
,
.
data_out
=
audio_data_out
,
.
SOF
=
usbd_audio_sof
};
Table 5-5
. AUDIO device class interface function
Descriptor name
Functional description
audio_init
Initialize AUDIO device
audio_deinit
deinitialize AUDIO device
audio_req_handler
AUDIO device class request function
audio_ctlx_out
OUT control transfer callback
audio_data_in
IN data transfer callback
audio_data_out
OUT data transfer callback
usbd_audio_sof
SOF event callback
AUDIO device class request
AUDIO contains individual device class requests as shown
Table 5-6
. AUDIO device class request
Request name
Functional description
AUDIO_REQ_SET_CUR
set current value request
AUDIO_REQ_GET_CUR
get current value request
AUDIO_REQ_SET_MIN
set minimum value request
AUDIO_REQ_GET_MIN
get minimum value request