|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
#include <stdint.h>#include <stddef.h>Go to the source code of this file.
Classes | |
| struct | osVersion_t |
| Version information. More... | |
| struct | osThreadAttr_t |
| Attributes structure for thread. More... | |
| struct | osTimerAttr_t |
| Attributes structure for timer. More... | |
| struct | osEventFlagsAttr_t |
| Attributes structure for event flags. More... | |
| struct | osMutexAttr_t |
| Attributes structure for mutex. More... | |
| struct | osSemaphoreAttr_t |
| Attributes structure for semaphore. More... | |
| struct | osMemoryPoolAttr_t |
| Attributes structure for memory pool. More... | |
| struct | osMessageQueueAttr_t |
| Attributes structure for message queue. More... | |
Macros | |
| #define | __NO_RETURN |
| #define | osWaitForever 0xFFFFFFFFU |
| Wait forever timeout value. | |
| #define | osFlagsWaitAny 0x00000000U |
| Wait for any flag (default). | |
| #define | osFlagsWaitAll 0x00000001U |
| Wait for all flags. | |
| #define | osFlagsNoClear 0x00000002U |
| Do not clear flags which have been specified to wait for. | |
| #define | osFlagsError 0x80000000U |
| Error indicator. | |
| #define | osFlagsErrorUnknown 0xFFFFFFFFU |
| osError (-1). | |
| #define | osFlagsErrorTimeout 0xFFFFFFFEU |
| osErrorTimeout (-2). | |
| #define | osFlagsErrorResource 0xFFFFFFFDU |
| osErrorResource (-3). | |
| #define | osFlagsErrorParameter 0xFFFFFFFCU |
| osErrorParameter (-4). | |
| #define | osFlagsErrorISR 0xFFFFFFFAU |
| osErrorISR (-6). | |
| #define | osThreadDetached 0x00000000U |
| Thread created in detached mode (default). | |
| #define | osThreadJoinable 0x00000001U |
| Thread created in joinable mode. | |
| #define | osMutexRecursive 0x00000001U |
| Recursive mutex. | |
| #define | osMutexPrioInherit 0x00000002U |
| Priority inherit protocol. | |
| #define | osMutexRobust 0x00000008U |
| Robust mutex. | |
| #define | TZ_MODULEID_T |
Typedefs | |
| typedef void(* | osThreadFunc_t) (void *argument) |
| Entry point of a thread. | |
| typedef void(* | osTimerFunc_t) (void *argument) |
| Timer callback function. | |
| typedef void * | osThreadId_t |
| typedef void * | osTimerId_t |
| typedef void * | osEventFlagsId_t |
| typedef void * | osMutexId_t |
| typedef void * | osSemaphoreId_t |
| typedef void * | osMemoryPoolId_t |
| typedef void * | osMessageQueueId_t |
Functions | |
| osStatus_t | osKernelInitialize (void) |
| Initialize the RTOS Kernel. | |
| osStatus_t | osKernelGetInfo (osVersion_t *version, char *id_buf, uint32_t id_size) |
| Get RTOS Kernel Information. | |
| osKernelState_t | osKernelGetState (void) |
| Get the current RTOS Kernel state. | |
| osStatus_t | osKernelStart (void) |
| Start the RTOS Kernel scheduler. | |
| int32_t | osKernelLock (void) |
| Lock the RTOS Kernel scheduler. | |
| int32_t | osKernelUnlock (void) |
| Unlock the RTOS Kernel scheduler. | |
| int32_t | osKernelRestoreLock (int32_t lock) |
| Restore the RTOS Kernel scheduler lock state. | |
| uint32_t | osKernelSuspend (void) |
| Suspend the RTOS Kernel scheduler. | |
| void | osKernelResume (uint32_t sleep_ticks) |
| Resume the RTOS Kernel scheduler. | |
| uint32_t | osKernelGetTickCount (void) |
| Get the RTOS kernel tick count. | |
| uint32_t | osKernelGetTickFreq (void) |
| Get the RTOS kernel tick frequency. | |
| uint32_t | osKernelGetSysTimerCount (void) |
| Get the RTOS kernel system timer count. | |
| uint32_t | osKernelGetSysTimerFreq (void) |
| Get the RTOS kernel system timer frequency. | |
| osThreadId_t | osThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr) |
| Create a thread and add it to Active Threads. | |
| const char * | osThreadGetName (osThreadId_t thread_id) |
| Get name of a thread. | |
| osThreadId_t | osThreadGetId (void) |
| Return the thread ID of the current running thread. | |
| osThreadState_t | osThreadGetState (osThreadId_t thread_id) |
| Get current thread state of a thread. | |
| uint32_t | osThreadGetStackSize (osThreadId_t thread_id) |
| Get stack size of a thread. | |
| uint32_t | osThreadGetStackSpace (osThreadId_t thread_id) |
| Get available stack space of a thread based on stack watermark recording during execution. | |
| osStatus_t | osThreadSetPriority (osThreadId_t thread_id, osPriority_t priority) |
| Change priority of a thread. | |
| osPriority_t | osThreadGetPriority (osThreadId_t thread_id) |
| Get current priority of a thread. | |
| osStatus_t | osThreadYield (void) |
| Pass control to next thread that is in state READY. | |
| osStatus_t | osThreadSuspend (osThreadId_t thread_id) |
| Suspend execution of a thread. | |
| osStatus_t | osThreadResume (osThreadId_t thread_id) |
| Resume execution of a thread. | |
| osStatus_t | osThreadDetach (osThreadId_t thread_id) |
| Detach a thread (thread storage can be reclaimed when thread terminates). | |
| osStatus_t | osThreadJoin (osThreadId_t thread_id) |
| Wait for specified thread to terminate. | |
| __NO_RETURN void | osThreadExit (void) |
| Terminate execution of current running thread. | |
| osStatus_t | osThreadTerminate (osThreadId_t thread_id) |
| Terminate execution of a thread. | |
| uint32_t | osThreadGetCount (void) |
| Get number of active threads. | |
| uint32_t | osThreadEnumerate (osThreadId_t *thread_array, uint32_t array_items) |
| Enumerate active threads. | |
| uint32_t | osThreadFlagsSet (osThreadId_t thread_id, uint32_t flags) |
| Set the specified Thread Flags of a thread. | |
| uint32_t | osThreadFlagsClear (uint32_t flags) |
| Clear the specified Thread Flags of current running thread. | |
| uint32_t | osThreadFlagsGet (void) |
| Get the current Thread Flags of current running thread. | |
| uint32_t | osThreadFlagsWait (uint32_t flags, uint32_t options, uint32_t timeout) |
| Wait for one or more Thread Flags of the current running thread to become signaled. | |
| osStatus_t | osDelay (uint32_t ticks) |
| Wait for Timeout (Time Delay). | |
| osStatus_t | osDelayUntil (uint32_t ticks) |
| Wait until specified time. | |
| osTimerId_t | osTimerNew (osTimerFunc_t func, osTimerType_t type, void *argument, const osTimerAttr_t *attr) |
| Create and Initialize a timer. | |
| const char * | osTimerGetName (osTimerId_t timer_id) |
| Get name of a timer. | |
| osStatus_t | osTimerStart (osTimerId_t timer_id, uint32_t ticks) |
| Start or restart a timer. | |
| osStatus_t | osTimerStop (osTimerId_t timer_id) |
| Stop a timer. | |
| uint32_t | osTimerIsRunning (osTimerId_t timer_id) |
| Check if a timer is running. | |
| osStatus_t | osTimerDelete (osTimerId_t timer_id) |
| Delete a timer. | |
| osEventFlagsId_t | osEventFlagsNew (const osEventFlagsAttr_t *attr) |
| Create and Initialize an Event Flags object. | |
| const char * | osEventFlagsGetName (osEventFlagsId_t ef_id) |
| Get name of an Event Flags object. | |
| uint32_t | osEventFlagsSet (osEventFlagsId_t ef_id, uint32_t flags) |
| Set the specified Event Flags. | |
| uint32_t | osEventFlagsClear (osEventFlagsId_t ef_id, uint32_t flags) |
| Clear the specified Event Flags. | |
| uint32_t | osEventFlagsGet (osEventFlagsId_t ef_id) |
| Get the current Event Flags. | |
| uint32_t | osEventFlagsWait (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options, uint32_t timeout) |
| Wait for one or more Event Flags to become signaled. | |
| osStatus_t | osEventFlagsDelete (osEventFlagsId_t ef_id) |
| Delete an Event Flags object. | |
| osMutexId_t | osMutexNew (const osMutexAttr_t *attr) |
| Create and Initialize a Mutex object. | |
| const char * | osMutexGetName (osMutexId_t mutex_id) |
| Get name of a Mutex object. | |
| osStatus_t | osMutexAcquire (osMutexId_t mutex_id, uint32_t timeout) |
| Acquire a Mutex or timeout if it is locked. | |
| osStatus_t | osMutexRelease (osMutexId_t mutex_id) |
| Release a Mutex that was acquired by osMutexAcquire. | |
| osThreadId_t | osMutexGetOwner (osMutexId_t mutex_id) |
| Get Thread which owns a Mutex object. | |
| osStatus_t | osMutexDelete (osMutexId_t mutex_id) |
| Delete a Mutex object. | |
| osSemaphoreId_t | osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr) |
| Create and Initialize a Semaphore object. | |
| const char * | osSemaphoreGetName (osSemaphoreId_t semaphore_id) |
| Get name of a Semaphore object. | |
| osStatus_t | osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t timeout) |
| Acquire a Semaphore token or timeout if no tokens are available. | |
| osStatus_t | osSemaphoreRelease (osSemaphoreId_t semaphore_id) |
| Release a Semaphore token up to the initial maximum count. | |
| uint32_t | osSemaphoreGetCount (osSemaphoreId_t semaphore_id) |
| Get current Semaphore token count. | |
| osStatus_t | osSemaphoreDelete (osSemaphoreId_t semaphore_id) |
| Delete a Semaphore object. | |
| osMemoryPoolId_t | osMemoryPoolNew (uint32_t block_count, uint32_t block_size, const osMemoryPoolAttr_t *attr) |
| Create and Initialize a Memory Pool object. | |
| const char * | osMemoryPoolGetName (osMemoryPoolId_t mp_id) |
| Get name of a Memory Pool object. | |
| void * | osMemoryPoolAlloc (osMemoryPoolId_t mp_id, uint32_t timeout) |
| Allocate a memory block from a Memory Pool. | |
| osStatus_t | osMemoryPoolFree (osMemoryPoolId_t mp_id, void *block) |
| Return an allocated memory block back to a Memory Pool. | |
| uint32_t | osMemoryPoolGetCapacity (osMemoryPoolId_t mp_id) |
| Get maximum number of memory blocks in a Memory Pool. | |
| uint32_t | osMemoryPoolGetBlockSize (osMemoryPoolId_t mp_id) |
| Get memory block size in a Memory Pool. | |
| uint32_t | osMemoryPoolGetCount (osMemoryPoolId_t mp_id) |
| Get number of memory blocks used in a Memory Pool. | |
| uint32_t | osMemoryPoolGetSpace (osMemoryPoolId_t mp_id) |
| Get number of memory blocks available in a Memory Pool. | |
| osStatus_t | osMemoryPoolDelete (osMemoryPoolId_t mp_id) |
| Delete a Memory Pool object. | |
| osMessageQueueId_t | osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr) |
| Create and Initialize a Message Queue object. | |
| const char * | osMessageQueueGetName (osMessageQueueId_t mq_id) |
| Get name of a Message Queue object. | |
| osStatus_t | osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout) |
| Put a Message into a Queue or timeout if Queue is full. | |
| osStatus_t | osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout) |
| Get a Message from a Queue or timeout if Queue is empty. | |
| uint32_t | osMessageQueueGetCapacity (osMessageQueueId_t mq_id) |
| Get maximum number of messages in a Message Queue. | |
| uint32_t | osMessageQueueGetMsgSize (osMessageQueueId_t mq_id) |
| Get maximum message size in a Message Queue. | |
| uint32_t | osMessageQueueGetCount (osMessageQueueId_t mq_id) |
| Get number of queued messages in a Message Queue. | |
| uint32_t | osMessageQueueGetSpace (osMessageQueueId_t mq_id) |
| Get number of available slots for messages in a Message Queue. | |
| osStatus_t | osMessageQueueReset (osMessageQueueId_t mq_id) |
| Reset a Message Queue to initial empty state. | |
| osStatus_t | osMessageQueueDelete (osMessageQueueId_t mq_id) |
| Delete a Message Queue object. | |
| #define __NO_RETURN |
Definition at line 60 of file cmsis_os2.h.
| #define osFlagsError 0x80000000U |
| #define osFlagsErrorISR 0xFFFFFFFAU |
osErrorISR (-6).
Definition at line 186 of file cmsis_os2.h.
| #define osFlagsErrorParameter 0xFFFFFFFCU |
osErrorParameter (-4).
Definition at line 185 of file cmsis_os2.h.
Referenced by osEventFlagsWait().
| #define osFlagsErrorResource 0xFFFFFFFDU |
osErrorResource (-3).
Definition at line 184 of file cmsis_os2.h.
| #define osFlagsErrorTimeout 0xFFFFFFFEU |
osErrorTimeout (-2).
Definition at line 183 of file cmsis_os2.h.
| #define osFlagsErrorUnknown 0xFFFFFFFFU |
osError (-1).
Definition at line 182 of file cmsis_os2.h.
| #define osFlagsNoClear 0x00000002U |
Do not clear flags which have been specified to wait for.
Definition at line 178 of file cmsis_os2.h.
Referenced by osEventFlagsWait().
| #define osFlagsWaitAll 0x00000001U |
| #define osFlagsWaitAny 0x00000000U |
Wait for any flag (default).
Definition at line 176 of file cmsis_os2.h.
Referenced by gnss_task(), idle_task(), anonymous_namespace{radio_task.cpp}::radio_task(), and sensors_task().
| #define osMutexPrioInherit 0x00000002U |
Priority inherit protocol.
Definition at line 194 of file cmsis_os2.h.
Referenced by board_spi_init(), radio_task_start(), sensors_task_start(), and take().
| #define osMutexRecursive 0x00000001U |
Recursive mutex.
Definition at line 193 of file cmsis_os2.h.
| #define osMutexRobust 0x00000008U |
Robust mutex.
Definition at line 195 of file cmsis_os2.h.
| #define osThreadDetached 0x00000000U |
Thread created in detached mode (default).
Definition at line 189 of file cmsis_os2.h.
| #define osThreadJoinable 0x00000001U |
Thread created in joinable mode.
Definition at line 190 of file cmsis_os2.h.
Referenced by osThreadNew().
| #define osWaitForever 0xFFFFFFFFU |
Wait forever timeout value.
Definition at line 173 of file cmsis_os2.h.
Referenced by gnss_task(), idle_task(), port_lock(), sensors_task(), sensors_task_snapshot(), anonymous_namespace{radio_task.cpp}::take(), and take().
| #define TZ_MODULEID_T |
Definition at line 233 of file cmsis_os2.h.
| typedef void* osEventFlagsId_t |
Event Flags ID identifies the event flags.
Definition at line 217 of file cmsis_os2.h.
| typedef void* osMemoryPoolId_t |
Memory Pool ID identifies the memory pool.
Definition at line 226 of file cmsis_os2.h.
| typedef void* osMessageQueueId_t |
Message Queue ID identifies the message queue.
Definition at line 229 of file cmsis_os2.h.
| typedef void* osMutexId_t |
Mutex ID identifies the mutex.
Definition at line 220 of file cmsis_os2.h.
| typedef void* osSemaphoreId_t |
Semaphore ID identifies the semaphore.
Definition at line 223 of file cmsis_os2.h.
| typedef void(* osThreadFunc_t) (void *argument) |
Entry point of a thread.
Definition at line 161 of file cmsis_os2.h.
| typedef void* osThreadId_t |
Thread ID identifies the thread.
Definition at line 211 of file cmsis_os2.h.
| typedef void(* osTimerFunc_t) (void *argument) |
Timer callback function.
Definition at line 164 of file cmsis_os2.h.
| typedef void* osTimerId_t |
Timer ID identifies the timer.
Definition at line 214 of file cmsis_os2.h.
| enum osKernelState_t |
Kernel state.
Definition at line 82 of file cmsis_os2.h.
| enum osPriority_t |
Priority values.
Definition at line 104 of file cmsis_os2.h.
| enum osStatus_t |
Status code values returned by CMSIS-RTOS functions.
Definition at line 198 of file cmsis_os2.h.
| enum osThreadState_t |
Thread state.
Definition at line 93 of file cmsis_os2.h.
| enum osTimerType_t |
Timer type.
| Enumerator | |
|---|---|
| osTimerOnce | One-shot timer. |
| osTimerPeriodic | Repeating timer. |
Definition at line 167 of file cmsis_os2.h.
| osStatus_t osDelay | ( | uint32_t | ticks | ) |
Wait for Timeout (Time Delay).
| [in] | ticks | time ticks value |
Definition at line 1094 of file cmsis_os2.c.
References IRQ_Context(), osErrorISR, osOK, and vTaskDelay().
Referenced by board_bringup_power_up(), bringup_task(), anonymous_namespace{radio_task.cpp}::BoardControl::delay_ms(), delay_ms(), emmc_stm32_writer_task(), gps_power(), ms5611_reset(), port_start(), sd_nand_probe(), StartDefaultTask(), wait_since_boot(), and wait_transfer_state().
| osStatus_t osDelayUntil | ( | uint32_t | ticks | ) |
Wait until specified time.
| [in] | ticks | absolute time in ticks |
Definition at line 1115 of file cmsis_os2.c.
References delay(), IRQ_Context(), osError, osErrorISR, osErrorParameter, osOK, pdFALSE, xTaskDelayUntil(), and xTaskGetTickCount().
| uint32_t osEventFlagsClear | ( | osEventFlagsId_t | ef_id, |
| uint32_t | flags ) |
Clear the specified Event Flags.
| [in] | ef_id | event flags ID obtained by osEventFlagsNew. |
| [in] | flags | specifies the flags that shall be cleared. |
Definition at line 1505 of file cmsis_os2.c.
References EVENT_FLAGS_INVALID_BITS, IRQ_Context(), NULL, osErrorParameter, osErrorResource, pdFAIL, pdTRUE, portYIELD_FROM_ISR, xEventGroupClearBits(), xEventGroupClearBitsFromISR, and xEventGroupGetBitsFromISR().
| osStatus_t osEventFlagsDelete | ( | osEventFlagsId_t | ef_id | ) |
Delete an Event Flags object.
| [in] | ef_id | event flags ID obtained by osEventFlagsNew. |
Definition at line 1629 of file cmsis_os2.c.
References IRQ_Context(), NULL, osError, osErrorISR, osErrorParameter, osOK, and vEventGroupDelete().
| uint32_t osEventFlagsGet | ( | osEventFlagsId_t | ef_id | ) |
Get the current Event Flags.
| [in] | ef_id | event flags ID obtained by osEventFlagsNew. |
Definition at line 1544 of file cmsis_os2.c.
References IRQ_Context(), NULL, xEventGroupGetBits, and xEventGroupGetBitsFromISR().
| const char * osEventFlagsGetName | ( | osEventFlagsId_t | ef_id | ) |
Get name of an Event Flags object.
| [in] | ef_id | event flags ID obtained by osEventFlagsNew. |
| osEventFlagsId_t osEventFlagsNew | ( | const osEventFlagsAttr_t * | attr | ) |
Create and Initialize an Event Flags object.
| [in] | attr | event flags attributes; NULL: default values. |
Definition at line 1416 of file cmsis_os2.c.
References osEventFlagsAttr_t::cb_mem, osEventFlagsAttr_t::cb_size, IRQ_Context(), and NULL.
| uint32_t osEventFlagsSet | ( | osEventFlagsId_t | ef_id, |
| uint32_t | flags ) |
Set the specified Event Flags.
| [in] | ef_id | event flags ID obtained by osEventFlagsNew. |
| [in] | flags | specifies the flags that shall be set. |
Definition at line 1465 of file cmsis_os2.c.
References EVENT_FLAGS_INVALID_BITS, IRQ_Context(), NULL, osErrorParameter, osErrorResource, pdFAIL, pdFALSE, portYIELD_FROM_ISR, xEventGroupGetBitsFromISR(), xEventGroupSetBits(), and xEventGroupSetBitsFromISR.
| uint32_t osEventFlagsWait | ( | osEventFlagsId_t | ef_id, |
| uint32_t | flags, | ||
| uint32_t | options, | ||
| uint32_t | timeout ) |
Wait for one or more Event Flags to become signaled.
| [in] | ef_id | event flags ID obtained by osEventFlagsNew. |
| [in] | flags | specifies the flags to wait for. |
| [in] | options | specifies flags options (osFlagsXxxx). |
| [in] | timeout | CMSIS_RTOS_TimeOutValue or 0 in case of no time-out. |
Definition at line 1569 of file cmsis_os2.c.
References EVENT_FLAGS_INVALID_BITS, IRQ_Context(), NULL, osErrorISR, osErrorParameter, osErrorResource, osErrorTimeout, osFlagsErrorParameter, osFlagsNoClear, osFlagsWaitAll, pdFAIL, pdTRUE, and xEventGroupWaitBits().
| osStatus_t osKernelGetInfo | ( | osVersion_t * | version, |
| char * | id_buf, | ||
| uint32_t | id_size ) |
Get RTOS Kernel Information.
| [out] | version | pointer to buffer for retrieving version information. |
| [out] | id_buf | pointer to buffer for retrieving kernel identification string. |
| [in] | id_size | size of buffer for kernel identification string. |
Definition at line 298 of file cmsis_os2.c.
References osVersion_t::api, osVersion_t::kernel, KERNEL_ID, KERNEL_VERSION, NULL, and osOK.
| osKernelState_t osKernelGetState | ( | void | ) |
Get the current RTOS Kernel state.
Definition at line 322 of file cmsis_os2.c.
References KernelState, osKernelInactive, osKernelLocked, osKernelReady, osKernelRunning, state, taskSCHEDULER_NOT_STARTED, taskSCHEDULER_RUNNING, taskSCHEDULER_SUSPENDED, and xTaskGetSchedulerState().
| uint32_t osKernelGetSysTimerCount | ( | void | ) |
Get the RTOS kernel system timer count.
Definition at line 515 of file cmsis_os2.c.
References __disable_irq, __enable_irq, IS_IRQ_MASKED, OS_Tick_GetCount(), OS_Tick_GetInterval(), OS_Tick_GetOverflow(), and xTaskGetTickCount().
| uint32_t osKernelGetSysTimerFreq | ( | void | ) |
Get the RTOS kernel system timer frequency.
Definition at line 561 of file cmsis_os2.c.
References configCPU_CLOCK_HZ.
| uint32_t osKernelGetTickCount | ( | void | ) |
Get the RTOS kernel tick count.
Definition at line 491 of file cmsis_os2.c.
References IRQ_Context(), xTaskGetTickCount(), and xTaskGetTickCountFromISR().
Referenced by app_set_state(), emmc_stm32_writer_task(), finish(), idle_task(), to_emmc(), to_emmc(), and wait_transfer_state().
| uint32_t osKernelGetTickFreq | ( | void | ) |
Get the RTOS kernel tick frequency.
Definition at line 507 of file cmsis_os2.c.
References configTICK_RATE_HZ.
| osStatus_t osKernelInitialize | ( | void | ) |
Initialize the RTOS Kernel.
Definition at line 264 of file cmsis_os2.c.
References IRQ_Context(), KernelState, osError, osErrorISR, osKernelInactive, osKernelReady, osOK, state, taskSCHEDULER_NOT_STARTED, vPortDefineHeapRegions(), and xTaskGetSchedulerState().
Referenced by main().
| int32_t osKernelLock | ( | void | ) |
Lock the RTOS Kernel scheduler.
Definition at line 384 of file cmsis_os2.c.
References IRQ_Context(), lock, osError, osErrorISR, taskSCHEDULER_NOT_STARTED, taskSCHEDULER_RUNNING, taskSCHEDULER_SUSPENDED, vTaskSuspendAll(), and xTaskGetSchedulerState().
| int32_t osKernelRestoreLock | ( | int32_t | lock | ) |
Restore the RTOS Kernel scheduler lock state.
| [in] | lock | lock state obtained by osKernelLock or osKernelUnlock. |
Definition at line 451 of file cmsis_os2.c.
References IRQ_Context(), lock, osError, osErrorISR, pdTRUE, taskSCHEDULER_NOT_STARTED, taskSCHEDULER_RUNNING, taskSCHEDULER_SUSPENDED, vTaskSuspendAll(), xTaskGetSchedulerState(), and xTaskResumeAll().
| void osKernelResume | ( | uint32_t | sleep_ticks | ) |
Resume the RTOS Kernel scheduler.
| [in] | sleep_ticks | time in ticks for how long the system was in sleep or power-down mode. |
| osStatus_t osKernelStart | ( | void | ) |
Start the RTOS Kernel scheduler.
Definition at line 353 of file cmsis_os2.c.
References IRQ_Context(), KernelState, osError, osErrorISR, osKernelReady, osKernelRunning, osOK, state, SVC_Setup(), taskSCHEDULER_NOT_STARTED, vTaskStartScheduler(), and xTaskGetSchedulerState().
Referenced by main().
| uint32_t osKernelSuspend | ( | void | ) |
Suspend the RTOS Kernel scheduler.
| int32_t osKernelUnlock | ( | void | ) |
Unlock the RTOS Kernel scheduler.
Definition at line 415 of file cmsis_os2.c.
References IRQ_Context(), lock, osError, osErrorISR, pdTRUE, taskSCHEDULER_NOT_STARTED, taskSCHEDULER_RUNNING, taskSCHEDULER_SUSPENDED, xTaskGetSchedulerState(), and xTaskResumeAll().
| void * osMemoryPoolAlloc | ( | osMemoryPoolId_t | mp_id, |
| uint32_t | timeout ) |
Allocate a memory block from a Memory Pool.
| [in] | mp_id | memory pool ID obtained by osMemoryPoolNew. |
| [in] | timeout | CMSIS_RTOS_TimeOutValue or 0 in case of no time-out. |
| osStatus_t osMemoryPoolDelete | ( | osMemoryPoolId_t | mp_id | ) |
Delete a Memory Pool object.
| [in] | mp_id | memory pool ID obtained by osMemoryPoolNew. |
| osStatus_t osMemoryPoolFree | ( | osMemoryPoolId_t | mp_id, |
| void * | block ) |
Return an allocated memory block back to a Memory Pool.
| [in] | mp_id | memory pool ID obtained by osMemoryPoolNew. |
| [in] | block | address of the allocated memory block to be returned to the memory pool. |
| uint32_t osMemoryPoolGetBlockSize | ( | osMemoryPoolId_t | mp_id | ) |
Get memory block size in a Memory Pool.
| [in] | mp_id | memory pool ID obtained by osMemoryPoolNew. |
| uint32_t osMemoryPoolGetCapacity | ( | osMemoryPoolId_t | mp_id | ) |
Get maximum number of memory blocks in a Memory Pool.
| [in] | mp_id | memory pool ID obtained by osMemoryPoolNew. |
| uint32_t osMemoryPoolGetCount | ( | osMemoryPoolId_t | mp_id | ) |
Get number of memory blocks used in a Memory Pool.
| [in] | mp_id | memory pool ID obtained by osMemoryPoolNew. |
| const char * osMemoryPoolGetName | ( | osMemoryPoolId_t | mp_id | ) |
Get name of a Memory Pool object.
| [in] | mp_id | memory pool ID obtained by osMemoryPoolNew. |
| uint32_t osMemoryPoolGetSpace | ( | osMemoryPoolId_t | mp_id | ) |
Get number of memory blocks available in a Memory Pool.
| [in] | mp_id | memory pool ID obtained by osMemoryPoolNew. |
| osMemoryPoolId_t osMemoryPoolNew | ( | uint32_t | block_count, |
| uint32_t | block_size, | ||
| const osMemoryPoolAttr_t * | attr ) |
Create and Initialize a Memory Pool object.
| [in] | block_count | maximum number of memory blocks in memory pool. |
| [in] | block_size | memory block size in bytes. |
| [in] | attr | memory pool attributes; NULL: default values. |
| osStatus_t osMessageQueueDelete | ( | osMessageQueueId_t | mq_id | ) |
Delete a Message Queue object.
| [in] | mq_id | message queue ID obtained by osMessageQueueNew. |
Definition at line 2360 of file cmsis_os2.c.
References IRQ_Context(), NULL, osError, osErrorISR, osErrorParameter, osOK, vQueueDelete(), and vQueueUnregisterQueue.
| osStatus_t osMessageQueueGet | ( | osMessageQueueId_t | mq_id, |
| void * | msg_ptr, | ||
| uint8_t * | msg_prio, | ||
| uint32_t | timeout ) |
Get a Message from a Queue or timeout if Queue is empty.
| [in] | mq_id | message queue ID obtained by osMessageQueueNew. |
| [out] | msg_ptr | pointer to buffer for message to get from a queue. |
| [out] | msg_prio | pointer to buffer for message priority or NULL. |
| [in] | timeout | CMSIS_RTOS_TimeOutValue or 0 in case of no time-out. |
Definition at line 2209 of file cmsis_os2.c.
References IRQ_Context(), NULL, osErrorParameter, osErrorResource, osErrorTimeout, osOK, pdFALSE, pdPASS, portYIELD_FROM_ISR, xQueueReceive(), and xQueueReceiveFromISR().
Referenced by poll_command().
| uint32_t osMessageQueueGetCapacity | ( | osMessageQueueId_t | mq_id | ) |
Get maximum number of messages in a Message Queue.
| [in] | mq_id | message queue ID obtained by osMessageQueueNew. |
Definition at line 2254 of file cmsis_os2.c.
References NULL, and xSTATIC_QUEUE::uxDummy4.
| uint32_t osMessageQueueGetCount | ( | osMessageQueueId_t | mq_id | ) |
Get number of queued messages in a Message Queue.
| [in] | mq_id | message queue ID obtained by osMessageQueueNew. |
Definition at line 2290 of file cmsis_os2.c.
References count(), IRQ_Context(), NULL, uxQueueMessagesWaiting(), and uxQueueMessagesWaitingFromISR().
Referenced by work_waiting().
| uint32_t osMessageQueueGetMsgSize | ( | osMessageQueueId_t | mq_id | ) |
Get maximum message size in a Message Queue.
| [in] | mq_id | message queue ID obtained by osMessageQueueNew. |
Definition at line 2272 of file cmsis_os2.c.
References NULL, and xSTATIC_QUEUE::uxDummy4.
| const char * osMessageQueueGetName | ( | osMessageQueueId_t | mq_id | ) |
Get name of a Message Queue object.
| [in] | mq_id | message queue ID obtained by osMessageQueueNew. |
| uint32_t osMessageQueueGetSpace | ( | osMessageQueueId_t | mq_id | ) |
Get number of available slots for messages in a Message Queue.
| [in] | mq_id | message queue ID obtained by osMessageQueueNew. |
Definition at line 2311 of file cmsis_os2.c.
References IRQ_Context(), NULL, taskENTER_CRITICAL_FROM_ISR, taskEXIT_CRITICAL_FROM_ISR, xSTATIC_QUEUE::uxDummy4, and uxQueueSpacesAvailable().
| osMessageQueueId_t osMessageQueueNew | ( | uint32_t | msg_count, |
| uint32_t | msg_size, | ||
| const osMessageQueueAttr_t * | attr ) |
Create and Initialize a Message Queue object.
| [in] | msg_count | maximum number of messages in queue. |
| [in] | msg_size | maximum message size in bytes. |
| [in] | attr | message queue attributes; NULL: default values. |
Definition at line 2100 of file cmsis_os2.c.
References osMessageQueueAttr_t::cb_mem, osMessageQueueAttr_t::cb_size, IRQ_Context(), osMessageQueueAttr_t::mq_mem, osMessageQueueAttr_t::mq_size, osMessageQueueAttr_t::name, NULL, and vQueueAddToRegistry.
Referenced by idle_task_start().
| osStatus_t osMessageQueuePut | ( | osMessageQueueId_t | mq_id, |
| const void * | msg_ptr, | ||
| uint8_t | msg_prio, | ||
| uint32_t | timeout ) |
Put a Message into a Queue or timeout if Queue is full.
| [in] | mq_id | message queue ID obtained by osMessageQueueNew. |
| [in] | msg_ptr | pointer to buffer with message to put into a queue. |
| [in] | msg_prio | message priority. |
| [in] | timeout | CMSIS_RTOS_TimeOutValue or 0 in case of no time-out. |
Definition at line 2161 of file cmsis_os2.c.
References IRQ_Context(), NULL, osErrorParameter, osErrorResource, osErrorTimeout, osOK, pdFALSE, pdPASS, pdTRUE, portYIELD_FROM_ISR, xQueueSendToBack, and xQueueSendToBackFromISR.
Referenced by idle_task_command().
| osStatus_t osMessageQueueReset | ( | osMessageQueueId_t | mq_id | ) |
Reset a Message Queue to initial empty state.
| [in] | mq_id | message queue ID obtained by osMessageQueueNew. |
Definition at line 2338 of file cmsis_os2.c.
References IRQ_Context(), NULL, osErrorISR, osErrorParameter, osOK, and xQueueReset.
| osStatus_t osMutexAcquire | ( | osMutexId_t | mutex_id, |
| uint32_t | timeout ) |
Acquire a Mutex or timeout if it is locked.
| [in] | mutex_id | mutex ID obtained by osMutexNew. |
| [in] | timeout | CMSIS_RTOS_TimeOutValue or 0 in case of no time-out. |
Referenced by board_spi_lock(), port_lock(), sensors_task(), sensors_task_snapshot(), anonymous_namespace{radio_task.cpp}::take(), and take().
| osStatus_t osMutexDelete | ( | osMutexId_t | mutex_id | ) |
Delete a Mutex object.
| [in] | mutex_id | mutex ID obtained by osMutexNew. |
| const char * osMutexGetName | ( | osMutexId_t | mutex_id | ) |
Get name of a Mutex object.
| [in] | mutex_id | mutex ID obtained by osMutexNew. |
| osThreadId_t osMutexGetOwner | ( | osMutexId_t | mutex_id | ) |
Get Thread which owns a Mutex object.
| [in] | mutex_id | mutex ID obtained by osMutexNew. |
| osMutexId_t osMutexNew | ( | const osMutexAttr_t * | attr | ) |
Create and Initialize a Mutex object.
| [in] | attr | mutex attributes; NULL: default values. |
Referenced by board_spi_init(), emmc_stm32_init(), radio_task_start(), sensors_task_start(), and take().
| osStatus_t osMutexRelease | ( | osMutexId_t | mutex_id | ) |
Release a Mutex that was acquired by osMutexAcquire.
| [in] | mutex_id | mutex ID obtained by osMutexNew. |
Referenced by app_set_state(), board_spi_unlock(), anonymous_namespace{radio_task.cpp}::give(), port_unlock(), sensors_task(), and sensors_task_snapshot().
| osStatus_t osSemaphoreAcquire | ( | osSemaphoreId_t | semaphore_id, |
| uint32_t | timeout ) |
Acquire a Semaphore token or timeout if no tokens are available.
| [in] | semaphore_id | semaphore ID obtained by osSemaphoreNew. |
| [in] | timeout | CMSIS_RTOS_TimeOutValue or 0 in case of no time-out. |
Definition at line 1970 of file cmsis_os2.c.
References IRQ_Context(), NULL, osErrorParameter, osErrorResource, osErrorTimeout, osOK, pdFALSE, pdPASS, portYIELD_FROM_ISR, xSemaphoreTake, and xSemaphoreTakeFromISR.
Referenced by finish(), port_read(), and port_write().
| osStatus_t osSemaphoreDelete | ( | osSemaphoreId_t | semaphore_id | ) |
Delete a Semaphore object.
| [in] | semaphore_id | semaphore ID obtained by osSemaphoreNew. |
Definition at line 2063 of file cmsis_os2.c.
References IRQ_Context(), NULL, osError, osErrorISR, osErrorParameter, osOK, vQueueUnregisterQueue, and vSemaphoreDelete.
| uint32_t osSemaphoreGetCount | ( | osSemaphoreId_t | semaphore_id | ) |
Get current Semaphore token count.
| [in] | semaphore_id | semaphore ID obtained by osSemaphoreNew. |
Definition at line 2043 of file cmsis_os2.c.
References count(), IRQ_Context(), NULL, uxSemaphoreGetCount, and uxSemaphoreGetCountFromISR.
| const char * osSemaphoreGetName | ( | osSemaphoreId_t | semaphore_id | ) |
Get name of a Semaphore object.
| [in] | semaphore_id | semaphore ID obtained by osSemaphoreNew. |
| osSemaphoreId_t osSemaphoreNew | ( | uint32_t | max_count, |
| uint32_t | initial_count, | ||
| const osSemaphoreAttr_t * | attr ) |
Create and Initialize a Semaphore object.
| [in] | max_count | maximum number of available tokens. |
| [in] | initial_count | initial number of available tokens. |
| [in] | attr | semaphore attributes; NULL: default values. |
Definition at line 1894 of file cmsis_os2.c.
References osSemaphoreAttr_t::cb_mem, osSemaphoreAttr_t::cb_size, IRQ_Context(), osSemaphoreAttr_t::name, NULL, pdPASS, vQueueAddToRegistry, vSemaphoreDelete, and xSemaphoreGive.
Referenced by emmc_stm32_init().
| osStatus_t osSemaphoreRelease | ( | osSemaphoreId_t | semaphore_id | ) |
Release a Semaphore token up to the initial maximum count.
| [in] | semaphore_id | semaphore ID obtained by osSemaphoreNew. |
Definition at line 2011 of file cmsis_os2.c.
References IRQ_Context(), NULL, osErrorParameter, osErrorResource, osOK, pdFALSE, pdPASS, pdTRUE, portYIELD_FROM_ISR, xSemaphoreGive, and xSemaphoreGiveFromISR.
Referenced by HAL_MMC_ErrorCallback(), and HAL_MMC_TxCpltCallback().
| osStatus_t osThreadDetach | ( | osThreadId_t | thread_id | ) |
Detach a thread (thread storage can be reclaimed when thread terminates).
| [in] | thread_id | thread ID obtained by osThreadNew or osThreadGetId. |
| uint32_t osThreadEnumerate | ( | osThreadId_t * | thread_array, |
| uint32_t | array_items ) |
Enumerate active threads.
| [out] | thread_array | pointer to array for retrieving thread IDs. |
| [in] | array_items | maximum number of items in array for retrieving thread IDs. |
Definition at line 886 of file cmsis_os2.c.
References count(), IRQ_Context(), NULL, pvPortMalloc(), uxTaskGetNumberOfTasks(), uxTaskGetSystemState(), vPortFree(), vTaskSuspendAll(), and xTaskResumeAll().
| __NO_RETURN void osThreadExit | ( | void | ) |
Terminate execution of current running thread.
Definition at line 826 of file cmsis_os2.c.
References __NO_RETURN, NULL, and vTaskDelete().
| uint32_t osThreadFlagsClear | ( | uint32_t | flags | ) |
Clear the specified Thread Flags of current running thread.
| [in] | flags | specifies the flags of the thread that shall be cleared. |
| uint32_t osThreadFlagsGet | ( | void | ) |
Get the current Thread Flags of current running thread.
| uint32_t osThreadFlagsSet | ( | osThreadId_t | thread_id, |
| uint32_t | flags ) |
Set the specified Thread Flags of a thread.
| [in] | thread_id | thread ID obtained by osThreadNew or osThreadGetId. |
| [in] | flags | specifies the flags of the thread that shall be set. |
Referenced by gnss_task_set_active(), HAL_GPIO_EXTI_Callback(), HAL_UARTEx_RxEventCallback(), idle_task_command(), idle_task_set_active(), and sensors_task_set_active().
| uint32_t osThreadFlagsWait | ( | uint32_t | flags, |
| uint32_t | options, | ||
| uint32_t | timeout ) |
Wait for one or more Thread Flags of the current running thread to become signaled.
| [in] | flags | specifies the flags to wait for. |
| [in] | options | specifies flags options (osFlagsXxxx). |
| [in] | timeout | CMSIS_RTOS_TimeOutValue or 0 in case of no time-out. |
Referenced by gnss_task(), idle_task(), anonymous_namespace{radio_task.cpp}::radio_task(), and sensors_task().
| uint32_t osThreadGetCount | ( | void | ) |
Get number of active threads.
Definition at line 869 of file cmsis_os2.c.
References count(), IRQ_Context(), and uxTaskGetNumberOfTasks().
| osThreadId_t osThreadGetId | ( | void | ) |
Return the thread ID of the current running thread.
Definition at line 669 of file cmsis_os2.c.
References xTaskGetCurrentTaskHandle().
Referenced by gnss_task(), anonymous_namespace{radio_task.cpp}::radio_task(), and sensors_task().
| const char * osThreadGetName | ( | osThreadId_t | thread_id | ) |
Get name of a thread.
| [in] | thread_id | thread ID obtained by osThreadNew or osThreadGetId. |
Definition at line 652 of file cmsis_os2.c.
References IRQ_Context(), NULL, and pcTaskGetName().
| osPriority_t osThreadGetPriority | ( | osThreadId_t | thread_id | ) |
Get current priority of a thread.
| [in] | thread_id | thread ID obtained by osThreadNew or osThreadGetId. |
Definition at line 746 of file cmsis_os2.c.
References IRQ_Context(), NULL, osPriorityError, and uxTaskPriorityGet().
| uint32_t osThreadGetStackSize | ( | osThreadId_t | thread_id | ) |
Get stack size of a thread.
| [in] | thread_id | thread ID obtained by osThreadNew or osThreadGetId. |
| uint32_t osThreadGetStackSpace | ( | osThreadId_t | thread_id | ) |
Get available stack space of a thread based on stack watermark recording during execution.
| [in] | thread_id | thread ID obtained by osThreadNew or osThreadGetId. |
Definition at line 707 of file cmsis_os2.c.
References IRQ_Context(), NULL, and uxTaskGetStackHighWaterMark().
| osThreadState_t osThreadGetState | ( | osThreadId_t | thread_id | ) |
Get current thread state of a thread.
| [in] | thread_id | thread ID obtained by osThreadNew or osThreadGetId. |
Definition at line 681 of file cmsis_os2.c.
References eBlocked, eDeleted, eInvalid, eReady, eRunning, eSuspended, eTaskGetState(), IRQ_Context(), NULL, osThreadBlocked, osThreadError, osThreadReady, osThreadRunning, and state.
| osStatus_t osThreadJoin | ( | osThreadId_t | thread_id | ) |
Wait for specified thread to terminate.
| [in] | thread_id | thread ID obtained by osThreadNew or osThreadGetId. |
References __NO_RETURN.
| osThreadId_t osThreadNew | ( | osThreadFunc_t | func, |
| void * | argument, | ||
| const osThreadAttr_t * | attr ) |
Create a thread and add it to Active Threads.
| [in] | func | thread function. |
| [in] | argument | pointer that is passed to the thread function as start argument. |
| [in] | attr | thread attributes; NULL: default values. |
Definition at line 577 of file cmsis_os2.c.
References osThreadAttr_t::attr_bits, osThreadAttr_t::cb_mem, osThreadAttr_t::cb_size, configMINIMAL_STACK_SIZE, configSTACK_DEPTH_TYPE, IRQ_Context(), osThreadAttr_t::name, NULL, osPriorityIdle, osPriorityISR, osPriorityNone, osPriorityNormal, osThreadJoinable, pdPASS, osThreadAttr_t::priority, osThreadAttr_t::stack_mem, and osThreadAttr_t::stack_size.
Referenced by bringup_task_start(), gnss_task_start(), idle_task_start(), main(), radio_task_start(), sensors_task_start(), and start_emmc().
| osStatus_t osThreadResume | ( | osThreadId_t | thread_id | ) |
Resume execution of a thread.
| [in] | thread_id | thread ID obtained by osThreadNew or osThreadGetId. |
Definition at line 803 of file cmsis_os2.c.
References IRQ_Context(), NULL, osErrorISR, osErrorParameter, osOK, and vTaskResume().
| osStatus_t osThreadSetPriority | ( | osThreadId_t | thread_id, |
| osPriority_t | priority ) |
Change priority of a thread.
| [in] | thread_id | thread ID obtained by osThreadNew or osThreadGetId. |
| [in] | priority | new priority value for the thread function. |
Definition at line 724 of file cmsis_os2.c.
References IRQ_Context(), NULL, osErrorISR, osErrorParameter, osOK, osPriorityIdle, osPriorityISR, and vTaskPrioritySet().
| osStatus_t osThreadSuspend | ( | osThreadId_t | thread_id | ) |
Suspend execution of a thread.
| [in] | thread_id | thread ID obtained by osThreadNew or osThreadGetId. |
Definition at line 781 of file cmsis_os2.c.
References IRQ_Context(), NULL, osErrorISR, osErrorParameter, osOK, and vTaskSuspend().
| osStatus_t osThreadTerminate | ( | osThreadId_t | thread_id | ) |
Terminate execution of a thread.
| [in] | thread_id | thread ID obtained by osThreadNew or osThreadGetId. |
Definition at line 836 of file cmsis_os2.c.
References eDeleted, eTaskGetState(), IRQ_Context(), NULL, osError, osErrorISR, osErrorParameter, osErrorResource, osOK, and vTaskDelete().
| osStatus_t osThreadYield | ( | void | ) |
Pass control to next thread that is in state READY.
Definition at line 763 of file cmsis_os2.c.
References IRQ_Context(), osErrorISR, osOK, and taskYIELD.
| osStatus_t osTimerDelete | ( | osTimerId_t | timer_id | ) |
Delete a timer.
| [in] | timer_id | timer ID obtained by osTimerNew. |
| const char * osTimerGetName | ( | osTimerId_t | timer_id | ) |
Get name of a timer.
| [in] | timer_id | timer ID obtained by osTimerNew. |
| uint32_t osTimerIsRunning | ( | osTimerId_t | timer_id | ) |
Check if a timer is running.
| [in] | timer_id | timer ID obtained by osTimerNew. |
| osTimerId_t osTimerNew | ( | osTimerFunc_t | func, |
| osTimerType_t | type, | ||
| void * | argument, | ||
| const osTimerAttr_t * | attr ) |
Create and Initialize a timer.
| [in] | func | function pointer to callback function. |
| [in] | type | osTimerOnce for one-shot or osTimerPeriodic for periodic behavior. |
| [in] | argument | argument to the timer callback function. |
| [in] | attr | timer attributes; NULL: default values. |
| osStatus_t osTimerStart | ( | osTimerId_t | timer_id, |
| uint32_t | ticks ) |
Start or restart a timer.
| [in] | timer_id | timer ID obtained by osTimerNew. |
| [in] | ticks | time ticks value of the timer. |
| osStatus_t osTimerStop | ( | osTimerId_t | timer_id | ) |
Stop a timer.
| [in] | timer_id | timer ID obtained by osTimerNew. |