Embedded Wireless Framework
Data Structures | Macros
ewf_platform_freertos.h File Reference

The Embedded Wireless Framework freeRTOS platform API. More...

#include "ewf_platform.h"
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"

Go to the source code of this file.

Data Structures

struct  _ewf_platform_thread
 The platform thread structure. More...
 
struct  _ewf_platform_mutex
 The platform mutex structure. More...
 
struct  _ewf_platform_queue
 The platform queue structure. More...
 

Macros

#define EWF_PLATFORM_TICKS_PER_SECOND   (configTICK_RATE_HZ)
 
#define EWF_PLATFORM_THREAD_PRIORITY_HIGH   (configMAX_PRIORITIES - 1)
 
#define EWF_PLATFORM_THREAD_PRIORITY_MEDIUM   (configMAX_PRIORITIES / 2)
 
#define EWF_PLATFORM_THREAD_PRIORITY_LOW   (1)
 
#define EWF_PLATFORM_THREAD_STATIC_DECLARE(thread_ptr, thread_name_symb, thread_function_ptr_param, thread_function_data_param, stack_size_param, thread_priority_param)
 
#define EWF_PLATFORM_MUTEX_STATIC_DECLARE(mutex_ptr, mutex_name)
 
#define EWF_PLATFORM_QUEUE_STATIC_DECLARE(queue_ptr, queue_name_symb, item_type_param, item_count_param)
 Declare statically a queue for the platform and initialize its data. More...
 

Detailed Description

The Embedded Wireless Framework freeRTOS platform API.

Version
Preview

Macro Definition Documentation

◆ EWF_PLATFORM_MUTEX_STATIC_DECLARE

#define EWF_PLATFORM_MUTEX_STATIC_DECLARE (   mutex_ptr,
  mutex_name 
)
Value:
do { \
static struct _ewf_platform_mutex _ewf_platform_mutex__##mutex_name = {0}; \
mutex_ptr = &(_ewf_platform_mutex__##mutex_name); \
} while(0)
The platform mutex structure.
Definition: ewf_platform_freertos.h:69

◆ EWF_PLATFORM_QUEUE_STATIC_DECLARE

#define EWF_PLATFORM_QUEUE_STATIC_DECLARE (   queue_ptr,
  queue_name_symb,
  item_type_param,
  item_count_param 
)
Value:
do { \
static uint8_t ewf_platform_queue__buffer__##queue_name_symb[sizeof(item_type_param) * item_count_param]; \
static ewf_platform_queue ewf_platform_queue__##queue_name_symb = {0}; \
ewf_platform_queue__##queue_name_symb.name_cstr = #queue_name_symb; \
ewf_platform_queue__##queue_name_symb.uxQueueLength = item_count_param; \
ewf_platform_queue__##queue_name_symb.uxItemSize = sizeof(item_type_param); \
ewf_platform_queue__##queue_name_symb.pucQueueStorageBuffer = ewf_platform_queue__buffer__##queue_name_symb; \
queue_ptr = &(ewf_platform_queue__##queue_name_symb); \
} while(0)
The platform queue structure.
Definition: ewf_platform_bare_metal.h:74

Declare statically a queue for the platform and initialize its data.

Parameters
[in,out]queue_ptra pointer to a _ewf_platform_thread structure that will be made to point to the statically declared thread
[in]queue_name_symba symbol that will be used to uniquely declare and name the thread
[in]item_typetype queue item type
[in]item_countthe maximum number item the queue can contain

◆ EWF_PLATFORM_THREAD_STATIC_DECLARE

#define EWF_PLATFORM_THREAD_STATIC_DECLARE (   thread_ptr,
  thread_name_symb,
  thread_function_ptr_param,
  thread_function_data_param,
  stack_size_param,
  thread_priority_param 
)
Value:
do { \
static StackType_t _ewf_platform_thread__stack__##thread_name_symb[stack_size_param / sizeof(StackType_t ) + 1]; \
static struct _ewf_platform_thread _ewf_platform_thread__##thread_name_symb = {0}; \
_ewf_platform_thread__##thread_name_symb.name_ptr = #thread_name_symb; \
_ewf_platform_thread__##thread_name_symb.thread_function_ptr = thread_function_ptr_param; \
_ewf_platform_thread__##thread_name_symb.thread_function_data = thread_function_data_param; \
_ewf_platform_thread__##thread_name_symb.stack_ptr = _ewf_platform_thread__stack__##thread_name_symb; \
_ewf_platform_thread__##thread_name_symb.stack_size = stack_size_param / sizeof(StackType_t); \
_ewf_platform_thread__##thread_name_symb.priority = thread_priority_param; \
_ewf_platform_thread__##thread_name_symb.task_handle = NULL; \
thread_ptr = &(_ewf_platform_thread__##thread_name_symb); \
} while(0)
The platform thread structure.
Definition: ewf_platform_freertos.h:43