Versions Compared

Key

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

...

\Micrium\Software\uC-USB-Device-V4\OS\Template

Table - Core OS port API summary summarizes all the functions that need to be implemented in the RTOS port file. For more information on how these functions should be implemented, refer to the Core Layer RTOS Model page and to the Core OS Functions reference.

Anchor
Table - Core OS port API summary
Table - Core OS port API summary

Panel
borderWidth0
titleTable - Core OS port API summary


Function nameOperation
USBD_OS_Init() Initializes all internal members / tasks.
USBD_OS_EP_SignalCreate() Creates OS signal used to synchronize synchronous transfers.
USBD_OS_EP_SignalDel() Deletes OS signal used to synchronize synchronous transfers.
USBD_OS_EP_SignalPend() Pends on OS signal used to synchronize synchronous transfers.
USBD_OS_EP_SignalAbort() Aborts OS signal used to synchronize synchronous transfers.
USBD_OS_EP_SignalPost() Posts OS signal used to synchronize synchronous transfers.
USBD_OS_EP_LockCreate() Creates OS lock used to lock endpoint.
USBD_OS_EP_LockDel() Deletes OS lock used to lock endpoint.
USBD_OS_EP_LockAcquire() Acquires OS lock used to lock endpoint.
USBD_OS_EP_LockRelease() Releases OS lock used to lock endpoint.
USBD_OS_DbgEventRdy() Posts signal used to resume debug task.
USBD_OS_DbgEventWait() Pends on signal used to resume debug task.
USBD_OS_CoreEventGet() Retrieves the next core event to process.
USBD_OS_CoreEventPut() Adds a core event to be processed by the core.
USBD_OS_DlyMs() Delays a task for a number of milliseconds.



Note that you must declare at least one task for the core events management within your RTOS port. This task should simply call the core function USBD_CoreTaskHandler in an infinite loop. Furthermore, if you plan using the debugging feature, you must also create a task for this purpose. This task should simply call the core function USBD_DbgTaskHandler in an infinite loop. Listing - Core task and debug task typical implementation shows how these two task functions body should be implemented.

Anchor
Listing - Core task and debug task typical implementation
Listing - Core task and debug task typical implementation

Code Block
languagecpp
titleListing - Core task and debug task typical implementation
linenumberstrue
static  void  USBD_OS_CoreTask (void  *p_arg)
{
    (void)&p_arg;
 
    while (DEF_ON) {
        USBD_CoreTaskHandler();
    }
}
 
static  void  USBD_OS_TraceTask (void  *p_arg)
{
    (void)&p_arg;
 
    while (DEF_ON) {
        USBD_DbgTaskHandler();
    }
}