Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e9f6bc6 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Staging: epl: remove MEM



It's not used and is not needed.

Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>
Cc: Ronald Sieber <Ronald.Sieber@systec-electronic.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5318487c
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -634,13 +634,13 @@
extern "C" {
extern "C" {
#endif
#endif


	void DumpData(char *szStr_p, BYTE MEM * pbData_p, WORD wSize_p);
	void DumpData(char *szStr_p, BYTE *pbData_p, WORD wSize_p);


#ifdef __cplusplus
#ifdef __cplusplus
}				// von extern "C"
}				// von extern "C"
#endif
#endif
#define DEBUG_DUMP_DATA(lvl,str,ptr,siz)    if ((DEBUG_GLB_LVL() & (lvl))==(lvl)) \
#define DEBUG_DUMP_DATA(lvl,str,ptr,siz)    if ((DEBUG_GLB_LVL() & (lvl))==(lvl)) \
                                                    DumpData (str, (BYTE MEM*) (ptr), (WORD) (siz));
                                                    DumpData (str, (BYTE *)(ptr), (WORD)(siz));
#else
#else


#define DEBUG_DUMP_DATA(lvl,str,ptr,siz)
#define DEBUG_DUMP_DATA(lvl,str,ptr,siz)
+1 −1
Original line number Original line Diff line number Diff line
@@ -244,7 +244,7 @@ tEplKernel EplApiWriteLocalObject(unsigned int uiIndex_p,
				  void *pSrcData_p,
				  void *pSrcData_p,
				  unsigned int uiSize_p);
				  unsigned int uiSize_p);


tEplKernel EplApiCbObdAccess(tEplObdCbParam MEM *pParam_p);
tEplKernel EplApiCbObdAccess(tEplObdCbParam *pParam_p);


tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p,
tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p,
			    void *pVar_p,
			    void *pVar_p,
+4 −4
Original line number Original line Diff line number Diff line
@@ -196,7 +196,7 @@ static tEplKernel EplApiCbLedStateChange(tEplLedType LedType_p, BOOL fOn_p);
#endif
#endif


// OD initialization function (implemented in Objdict.c)
// OD initialization function (implemented in Objdict.c)
tEplKernel EplObdInitRam(tEplObdInitParam MEM *pInitParam_p);
tEplKernel EplObdInitRam(tEplObdInitParam *pInitParam_p);


//=========================================================================//
//=========================================================================//
//                                                                         //
//                                                                         //
@@ -558,7 +558,7 @@ tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p,
{
{
	BYTE bVarEntries;
	BYTE bVarEntries;
	BYTE bIndexEntries;
	BYTE bIndexEntries;
	BYTE MEM *pbData;
	BYTE *pbData;
	unsigned int uiSubindex;
	unsigned int uiSubindex;
	tEplVarParam VarParam;
	tEplVarParam VarParam;
	tEplObdSize EntrySize;
	tEplObdSize EntrySize;
@@ -574,7 +574,7 @@ tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p,
		goto Exit;
		goto Exit;
	}
	}


	pbData = (BYTE MEM *) pVar_p;
	pbData = (BYTE *)pVar_p;
	bVarEntries = (BYTE) * puiVarEntries_p;
	bVarEntries = (BYTE) * puiVarEntries_p;
	UsedSize = 0;
	UsedSize = 0;


@@ -962,7 +962,7 @@ tEplKernel EplApiMnTriggerStateChange(unsigned int uiNodeId_p,
//
//
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------


tEplKernel EplApiCbObdAccess(tEplObdCbParam MEM *pParam_p)
tEplKernel EplApiCbObdAccess(tEplObdCbParam *pParam_p)
{
{
	tEplKernel Ret = kEplSuccessful;
	tEplKernel Ret = kEplSuccessful;


+16 −18
Original line number Original line Diff line number Diff line
@@ -83,7 +83,7 @@ typedef enum {


//------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------


typedef void MEM *tEplPtrInstance;
typedef void *tEplPtrInstance;
typedef BYTE tEplInstanceHdl;
typedef BYTE tEplInstanceHdl;


// define const for illegale values
// define const for illegale values
@@ -99,7 +99,6 @@ typedef BYTE tEplInstanceHdl;
    //--------------------------------------------------------------------------------------
    //--------------------------------------------------------------------------------------


    // memory attributes for instance table
    // memory attributes for instance table
#define INST_FAR		// variables wich have to located in xdata
#define STATIC			// prevent warnings for variables with same name
#define STATIC			// prevent warnings for variables with same name


#define INSTANCE_TYPE_BEGIN     typedef struct {
#define INSTANCE_TYPE_BEGIN     typedef struct {
@@ -116,12 +115,12 @@ typedef BYTE tEplInstanceHdl;
#define CCM_DECL_INSTANCE_HDL_                  tEplInstanceHdl InstanceHandle,
#define CCM_DECL_INSTANCE_HDL_                  tEplInstanceHdl InstanceHandle,


    // macros for declaration of pointer to instance handle within function header or prototype of API functions
    // macros for declaration of pointer to instance handle within function header or prototype of API functions
#define CCM_DECL_PTR_INSTANCE_HDL               tEplInstanceHdl MEM* pInstanceHandle
#define CCM_DECL_PTR_INSTANCE_HDL               tEplInstanceHdl *pInstanceHandle
#define CCM_DECL_PTR_INSTANCE_HDL_              tEplInstanceHdl MEM* pInstanceHandle,
#define CCM_DECL_PTR_INSTANCE_HDL_              tEplInstanceHdl *pInstanceHandle,


    // macros for declaration instance as lokacl variable within functions
    // macros for declaration instance as lokacl variable within functions
#define CCM_DECL_INSTANCE_PTR_LOCAL             tCcmInstanceInfo MEM* pInstance;
#define CCM_DECL_INSTANCE_PTR_LOCAL             tCcmInstanceInfo *pInstance;
#define CCM_DECL_PTR_INSTANCE_HDL_LOCAL         tEplInstanceHdl  MEM* pInstanceHandle;
#define CCM_DECL_PTR_INSTANCE_HDL_LOCAL         tEplInstanceHdl  *pInstanceHandle;


    // reference:
    // reference:


@@ -162,10 +161,10 @@ typedef BYTE tEplInstanceHdl;
    //--------------------------------------------------------------------------------------
    //--------------------------------------------------------------------------------------


    // macros for declaration within the function header, prototype or local var list
    // macros for declaration within the function header, prototype or local var list
    // Declaration of pointers within function paramater list must defined as void MEM*
    // Declaration of pointers within function paramater list must defined as void *
    // pointer.
    // pointer.
#define EPL_MCO_DECL_INSTANCE_PTR                   void MEM* pInstance
#define EPL_MCO_DECL_INSTANCE_PTR                   void *pInstance
#define EPL_MCO_DECL_INSTANCE_PTR_                  void MEM* pInstance,
#define EPL_MCO_DECL_INSTANCE_PTR_                  void *pInstance,
#define EPL_MCO_DECL_INSTANCE_PTR_LOCAL             tEplPtrInstance  pInstance;
#define EPL_MCO_DECL_INSTANCE_PTR_LOCAL             tEplPtrInstance  pInstance;


    // macros for reference of pointer to instance
    // macros for reference of pointer to instance
@@ -190,8 +189,8 @@ typedef BYTE tEplInstanceHdl;
                                                    ASSERT (((tEplPtrInstance)pInstance)->m_InstState == kStateUsed);
                                                    ASSERT (((tEplPtrInstance)pInstance)->m_InstState == kStateUsed);


    // macros for declaration of pointer to instance pointer
    // macros for declaration of pointer to instance pointer
#define EPL_MCO_DECL_PTR_INSTANCE_PTR               void MEM*  MEM* pInstancePtr
#define EPL_MCO_DECL_PTR_INSTANCE_PTR               void **pInstancePtr
#define EPL_MCO_DECL_PTR_INSTANCE_PTR_              void MEM*  MEM* pInstancePtr,
#define EPL_MCO_DECL_PTR_INSTANCE_PTR_              void **pInstancePtr,


    // macros for reference of pointer to instance pointer
    // macros for reference of pointer to instance pointer
    // These macros are used for parameter passing to called function.
    // These macros are used for parameter passing to called function.
@@ -211,7 +210,7 @@ typedef BYTE tEplInstanceHdl;
    // this macro deletes all instance entries as unused
    // this macro deletes all instance entries as unused
#define EPL_MCO_DELETE_INSTANCE_TABLE()                                    \
#define EPL_MCO_DELETE_INSTANCE_TABLE()                                    \
    {                                                                      \
    {                                                                      \
        tEplInstanceInfo MEM*   pInstance       = &aEplInstanceTable_g[0]; \
        tEplInstanceInfo *   pInstance       = &aEplInstanceTable_g[0];    \
        tFastByte            InstNumber      = 0;                          \
        tFastByte            InstNumber      = 0;                          \
        tFastByte            i               = EPL_MAX_INSTANCES;          \
        tFastByte            i               = EPL_MAX_INSTANCES;          \
        do {                                                               \
        do {                                                               \
@@ -229,7 +228,7 @@ typedef BYTE tEplInstanceHdl;
        static tEplPtrInstance GetInstancePtr (tEplInstanceHdl InstHandle_p) { \
        static tEplPtrInstance GetInstancePtr (tEplInstanceHdl InstHandle_p) { \
            return &aEplInstanceTable_g[InstHandle_p]; }                       \
            return &aEplInstanceTable_g[InstHandle_p]; }                       \
        static tEplPtrInstance GetFreeInstance (void) {                        \
        static tEplPtrInstance GetFreeInstance (void) {                        \
            tEplInstanceInfo MEM*   pInstance   = &aEplInstanceTable_g[0];     \
            tEplInstanceInfo *pInstance   = &aEplInstanceTable_g[0];           \
            tFastByte         i           = EPL_MAX_INSTANCES;                 \
            tFastByte         i           = EPL_MAX_INSTANCES;                 \
            do { if (pInstance->m_InstState != kStateUsed) {                   \
            do { if (pInstance->m_InstState != kStateUsed) {                   \
                    return (tEplPtrInstance) pInstance; }                      \
                    return (tEplPtrInstance) pInstance; }                      \
@@ -239,7 +238,7 @@ typedef BYTE tEplInstanceHdl;


    // this macro defines the instance table. Each entry is reserved for an instance of CANopen.
    // this macro defines the instance table. Each entry is reserved for an instance of CANopen.
#define EPL_MCO_DECL_INSTANCE_VAR() \
#define EPL_MCO_DECL_INSTANCE_VAR() \
        static tEplInstanceInfo MEM aEplInstanceTable_g [EPL_MAX_INSTANCES];
        static tEplInstanceInfo aEplInstanceTable_g [EPL_MAX_INSTANCES];


    // this macro defines member variables in instance table which are needed in
    // this macro defines member variables in instance table which are needed in
    // all modules of Epl stack
    // all modules of Epl stack
@@ -253,7 +252,6 @@ typedef BYTE tEplInstanceHdl;
#else // only one instance is used
#else // only one instance is used


    // Memory attributes for instance table.
    // Memory attributes for instance table.
#define INST_FAR    MEM		// variables wich have to located in xdata
#define STATIC      static	// prevent warnings for variables with same name
#define STATIC      static	// prevent warnings for variables with same name


#define INSTANCE_TYPE_BEGIN
#define INSTANCE_TYPE_BEGIN
+7 −7
Original line number Original line Diff line number Diff line
@@ -107,12 +107,12 @@ void TgtDbgPostTraceValue(DWORD dwTraceValue_p);
// struct for instance table
// struct for instance table
INSTANCE_TYPE_BEGIN EPL_MCO_DECL_INSTANCE_MEMBER()
INSTANCE_TYPE_BEGIN EPL_MCO_DECL_INSTANCE_MEMBER()


STATIC volatile tEplNmtState INST_FAR m_NmtState;
STATIC volatile tEplNmtState m_NmtState;
STATIC volatile BOOL INST_FAR m_fEnableReadyToOperate;
STATIC volatile BOOL m_fEnableReadyToOperate;
STATIC volatile BOOL INST_FAR m_fAppReadyToOperate;
STATIC volatile BOOL m_fAppReadyToOperate;
STATIC volatile BOOL INST_FAR m_fTimerMsPreOp2;
STATIC volatile BOOL m_fTimerMsPreOp2;
STATIC volatile BOOL INST_FAR m_fAllMandatoryCNIdent;
STATIC volatile BOOL m_fAllMandatoryCNIdent;
STATIC volatile BOOL INST_FAR m_fFrozen;
STATIC volatile BOOL m_fFrozen;


INSTANCE_TYPE_END
INSTANCE_TYPE_END
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
@@ -121,7 +121,7 @@ INSTANCE_TYPE_END
// This macro replace the unspecific pointer to an instance through
// This macro replace the unspecific pointer to an instance through
// the modul specific type for the local instance table. This macro
// the modul specific type for the local instance table. This macro
// must defined in each modul.
// must defined in each modul.
//#define tEplPtrInstance             tEplInstanceInfo MEM*
//#define tEplPtrInstance             tEplInstanceInfo*
EPL_MCO_DECL_INSTANCE_VAR()
EPL_MCO_DECL_INSTANCE_VAR()
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// local function prototypes
// local function prototypes
Loading