Go to the documentation of this file.
29 #ifndef _OS_PORT_CMSIS_RTOS2_H
30 #define _OS_PORT_CMSIS_RTOS2_H
33 #include "cmsis_os2.h"
35 #ifdef RTE_CMSIS_RTOS2_RTX5
39 #ifdef RTE_CMSIS_RTOS2_FreeRTOS
44 #define OS_INVALID_TASK_ID NULL
46 #define OS_SELF_TASK_ID NULL
49 #ifndef OS_TASK_PRIORITY_NORMAL
50 #define OS_TASK_PRIORITY_NORMAL osPriorityNormal
54 #ifndef OS_TASK_PRIORITY_HIGH
55 #define OS_TASK_PRIORITY_HIGH osPriorityAboveNormal
59 #ifndef OS_MS_TO_SYSTICKS
60 #define OS_MS_TO_SYSTICKS(n) (n)
64 #ifndef OS_SYSTICKS_TO_MS
65 #define OS_SYSTICKS_TO_MS(n) (n)
69 #ifndef osGetSystemTime64
70 #define osGetSystemTime64() osGetSystemTime()
80 #define osExitIsr(flag)
108 #if defined(os_CMSIS_RTX)
111 #if defined(osRtxVersionKernel)
114 #if defined(configSUPPORT_STATIC_ALLOCATION)
130 #if defined(os_CMSIS_RTX)
133 #if defined(osRtxVersionKernel)
134 osRtxEventFlags_t cb;
146 #if defined(os_CMSIS_RTX)
149 #if defined(osRtxVersionKernel)
162 #if defined(os_CMSIS_RTX)
165 #if defined(osRtxVersionKernel)
void osDeleteMutex(OsMutex *mutex)
Delete a mutex object.
void osDelayTask(systime_t delay)
Delay routine.
void osDeleteTask(OsTaskId taskId)
Delete a task.
void osDeleteSemaphore(OsSemaphore *semaphore)
Delete a semaphore object.
void(* OsTaskCode)(void *arg)
Task routine.
void osSuspendAllTasks(void)
Suspend scheduler activity.
bool_t osCreateSemaphore(OsSemaphore *semaphore, uint_t count)
Create a semaphore object.
void * osAllocMem(size_t size)
Allocate a memory block.
void osStartKernel(void)
Start kernel.
void osDeleteEvent(OsEvent *event)
Delete an event object.
bool_t osWaitForSemaphore(OsSemaphore *semaphore, systime_t timeout)
Wait for the specified semaphore to be available.
mutex_t OsMutex
Mutex object.
void osInitKernel(void)
Kernel initialization.
binary_semaphore_t OsEvent
Event object.
uint32_t systime_t
System time.
void osAcquireMutex(OsMutex *mutex)
Acquire ownership of the specified mutex object.
const OsTaskParameters OS_TASK_DEFAULT_PARAMS
osThreadId_t OsTaskId
Task identifier.
void osReleaseSemaphore(OsSemaphore *semaphore)
Release the specified semaphore object.
bool_t osCreateEvent(OsEvent *event)
Create an event object.
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
void osFreeMem(void *p)
Release a previously allocated memory block.
uint32_t systime_t
System time.
bool_t osCreateMutex(OsMutex *mutex)
Create a mutex object.
OsTaskId osCreateTask(const char_t *name, OsTaskCode taskCode, void *arg, const OsTaskParameters *params)
Create a task.
thread_t * OsTaskId
Task identifier.
void osSwitchTask(void)
Yield control to the next task.
systime_t osGetSystemTime(void)
Retrieve system time.
bool_t osWaitForEvent(OsEvent *event, systime_t timeout)
Wait until the specified event is in the signaled state.
void osResetEvent(OsEvent *event)
Set the specified event object to the nonsignaled state.
bool_t osSetEventFromIsr(OsEvent *event)
Set an event object to the signaled state from an interrupt service routine.
void osResumeAllTasks(void)
Resume scheduler activity.
void osReleaseMutex(OsMutex *mutex)
Release ownership of the specified mutex object.
semaphore_t OsSemaphore
Semaphore object.