AN050
GD32 USBFS&USBHS Firmware Library User Guide
31
Request name
Functional description
AUDIO_REQ_SET_MAX
set maximum value request
AUDIO_REQ_GET_MAX
get maximum value request
AUDIO_REQ_SET_RES
set resolution request
AUDIO_REQ_GET_RES
get resolution request
AUDIO user interface
AUDIO user interface definition is shown as below struct.
audio_fops_struct audio_out_fops
=
{
init
,
deinit
,
audio_cmd
,
volume_ctl
,
mute_ctl
,
periodic_tc
,
get_state
};
Corresponding function is shown as
Table 5-7. AUDIO user interface functions
Table 5-7
. AUDIO user interface functions
Function name
Functional description
init
initialize AUDIO required hardware resources
deinit
halt AUDIO function, release hardware resources
audio_cmd
play, stop, pause and restart command
volume_ctl
volume control
mute_ctl
mute control
periodic_tc
periodic transfer control
get_state
get AUDIO current state
AUDIO Routine operation guide
Download the audio routine to EVAL board, the newly added device is visible in device
Figure 5-5.
AUDIO device class