USBD_Audio_OS_DlyMs
Description
Delay a task for a certain time.
Files
usbd_audio_os.h / usbd_audio_os.c
Prototype
void USBD_Audio_OS_DlyMs (CPU_INT32U ms);
Arguments
ms
Delay in milliseconds.
Returned Value
None.
Callers
Audio Class.
Implementation guidelines
The RTOS layer code should delay the calling task by the specified number of milliseconds.
OS Tick Rate
Whenever possible, USBD_Audio_OS_DlyMs() should provide a delay with a 1 ms granularity. That is the OS tick rate should be set to produce at least 1 tick per millisecond. It will help for the audio class tasks scheduling as audio class works on a 1 ms frame basis. Moreover, a retry mechanism is implemented in the playback and record tasks in case a transfer cannot be queued on a given endpoint. The playback or record task waits 1 ms between each attempt before re-transmitting the transfer.