diff --git a/soem/ethercattype.h b/soem/ethercattype.h index 86df704..ba5b774 100644 --- a/soem/ethercattype.h +++ b/soem/ethercattype.h @@ -23,12 +23,15 @@ extern "C" { #endif -/** define EC_VER1 if version 1 default context and functions are needed - * comment if application uses only ecx_ functions and own context */ -#define EC_VER1 - #include "osal.h" +/** define EC_VER1 if version 1 default context and functions are needed + * define EC_VER2 if application uses only ecx_ functions and own context */ +#if !defined(EC_VER1) && !defined(EC_VER2) +# define EC_VER1 +#endif + + /** Define little endian target by default if no endian is set */ #if !defined(EC_LITTLE_ENDIAN) && !defined(EC_BIG_ENDIAN) # define EC_LITTLE_ENDIAN