Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

By default, Micrium will provide an RTOS layer for both μC/OS-II and μC/OS-III. However, it is possible to create your own RTOS layer. Your layer will need to implement the functions listed in Table - OS Layer API Summary. For a complete API description, see the Audio API Reference.


Anchor
Table - OS Layer API Summary
Table - OS Layer API Summary

Panel
borderWidth0
titleTable - OS Layer API Summary


Function nameOperation
USBD_Audio_OS_Init()Initializes all internal members / tasks.
USBD_Audio_OS_AS_IF_LockCreate()Creates an OS resource to use as an AudioStreaming interface lock.
USBD_Audio_OS_AS_IF_LockAcquire()Waits for an AudioStreaming interface to become available and acquire its lock.
USBD_Audio_OS_AS_IF_LockRelease()Releases an AudioStreaming interface lock.
USBD_Audio_OS_RingBufQLockCreate()Creates an OS resource to use as a stream ring buffer queue lock.
USBD_Audio_OS_RingBufQLockAcquire()Waits for a stream ring buffer queue to become available and acquire its lock.
USBD_Audio_OS_RingBufQLockRelease()Releases a stream ring buffer queue lock.
USBD_Audio_OS_RecordReqPostPosts a request into the record task's queue.
USBD_Audio_OS_RecordReqPendPends on a request from the record task's queue.
USBD_Audio_OS_PlaybackReqPostPosts a request into the playback task's queue.
USBD_Audio_OS_PlaybackReqPendPends on a request from the playback task's queue.
USBD_Audio_OS_DlyMs()Delays calling task for a certain duration expressed in milliseconds.
USBD_Audio_OS_RecordTask()Task processing record streams. Refer to Audio Class Stream Data Flow for more details about this task.
USBD_Audio_OS_PlaybackTask()Task processing playback streams. Refer to Audio Class Stream Data Flow for more details about this task.



Warning
titleOS 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 improve 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.

...