Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds generation of a C macro, which is able to initialize a CO_config_t structure.
So you can write:
CO_config_t myConfig;
xxx_OD_INIT_CONFIG(myConfig)
Below are a small sample of the macro in our project:
#define CO_PowerBoard_OD_INIT_CONFIG(config) {\ (config).CNT_NMT=1;\ (config).ENTRY_H1017=CO_PowerBoard_OD_ENTRY_H1017_producerHeartbeatTime;\ (config).CNT_HB_CONS=16;\ (config).ENTRY_H1016=CO_PowerBoard_OD_ENTRY_H1016_consumerHeartbeatTime;\ (config).CNT_EM=1;\ (config).ENTRY_H1001=CO_PowerBoard_OD_ENTRY_H1001_errorRegister;\ (config).ENTRY_H1014=CO_PowerBoard_OD_ENTRY_H1014_emcyCOBID;\ (config).ENTRY_H1015=CO_PowerBoard_OD_ENTRY_H1015_inhibitTimeEMCY;\ (config).ENTRY_H1003=CO_PowerBoard_OD_ENTRY_H1003_pre_definedErrorField;\ (config).CNT_SDO_SRV=1;\ (config).ENTRY_H1200=CO_PowerBoard_OD_ENTRY_H1200_serverSDO_Parameter;\ (config).CNT_SDO_CLI=6;\ (config).ENTRY_H1280=CO_PowerBoard_OD_ENTRY_H1280_clientSDO_1_Parameter;\ (config).CNT_TIME=0;\ (config).ENTRY_H1012=NULL;\ (config).CNT_SYNC=1;\