CMSIS2000
0.0.7
|
Структуры данных | |
struct | os_mailQ_def |
Definition structure for mail queue. Подробнее... | |
struct | os_messageQ_def |
Definition structure for message queue. Подробнее... | |
struct | os_mutex_def |
Mutex Definition structure contains setup information for a mutex. Подробнее... | |
struct | os_pool_def |
Definition structure for memory block allocation. Подробнее... | |
struct | os_semaphore_def |
Semaphore Definition structure contains setup information for a semaphore. Подробнее... | |
struct | os_thread_def |
Thread Definition structure contains startup information of a thread. Подробнее... | |
struct | os_timer_def |
Timer Definition structure contains timer parameters. Подробнее... | |
struct | osEvent |
Event structure contains detailed information about an event. Подробнее... |
Макросы | |
#define | osCMSIS 0x00003 |
API version (main [31:16] .sub [15:0]) | |
#define | osCMSIS_KERNEL 0x10000 |
RTOS identification and version (main [31:16] .sub [15:0]) | |
#define | osFeature_MailQ 1 |
Mail Queues: 1=available, 0=not available. | |
#define | osFeature_MainThread 1 |
main thread 1=main can be thread, 0=not available | |
#define | osFeature_MessageQ 1 |
Message Queues: 1=available, 0=not available. | |
#define | osFeature_Pool 1 |
Memory Pools: 1=available, 0=not available. | |
#define | osFeature_Semaphore 30 |
maximum count for SemaphoreInit function | |
#define | osFeature_Signals 8 |
maximum number of Signal Flags available per thread | |
#define | osFeature_Wait 1 |
osWait function: 1=available, 0=not available | |
#define | osKernelSystemId "KERNEL V1.00" |
RTOS identification string. | |
#define | osMailQ(name) &os_mailQ_def_##name |
Access a Mail Queue Definition. | |
#define | osMailQDef(name, queue_sz, type) |
Create a Mail Queue Definition. | |
#define | osMessageQ(name) &os_messageQ_def_##name |
Access a Message Queue Definition. | |
#define | osMessageQDef(name, queue_sz, type) |
Create a Message Queue Definition. | |
#define | osMutex(name) &os_mutex_def_##name |
Access a Mutex defintion. | |
#define | osMutexDef(name) osMutexDef_t os_mutex_def_##name = { 0 } |
Define a Mutex. | |
#define | osPool(name) &os_pool_def_##name |
Access a Memory Pool definition. | |
#define | osPoolDef(name, no, type) |
Define a Memory Pool. | |
#define | osSemaphore(name) &os_semaphore_def_##name |
Access a Semaphore definition. | |
#define | osSemaphoreDef(name) osSemaphoreDef_t os_semaphore_def_##name = { 0 } |
Define a Semaphore object. | |
#define | osThread(name) &os_thread_def_##name |
Access a Thread defintion. | |
#define | osThreadDef(name, priority, instances, stacksz) |
Create a Thread Definition with function, priority, and stack requirements. | |
#define | osTimer(name) &os_timer_def_##name |
Access a Timer definition. | |
#define | osTimerDef(name, function) |
Define a Timer object. | |
#define | osWaitForever 0xFFFFFFFF |
Timeout value. |
Определения типов | |
typedef void(* | os_pthread )(void const *argument) |
Entry point of a thread. | |
typedef void(* | os_ptimer )(void const *argument) |
Entry point of a timer call back function. | |
typedef struct os_mailQ_def | osMailQDef_t |
Definition structure for mail queue. | |
typedef struct os_mailQ_cb * | osMailQId |
Mail ID identifies the mail queue (pointer to a mail queue control block). | |
typedef struct os_messageQ_def | osMessageQDef_t |
Definition structure for message queue. | |
typedef struct os_messageQ_cb * | osMessageQId |
Message ID identifies the message queue (pointer to a message queue control block). | |
typedef struct os_mutex_def | osMutexDef_t |
Mutex Definition structure contains setup information for a mutex. | |
typedef struct os_mutex_cb * | osMutexId |
Mutex ID identifies the mutex (pointer to a mutex control block). | |
typedef struct os_pool_def | osPoolDef_t |
Definition structure for memory block allocation. | |
typedef struct os_pool_cb * | osPoolId |
Pool ID identifies the memory pool (pointer to a memory pool control block). | |
typedef struct os_semaphore_def | osSemaphoreDef_t |
Semaphore Definition structure contains setup information for a semaphore. | |
typedef struct os_semaphore_cb * | osSemaphoreId |
Semaphore ID identifies the semaphore (pointer to a semaphore control block). | |
typedef struct os_thread_def | osThreadDef_t |
Thread Definition structure contains startup information of a thread. | |
typedef struct os_thread_cb * | osThreadId |
Thread ID identifies the thread (pointer to a thread control block). | |
typedef struct os_timer_def | osTimerDef_t |
Timer Definition structure contains timer parameters. | |
typedef struct os_timer_cb * | osTimerId |
Timer ID identifies the timer (pointer to a timer control block). |
Перечисления | |
enum | os_timer_type { osTimerOnce = 0, osTimerPeriodic = 1 } |
Timer type value for the timer definition. Подробнее... | |
enum | osPriority { osPriorityIdle = -3, osPriorityLow = -2, osPriorityBelowNormal = -1, osPriorityNormal = 0, osPriorityAboveNormal = +1, osPriorityHigh = +2, osPriorityRealtime = +3, osPriorityError = 0x84 } |
Priority used for thread control. Подробнее... | |
enum | osStatus { osOK = 0, osEventSignal = 0x08, osEventMessage = 0x10, osEventMail = 0x20, osEventTimeout = 0x40, osErrorParameter = 0x80, osErrorResource = 0x81, osErrorTimeoutResource = 0xC1, osErrorISR = 0x82, osErrorISRRecursive = 0x83, osErrorPriority = 0x84, osErrorNoMemory = 0x85, osErrorValue = 0x86, osErrorOS = 0xFF, os_status_reserved = 0x7FFFFFFF } |
Status code values returned by CMSIS-RTOS functions. Подробнее... |
Функции | |
osStatus | osDelay (uint32_t millisec) |
Wait for Timeout (Time Delay) | |
int32_t | osKernelRunning (void) |
Check if the RTOS kernel is already started. | |
osStatus | osKernelStart (osThreadDef_t *thread_def, void *argument) |
Start the RTOS Kernel with executing the specified thread. | |
void * | osMailAlloc (osMailQId queue_id, uint32_t millisec) |
Allocate a memory block from a mail. | |
void * | osMailCAlloc (osMailQId queue_id, uint32_t millisec) |
Allocate a memory block from a mail and set memory block to zero. | |
osMailQId | osMailCreate (osMailQDef_t *queue_def, osThreadId thread_id) |
Create and Initialize mail queue. | |
osStatus | osMailFree (osMailQId queue_id, void *mail) |
Free a memory block from a mail. | |
osEvent | osMailGet (osMailQId queue_id, uint32_t millisec) |
Get a mail from a queue. | |
osStatus | osMailPut (osMailQId queue_id, void *mail) |
Put a mail to a queue. | |
osMessageQId | osMessageCreate (osMessageQDef_t *queue_def, osThreadId thread_id) |
Create and Initialize a Message Queue. | |
osEvent | osMessageGet (osMessageQId queue_id, uint32_t millisec) |
Get a Message or Wait for a Message from a Queue. | |
osStatus | osMessagePut (osMessageQId queue_id, uint32_t info, uint32_t millisec) |
Put a Message to a Queue. | |
osMutexId | osMutexCreate (osMutexDef_t *mutex_def) |
Create and Initialize a Mutex object. | |
osStatus | osMutexRelease (osMutexId mutex_id) |
Release a Mutex that was obtained by osMutexWait. | |
osStatus | osMutexWait (osMutexId mutex_id, uint32_t millisec) |
Wait until a Mutex becomes available. | |
void * | osPoolAlloc (osPoolId pool_id) |
Allocate a memory block from a memory pool. | |
void * | osPoolCAlloc (osPoolId pool_id) |
Allocate a memory block from a memory pool and set memory block to zero. | |
osPoolId | osPoolCreate (osPoolDef_t *pool_def) |
Create and Initialize a memory pool. | |
osStatus | osPoolFree (osPoolId pool_id, void *block) |
Return an allocated memory block back to a specific memory pool. | |
osSemaphoreId | osSemaphoreCreate (osSemaphoreDef_t *semaphore_def, int32_t count) |
Create and Initialize a Semaphore object used for managing resources. | |
osStatus | osSemaphoreRelease (osSemaphoreId semaphore_id) |
Release a Semaphore token. | |
int32_t | osSemaphoreWait (osSemaphoreId semaphore_id, uint32_t millisec) |
Wait until a Semaphore token becomes available. | |
int32_t | osSignalClear (osThreadId thread_id, int32_t signal) |
Clear the specified Signal Flags of an active thread. | |
int32_t | osSignalGet (osThreadId thread_id) |
Get Signal Flags status of an active thread. | |
int32_t | osSignalSet (osThreadId thread_id, int32_t signal) |
Set the specified Signal Flags of an active thread. | |
osEvent | osSignalWait (int32_t signals, uint32_t millisec) |
Wait for one or more Signal Flags to become signaled for the current RUNNING thread. | |
osThreadId | osThreadCreate (osThreadDef_t *thread_def, void *argument) |
Create a thread and add it to Active Threads and set it to state READY. | |
osThreadId | osThreadGetId (void) |
Return the thread ID of the current running thread. | |
osPriority | osThreadGetPriority (osThreadId thread_id) |
Get current priority of an active thread. | |
osStatus | osThreadSetPriority (osThreadId thread_id, osPriority priority) |
Change priority of an active thread. | |
osStatus | osThreadTerminate (osThreadId thread_id) |
Terminate execution of a thread and remove it from Active Threads. | |
osStatus | osThreadYield (void) |
Pass control to next thread that is in state READY. | |
osTimerId | osTimerCreate (osTimerDef_t *timer_def, os_timer_type type, void *argument) |
Create a timer. | |
osStatus | osTimerStart (osTimerId timer_id, uint32_t millisec) |
Start or restart a timer. | |
osStatus | osTimerStop (osTimerId timer_id) |
Stop the timer. | |
osEvent | osWait (uint32_t millisec) |
Wait for Signal, Message, Mail, or Timeout. |
#define osCMSIS 0x00003 |
API version (main [31:16] .sub [15:0])
См. определение в файле cmsis_os.h строка 100
#define osCMSIS_KERNEL 0x10000 |
RTOS identification and version (main [31:16] .sub [15:0])
См. определение в файле cmsis_os.h строка 103
#define osFeature_MailQ 1 |
Mail Queues: 1=available, 0=not available.
См. определение в файле cmsis_os.h строка 111
#define osFeature_MainThread 1 |
main thread 1=main can be thread, 0=not available
См. определение в файле cmsis_os.h строка 109
#define osFeature_MessageQ 1 |
Message Queues: 1=available, 0=not available.
См. определение в файле cmsis_os.h строка 112
#define osFeature_Pool 1 |
Memory Pools: 1=available, 0=not available.
См. определение в файле cmsis_os.h строка 110
#define osFeature_Semaphore 30 |
maximum count for SemaphoreInit function
См. определение в файле cmsis_os.h строка 114
#define osFeature_Signals 8 |
maximum number of Signal Flags available per thread
См. определение в файле cmsis_os.h строка 113
#define osFeature_Wait 1 |
osWait function: 1=available, 0=not available
См. определение в файле cmsis_os.h строка 115
#define osKernelSystemId "KERNEL V1.00" |
RTOS identification string.
См. определение в файле cmsis_os.h строка 106
#define osMailQ | ( | name | ) | &os_mailQ_def_##name |
Access a Mail Queue Definition.
name | name of the queue |
См. определение в файле cmsis_os.h строка 665
#define osMailQDef | ( | name, | |
queue_sz, | |||
type | |||
) |
Create a Mail Queue Definition.
name | name of the queue |
queue_sz | maximum number of messages in queue |
type | data type of a single message element |
См. определение в файле cmsis_os.h строка 656
#define osMessageQ | ( | name | ) | &os_messageQ_def_##name |
Access a Message Queue Definition.
name | name of the queue |
См. определение в файле cmsis_os.h строка 614
#define osMessageQDef | ( | name, | |
queue_sz, | |||
type | |||
) |
Create a Message Queue Definition.
name | name of the queue. |
queue_sz | maximum number of messages in the queue. |
type | data type of a single message element (for debugger). |
См. определение в файле cmsis_os.h строка 605
#define osMutex | ( | name | ) | &os_mutex_def_##name |
Access a Mutex defintion.
name | name of the mutex object. |
См. определение в файле cmsis_os.h строка 469
#define osMutexDef | ( | name | ) | osMutexDef_t os_mutex_def_##name = { 0 } |
Define a Mutex.
name | name of the mutex object. |
См. определение в файле cmsis_os.h строка 461
#define osPool | ( | name | ) | &os_pool_def_##name |
Access a Memory Pool definition.
name | name of the memory pool |
См. определение в файле cmsis_os.h строка 560
#define osPoolDef | ( | name, | |
no, | |||
type | |||
) |
Define a Memory Pool.
name | name of the memory pool. |
no | maximum number of objects (elements) in the memory pool. |
type | data type of a single object (element). |
См. определение в файле cmsis_os.h строка 551
#define osSemaphore | ( | name | ) | &os_semaphore_def_##name |
Access a Semaphore definition.
name | name of the semaphore object. |
См. определение в файле cmsis_os.h строка 512
#define osSemaphoreDef | ( | name | ) | osSemaphoreDef_t os_semaphore_def_##name = { 0 } |
Define a Semaphore object.
name | name of the semaphore object. |
См. определение в файле cmsis_os.h строка 504
#define osThread | ( | name | ) | &os_thread_def_##name |
Access a Thread defintion.
name | name of the thread definition object. |
См. определение в файле cmsis_os.h строка 317
#define osThreadDef | ( | name, | |
priority, | |||
instances, | |||
stacksz | |||
) |
Create a Thread Definition with function, priority, and stack requirements.
name | name of the thread function. |
priority | initial priority of the thread function. |
instances | number of possible thread instances. |
stacksz | stack size (in bytes) requirements for the thread function. |
См. определение в файле cmsis_os.h строка 308
#define osTimer | ( | name | ) | &os_timer_def_##name |
Access a Timer definition.
name | name of the timer object. |
См. определение в файле cmsis_os.h строка 396
#define osTimerDef | ( | name, | |
function | |||
) |
Define a Timer object.
name | name of the timer object. |
function | name of the timer call back function. |
См. определение в файле cmsis_os.h строка 387
#define osWaitForever 0xFFFFFFFF |
Timeout value.
См. определение в файле cmsis_os.h строка 143
typedef void(* os_pthread)(void const *argument) |
Entry point of a thread.
См. определение в файле cmsis_os.h строка 175
typedef void(* os_ptimer)(void const *argument) |
Entry point of a timer call back function.
См. определение в файле cmsis_os.h строка 179
typedef struct os_mailQ_def osMailQDef_t |
Definition structure for mail queue.
typedef struct os_mailQ_cb* osMailQId |
Mail ID identifies the mail queue (pointer to a mail queue control block).
См. определение в файле cmsis_os.h строка 209
typedef struct os_messageQ_def osMessageQDef_t |
Definition structure for message queue.
typedef struct os_messageQ_cb* osMessageQId |
Message ID identifies the message queue (pointer to a message queue control block).
См. определение в файле cmsis_os.h строка 205
typedef struct os_mutex_def osMutexDef_t |
Mutex Definition structure contains setup information for a mutex.
typedef struct os_mutex_cb* osMutexId |
Mutex ID identifies the mutex (pointer to a mutex control block).
См. определение в файле cmsis_os.h строка 193
typedef struct os_pool_def osPoolDef_t |
Definition structure for memory block allocation.
typedef struct os_pool_cb* osPoolId |
Pool ID identifies the memory pool (pointer to a memory pool control block).
См. определение в файле cmsis_os.h строка 201
typedef struct os_semaphore_def osSemaphoreDef_t |
Semaphore Definition structure contains setup information for a semaphore.
typedef struct os_semaphore_cb* osSemaphoreId |
Semaphore ID identifies the semaphore (pointer to a semaphore control block).
См. определение в файле cmsis_os.h строка 197
typedef struct os_thread_def osThreadDef_t |
Thread Definition structure contains startup information of a thread.
typedef struct os_thread_cb* osThreadId |
Thread ID identifies the thread (pointer to a thread control block).
См. определение в файле cmsis_os.h строка 185
typedef struct os_timer_def osTimerDef_t |
Timer Definition structure contains timer parameters.
typedef struct os_timer_cb* osTimerId |
Timer ID identifies the timer (pointer to a timer control block).
См. определение в файле cmsis_os.h строка 189
enum os_timer_type |
Timer type value for the timer definition.
См. определение в файле cmsis_os.h строка 168
enum osPriority |
Priority used for thread control.
См. определение в файле cmsis_os.h строка 130
enum osStatus |
Status code values returned by CMSIS-RTOS functions.
См. определение в файле cmsis_os.h строка 147
Wait for Timeout (Time Delay)
[in] | millisec | time delay value |
int32_t osKernelRunning | ( | void | ) |
Check if the RTOS kernel is already started.
osStatus osKernelStart | ( | osThreadDef_t * | thread_def, |
void * | argument | ||
) |
Start the RTOS Kernel with executing the specified thread.
[in] | thread_def | thread definition referenced with osThread. |
[in] | argument | pointer that is passed to the thread function as start argument. |
Allocate a memory block from a mail.
[in] | queue_id | mail queue ID obtained with osMailCreate. |
[in] | millisec | timeout value or 0 in case of no time-out |
Allocate a memory block from a mail and set memory block to zero.
[in] | queue_id | mail queue ID obtained with osMailCreate. |
[in] | millisec | timeout value or 0 in case of no time-out |
osMailQId osMailCreate | ( | osMailQDef_t * | queue_def, |
osThreadId | thread_id | ||
) |
Create and Initialize mail queue.
[in] | queue_def | reference to the mail queue definition obtain with osMailQ |
[in] | thread_id | thread ID (obtained by osThreadCreate or osThreadGetId) or NULL. |
Free a memory block from a mail.
[in] | queue_id | mail queue ID obtained with osMailCreate. |
[in] | pointer to the memory block that was obtained with osMailGet. |
Get a mail from a queue.
[in] | queue_id | mail queue ID obtained with osMailCreate. |
[in] | millisec | timeout value or 0 in case of no time-out |
Put a mail to a queue.
[in] | queue_id | mail queue ID obtained with osMailCreate. |
[in] | memory block previously allocated with osMailAlloc or osMailCAlloc. |
osMessageQId osMessageCreate | ( | osMessageQDef_t * | queue_def, |
osThreadId | thread_id | ||
) |
Create and Initialize a Message Queue.
[in] | queue_def | queue definition referenced with osMessageQ. |
[in] | thread_id | thread ID (obtained by osThreadCreate or osThreadGetId) or NULL. |
osEvent osMessageGet | ( | osMessageQId | queue_id, |
uint32_t | millisec | ||
) |
Get a Message or Wait for a Message from a Queue.
[in] | queue_id | message queue ID obtained with osMessageCreate. |
[in] | millisec | timeout value or 0 in case of no time-out. |
osStatus osMessagePut | ( | osMessageQId | queue_id, |
uint32_t | info, | ||
uint32_t | millisec | ||
) |
Put a Message to a Queue.
[in] | queue_id | message queue ID obtained with osMessageCreate. |
[in] | info | message information. |
[in] | millisec | timeout value or 0 in case of no time-out. |
osMutexId osMutexCreate | ( | osMutexDef_t * | mutex_def | ) |
Create and Initialize a Mutex object.
[in] | mutex_def | mutex definition referenced with osMutex. |
Release a Mutex that was obtained by osMutexWait.
[in] | mutex_id | mutex ID obtained by osMutexCreate. |
Wait until a Mutex becomes available.
[in] | mutex_id | mutex ID obtained by osMutexCreate. |
[in] | millisec | timeout value or 0 in case of no time-out. |
void* osPoolAlloc | ( | osPoolId | pool_id | ) |
Allocate a memory block from a memory pool.
[in] | pool_id | memory pool ID obtain referenced with osPoolCreate. |
void* osPoolCAlloc | ( | osPoolId | pool_id | ) |
Allocate a memory block from a memory pool and set memory block to zero.
[in] | pool_id | memory pool ID obtain referenced with osPoolCreate. |
osPoolId osPoolCreate | ( | osPoolDef_t * | pool_def | ) |
Create and Initialize a memory pool.
[in] | pool_def | memory pool definition referenced with osPool. |
Return an allocated memory block back to a specific memory pool.
[in] | pool_id | memory pool ID obtain referenced with osPoolCreate. |
[in] | block | address of the allocated memory block that is returned to the memory pool. |
osSemaphoreId osSemaphoreCreate | ( | osSemaphoreDef_t * | semaphore_def, |
int32_t | count | ||
) |
Create and Initialize a Semaphore object used for managing resources.
[in] | semaphore_def | semaphore definition referenced with osSemaphore. |
[in] | count | number of available resources. |
osStatus osSemaphoreRelease | ( | osSemaphoreId | semaphore_id | ) |
Release a Semaphore token.
[in] | semaphore_id | semaphore object referenced with osSemaphore. |
int32_t osSemaphoreWait | ( | osSemaphoreId | semaphore_id, |
uint32_t | millisec | ||
) |
Wait until a Semaphore token becomes available.
[in] | semaphore_id | semaphore object referenced with osSemaphore. |
[in] | millisec | timeout value or 0 in case of no time-out. |
int32_t osSignalClear | ( | osThreadId | thread_id, |
int32_t | signal | ||
) |
Clear the specified Signal Flags of an active thread.
[in] | thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
[in] | signal | specifies the signal flags of the thread that shall be cleared. |
int32_t osSignalGet | ( | osThreadId | thread_id | ) |
Get Signal Flags status of an active thread.
[in] | thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
int32_t osSignalSet | ( | osThreadId | thread_id, |
int32_t | signal | ||
) |
Set the specified Signal Flags of an active thread.
[in] | thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
[in] | signal | specifies the signal flags of the thread that should be set. |
Wait for one or more Signal Flags to become signaled for the current RUNNING thread.
[in] | signals | wait until all specified signal flags set or 0 for any single signal flag. |
[in] | millisec | timeout value or 0 in case of no time-out. |
osThreadId osThreadCreate | ( | osThreadDef_t * | thread_def, |
void * | argument | ||
) |
Create a thread and add it to Active Threads and set it to state READY.
[in] | thread_def | thread definition referenced with osThread. |
[in] | argument | pointer that is passed to the thread function as start argument. |
osThreadId osThreadGetId | ( | void | ) |
Return the thread ID of the current running thread.
osPriority osThreadGetPriority | ( | osThreadId | thread_id | ) |
Get current priority of an active thread.
[in] | thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
osStatus osThreadSetPriority | ( | osThreadId | thread_id, |
osPriority | priority | ||
) |
Change priority of an active thread.
[in] | thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
[in] | priority | new priority value for the thread function. |
osStatus osThreadTerminate | ( | osThreadId | thread_id | ) |
Terminate execution of a thread and remove it from Active Threads.
[in] | thread_id | thread ID obtained by osThreadCreate or osThreadGetId. |
osStatus osThreadYield | ( | void | ) |
Pass control to next thread that is in state READY.
osTimerId osTimerCreate | ( | osTimerDef_t * | timer_def, |
os_timer_type | type, | ||
void * | argument | ||
) |
Create a timer.
[in] | timer_def | timer object referenced with osTimer. |
[in] | type | osTimerOnce for one-shot or osTimerPeriodic for periodic behavior. |
[in] | argument | argument to the timer call back function. |
Start or restart a timer.
[in] | timer_id | timer ID obtained by osTimerCreate. |
[in] | millisec | time delay value of the timer. |
Stop the timer.
[in] | timer_id | timer ID obtained by osTimerCreate. |
Wait for Signal, Message, Mail, or Timeout.
[in] | millisec | timeout value or 0 in case of no time-out |