72#define __NO_RETURN __declspec(noreturn)
73#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
74#define __NO_RETURN __attribute__((__noreturn__))
75#elif defined(__GNUC__)
76#define __NO_RETURN __attribute__((__noreturn__))
77#elif defined(__ICCARM__)
78#define __NO_RETURN __noreturn
201#define osWaitForever 0xFFFFFFFFU
204#define osFlagsWaitAny 0x00000000U
205#define osFlagsWaitAll 0x00000001U
206#define osFlagsNoClear 0x00000002U
209#define osFlagsError 0x80000000U
210#define osFlagsErrorUnknown 0xFFFFFFFFU
211#define osFlagsErrorTimeout 0xFFFFFFFEU
212#define osFlagsErrorResource 0xFFFFFFFDU
213#define osFlagsErrorParameter 0xFFFFFFFCU
214#define osFlagsErrorISR 0xFFFFFFFAU
215#define osFlagsErrorSafetyClass 0xFFFFFFF9U
218#define osThreadDetached 0x00000000U
219#define osThreadJoinable 0x00000001U
220#define osThreadUnprivileged 0x00000002U
221#define osThreadPrivileged 0x00000004U
223#define osThreadZone_Pos 8U
224#define osThreadZone_Msk (0x3FUL << osThreadZone_Pos)
225#define osThreadZone_Valid (0x80UL << osThreadZone_Pos)
226#define osThreadZone(n) ((((n) << osThreadZone_Pos) & osThreadZone_Msk) | \
230#define osThreadProcessor(n) (1UL << (n))
233#define osMutexRecursive 0x00000001U
234#define osMutexPrioInherit 0x00000002U
235#define osMutexRobust 0x00000008U
238#define osSafetyClass_Pos 16U
239#define osSafetyClass_Msk (0x0FUL << osSafetyClass_Pos)
240#define osSafetyClass_Valid (0x10UL << osSafetyClass_Pos)
241#define osSafetyClass(n) ((((n) << osSafetyClass_Pos) & osSafetyClass_Msk) | \
245#define osSafetyWithSameClass 0x00000001U
246#define osSafetyWithLowerClass 0x00000002U
249#define osErrorId 0xFFFFFFFFU
uint32_t osMemoryPoolGetSpace(osMemoryPoolId_t mp_id)
osKernelState_t
Kernel state.
osStatus_t osSemaphoreRelease(osSemaphoreId_t semaphore_id)
osPriority_t osThreadGetPriority(osThreadId_t thread_id)
const char * osMutexGetName(osMutexId_t mutex_id)
uint32_t osThreadGetClass(osThreadId_t thread_id)
osStatus_t osKernelDestroyClass(uint32_t safety_class, uint32_t mode)
void * osMessageQueueId_t
osMessageQueueId_t osMessageQueueNew(uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr)
osSemaphoreId_t osSemaphoreNew(uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr)
osStatus_t osThreadTerminate(osThreadId_t thread_id)
uint32_t osEventFlagsSet(osEventFlagsId_t ef_id, uint32_t flags)
osStatus_t osDelayUntil(uint32_t ticks)
osStatus_t osThreadResume(osThreadId_t thread_id)
osStatus_t osThreadJoin(osThreadId_t thread_id)
uint32_t osThreadGetZone(osThreadId_t thread_id)
osKernelState_t osKernelGetState(void)
osThreadId_t osThreadNew(osThreadFunc_t func, void *argument, const osThreadAttr_t *attr)
uint32_t osThreadGetCount(void)
osMemoryPoolId_t osMemoryPoolNew(uint32_t block_count, uint32_t block_size, const osMemoryPoolAttr_t *attr)
uint64_t osKernelGetSysTimerCount64(void)
uint32_t osKernelGetSysTimerFreq(void)
uint32_t osEventFlagsWait(osEventFlagsId_t ef_id, uint32_t flags, uint32_t options, uint32_t timeout)
uint32_t osThreadEnumerate(osThreadId_t *thread_array, uint32_t array_items)
const char * osEventFlagsGetName(osEventFlagsId_t ef_id)
uint32_t osWatchdogAlarm_Handler(osThreadId_t thread_id)
osStatus_t osThreadSetAffinityMask(osThreadId_t thread_id, uint32_t affinity_mask)
uint32_t osThreadFlagsClear(uint32_t flags)
uint32_t osTimerIsRunning(osTimerId_t timer_id)
uint32_t osMessageQueueGetCount(osMessageQueueId_t mq_id)
osStatus_t
Status code values returned by CMSIS-RTOS functions.
osStatus_t osKernelGetInfo(osVersion_t *version, char *id_buf, uint32_t id_size)
uint32_t osThreadFlagsSet(osThreadId_t thread_id, uint32_t flags)
uint32_t osSemaphoreGetCount(osSemaphoreId_t semaphore_id)
void osThreadExit(void)
Terminate execution of current running thread.
void(* osTimerFunc_t)(void *argument)
Timer callback function.
const char * osTimerGetName(osTimerId_t timer_id)
void osZoneSetup_Callback(uint32_t zone)
uint32_t osKernelGetTickFreq(void)
osStatus_t osEventFlagsDelete(osEventFlagsId_t ef_id)
osStatus_t osSemaphoreAcquire(osSemaphoreId_t semaphore_id, uint32_t timeout)
osThreadId_t osMutexGetOwner(osMutexId_t mutex_id)
osStatus_t osSemaphoreDelete(osSemaphoreId_t semaphore_id)
uint32_t osKernelGetTickCount(void)
uint32_t osThreadFlagsGet(void)
osStatus_t osThreadSetPriority(osThreadId_t thread_id, osPriority_t priority)
uint32_t osEventFlagsGet(osEventFlagsId_t ef_id)
osStatus_t osMemoryPoolDelete(osMemoryPoolId_t mp_id)
void osKernelResume(uint32_t sleep_ticks)
osThreadId_t osThreadGetId(void)
void * osMemoryPoolAlloc(osMemoryPoolId_t mp_id, uint32_t timeout)
void(* osThreadFunc_t)(void *argument)
Entry point of a thread.
osStatus_t osThreadFeedWatchdog(uint32_t ticks)
void osFaultResume(void)
Resume normal operation when exiting exception faults.
uint32_t osEventFlagsClear(osEventFlagsId_t ef_id, uint32_t flags)
int32_t osKernelLock(void)
const char * osSemaphoreGetName(osSemaphoreId_t semaphore_id)
uint32_t osMemoryPoolGetCount(osMemoryPoolId_t mp_id)
uint32_t osMessageQueueGetMsgSize(osMessageQueueId_t mq_id)
osStatus_t osThreadTerminateZone(uint32_t zone)
osStatus_t osKernelStart(void)
uint32_t osThreadGetStackSpace(osThreadId_t thread_id)
osStatus_t osMessageQueuePut(osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout)
osStatus_t osThreadSuspend(osThreadId_t thread_id)
osStatus_t osThreadDetach(osThreadId_t thread_id)
uint32_t osThreadGetAffinityMask(osThreadId_t thread_id)
osEventFlagsId_t osEventFlagsNew(const osEventFlagsAttr_t *attr)
uint32_t osMemoryPoolGetBlockSize(osMemoryPoolId_t mp_id)
const char * osMemoryPoolGetName(osMemoryPoolId_t mp_id)
osStatus_t osTimerStart(osTimerId_t timer_id, uint32_t ticks)
osMutexId_t osMutexNew(const osMutexAttr_t *attr)
uint32_t osThreadGetStackSize(osThreadId_t thread_id)
osStatus_t osMessageQueueDelete(osMessageQueueId_t mq_id)
osStatus_t osMemoryPoolFree(osMemoryPoolId_t mp_id, void *block)
osStatus_t osMutexAcquire(osMutexId_t mutex_id, uint32_t timeout)
osStatus_t osTimerStop(osTimerId_t timer_id)
osStatus_t osMutexDelete(osMutexId_t mutex_id)
uint32_t osThreadFlagsWait(uint32_t flags, uint32_t options, uint32_t timeout)
uint32_t osMessageQueueGetCapacity(osMessageQueueId_t mq_id)
const char * osThreadGetName(osThreadId_t thread_id)
osStatus_t osMessageQueueReset(osMessageQueueId_t mq_id)
osStatus_t osKernelProtect(uint32_t safety_class)
osThreadState_t osThreadGetState(osThreadId_t thread_id)
osStatus_t osTimerDelete(osTimerId_t timer_id)
osStatus_t osThreadYield(void)
osThreadState_t
Thread state.
osPriority_t
Priority values.
osTimerId_t osTimerNew(osTimerFunc_t func, osTimerType_t type, void *argument, const osTimerAttr_t *attr)
uint32_t osMemoryPoolGetCapacity(osMemoryPoolId_t mp_id)
osStatus_t osMessageQueueGet(osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout)
osStatus_t osThreadSuspendClass(uint32_t safety_class, uint32_t mode)
osStatus_t osThreadResumeClass(uint32_t safety_class, uint32_t mode)
uint32_t osMessageQueueGetSpace(osMessageQueueId_t mq_id)
uint32_t osKernelGetSysTimerCount(void)
uint32_t osKernelSuspend(void)
const char * osMessageQueueGetName(osMessageQueueId_t mq_id)
int32_t osKernelRestoreLock(int32_t lock)
osStatus_t osKernelInitialize(void)
osStatus_t osMutexRelease(osMutexId_t mutex_id)
osStatus_t osThreadProtectPrivileged(void)
int32_t osKernelUnlock(void)
osStatus_t osDelay(uint32_t ticks)
@ osKernelSuspended
Suspended.
@ osKernelRunning
Running.
@ osKernelReserved
Prevents enum down-size compiler optimization.
@ osKernelInactive
Inactive.
@ osErrorISR
Not allowed in ISR context: the function cannot be called from interrupt service routines.
@ osStatusReserved
Prevents enum down-size compiler optimization.
@ osErrorResource
Resource not available.
@ osErrorTimeout
Operation not completed within the timeout period.
@ osOK
Operation completed successfully.
@ osError
Unspecified RTOS error: run-time error but no other error message fits.
@ osErrorParameter
Parameter error.
@ osErrorNoMemory
System is out of memory: it was impossible to allocate or reserve memory for the operation.
@ osErrorSafetyClass
Operation denied because of safety class violation.
@ osTimerPeriodic
Repeating timer.
@ osTimerOnce
One-shot timer.
@ osThreadBlocked
Blocked.
@ osThreadRunning
Running.
@ osThreadInactive
Inactive.
@ osThreadReserved
Prevents enum down-size compiler optimization.
@ osThreadTerminated
Terminated.
@ osPriorityNormal7
Priority: normal + 7.
@ osPriorityHigh3
Priority: high + 3.
@ osPriorityBelowNormal5
Priority: below normal + 5.
@ osPriorityRealtime
Priority: realtime.
@ osPriorityAboveNormal
Priority: above normal.
@ osPriorityHigh1
Priority: high + 1.
@ osPriorityBelowNormal
Priority: below normal.
@ osPriorityBelowNormal3
Priority: below normal + 3.
@ osPriorityNormal2
Priority: normal + 2.
@ osPriorityLow3
Priority: low + 3.
@ osPriorityBelowNormal4
Priority: below normal + 4.
@ osPriorityISR
Reserved for ISR deferred thread.
@ osPriorityNormal1
Priority: normal + 1.
@ osPriorityRealtime3
Priority: realtime + 3.
@ osPriorityNormal3
Priority: normal + 3.
@ osPriorityHigh2
Priority: high + 2.
@ osPriorityNormal
Priority: normal.
@ osPriorityBelowNormal2
Priority: below normal + 2.
@ osPriorityIdle
Reserved for Idle thread.
@ osPriorityHigh6
Priority: high + 6.
@ osPriorityHigh5
Priority: high + 5.
@ osPriorityLow4
Priority: low + 4.
@ osPriorityLow7
Priority: low + 7.
@ osPriorityLow
Priority: low.
@ osPriorityAboveNormal6
Priority: above normal + 6.
@ osPriorityHigh7
Priority: high + 7.
@ osPriorityNormal5
Priority: normal + 5.
@ osPriorityNone
No priority (not initialized).
@ osPriorityAboveNormal4
Priority: above normal + 4.
@ osPriorityLow2
Priority: low + 2.
@ osPriorityRealtime6
Priority: realtime + 6.
@ osPriorityNormal6
Priority: normal + 6.
@ osPriorityAboveNormal2
Priority: above normal + 2.
@ osPriorityBelowNormal1
Priority: below normal + 1.
@ osPriorityHigh
Priority: high.
@ osPriorityNormal4
Priority: normal + 4.
@ osPriorityRealtime7
Priority: realtime + 7.
@ osPriorityBelowNormal7
Priority: below normal + 7.
@ osPriorityRealtime2
Priority: realtime + 2.
@ osPriorityLow1
Priority: low + 1.
@ osPriorityBelowNormal6
Priority: below normal + 6.
@ osPriorityAboveNormal1
Priority: above normal + 1.
@ osPriorityLow6
Priority: low + 6.
@ osPriorityReserved
Prevents enum down-size compiler optimization.
@ osPriorityAboveNormal3
Priority: above normal + 3.
@ osPriorityLow5
Priority: low + 5.
@ osPriorityAboveNormal7
Priority: above normal + 7.
@ osPriorityError
System cannot determine priority or illegal priority.
@ osPriorityAboveNormal5
Priority: above normal + 5.
@ osPriorityRealtime4
Priority: realtime + 4.
@ osPriorityRealtime1
Priority: realtime + 1.
@ osPriorityHigh4
Priority: high + 4.
@ osPriorityRealtime5
Priority: realtime + 5.
uint32_t api
API version (major.minor.rev: mmnnnrrrr dec).
uint32_t kernel
Kernel version (major.minor.rev: mmnnnrrrr dec).
Attributes structure for thread.
uint32_t affinity_mask
processor affinity mask for binding the thread to a CPU in a SMP system (0 when not used)
void * cb_mem
memory for control block
TZ_ModuleId_t tz_module
TrustZone module identifier.
uint32_t attr_bits
attribute bits
uint32_t cb_size
size of provided memory for control block
void * stack_mem
memory for stack
osPriority_t priority
initial thread priority (default: osPriorityNormal)
uint32_t stack_size
size of stack
const char * name
name of the thread
Attributes structure for timer.
void * cb_mem
memory for control block
const char * name
name of the timer
uint32_t attr_bits
attribute bits
uint32_t cb_size
size of provided memory for control block
Attributes structure for event flags.
uint32_t attr_bits
attribute bits
uint32_t cb_size
size of provided memory for control block
const char * name
name of the event flags
void * cb_mem
memory for control block
Attributes structure for mutex.
uint32_t cb_size
size of provided memory for control block
uint32_t attr_bits
attribute bits
const char * name
name of the mutex
void * cb_mem
memory for control block
Attributes structure for semaphore.
const char * name
name of the semaphore
uint32_t attr_bits
attribute bits
uint32_t cb_size
size of provided memory for control block
void * cb_mem
memory for control block
Attributes structure for memory pool.
uint32_t mp_size
size of provided memory for data storage
const char * name
name of the memory pool
void * cb_mem
memory for control block
uint32_t attr_bits
attribute bits
uint32_t cb_size
size of provided memory for control block
void * mp_mem
memory for data storage
Attributes structure for message queue.
const char * name
name of the message queue
uint32_t attr_bits
attribute bits
void * cb_mem
memory for control block
uint32_t mq_size
size of provided memory for data storage
uint32_t cb_size
size of provided memory for control block
void * mq_mem
memory for data storage