Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
µC/OS-II Abstraction Layer

The Kinetis SDK provides the µC/OS-II Abstraction Layer for synchronization, mutual exclusion, message queue, etc. More...

Overview

Data Structures

struct  event_ucosii
 Type for an event group object in µCOS-II. More...
 
struct  msgq_ucosii
 Type for message queue in µCOS-II. More...
 

Macros

#define OSA_WAIT_FOREVER   0xFFFFFFFFU
 Constant to pass as timeout value to wait indefinitely. More...
 
#define FSL_OSA_TIME_RANGE   0xFFFFFFFFU
 OSA's time range in millisecond, OSA time wraps if exceeds this value. More...
 
#define OSA_DEFAULT_INT_HANDLER   ((osa_int_handler_t)(&DefaultISR))
 The default interrupt handler installed in vector table. More...
 

Typedefs

typedef OS_FLAGS event_flags_t
 Type for an event flags group.
 
typedef OS_EVENT * semaphore_t
 Type for an semaphore.
 
typedef OS_EVENT * mutex_t
 Type for a mutex.
 
typedef event_ucosii event_t
 Type for an event group object.
 
typedef msgq_ucosii msg_queue_t
 Type for a message queue.
 
typedef msgq_ucosiimsg_queue_handler_t
 Type for a message queue handler.
 
typedef OS_TCB * task_handler_t
 Type for a task handler, returned by the OSA_TaskCreate function.
 
typedef OS_STK task_stack_t
 Type for a task stack.
 
typedef void * task_param_t
 Type for task parameter.
 
typedef void(* task_t )(task_param_t param)
 Type for a task pointer.
 

Thread management

#define OSA_TASK_DEFINE(task, stackSize)
 Defines a task. More...
 
#define PRIORITY_OSA_TO_RTOS(osa_prio)   ((osa_prio)+4U)
 To provide unified task piority for upper layer, OSA layer makes conversion.
 
#define PRIORITY_RTOS_TO_OSA(rtos_prio)   ((rtos_prio)-4U)
 

Message queues

#define MSG_QUEUE_DECLARE(name, number, size)
 This macro statically reserves the memory required for the queue. More...
 

Data Structure Documentation

struct event_ucosii

Data Fields

OS_FLAG_GRP * pGroup
 Pointer to µCOS-II's event entity.
 
osa_event_clear_mode_t clearMode
 Auto clear or manual clear.
 
struct msgq_ucosii

Data Fields

OS_EVENT * pQueue
 Pointer to the queue.
 
void ** msgTbl
 Pointer to the array that saves the pointers to messages.
 
OS_MEM * pMem
 Pointer to memory where save the messages.
 
void * msgs
 Memory to save the messages.
 
uint16_t size
 Size of the message in words.
 

Macro Definition Documentation

#define OSA_WAIT_FOREVER   0xFFFFFFFFU
#define FSL_OSA_TIME_RANGE   0xFFFFFFFFU
#define OSA_DEFAULT_INT_HANDLER   ((osa_int_handler_t)(&DefaultISR))
#define OSA_TASK_DEFINE (   task,
  stackSize 
)
Value:
task_stack_t task##_stack[(stackSize)/sizeof(task_stack_t)]; \
task_handler_t task##_task_handler
uint32_t task_stack_t
Type for a task stack.
Definition: fsl_os_abstraction_bm.h:104
OS_TCB * task_handler_t
Type for a task handler, returned by the OSA_TaskCreate function.
Definition: fsl_os_abstraction_ucosii.h:88

This macro defines resources for a task statically. Then the OSA_TaskCreate creates the task based on these resources.

Parameters
taskThe task function.
stackSizeThe stack size this task needs in bytes.
#define MSG_QUEUE_DECLARE (   name,
  number,
  size 
)
Value:
void* msgTbl_##name[number]; \
uint32_t msgs_##name[number*size]; \
msg_queue_t memory_##name = { \
.msgTbl = msgTbl_##name, \
.msgs = msgs_##name \
}; \
msg_queue_t *name = &(memory_##name)
msgq_ucosii msg_queue_t
Type for a message queue.
Definition: fsl_os_abstraction_ucosii.h:82
void ** msgTbl
Pointer to the array that saves the pointers to messages.
Definition: fsl_os_abstraction_ucosii.h:63
Parameters
nameIdentifier for the memory region.
numberNumber of elements in the queue.
sizeSize of every elements in words.