From 7b1ea32343c18d35778f65e2cfc4718e0dd72744 Mon Sep 17 00:00:00 2001 From: Andreas Karlsson Date: Fri, 24 May 2019 14:02:46 +0200 Subject: [PATCH] Make it possible to set EC_VER from osal layer --- soem/ethercattype.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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