diff --git a/soem/ethercattype.h b/soem/ethercattype.h index 1881df3..86df704 100644 --- a/soem/ethercattype.h +++ b/soem/ethercattype.h @@ -23,15 +23,17 @@ extern "C" { #endif -/** Define Little or Big endian target */ -#define EC_LITTLE_ENDIAN - /** 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 little endian target by default if no endian is set */ +#if !defined(EC_LITTLE_ENDIAN) && !defined(EC_BIG_ENDIAN) +# define EC_LITTLE_ENDIAN +#endif + /** return value general error */ #define EC_ERROR -3 /** return value no frame returned */