USBD_Audio_OS_Init
Description
Initialize the audio class OS layer.
Files
usbd_audio_os.h / usbd_audio_os.c
Prototype
void USBD_Audio_OS_Init (CPU_INT16U msg_qty, USBD_ERR *p_err);
Arguments
msg_qty
Maximum quantity of messages for playback and record tasks' queues.
p_err
Pointer to variable that will receive the return error code from this function.
USBD_ERR_NONE
USBD_ERR_OS_INIT_FAIL
Returned Value
None.
Callers
Audio Class.
Implementation guidelines
- This function is called only once by the audio class. It usually performs the following operations:
- Create one queue for the playback task and one for the record task that can contain up to
msg_qty
. - Create a task used for playback and another for record. If the task creation fails, set
p_err
toUSBD_ERR_OS_INIT_FAIL
and return. - Set
p_err
toUSBD_ERR_NONE
if the initialization proceeded as expected.
- Create one queue for the playback task and one for the record task that can contain up to