STM32 Sequencer v1.6.0

Macros
SEQUENCER exported macros
sequencer utilities

## Macros
#define | UTIL_SEQ_TaskParamDef(_FUNC_, _PARAM_VAL_)
| This macro can be used to define a task with one parameter. More...
#define | UTIL_SEQ_TaskFunction(_FUNC_, _PARAM_VAL_) SEQ_FUNC_##_FUNC_##_PARAM_VAL_
| This macro is used to retrieve the function name of the task. More...

## Detailed Description

## Macro Definition Documentation

## ◆ UTIL_SEQ_TaskFunction

#define UTIL_SEQ_TaskFunction | ( |  | _FUNC_,
|  |  | _PARAM_VAL_
| ) |  | SEQ_FUNC_##_FUNC_##_PARAM_VAL_

This macro is used to retrieve the function name of the task.

Definition at line 124 of file stm32_seq.h.

## ◆ UTIL_SEQ_TaskParamDef

#define UTIL_SEQ_TaskParamDef | ( |  | _FUNC_,
|  |  | _PARAM_VAL_
| ) |  |

Value:
static void SEQ_FUNC_##_FUNC_##_PARAM_VAL_(void); \
static void SEQ_FUNC_##_FUNC_##_PARAM_VAL_(void) \
{ \
static void *SEQ_PARAM_##_FUNC_ = (void*)&_PARAM_VAL_;\
_FUNC_(SEQ_PARAM_##_FUNC_); \
}

This macro can be used to define a task with one parameter.

Note
  this is an example of using this macro

          task prototype definition
          void FUNCTION_NAME(void *Instance)
          {
              uint8_t _instance = *(uint8_t*) Instance;
          }

          task declaration in the application for two instances
          const uint8_t instance1 = 1;
          const uint8_t instance2 = 2;
          UTIL_SEQ_TaskParamDef(FUNCTION_NAME, instance1)
          UTIL_SEQ_TaskParamDef(FUNCTION_NAME, instance2)

          task initialization
          UTIL_SEQ_RegTask(1 << 1,  0, UTIL_SEQ_TaskFunction(FUNCTION_NAME,instance2));
          UTIL_SEQ_RegTask(1 << 10, 0, UTIL_SEQ_TaskFunction(FUNCTION_NAME,instance3));

          Then no change on the management of the task within the application, the instance being managed within the overloaded function

Definition at line 113 of file stm32_seq.h.