diff --git a/osal/intime/osal_defs.h b/osal/intime/osal_defs.h index 1325963..34a9e87 100644 --- a/osal/intime/osal_defs.h +++ b/osal/intime/osal_defs.h @@ -11,6 +11,15 @@ extern "C" { #endif +// define if debug printf is needed +//#define EC_DEBUG + +#ifdef EC_DEBUG +#define EC_PRINT printf +#else +#define EC_PRINT(...) do {} while (0) +#endif + #ifndef PACKED #ifdef _MSC_VER #define PACKED_BEGIN __pragma(pack(push, 1)) diff --git a/osal/linux/osal_defs.h b/osal/linux/osal_defs.h index 7140754..6ec32ef 100644 --- a/osal/linux/osal_defs.h +++ b/osal/linux/osal_defs.h @@ -11,6 +11,15 @@ extern "C" { #endif +// define if debug printf is needed +//#define EC_DEBUG + +#ifdef EC_DEBUG +#define EC_PRINT printf +#else +#define EC_PRINT(...) do {} while (0) +#endif + #ifndef PACKED #define PACKED_BEGIN #define PACKED __attribute__((__packed__)) diff --git a/osal/rtems/osal_defs.h b/osal/rtems/osal_defs.h index 7140754..6ec32ef 100644 --- a/osal/rtems/osal_defs.h +++ b/osal/rtems/osal_defs.h @@ -11,6 +11,15 @@ extern "C" { #endif +// define if debug printf is needed +//#define EC_DEBUG + +#ifdef EC_DEBUG +#define EC_PRINT printf +#else +#define EC_PRINT(...) do {} while (0) +#endif + #ifndef PACKED #define PACKED_BEGIN #define PACKED __attribute__((__packed__)) diff --git a/osal/rtk/osal_defs.h b/osal/rtk/osal_defs.h index c848b42..162a42e 100644 --- a/osal/rtk/osal_defs.h +++ b/osal/rtk/osal_defs.h @@ -11,6 +11,15 @@ extern "C" { #endif +// define if debug printf is needed +//#define EC_DEBUG + +#ifdef EC_DEBUG +#define EC_PRINT printf +#else +#define EC_PRINT(...) do {} while (0) +#endif + #ifndef PACKED #define PACKED_BEGIN #define PACKED __attribute__((__packed__)) diff --git a/osal/vxworks/osal_defs.h b/osal/vxworks/osal_defs.h index 1a3310d..3aafb73 100644 --- a/osal/vxworks/osal_defs.h +++ b/osal/vxworks/osal_defs.h @@ -6,6 +6,15 @@ #ifndef _osal_defs_ #define _osal_defs_ +// define if debug printf is needed +//#define EC_DEBUG + +#ifdef EC_DEBUG +#define EC_PRINT printf +#else +#define EC_PRINT(...) do {} while (0) +#endif + #ifndef PACKED #define PACKED_BEGIN #define PACKED __attribute__((__packed__)) diff --git a/osal/win32/osal_defs.h b/osal/win32/osal_defs.h index d24c6a8..2587aa7 100644 --- a/osal/win32/osal_defs.h +++ b/osal/win32/osal_defs.h @@ -11,6 +11,15 @@ extern "C" { #endif +// define if debug printf is needed +//#define EC_DEBUG + +#ifdef EC_DEBUG +#define EC_PRINT printf +#else +#define EC_PRINT(...) do {} while (0) +#endif + #ifndef PACKED #define PACKED_BEGIN __pragma(pack(push, 1)) #define PACKED diff --git a/soem/ethercatconfig.c b/soem/ethercatconfig.c index 4bfc540..878e426 100644 --- a/soem/ethercatconfig.c +++ b/soem/ethercatconfig.c @@ -22,14 +22,6 @@ #include "ethercatsoe.h" #include "ethercatconfig.h" -// define if debug printf is needed -//#define EC_DEBUG - -#ifdef EC_DEBUG -#define EC_PRINT printf -#else -#define EC_PRINT(...) do {} while (0) -#endif typedef struct {