|
STM32 Sequencer
v1.6.0
|
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... | |
| #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.
| #define UTIL_SEQ_TaskParamDef | ( | _FUNC_, | |
| _PARAM_VAL_ | |||
| ) |
This macro can be used to define a task with one parameter.
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.