39#if !defined(OS_TYPE_FREERTOS) && !defined(_POSIX)
40#include "../os/merlot/osal/uitron/os_wrapper_rename.h"
51#ifdef OS_TYPE_FREERTOS
53#include <freertos_inc.h>
55typedef unsigned int SYS_CpuId;
56typedef int16_t SYS_Id;
57typedef uint32_t SYS_FlagPattern;
61typedef int SYS_Timeout;
62typedef unsigned int SYS_WaitMode;
63typedef unsigned int SYS_Time;
64typedef unsigned int SYS_RelativeTime;
65typedef uint32_t SYS_Attribute;
66typedef unsigned int SYS_Status;
67typedef TaskHandle_t SYS_Task;
68typedef TimerHandle_t SYS_CyclicHandler;
69typedef TimerHandle_t SYS_AlarmHandler;
70typedef void *SYS_CyclicHandlerInfo;
71typedef void *SYS_AlarmHandlerInfo;
76#include <refcnt_mpf.h>
78typedef unsigned int SYS_CpuId;
80typedef FLGPTN SYS_FlagPattern;
81typedef T_MSG SYS_Message;
82typedef TMO SYS_Timeout;
83typedef MODE SYS_WaitMode;
84typedef SYSTIM SYS_Time;
85typedef RELTIM SYS_RelativeTime;
86typedef ATR SYS_Attribute;
87typedef STAT SYS_Status;
89typedef ID SYS_CyclicHandler;
90typedef ID SYS_AlarmHandler;
91typedef void *SYS_CyclicHandlerInfo;
92typedef void *SYS_AlarmHandlerInfo;
101 void (*function)(
void *arg);
104 unsigned long stackSize;
108 SYS_Attribute attribute;
109 unsigned int initialCount;
110 unsigned int maxCount;
114 SYS_Attribute attribute;
115 SYS_FlagPattern initialPattern;
119 SYS_Attribute attribute;
123 unsigned int blockCount;
124 unsigned int blockSize;
130 void (*handler)(SYS_CyclicHandlerInfo info);
132 SYS_RelativeTime cycle;
137 void (*handler)(SYS_AlarmHandlerInfo info);
147 unsigned int semaphoreCount;
151 SYS_FlagPattern flagPattern;
155 SYS_Message *message;
159 unsigned int freeBlocks;
172int SYS_DeleteTask(SYS_Task desc);
173int SYS_ChangeTaskPriority(SYS_Task desc,
int prio);
174int SYS_GetTaskPriority(SYS_Task desc,
int *prio);
178int SYS_SleepTask(SYS_Timeout timeout);
179int SYS_SuspendTask(SYS_Task desc);
180int SYS_ResumeTask(SYS_Task desc);
181int SYS_DelayTask(SYS_RelativeTime delay);
185int SYS_DeleteSemaphore(SYS_Id
id);
186int SYS_SignalSemaphore(SYS_Id
id);
187int SYS_WaitSemaphore(SYS_Id
id, SYS_Timeout timeout);
191int SYS_DeleteFlag(SYS_Id
id);
192int SYS_SetFlag(SYS_Id
id, SYS_FlagPattern setPattern);
193int SYS_ClearFlag(SYS_Id
id, SYS_FlagPattern clearPattern);
194int SYS_WaitFlag(SYS_Id
id, SYS_FlagPattern waitPattern, SYS_WaitMode waitMode, SYS_FlagPattern *flagPattern, SYS_Timeout timeout);
198int SYS_DeleteMailbox(SYS_Id
id);
199int SYS_SendMailbox(SYS_Id
id, SYS_Message *message);
200int SYS_ReceiveMailbox(SYS_Id
id, SYS_Message **message, SYS_Timeout timeout);
203#if defined(CPU_CLUSTER_M0P) && defined(CONFIG_OS_PM_SUPPORT)
204int SYS_SignalSemaphorePowerCare(SYS_Id
id);
205int SYS_WaitSemaphorePowerCare(SYS_Id
id, SYS_Timeout timeout);
208int SYS_SetFlagPowerCare(SYS_Id
id, SYS_FlagPattern setPattern);
209int SYS_ClearFlagPowerCare(SYS_Id
id, SYS_FlagPattern clearPattern);
210int SYS_WaitFlagPowerCare(SYS_Id
id, SYS_FlagPattern waitPattern, SYS_WaitMode waitMode, SYS_FlagPattern *flagPattern, SYS_Timeout timeout);
213int SYS_SendMailboxPowerCare(SYS_Id
id, SYS_Message *message);
214int SYS_ReceiveMailboxPowerCare(SYS_Id
id, SYS_Message **message, SYS_Timeout timeout);
220void *SYS_AllocMemory(
unsigned int size);
221void SYS_FreeMemory(
void *ptr);
222void *SYS_AllocSharedMemory(
unsigned int size);
223void SYS_FreeSharedMemory(
void *ptr);
225int SYS_DeleteMemoryPool(SYS_Id
id);
226int SYS_GetMemoryBlock(SYS_Id
id,
void **block, SYS_Timeout timeout);
227int SYS_AcquireMemoryBlock(SYS_Id
id,
void *block);
228int SYS_ReleaseMemoryBlock(SYS_Id
id,
void *block);
232int SYS_GetTime(SYS_Time *time);
234int SYS_DeleteCyclicHandler(SYS_CyclicHandler desc);
235int SYS_StartCyclicHandler(SYS_CyclicHandler desc);
236int SYS_StopCyclicHandler(SYS_CyclicHandler desc);
237int SYS_GetCyclicHandlerArg(SYS_CyclicHandlerInfo info,
void **arg);
240int SYS_DeleteAlarmHandler(SYS_AlarmHandler desc);
241int SYS_StartAlarmHandler(SYS_AlarmHandler desc, SYS_RelativeTime time);
242int SYS_StopAlarmHandler(SYS_AlarmHandler desc);
243int SYS_GetAlarmHandlerArg(SYS_AlarmHandlerInfo info,
void **arg);
247int SYS_GetTaskDescriptor(SYS_Task *desc);
248int SYS_YieldTask(
void);
249int SYS_DisableDispatch(
void);
250int SYS_EnableDispatch(
void);
251bool SYS_IsDispatchDisabled(
void);
252int SYS_DisableInterrupt(
int irqNum);
253int SYS_EnableInterrupt(
int irqNum);
254void SYS_SaveInterruptMask(uint32_t *mask);
255void SYS_RestoreInterruptMask(uint32_t mask);
256bool SYS_GetInterruptMask(
void);
257bool SYS_IsInTaskContext(
void);
258int SYS_GetCpuId(
void);
259int SYS_GetCpuClusterId(
void);
264int SYS_DisableDispatch(
void);
265int SYS_EnableDispatch(
void);
266int SYS_GetCpuId(
void);
270#define TTS_RUN (0x0001)
271#define TTS_RDY (0x0002)
272#define TTS_WAI (0x0004)
279#define TWF_ANDW (0x0000)
280#define TWF_ORW (0x0001)
282#define TA_CLR (0x0004)
Definition: os_wrapper.h:166
Definition: os_wrapper.h:162
Definition: os_wrapper.h:150
Definition: os_wrapper.h:154
Definition: os_wrapper.h:158
Definition: os_wrapper.h:135
Definition: os_wrapper.h:128
Definition: os_wrapper.h:113
Definition: os_wrapper.h:118
Definition: os_wrapper.h:122
Definition: os_wrapper.h:107
Definition: os_wrapper.h:99
Definition: os_wrapper.h:146
Definition: os_wrapper.h:141