The Kinetis SDK provides the MQX RTOS Abstraction Layer for synchronization, mutual exclusion, message queue, etc.
More...
|
| #define | OSA_TASK_DEFINE(task, stackSize) |
| | Defines a task. More...
|
| |
| #define | PRIORITY_OSA_TO_RTOS(osa_prio) ((osa_prio)+7U) |
| | To provide unified task priority for upper layer, OSA layer makes a conversion. More...
|
| |
|
#define | PRIORITY_RTOS_TO_OSA(rtos_prio) ((rtos_prio)-7U) |
| |
|
|
#define | SIZE_IN_MMT_UNITS(size) ((size + sizeof(_mqx_max_type) - 1) / sizeof(_mqx_max_type)) |
| |
| #define | MSG_QUEUE_DECLARE(name, number, size) _mqx_max_type name[SIZE_IN_MMT_UNITS(sizeof(LWMSGQ_STRUCT)) + SIZE_IN_MMT_UNITS(size * 4) * number] |
| | This macro statically reserves the memory required for the queue. More...
|
| |
Data Fields |
|
volatile bool | isWaiting |
| | Is any task waiting for a timeout on this mutex.
|
| |
|
volatile bool | isLocked |
| | Is the object locked or not.
|
| |
|
uint32_t | time_start |
| | The time to start timeout.
|
| |
|
uint32_t | timeout |
| | Timeout to wait in milliseconds.
|
| |
| LWSEM_STRUCT | sema |
| | The lwsem structure. More...
|
| |
| _task_id | owner |
| | Task who locks this mutex. More...
|
| |
| LWSEM_STRUCT mutex_t::sema |
| #define OSA_WAIT_FOREVER 0xFFFFFFFFU |
| #define FSL_OSA_TIME_RANGE 0xFFFFFFFFU |
| #define MQX_MAIN_TASK_PRIORITY (7+16) |
| #define OSA_TASK_DEFINE |
( |
|
task, |
|
|
|
stackSize |
|
) |
| |
Value:
uint32_t task_stack_t
Type for a task stack.
Definition: fsl_os_abstraction_bm.h:104
_task_id task_handler_t
Type for a task handler, returned by the OSA_TaskCreate function.
Definition: fsl_os_abstraction_mqx.h:124
uint32_t task_stack_t
Type for a task stack.
Definition: fsl_os_abstraction_mqx.h:130
This macro defines resources for a task statically. Then, the OSA_TaskCreate creates the task based-on these resources.
- Parameters
-
| task | The task function. |
| stackSize | The stack size this task needs in bytes. |
| #define PRIORITY_OSA_TO_RTOS |
( |
|
osa_prio | ) |
((osa_prio)+7U) |
MQX RTOS highest 7 priorities are special priorities.
| #define MSG_QUEUE_DECLARE |
( |
|
name, |
|
|
|
number, |
|
|
|
size |
|
) |
| _mqx_max_type name[SIZE_IN_MMT_UNITS(sizeof(LWMSGQ_STRUCT)) + SIZE_IN_MMT_UNITS(size * 4) * number] |
- Parameters
-
| name | Identifier for the memory region. |
| number | Number of elements in the queue. |
| size | Size of element in 4 B units. |