Go to the documentation of this file.
   29 #ifndef _OS_PORT_FREERTOS_H 
   30 #define _OS_PORT_FREERTOS_H 
   34    #include "freertos/FreeRTOS.h" 
   35    #include "freertos/task.h" 
   36    #include "freertos/semphr.h" 
   44 #define OS_INVALID_TASK_ID NULL 
   46 #define OS_SELF_TASK_ID NULL 
   49 #ifndef OS_TASK_PRIORITY_NORMAL 
   50    #define OS_TASK_PRIORITY_NORMAL (tskIDLE_PRIORITY + 1) 
   54 #ifndef OS_TASK_PRIORITY_HIGH 
   55    #define OS_TASK_PRIORITY_HIGH (tskIDLE_PRIORITY + 2) 
   59 #ifndef OS_MS_TO_SYSTICKS 
   60    #define OS_MS_TO_SYSTICKS(n) (n) 
   64 #ifndef OS_SYSTICKS_TO_MS 
   65    #define OS_SYSTICKS_TO_MS(n) (n) 
   69 #ifndef osGetSystemTime64 
   70    #define osGetSystemTime64() osGetSystemTime() 
   85    #if defined(portENTER_SWITCHING_ISR) 
   86       #define osEnterIsr() portENTER_SWITCHING_ISR() 
   94    #if defined(__XTENSA__) 
   95       #define osExitIsr(flag) if(flag) portYIELD_FROM_ISR() 
   96    #elif defined(portEXIT_SWITCHING_ISR) 
   97       #define osExitIsr(flag) portEXIT_SWITCHING_ISR() 
   98    #elif defined(portEND_SWITCHING_ISR) 
   99       #define osExitIsr(flag) portEND_SWITCHING_ISR(flag) 
  100    #elif defined(portYIELD_FROM_ISR) 
  101       #define osExitIsr(flag) portYIELD_FROM_ISR(flag) 
  103       #define osExitIsr(flag) 
  108 #ifndef configSUPPORT_STATIC_ALLOCATION 
  109    #define configSUPPORT_STATIC_ALLOCATION 0 
  138 #if (configSUPPORT_STATIC_ALLOCATION == 1) 
  158 #if (configSUPPORT_STATIC_ALLOCATION == 1) 
  159    StaticSemaphore_t buffer;
 
  171 #if (configSUPPORT_STATIC_ALLOCATION == 1) 
  172    StaticSemaphore_t buffer;
 
  184 #if (configSUPPORT_STATIC_ALLOCATION == 1) 
  185    StaticSemaphore_t buffer;
 
  
systime_t osGetSystemTime(void)
Retrieve system time.
void osReleaseSemaphore(OsSemaphore *semaphore)
Release the specified semaphore object.
void osDeleteSemaphore(OsSemaphore *semaphore)
Delete a semaphore object.
bool_t osSetEventFromIsr(OsEvent *event)
Set an event object to the signaled state from an interrupt service routine.
void * osAllocMem(size_t size)
Allocate a memory block.
void osSuspendAllTasks(void)
Suspend scheduler activity.
mutex_t OsMutex
Mutex object.
void osReleaseMutex(OsMutex *mutex)
Release ownership of the specified mutex object.
binary_semaphore_t OsEvent
Event object.
void osSwitchTask(void)
Yield control to the next task.
TaskHandle_t OsTaskId
Task identifier.
bool_t osWaitForSemaphore(OsSemaphore *semaphore, systime_t timeout)
Wait for the specified semaphore to be available.
void osDelayTask(systime_t delay)
Delay routine.
void(* OsTaskCode)(void *arg)
Task routine.
uint32_t systime_t
System time.
void osInitKernel(void)
Kernel initialization.
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
const OsTaskParameters OS_TASK_DEFAULT_PARAMS
bool_t osCreateSemaphore(OsSemaphore *semaphore, uint_t count)
Create a semaphore object.
void osDeleteMutex(OsMutex *mutex)
Delete a mutex object.
TickType_t systime_t
System time.
OsTaskId osCreateTask(const char_t *name, OsTaskCode taskCode, void *arg, const OsTaskParameters *params)
Create a task.
void osResetEvent(OsEvent *event)
Set the specified event object to the nonsignaled state.
void osStartKernel(void)
Start kernel.
void osDeleteEvent(OsEvent *event)
Delete an event object.
void osResumeAllTasks(void)
Resume scheduler activity.
void osFreeMem(void *p)
Release a previously allocated memory block.
void osAcquireMutex(OsMutex *mutex)
Acquire ownership of the specified mutex object.
thread_t * OsTaskId
Task identifier.
bool_t osWaitForEvent(OsEvent *event, systime_t timeout)
Wait until the specified event is in the signaled state.
void osDeleteTask(OsTaskId taskId)
Delete a task.
bool_t osCreateMutex(OsMutex *mutex)
Create a mutex object.
bool_t osCreateEvent(OsEvent *event)
Create an event object.
semaphore_t OsSemaphore
Semaphore object.