# CMSIS ## **Overview** Provides standard, universal real-time operating system \(RTOS\) APIs. These APIs comply with ARM CMSIS and are used for thread management, timer management, inter-process communications, and semaphores. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Data Structures
osWaitForever 0xFFFFFFFFU |
Indicates that the RTOS waits forever unless an event flag is received. |
osNoWait 0x0U |
|
osFlagsWaitAny 0x00000000U |
Indicates that the RTOS waits until any event flag is triggered. |
osFlagsWaitAll 0x00000001U |
Indicates that the system waits until all event flags are triggered. |
osFlagsNoClear 0x00000002U |
|
osFlagsError 0x80000000U |
|
osFlagsErrorUnknown 0xFFFFFFFFU |
|
osFlagsErrorTimeout 0xFFFFFFFEU |
|
osFlagsErrorResource 0xFFFFFFFDU |
|
osFlagsErrorParameter 0xFFFFFFFCU |
osThreadFunc_t) (void *argument) |
|
osTimerFunc_t) (void *argument) |
|
osKernelInitialize (void) |
|
osKernelGetInfo (osVersion_t *version, char *id_buf, uint32_t id_size) |
|
osKernelGetState (void) |
|
osKernelStart (void) |
|
osKernelLock (void) |
|
osKernelUnlock (void) |
|
osKernelRestoreLock (int32_t lock) |
|
osKernelGetTickFreq (void) |
|
osKernelGetSysTimerCount (void) |
|
osKernelGetSysTimerFreq (void) |
|
osThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr) |
|
osThreadGetName (osThreadId_t thread_id) |
|
osThreadGetId (void) |
|
osThreadGetState (osThreadId_t thread_id) |
|
osThreadGetStackSize (osThreadId_t thread_id) |
|
osThreadGetStackSpace (osThreadId_t thread_id) |
Obtains the size of the available stack space for a thread based on the stack watermark. |
osThreadSetPriority (osThreadId_t thread_id, osPriority_t priority) |
|
osThreadGetPriority (osThreadId_t thread_id) |
|
osThreadYield (void) |
|
osThreadSuspend (osThreadId_t thread_id) |
|
osThreadResume (osThreadId_t thread_id) |
|
osThreadTerminate (osThreadId_t thread_id) |
|
osThreadGetCount (void) |
|
osDelay (uint32_t ticks) |
|
osDelayUntil (uint64_t ticks) |
|
osTimerNew (osTimerFunc_t func, osTimerType_t type, void *argument, const osTimerAttr_t *attr) |
|
osTimerStart (osTimerId_t timer_id, uint32_t ticks) |
|
osTimerStop (osTimerId_t timer_id) |
|
osTimerIsRunning (osTimerId_t timer_id) |
|
osTimerDelete (osTimerId_t timer_id) |
|
osEventFlagsNew (const osEventFlagsAttr_t *attr) |
|
osEventFlagsSet (osEventFlagsId_t ef_id, uint32_t flags) |
|
osEventFlagsClear (osEventFlagsId_t ef_id, uint32_t flags) |
|
osEventFlagsGet (osEventFlagsId_t ef_id) |
|
osEventFlagsWait (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options, uint32_t timeout) |
|
osEventFlagsDelete (osEventFlagsId_t ef_id) |
|
osMutexNew (const osMutexAttr_t *attr) |
|
osMutexAcquire (osMutexId_t mutex_id, uint32_t timeout) |
|
osMutexRelease (osMutexId_t mutex_id) |
|
osMutexGetOwner (osMutexId_t mutex_id) |
|
osMutexDelete (osMutexId_t mutex_id) |
|
osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr) |
|
osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t timeout) |
|
osSemaphoreRelease (osSemaphoreId_t semaphore_id) |
|
osSemaphoreGetCount (osSemaphoreId_t semaphore_id) |
Obtains the number of available tokens of a semaphore object. |
osSemaphoreDelete (osSemaphoreId_t semaphore_id) |
|
osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr) |
|
osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout) |
|
osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout) |
|
Obtains the maximum number of messages that can be placed in a message queue. |
|
Obtains the maximum size of messages that can be placed in a message queue. |
|
Obtains the number of available slots for messages in a message queue. |
|
osTimerAlignIgnore | |
osTimerAlignAllow |
osTimerRousesIgnore | |
osTimerRousesAllow |
osKernelInactive | |
osKernelReady | |
osKernelRunning | |
osKernelLocked | |
osKernelSuspended | |
osKernelError | |
osKernelReserved |
osOK | |
osError | |
osErrorTimeout | |
osErrorResource | |
osErrorParameter | |
osErrorNoMemory | |
osErrorISR | Service interruption |
osStatusReserved | Reserved. It is used to prevent the compiler from optimizing enumerations. |
osThreadInactive | |
osThreadReady | |
osThreadRunning | |
osThreadBlocked | |
osThreadTerminated | |
osThreadError | |
osThreadReserved |
osTimerOnce | |
osTimerPeriodic |
ticks | Indicates the number of ticks to wait for. |
ticks | Indicates the number of ticks converted from the absolute time. |
ef_id | Indicates the event flags ID, which is obtained using osEventFlagsNew. |
flags | Indicates the event flags to clear. |
ef_id | Indicates the event flags ID, which is obtained using osEventFlagsNew. |
ef_id | Indicates the event flags ID, which is obtained using osEventFlagsNew. |
attr | Indicates the pointer to the event flags attributes. This parameter is not used. |
ef_id | Indicates the event flags ID, which is obtained using osEventFlagsNew. |
flags | Indicates the event flags to set. |
ef_id | Indicates the event flags ID, which is obtained using osEventFlagsNew. |
flags | Indicates the event flags to trigger. |
options | Indicates the configuration of the event flags to trigger. |
timeout | Indicates the timeout duration. |
version | Indicates the pointer to the buffer for storing the version. |
id_buf | Indicates the pointer to the buffer for storing the kernel ID. |
id_size | Indicates the size of the buffer for storing the kernel ID. |
locks | Indicates the lock state to restore to. The value 1 indicates the locked state, and 0 indicates the unlocked state. |
osMessageQueueId_t | Indicates the message queue ID, which is obtained using osMessageQueueNew. |
osMessageQueueId_t | Indicates the message queue ID, which is obtained using osMessageQueueNew. |
msg_ptr | Indicates the pointer to the buffer for storing the message to be retrieved from the message queue. |
msg_prio | Indicates the pointer to the buffer for storing the priority of the message to be retrieved from the message queue. This parameter can be left empty. |
timeout | Indicates the timeout duration. |
osMessageQueueId_t | Indicates the message queue ID, which is obtained using osMessageQueueNew. |
osMessageQueueId_t | Indicates the message queue ID, which is obtained using osMessageQueueNew. |
osMessageQueueId_t | Indicates the message queue ID, which is obtained using osMessageQueueNew. |
osMessageQueueId_t | Indicates the message queue ID, which is obtained using osMessageQueueNew. |
msg_count | Indicates the number of messages in the message queue. |
msg_size | Indicates the size of messages in the message queue. |
attr | Indicates the pointer to the message queue attributes. This parameter is not used. |
osMessageQueueId_t | Indicates the message queue ID, which is obtained using osMessageQueueNew. |
msg_ptr | Indicates the pointer to the buffer for storing the message to be placed in the message queue. |
msg_prio | Indicates the priority of the message to be placed in the message queue. |
timeout | Indicates the timeout duration. |
mutex_id | Indicates the mutex ID, which is obtained using osMutexNew. |
timeout | Indicates the timeout duration. |
mutex_id | Indicates the mutex ID, which is obtained using osMutexNew. |
mutex_id | Indicates the mutex ID, which is obtained using osMutexNew. |
attr | Indicates the pointer to the mutex attributes. This parameter is not used. |
mutex_id | Indicates the mutex ID, which is obtained using osMutexNew. |
semaphore_id | Indicates the semaphore ID, which is obtained using osSemaphoreNew. |
timeout | Indicates the timeout duration. |
semaphore_id | Indicates the semaphore ID, which is obtained using osSemaphoreNew. |
semaphore_id | Indicates the semaphore ID, which is obtained using osSemaphoreNew. |
max_count | Indicates the maximum number of available tokens that can be applied for. |
initial_count | Indicates the initial number of available tokens. |
attr | Indicates the pointer to the semaphore attributes. This parameter is not used. |
semaphore_id | Indicates the semaphore ID, which is obtained using osSemaphoreNew. |
thread_id | Indicates the thread ID, which is obtained using osThreadNew or osThreadGetId. |
thread_id | Indicates the thread ID, which is obtained using osThreadNew or osThreadGetId. |
thread_id | Indicates the thread ID, which is obtained using osThreadNew or osThreadGetId. |
thread_id | Indicates the thread ID, which is obtained using osThreadNew or osThreadGetId. |
thread_id | Indicates the thread ID, which is obtained using osThreadNew or osThreadGetId. |
func | Indicates the entry of the thread callback function. |
argument | Indicates the pointer to the argument passed to the thread. |
attr | Indicates the thread attributes. If this parameter is left unspecified, the default value 0 is used. |
thread_id | Indicates the thread ID, which is obtained using osThreadNew or osThreadGetId. |
thread_id | Indicates the thread ID, which is obtained using osThreadNew or osThreadGetId. |
priority | Indicates the new priority. |
thread_id | Indicates the thread ID, which is obtained using osThreadNew or osThreadGetId. |
thread_id | Indicates the thread ID, which is obtained using osThreadNew or osThreadGetId. |
timer_id | Indicates the timer ID, which is obtained using osTimerNew. |
timer_id | Indicates the timer ID, which is obtained using osTimerNew. |
func | Indicates the entry of the timer callback function. |
type | Indicates the timer type. |
argument | Indicates the pointer to the argument used in timer callback. |
attr | Indicates the pointer to the timer attributes. This parameter is not used. |
timer_id | Indicates the timer ID, which is obtained using osTimerNew. |
ticks | Indicates the number of ticks since the timer starts running. |
timer_id | Indicates the timer ID, which is obtained using osTimerNew. |