Data Structures
BCDS_HAL_Signal.h File Reference

This is API to support signaling between concurrent execution contexts, i.e. tasks and ISRs. More...

#include "BCDS_Basics.h"
#include "BCDS_Assert.h"
+ Include dependency graph for BCDS_HAL_Signal.h:

Data Structures

struct  _HAL_SignalHandle_S
 
#define HAL_SIGNAL_HANDLE_INIT   {HAL_SIGNAL_NOTINIT, NULL}
 
enum  HAL_Signal_Basic_Instance_E
 
typedef struct _HAL_SignalHandle_S HAL_SignalHandle_T
 
typedef Retcode_T(* HAL_Signal_WaitHook_T )(HAL_SignalHandle_T *handle, uint32_t timeoutInMs)
 
typedef Retcode_T(* HAL_Signal_NotifyHook_T )(HAL_SignalHandle_T *handle)
 
Retcode_T HAL_Signal_SetHooks (HAL_Signal_WaitHook_T waitHook, HAL_Signal_NotifyHook_T notifyHook)
 a function to set RTOS hooks More...
 
Retcode_T HAL_Signal_Wait (HAL_SignalHandle_T *handle, uint32_t timeoutInMs)
 Wait for the signal in handle Context. More...
 
Retcode_T HAL_Signal_Notify (HAL_SignalHandle_T *handle)
 Send a signal to handle context. More...
 

Detailed Description

HAL provides a basic implementation of the signaling between concurrent execution contexts which is based on a conditional variable and a waiting loop.

If an RTOS is used, then hooks should be set to provide a proper signaling functions based on RTOS mechanisms such as semaphores.

Macro Definition Documentation

#define HAL_SIGNAL_HANDLE_INIT   {HAL_SIGNAL_NOTINIT, NULL}

A macro for the initialization of singal handles.

Typedef Documentation

typedef Retcode_T(* HAL_Signal_NotifyHook_T)(HAL_SignalHandle_T *handle)

Function data type for to handle different os Functions by setting a new Function

typedef Retcode_T(* HAL_Signal_WaitHook_T)(HAL_SignalHandle_T *handle, uint32_t timeoutInMs)

Enumeration Type Documentation

Enumerator
HAL_SIGNAL_NOTINIT 
HAL_SIGNAL_FULL 
HAL_SIGNAL_EMPTY 

Function Documentation

Retcode_T HAL_Signal_Notify ( HAL_SignalHandle_T handle)
Parameters
[in]handle: Handle to a Signal context
Return values
RETCODE_OKwhen successful
RETCODE_NULL_POINTERwhen HAL_Signal_SetHooks() is not initialized.
Retcode_T HAL_Signal_SetHooks ( HAL_Signal_WaitHook_T  waitHook,
HAL_Signal_NotifyHook_T  notifyHook 
)

If an RTOS is used, then hooks should be set to provide a proper signaling functions based on RTOS mechanisms such as semaphores.

Parameters
[in]waitHookthe hook for the wait function
[in]notifyHookthe hook for the notify function
Return values
RETCODE_OKwhen successful
RETCODE_NULL_POINTERwhen any one of the param has been NULL
Note
a new wait Function Hook must implement a initialization or the used resource at first call
Retcode_T HAL_Signal_Wait ( HAL_SignalHandle_T handle,
uint32_t  timeoutInMs 
)

The call blocks until the signal is reached or the timeout is expired.

Parameters
[in]handle: Handle to a signal context
[in]timeoutInMs: timeout in milliseconds, 0 -> No Timeout/wait for ever , Value > 0 timeout in ms
Return values
RETCODE_OKwhen successful
RETCODE_NULL_POINTERwhen HAL_Signal_SetHooks() is not initialized.
Note
The Usage of wait in ISR Context is not Supported !

This documentation file has been automatically generated on Wed May 6 2020 20:45:15 by doxygen 1.8.8