Choco OS  V.0.16.9.0
Join to the chocolate world
oc_dynamic_config.c
Go to the documentation of this file.
1 
27 #include <oc_dynamic_config.h>
28 
34 #define _________________________________________VARIABLES_SECTION__________________________________________________________________________
35 
36 //==========================================================================================================================================
37 /* Creating variables to store values of configurations */
38 //==========================================================================================================================================
39 #define ADD( MODULE_NAME, TYPE , VARIABLE_NAME, DEFAULT_VALUE, FRIENDLY_NAME, BRIEF ) \
40  TYPE DYNAMIC_CONFIG_MAKE_VARIABLE_NAME(MODULE_NAME, VARIABLE_NAME) = DEFAULT_VALUE;
41 #define DONT_ADD(...)
42 
43 oC_CONFIGURATIONS_LIST(ADD,DONT_ADD);
44 
45 #undef ADD
46 #undef DONT_ADD
47 
48 //==========================================================================================================================================
49 /* Creating array with details of configuration variables */
50 //==========================================================================================================================================
51 #define ADD( MODULE_NAME, TYPE , VARIABLE_NAME, DEFAULT_VALUE, FRIENDLY_NAME, BRIEF ) \
52  {\
53  .Module = oC_DynamicConfig_Module_(MODULE_NAME) , \
54  .TypeName = #TYPE , \
55  .TypeSize = sizeof(TYPE), \
56  .ValueReference = &DYNAMIC_CONFIG_MAKE_VARIABLE_NAME(MODULE_NAME, VARIABLE_NAME), \
57  .VariableName = #VARIABLE_NAME, \
58  .FriendlyName = FRIENDLY_NAME, \
59  .Brief = BRIEF, \
60  } ,
61 
62 #define DONT_ADD(...)
63 
64 //==========================================================================================================================================
68 //==========================================================================================================================================
69 oC_DynamicConfig_VariableDetails_t oC_DynamicConfig_VariablesDetails[oC_DynamicConfig_VariableId_NumberOfElements] = {
70  oC_CONFIGURATIONS_LIST(ADD,DONT_ADD)
71 };
72 
73 #undef ADD
74 #undef DONT_ADD
75 
76 #undef _________________________________________VARIABLES_SECTION__________________________________________________________________________
77 
stores configuration data
#define oC_CONFIGURATIONS_LIST(ADD, DONT_ADD)
oC_DynamicConfig_VariableDetails_t oC_DynamicConfig_VariablesDetails[oC_DynamicConfig_VariableId_NumberOfElements]
array with definitions of variables details
Handles configuration of the Dynamic.