Description
Get or set current sampling frequency for a particular Terminal (i.e. endpoint).
Files
usbd_audio_drv_<codec-name>.h / usbd_audio_drv_<codec-name>.c
Prototype
Arguments
p_audio_drv
Pointer to audio driver structure.
terminal_id_link
AudioStreaming terminal link.
set_en
Flag indicating to get or set the sampling frequency.
p_sampling_freq
Pointer to the sampling frequency value to get or set.
Endianness
p_sampling_freq
uses a little endian memory organization. Hence, you should use the µC/LIB macro MEM_VAL_SET_INT32U_LITTLE()
when writing the sampling frequency to it. This will ensure data is accessed correctly regarding your CPU endianness.
Returned Value
DEF_OK
, if NO error(s) occurred and request is supported.
DEF_FAIL
, otherwise.
Callers
Audio Class.
Implementation guidelines
This listing shows an example usage of this function.