Add possibiliy to set endian target by hardware layer

Now it is possible to set a EC_LITTLE_ENDIAN or EC_BIG_ENDIAN in the
osal_defs.h file or by compile option. If no endian is defined, the default
EC_LITTLE_ENDIAN is used.
This commit is contained in:
Schlumpf 2019-05-08 08:52:54 +02:00 committed by nakarlsson
parent 537145f6bf
commit 787cf82d7d
1 changed files with 5 additions and 3 deletions

View File

@ -23,15 +23,17 @@ extern "C"
{ {
#endif #endif
/** Define Little or Big endian target */
#define EC_LITTLE_ENDIAN
/** define EC_VER1 if version 1 default context and functions are needed /** define EC_VER1 if version 1 default context and functions are needed
* comment if application uses only ecx_ functions and own context */ * comment if application uses only ecx_ functions and own context */
#define EC_VER1 #define EC_VER1
#include "osal.h" #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 */ /** return value general error */
#define EC_ERROR -3 #define EC_ERROR -3
/** return value no frame returned */ /** return value no frame returned */