The core RTOS port is located in a separate file named usbd_os.c
. A template file can be found in the following folder:
\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.
|
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.
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(); } } |