VSF Documented
Macros | Typedefs | Enumerations | Functions
rtos_al.h File Reference
#include "vsf.h"
#include "dbg_assert.h"

Go to the source code of this file.

Macros

#define RTOS_TASK_FCT(__NAME)   void __NAME(void *param)
 
#define RTOS_TASK_PRIORITY(__PRIO)   (__PRIO)
 
#define pdTRUE   true
 
#define pdFALSE   false
 

Typedefs

typedef uint32_t TickType_t
 
typedef uint32_t UBaseType_t
 
typedef struct rtos_timer_tTimerHandle_t
 
typedef void(* TimerCallbackFunction_t) (TimerHandle_t xTimer)
 
typedef void(* rtos_task_fct) (void *)
 
typedef struct vsf_rtos_thread_t * rtos_task_handle
 
typedef vsf_prio_t rtos_prio
 
typedef vsf_sem_trtos_semaphore
 
typedef vsf_mutex_trtos_mutex
 
typedef struct vsf_rtos_queue_trtos_queue
 

Enumerations

enum  rtos_task_id {
  IDLE_TASK = 0 ,
  TMR_DAEMON_TASK = 1 ,
  CONSOLE_TASK = 2 ,
  TEST_TASK = 3 ,
  BT_TASK = 4 ,
  INTERSYS_TASK = 5 ,
  ASIO_TASK = 6 ,
  AUDIO_TASK = 7 ,
  WIFI_TASK = 8 ,
  CONTROL_TASK = 9 ,
  SUPPLICANT_TASK = 10 ,
  IP_TASK = 11 ,
  APPLICATION_TASK = 12 ,
  TG_SEND_TASK = 13 ,
  PING_SEND_TASK = 14 ,
  IPERF_TASK = 15 ,
  SMARTCONF_TASK = 16 ,
  IPC_CNTRL_TASK = 17 ,
  TCPUDP_FIRST_TASK = 18 ,
  TCPUDP_LAST_TASK = 21 ,
  RTP_TASK = 22 ,
  USBH_TASK = 23 ,
  MDNS_TASK = 24 ,
  RTCP_TASK = 25 ,
  MAX_TASK ,
  UNDEF_TASK = 255
}
 

Functions

int rtos_init (void)
 
void * rtos_malloc (uint32_t size)
 
void rtos_free (void *ptr)
 
uint32_t rtos_now (bool isr)
 
int rtos_task_create (rtos_task_fct func, const char *const name, enum rtos_task_id task_id, const uint16_t stack_depth, void *const params, rtos_prio prio, rtos_task_handle *const task_handle)
 
void rtos_task_suspend (int duration)
 
uint32_t rtos_protect (void)
 
void rtos_unprotect (uint32_t protect)
 
int rtos_semaphore_create (rtos_semaphore *semaphore, int max_count, int init_count)
 
void rtos_semaphore_delete (rtos_semaphore semaphore)
 
int rtos_semaphore_wait (rtos_semaphore semaphore, int timeout)
 
int rtos_semaphore_signal (rtos_semaphore semaphore, bool isr)
 
int rtos_semaphore_get_count (rtos_semaphore semaphore)
 
int rtos_mutex_create (rtos_mutex *mutex)
 
void rtos_mutex_delete (rtos_mutex mutex)
 
int rtos_mutex_lock (rtos_mutex mutex, int timeout)
 
int rtos_mutex_unlock (rtos_mutex mutex)
 
int rtos_queue_create (int elt_size, int nb_elt, rtos_queue *queue)
 
void rtos_queue_delete (rtos_queue queue)
 
int rtos_queue_write (rtos_queue queue, void *msg, int timeout, bool isr)
 
int rtos_queue_read (rtos_queue queue, void *msg, int timeout, bool isr)
 
bool rtos_queue_is_empty (rtos_queue queue)
 
TimerHandle_t rtos_timer_create (const char *const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void *const pvTimerID, TimerCallbackFunction_t pxCallbackFunction)
 
int rtos_timer_delete (TimerHandle_t xTimer, TickType_t xTicksToWait)
 
int rtos_timer_start (TimerHandle_t xTimer, TickType_t xTicksToWait, bool isr)
 
int rtos_timer_restart (TimerHandle_t xTimer, TickType_t xTicksToWait, bool isr)
 
int rtos_timer_stop (TimerHandle_t xTimer, TickType_t xTicksToWait)
 
void * rtos_timer_get_pvTimerID (TimerHandle_t xTimer)
 

Macro Definition Documentation

◆ RTOS_TASK_FCT

#define RTOS_TASK_FCT (   __NAME)    void __NAME(void *param)

◆ RTOS_TASK_PRIORITY

#define RTOS_TASK_PRIORITY (   __PRIO)    (__PRIO)

◆ pdTRUE

#define pdTRUE   true

◆ pdFALSE

#define pdFALSE   false

Typedef Documentation

◆ TickType_t

◆ UBaseType_t

◆ TimerHandle_t

typedef struct rtos_timer_t* TimerHandle_t

◆ TimerCallbackFunction_t

typedef void(* TimerCallbackFunction_t) (TimerHandle_t xTimer)

◆ rtos_task_fct

typedef void(* rtos_task_fct) (void *)

◆ rtos_task_handle

typedef struct vsf_rtos_thread_t* rtos_task_handle

◆ rtos_prio

◆ rtos_semaphore

◆ rtos_mutex

◆ rtos_queue

typedef struct vsf_rtos_queue_t* rtos_queue

Enumeration Type Documentation

◆ rtos_task_id

Enumerator
IDLE_TASK 
TMR_DAEMON_TASK 
CONSOLE_TASK 
TEST_TASK 
BT_TASK 
INTERSYS_TASK 
ASIO_TASK 
AUDIO_TASK 
WIFI_TASK 
CONTROL_TASK 
SUPPLICANT_TASK 
IP_TASK 
APPLICATION_TASK 
TG_SEND_TASK 
PING_SEND_TASK 
IPERF_TASK 
SMARTCONF_TASK 
IPC_CNTRL_TASK 
TCPUDP_FIRST_TASK 
TCPUDP_LAST_TASK 
RTP_TASK 
USBH_TASK 
MDNS_TASK 
RTCP_TASK 
MAX_TASK 
UNDEF_TASK 

Function Documentation

◆ rtos_init()

int rtos_init ( void  )
extern

◆ rtos_malloc()

void * rtos_malloc ( uint32_t  size)
extern

◆ rtos_free()

void rtos_free ( void *  ptr)
extern

◆ rtos_now()

uint32_t rtos_now ( bool  isr)
extern

◆ rtos_task_create()

int rtos_task_create ( rtos_task_fct  func,
const char *const  name,
enum rtos_task_id  task_id,
const uint16_t  stack_depth,
void *const  params,
rtos_prio  prio,
rtos_task_handle *const  task_handle 
)
extern

◆ rtos_task_suspend()

void rtos_task_suspend ( int  duration)
extern

◆ rtos_protect()

uint32_t rtos_protect ( void  )
extern

◆ rtos_unprotect()

void rtos_unprotect ( uint32_t  protect)
extern

◆ rtos_semaphore_create()

int rtos_semaphore_create ( rtos_semaphore semaphore,
int  max_count,
int  init_count 
)
extern

◆ rtos_semaphore_delete()

void rtos_semaphore_delete ( rtos_semaphore  semaphore)
extern

◆ rtos_semaphore_wait()

int rtos_semaphore_wait ( rtos_semaphore  semaphore,
int  timeout 
)
extern

◆ rtos_semaphore_signal()

int rtos_semaphore_signal ( rtos_semaphore  semaphore,
bool  isr 
)
extern

◆ rtos_semaphore_get_count()

int rtos_semaphore_get_count ( rtos_semaphore  semaphore)
extern

◆ rtos_mutex_create()

int rtos_mutex_create ( rtos_mutex mutex)
extern

◆ rtos_mutex_delete()

void rtos_mutex_delete ( rtos_mutex  mutex)
extern

◆ rtos_mutex_lock()

int rtos_mutex_lock ( rtos_mutex  mutex,
int  timeout 
)
extern

◆ rtos_mutex_unlock()

int rtos_mutex_unlock ( rtos_mutex  mutex)
extern

◆ rtos_queue_create()

int rtos_queue_create ( int  elt_size,
int  nb_elt,
rtos_queue queue 
)
extern

◆ rtos_queue_delete()

void rtos_queue_delete ( rtos_queue  queue)
extern

◆ rtos_queue_write()

int rtos_queue_write ( rtos_queue  queue,
void *  msg,
int  timeout,
bool  isr 
)
extern

◆ rtos_queue_read()

int rtos_queue_read ( rtos_queue  queue,
void *  msg,
int  timeout,
bool  isr 
)
extern

◆ rtos_queue_is_empty()

bool rtos_queue_is_empty ( rtos_queue  queue)
extern

◆ rtos_timer_create()

TimerHandle_t rtos_timer_create ( const char *const  pcTimerName,
const TickType_t  xTimerPeriodInTicks,
const UBaseType_t  uxAutoReload,
void *const  pvTimerID,
TimerCallbackFunction_t  pxCallbackFunction 
)
extern

◆ rtos_timer_delete()

int rtos_timer_delete ( TimerHandle_t  xTimer,
TickType_t  xTicksToWait 
)
extern

◆ rtos_timer_start()

int rtos_timer_start ( TimerHandle_t  xTimer,
TickType_t  xTicksToWait,
bool  isr 
)
extern

◆ rtos_timer_restart()

int rtos_timer_restart ( TimerHandle_t  xTimer,
TickType_t  xTicksToWait,
bool  isr 
)
extern

◆ rtos_timer_stop()

int rtos_timer_stop ( TimerHandle_t  xTimer,
TickType_t  xTicksToWait 
)
extern

◆ rtos_timer_get_pvTimerID()

void * rtos_timer_get_pvTimerID ( TimerHandle_t  xTimer)
extern