MCUXpresso SDK API Reference Manual  Rev 2.16.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Os_abstraction_zephyr


Copyright (c) 2015, Freescale Semiconductor, Inc. More...

Overview

Copyright 2016-2024 NXP All rights reserved.

This is the header file for the OS Abstraction layer for Zephyr.

SPDX-License-Identifier: BSD-3-Clause

Data Structures

struct  osa_zephyr_taskHandle_t
 Private Zephyr OSA task handle. More...
 
struct  osa_zephyr_msgQueueHandle_t
 Private Zephyr OSA message queue handle. More...
 
struct  osa_zephyr_eventHandle_t
 Private Zephyr OSA event handle. More...
 
struct  osa_zephyr_mutexHandle_t
 Private Zephyr OSA mutex handle. More...
 
struct  osa_zephyr_semHandle_t
 Private Zephyr OSA semaphore handle. More...
 
struct  osa_zephyr_timerHandle_t
 Private Zephyr OSA timer handle. More...
 

Macros

#define OSA_CHECKMARK_TASK   (0x05A05A01u)
 
#define OSA_TASK_HANDLE_SIZE   (sizeof(osa_zephyr_taskHandle_t))
 Zephyr OSA task handle size. More...
 
#define OSA_EVENT_HANDLE_SIZE   (sizeof(osa_zephyr_eventHandle_t))
 Zephyr OSA event handle size. More...
 
#define OSA_SEM_HANDLE_SIZE   (sizeof(osa_zephyr_semHandle_t))
 Zephyr OSA semaphore handle size. More...
 
#define OSA_MUTEX_HANDLE_SIZE   (sizeof(osa_zephyr_mutexHandle_t))
 Zephyr OSA mutex handle size. More...
 
#define OSA_MSGQ_HANDLE_SIZE   (sizeof(osa_zephyr_msgQueueHandle_t))
 Zephyr OSA queue handle size. More...
 
#define OSA_TIMER_HANDLE_SIZE   (sizeof(osa_zephyr_timerHandle_t))
 Zephyr OSA timer handle size. More...
 

Data Structure Documentation

struct osa_zephyr_taskHandle_t

List of Zephyr primitive handles. Each time RTOS primitive is created, it is pointing to one of following structures with naming convention: osa_zephyr_<primitiveName>Handle_t. For example: osa_zephyr_taskHandle_t.

Do not use directly.

struct osa_zephyr_msgQueueHandle_t

Do not use directly.

struct osa_zephyr_eventHandle_t

Do not use directly.

struct osa_zephyr_mutexHandle_t

Do not use directly.

struct osa_zephyr_semHandle_t

Do not use directly.

struct osa_zephyr_timerHandle_t

Do not use directly.

Macro Definition Documentation

#define OSA_CHECKMARK_TASK   (0x05A05A01u)

INFORMATION for developers:

To turn on ASSERTS of OSA layer, define and set macro CONFIG_OSA_DEBUG_ASSERT_ENABLED = 1. Turned off by default.

Call OSA_Init() before using any task API (taskCreate, etc ...)

List of differences between NXP's OSA API and Zephyr's API: [OSA_TaskCreate] unused following variables in OSA's thread_def: tlink, useFloat, instances. [OSA_TaskGetPriority] different priority formats. See function comment for more info. [OSA_TaskSetPriority] different priority formats. See function comment for more info. [OSA_Start] does nothing in Zephyr. Scheduler started automatically. List of unsupported OSA API: [OSA_InstallIntHandler]

CONFIG_EVENTS must be set in order to use Event api. Zephyr is not enabling its event API by default. Zephyr does not check whether handle for specific OS primitive is correct. This may lead to unexpected behavior. This OSA layer port adds checkmark to all OS primitives checking if it is correct at every API call, returning back error and rising assert if incorrect, preventing from unexpected behavior. Every checkmark value prefixes with "OSA_CHECKMARK".

#define OSA_TASK_HANDLE_SIZE   (sizeof(osa_zephyr_taskHandle_t))
#define OSA_EVENT_HANDLE_SIZE   (sizeof(osa_zephyr_eventHandle_t))
#define OSA_SEM_HANDLE_SIZE   (sizeof(osa_zephyr_semHandle_t))
#define OSA_MUTEX_HANDLE_SIZE   (sizeof(osa_zephyr_mutexHandle_t))
#define OSA_MSGQ_HANDLE_SIZE   (sizeof(osa_zephyr_msgQueueHandle_t))
#define OSA_TIMER_HANDLE_SIZE   (sizeof(osa_zephyr_timerHandle_t))