CMSIS-RTOS
Version 1.00
CMSIS-RTOS API: Generic RTOS interface for Cortex-M processor-based devices.
|
Provide version/system information and start the RTOS Kernel. More...
Defines | |
#define | osFeature_MainThread 1 |
main thread 1=main can be thread, 0=not available | |
#define | osCMSIS 0x00003 |
API version (main [31:16] .sub [15:0]) | |
#define | osCMSIS_KERNEL 0x10000 |
RTOS identification and version (main [31:16] .sub [15:0]) | |
#define | osKernelSystemId "KERNEL V1.00" |
RTOS identification string. | |
Functions | |
osStatus | osKernelStart (osThreadDef_t *thread_def, void *argument) |
Start the RTOS Kernel with executing the specified thread. | |
int32_t | osKernelRunning (void) |
Check if the RTOS kernel is already started. |
The Kernel Information and Control function group allow to:
The function main is a special thread function that may be started at system initialization. In this case it has the initial priority osPriorityNormal.
#define osCMSIS 0x00003 |
Version information of the CMSIS RTOS API whereby major verison is in bits [31:16] and sub version in bits [15:0]. The value 0x10000 represents version 1.00.
#define osCMSIS_KERNEL 0x10000 |
Identifies the underlaying RTOS kernel and version number. The actual name of that define depends on the RTOS Kernel used in the implementation. For example, osCMSIS_FreeRTOS identifies the FreeRTOS kernel and the value indicates the version number of that kernel whereby the major verison is in bits [31:16] and sub version in bits [15:0]. The value 0x10000 represents version 1.00.
#define osFeature_MainThread 1 |
A CMSIS-RTOS implementation may support to start thread execution with the function 'main'. When the value osFeature_MainThread is 1 the RTOS offers to start with 'main'. The RTOS kernel is in this case already started. When the value osFeature_MainThread is 0 the RTOS requries explicit start with osKernelStart.
#define osKernelSystemId "KERNEL V1.00" |
Defines a string that identifies the underlaying RTOS Kernel and provides version information. The lenght of that string is limited to 21 bytes. A valid indenification string is for example, "FreeRTOS V1.00".
int32_t osKernelRunning | ( | void | ) |
Identifies if the RTOS kernel is started. For systems with the option to start the 'main' function as a thread this allows to identify that the RTOS kernel is already running.
void osKernelStart | ( | osThreadDef_t * | thread_def, |
void * | argument | ||
) |
[in] | thread_def | thread definition referenced with osThread. |
[in] | argument | pointer that is passed to the thread function as start argument. |
Start the RTOS Kernel and begin execution of the thread function specified by thread_def. The argument is passed to the thread function.
When the CMSIS-RTOS starts thread execution with 'main', the function osKernelStart terminates this 'main; thread and starts execution with the specified thread function. This ensures that the code is portable regardless weather the function 'main' is started as thread or executed without control of the RTOS kernel.