![]() |
STM32F769IDiscovery
1.00
uDANTE Audio Networking with STM32F7 DISCO board
|
CMSIS-RTOS API implementation for FreeRTOS V8.2.3. More...
Go to the source code of this file.
Data Structures | |
struct | os_pool_cb |
struct | os_mailQ_cb |
Typedefs | |
typedef struct os_pool_cb | os_pool_cb_t |
typedef struct os_mailQ_cb | os_mailQ_cb_t |
Functions | |
void | xPortSysTickHandler (void) |
osStatus | osKernelInitialize (void) |
Initialize the RTOS Kernel for creating objects. More... | |
osStatus | osKernelStart (void) |
Start the RTOS Kernel with executing the specified thread. More... | |
int32_t | osKernelRunning (void) |
Check if the RTOS kernel is already started. More... | |
uint32_t | osKernelSysTick (void) |
Get the value of the Kernel SysTick timer. More... | |
osThreadId | osThreadCreate (const osThreadDef_t *thread_def, void *argument) |
Create a thread and add it to Active Threads and set it to state READY. More... | |
osThreadId | osThreadGetId (void) |
Return the thread ID of the current running thread. More... | |
osStatus | osThreadTerminate (osThreadId thread_id) |
Terminate execution of a thread and remove it from Active Threads. More... | |
osStatus | osThreadYield (void) |
Pass control to next thread that is in state READY. More... | |
osStatus | osThreadSetPriority (osThreadId thread_id, osPriority priority) |
Change priority of an active thread. More... | |
osPriority | osThreadGetPriority (osThreadId thread_id) |
Get current priority of an active thread. More... | |
osStatus | osDelay (uint32_t millisec) |
Wait for Timeout (Time Delay) More... | |
osTimerId | osTimerCreate (const osTimerDef_t *timer_def, os_timer_type type, void *argument) |
Create a timer. More... | |
osStatus | osTimerStart (osTimerId timer_id, uint32_t millisec) |
Start or restart a timer. More... | |
osStatus | osTimerStop (osTimerId timer_id) |
Stop a timer. More... | |
osStatus | osTimerDelete (osTimerId timer_id) |
Delete a timer. More... | |
int32_t | osSignalSet (osThreadId thread_id, int32_t signal) |
Set the specified Signal Flags of an active thread. More... | |
int32_t | osSignalClear (osThreadId thread_id, int32_t signal) |
Clear the specified Signal Flags of an active thread. More... | |
osEvent | osSignalWait (int32_t signals, uint32_t millisec) |
Wait for one or more Signal Flags to become signaled for the current RUNNING thread. More... | |
osMutexId | osMutexCreate (const osMutexDef_t *mutex_def) |
Create and Initialize a Mutex object. More... | |
osStatus | osMutexWait (osMutexId mutex_id, uint32_t millisec) |
Wait until a Mutex becomes available. More... | |
osStatus | osMutexRelease (osMutexId mutex_id) |
Release a Mutex that was obtained by osMutexWait. More... | |
osStatus | osMutexDelete (osMutexId mutex_id) |
Delete a Mutex. More... | |
osSemaphoreId | osSemaphoreCreate (const osSemaphoreDef_t *semaphore_def, int32_t count) |
Create and Initialize a Semaphore object used for managing resources. More... | |
int32_t | osSemaphoreWait (osSemaphoreId semaphore_id, uint32_t millisec) |
Wait until a Semaphore token becomes available. More... | |
osStatus | osSemaphoreRelease (osSemaphoreId semaphore_id) |
Release a Semaphore token. More... | |
osStatus | osSemaphoreDelete (osSemaphoreId semaphore_id) |
Delete a Semaphore. More... | |
osPoolId | osPoolCreate (const osPoolDef_t *pool_def) |
Create and Initialize a memory pool. More... | |
void * | osPoolAlloc (osPoolId pool_id) |
Allocate a memory block from a memory pool. More... | |
void * | osPoolCAlloc (osPoolId pool_id) |
Allocate a memory block from a memory pool and set memory block to zero. More... | |
osStatus | osPoolFree (osPoolId pool_id, void *block) |
Return an allocated memory block back to a specific memory pool. More... | |
osMessageQId | osMessageCreate (const osMessageQDef_t *queue_def, osThreadId thread_id) |
Create and Initialize a Message Queue. More... | |
osStatus | osMessagePut (osMessageQId queue_id, uint32_t info, uint32_t millisec) |
Put a Message to a Queue. More... | |
osEvent | osMessageGet (osMessageQId queue_id, uint32_t millisec) |
Get a Message or Wait for a Message from a Queue. More... | |
osMailQId | osMailCreate (const osMailQDef_t *queue_def, osThreadId thread_id) |
Create and Initialize mail queue. More... | |
void * | osMailAlloc (osMailQId queue_id, uint32_t millisec) |
Allocate a memory block from a mail. More... | |
void * | osMailCAlloc (osMailQId queue_id, uint32_t millisec) |
Allocate a memory block from a mail and set memory block to zero. More... | |
osStatus | osMailPut (osMailQId queue_id, void *mail) |
Put a mail to a queue. More... | |
osEvent | osMailGet (osMailQId queue_id, uint32_t millisec) |
Get a mail from a queue. More... | |
osStatus | osMailFree (osMailQId queue_id, void *mail) |
Free a memory block from a mail. More... | |
void | osSystickHandler (void) |
Handles the tick increment. More... | |
osStatus | osThreadSuspend (osThreadId thread_id) |
Suspend execution of a thread. More... | |
osStatus | osThreadResume (osThreadId thread_id) |
Resume execution of a suspended thread. More... | |
osStatus | osThreadSuspendAll (void) |
Suspend execution of a all active threads. More... | |
osStatus | osThreadResumeAll (void) |
Resume execution of a all suspended threads. More... | |
osStatus | osDelayUntil (uint32_t *PreviousWakeTime, uint32_t millisec) |
Delay a task until a specified time. More... | |
osStatus | osThreadList (uint8_t *buffer) |
Lists all the current threads, along with their current state and stack usage high water mark. More... | |
osEvent | osMessagePeek (osMessageQId queue_id, uint32_t millisec) |
Receive an item from a queue without removing the item from the queue. More... | |
osMutexId | osRecursiveMutexCreate (const osMutexDef_t *mutex_def) |
Create and Initialize a Recursive Mutex. More... | |
osStatus | osRecursiveMutexRelease (osMutexId mutex_id) |
Release a Recursive Mutex. More... | |
osStatus | osRecursiveMutexWait (osMutexId mutex_id, uint32_t millisec) |
Release a Recursive Mutex. More... | |
CMSIS-RTOS API implementation for FreeRTOS V8.2.3.
Redistribution and use in source and binary forms, with or without modification, are permitted, provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file cmsis_os.c.
typedef struct os_mailQ_cb os_mailQ_cb_t |
typedef struct os_pool_cb os_pool_cb_t |
osStatus osDelay | ( | uint32_t | millisec | ) |
Wait for Timeout (Time Delay)
millisec | time delay value |
status | code that indicates the execution status of the function. |
Definition at line 305 of file cmsis_os.c.
osStatus osDelayUntil | ( | uint32_t * | PreviousWakeTime, |
uint32_t | millisec | ||
) |
Delay a task until a specified time.
PreviousWakeTime | Pointer to a variable that holds the time at which the task was last unblocked. PreviousWakeTime must be initialised with the current time prior to its first use (PreviousWakeTime = osKernelSysTick() ) |
millisec | time delay value |
status | code that indicates the execution status of the function. |
Definition at line 1377 of file cmsis_os.c.
osStatus osKernelInitialize | ( | void | ) |
Initialize the RTOS Kernel for creating objects.
status | code that indicates the execution status of the function. |
int32_t osKernelRunning | ( | void | ) |
Check if the RTOS kernel is already started.
None |
(0) | RTOS is not started (1) RTOS is started (-1) if this feature is disabled in FreeRTOSConfig.h |
Definition at line 167 of file cmsis_os.c.
osStatus osKernelStart | ( | void | ) |
Start the RTOS Kernel with executing the specified thread.
thread_def | thread definition referenced with osThread. |
argument | pointer that is passed to the thread function as start argument. |
status | code that indicates the execution status of the function |
Definition at line 152 of file cmsis_os.c.
uint32_t osKernelSysTick | ( | void | ) |
Get the value of the Kernel SysTick timer.
None |
None |
Definition at line 186 of file cmsis_os.c.
void* osMailAlloc | ( | osMailQId | queue_id, |
uint32_t | millisec | ||
) |
Allocate a memory block from a mail.
queue_id | mail queue ID obtained with osMailCreate. |
millisec | timeout value or 0 in case of no time-out. |
pointer | to memory block that can be filled with mail or NULL in case error. |
Definition at line 1091 of file cmsis_os.c.
void* osMailCAlloc | ( | osMailQId | queue_id, |
uint32_t | millisec | ||
) |
Allocate a memory block from a mail and set memory block to zero.
queue_id | mail queue ID obtained with osMailCreate. |
millisec | timeout value or 0 in case of no time-out. |
pointer | to memory block that can be filled with mail or NULL in case error. |
Definition at line 1113 of file cmsis_os.c.
osMailQId osMailCreate | ( | const osMailQDef_t * | queue_def, |
osThreadId | thread_id | ||
) |
Create and Initialize mail queue.
queue_def | reference to the mail queue definition obtain with osMailQ |
thread_id | thread ID (obtained by osThreadCreate or osThreadGetId) or NULL. |
queue ID for reference by other functions or NULL in case of error. |
Definition at line 1052 of file cmsis_os.c.
Free a memory block from a mail.
queue_id | mail queue ID obtained with osMailCreate. |
pointer to the memory block that was obtained with osMailGet. |
status | code that indicates the execution status of the function. |
Definition at line 1223 of file cmsis_os.c.
Get a mail from a queue.
queue_id | mail queue ID obtained with osMailCreate. |
millisec | timeout value or 0 in case of no time-out |
event | that contains mail information or error code. |
Definition at line 1167 of file cmsis_os.c.
Put a mail to a queue.
queue_id | mail queue ID obtained with osMailCreate. |
memory block previously allocated with osMailAlloc or osMailCAlloc. |
status | code that indicates the execution status of the function. |
Definition at line 1134 of file cmsis_os.c.
osMessageQId osMessageCreate | ( | const osMessageQDef_t * | queue_def, |
osThreadId | thread_id | ||
) |
Create and Initialize a Message Queue.
queue_def | queue definition referenced with osMessageQ. |
thread_id | thread ID (obtained by osThreadCreate or osThreadGetId) or NULL. |
message | queue ID for reference by other functions or NULL in case of error. |
Definition at line 936 of file cmsis_os.c.
osEvent osMessageGet | ( | osMessageQId | queue_id, |
uint32_t | millisec | ||
) |
Get a Message or Wait for a Message from a Queue.
queue_id | message queue ID obtained with osMessageCreate. |
millisec | timeout value or 0 in case of no time-out. |
event | information that includes status code. |
Definition at line 983 of file cmsis_os.c.
osEvent osMessagePeek | ( | osMessageQId | queue_id, |
uint32_t | millisec | ||
) |
Receive an item from a queue without removing the item from the queue.
queue_id | message queue ID obtained with osMessageCreate. |
millisec | timeout value or 0 in case of no time-out. |
event | information that includes status code. |
Definition at line 1413 of file cmsis_os.c.
osStatus osMessagePut | ( | osMessageQId | queue_id, |
uint32_t | info, | ||
uint32_t | millisec | ||
) |
Put a Message to a Queue.
queue_id | message queue ID obtained with osMessageCreate. |
info | message information. |
millisec | timeout value or 0 in case of no time-out. |
status | code that indicates the execution status of the function. |
Definition at line 951 of file cmsis_os.c.
osMutexId osMutexCreate | ( | const osMutexDef_t * | mutex_def | ) |
Create and Initialize a Mutex object.
mutex_def | mutex definition referenced with osMutex. |
mutex | ID for reference by other functions or NULL in case of error. |
Definition at line 554 of file cmsis_os.c.
Delete a Mutex.
mutex_id | mutex ID obtained by osMutexCreate. |
status | code that indicates the execution status of the function. |
Definition at line 634 of file cmsis_os.c.
Release a Mutex that was obtained by osMutexWait.
mutex_id | mutex ID obtained by osMutexCreate. |
status | code that indicates the execution status of the function. |
Definition at line 610 of file cmsis_os.c.
Wait until a Mutex becomes available.
mutex_id | mutex ID obtained by osMutexCreate. |
millisec | timeout value or 0 in case of no time-out. |
status | code that indicates the execution status of the function. |
Definition at line 570 of file cmsis_os.c.
void* osPoolAlloc | ( | osPoolId | pool_id | ) |
Allocate a memory block from a memory pool.
pool_id | memory pool ID obtain referenced with osPoolCreate. |
address | of the allocated memory block or NULL in case of no memory available. |
Definition at line 829 of file cmsis_os.c.
void* osPoolCAlloc | ( | osPoolId | pool_id | ) |
Allocate a memory block from a memory pool and set memory block to zero.
pool_id | memory pool ID obtain referenced with osPoolCreate. |
address | of the allocated memory block or NULL in case of no memory available. |
Definition at line 873 of file cmsis_os.c.
osPoolId osPoolCreate | ( | const osPoolDef_t * | pool_def | ) |
Create and Initialize a memory pool.
pool_def | memory pool definition referenced with osPool. |
memory | pool ID for reference by other functions or NULL in case of error. |
Definition at line 784 of file cmsis_os.c.
Return an allocated memory block back to a specific memory pool.
pool_id | memory pool ID obtain referenced with osPoolCreate. |
block | address of the allocated memory block that is returned to the memory pool. |
status | code that indicates the execution status of the function. |
Definition at line 892 of file cmsis_os.c.
osMutexId osRecursiveMutexCreate | ( | const osMutexDef_t * | mutex_def | ) |
Create and Initialize a Recursive Mutex.
mutex_def | mutex definition referenced with osMutex. |
mutex | ID for reference by other functions or NULL in case of error.. |
Definition at line 1454 of file cmsis_os.c.
Release a Recursive Mutex.
mutex_id | mutex ID obtained by osRecursiveMutexCreate. |
status | code that indicates the execution status of the function. |
Definition at line 1469 of file cmsis_os.c.
Release a Recursive Mutex.
mutex_id | mutex ID obtained by osRecursiveMutexCreate. |
millisec | timeout value or 0 in case of no time-out. |
status | code that indicates the execution status of the function. |
Definition at line 1490 of file cmsis_os.c.
osSemaphoreId osSemaphoreCreate | ( | const osSemaphoreDef_t * | semaphore_def, |
int32_t | count | ||
) |
Create and Initialize a Semaphore object used for managing resources.
semaphore_def | semaphore definition referenced with osSemaphore. |
count | number of available resources. |
semaphore | ID for reference by other functions or NULL in case of error. |
Definition at line 656 of file cmsis_os.c.
osStatus osSemaphoreDelete | ( | osSemaphoreId | semaphore_id | ) |
Delete a Semaphore.
semaphore_id | semaphore object referenced with osSemaphore. |
status | code that indicates the execution status of the function. |
Definition at line 747 of file cmsis_os.c.
osStatus osSemaphoreRelease | ( | osSemaphoreId | semaphore_id | ) |
Release a Semaphore token.
semaphore_id | semaphore object referenced with osSemaphore. |
status | code that indicates the execution status of the function. |
Definition at line 720 of file cmsis_os.c.
int32_t osSemaphoreWait | ( | osSemaphoreId | semaphore_id, |
uint32_t | millisec | ||
) |
Wait until a Semaphore token becomes available.
semaphore_id | semaphore object referenced with osSemaphore. |
millisec | timeout value or 0 in case of no time-out. |
number | of available tokens, or -1 in case of incorrect parameters. |
Definition at line 680 of file cmsis_os.c.
int32_t osSignalClear | ( | osThreadId | thread_id, |
int32_t | signal | ||
) |
Clear the specified Signal Flags of an active thread.
thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
signals | specifies the signal flags of the thread that shall be cleared. |
previous | signal flags of the specified thread or 0x80000000 in case of incorrect parameters. |
int32_t osSignalSet | ( | osThreadId | thread_id, |
int32_t | signal | ||
) |
Set the specified Signal Flags of an active thread.
thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
signals | specifies the signal flags of the thread that should be set. |
osOK | if successful, osErrorOS if failed . |
Definition at line 458 of file cmsis_os.c.
osEvent osSignalWait | ( | int32_t | signals, |
uint32_t | millisec | ||
) |
Wait for one or more Signal Flags to become signaled for the current RUNNING thread.
signals | wait until all specified signal flags set or 0 for any single signal flag. |
millisec | timeout value or 0 in case of no time-out. |
event | flag information or error code. |
Definition at line 500 of file cmsis_os.c.
void osSystickHandler | ( | void | ) |
Handles the tick increment.
none. |
none. |
Definition at line 1239 of file cmsis_os.c.
osThreadId osThreadCreate | ( | const osThreadDef_t * | thread_def, |
void * | argument | ||
) |
Create a thread and add it to Active Threads and set it to state READY.
thread_def | thread definition referenced with osThread. |
argument | pointer that is passed to the thread function as start argument. |
thread | ID for reference by other functions or NULL in case of error. |
Definition at line 204 of file cmsis_os.c.
osThreadId osThreadGetId | ( | void | ) |
Return the thread ID of the current running thread.
thread | ID for reference by other functions or NULL in case of error. |
Definition at line 223 of file cmsis_os.c.
osPriority osThreadGetPriority | ( | osThreadId | thread_id | ) |
Get current priority of an active thread.
thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
current | priority value of the thread function. |
Definition at line 283 of file cmsis_os.c.
osStatus osThreadList | ( | uint8_t * | buffer | ) |
Lists all the current threads, along with their current state and stack usage high water mark.
buffer | A buffer into which the above mentioned details will be written |
status | code that indicates the execution status of the function. |
Definition at line 1399 of file cmsis_os.c.
osStatus osThreadResume | ( | osThreadId | thread_id | ) |
Resume execution of a suspended thread.
thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
status | code that indicates the execution status of the function. |
Definition at line 1325 of file cmsis_os.c.
osStatus osThreadResumeAll | ( | void | ) |
Resume execution of a all suspended threads.
status | code that indicates the execution status of the function. |
Definition at line 1360 of file cmsis_os.c.
osStatus osThreadSetPriority | ( | osThreadId | thread_id, |
osPriority | priority | ||
) |
Change priority of an active thread.
thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
priority | new priority value for the thread function. |
status | code that indicates the execution status of the function. |
Definition at line 267 of file cmsis_os.c.
osStatus osThreadSuspend | ( | osThreadId | thread_id | ) |
Suspend execution of a thread.
thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
status | code that indicates the execution status of the function. |
Definition at line 1309 of file cmsis_os.c.
osStatus osThreadSuspendAll | ( | void | ) |
Suspend execution of a all active threads.
status | code that indicates the execution status of the function. |
Definition at line 1349 of file cmsis_os.c.
osStatus osThreadTerminate | ( | osThreadId | thread_id | ) |
Terminate execution of a thread and remove it from Active Threads.
thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
status | code that indicates the execution status of the function. |
Definition at line 238 of file cmsis_os.c.
osStatus osThreadYield | ( | void | ) |
Pass control to next thread that is in state READY.
status | code that indicates the execution status of the function. |
Definition at line 253 of file cmsis_os.c.
osTimerId osTimerCreate | ( | const osTimerDef_t * | timer_def, |
os_timer_type | type, | ||
void * | argument | ||
) |
Create a timer.
timer_def | timer object referenced with osTimer. |
type | osTimerOnce for one-shot or osTimerPeriodic for periodic behavior. |
argument | argument to the timer call back function. |
timer | ID for reference by other functions or NULL in case of error. |
Definition at line 340 of file cmsis_os.c.
Delete a timer.
timer_id | timer ID obtained by osTimerCreate |
status | code that indicates the execution status of the function. |
Definition at line 428 of file cmsis_os.c.
Start or restart a timer.
timer_id | timer ID obtained by osTimerCreate. |
millisec | time delay value of the timer. |
status | code that indicates the execution status of the function |
Definition at line 360 of file cmsis_os.c.
Stop a timer.
timer_id | timer ID obtained by osTimerCreate |
status | code that indicates the execution status of the function. |
Definition at line 399 of file cmsis_os.c.