Commit 2ed53cf8 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: epl: remove BYTE

It's u8 in kernelspace, not BYTE.

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 48c13450
...@@ -634,13 +634,13 @@ ...@@ -634,13 +634,13 @@
extern "C" { extern "C" {
#endif #endif
void DumpData(char *szStr_p, BYTE *pbData_p, WORD wSize_p); void DumpData(char *szStr_p, u8 *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 *)(ptr), (WORD)(siz)); DumpData (str, (u8 *)(ptr), (WORD)(siz));
#else #else
#define DEBUG_DUMP_DATA(lvl,str,ptr,siz) #define DEBUG_DUMP_DATA(lvl,str,ptr,siz)
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
// TracePoint support for realtime-debugging // TracePoint support for realtime-debugging
#ifdef _DBG_TRACE_POINTS_ #ifdef _DBG_TRACE_POINTS_
void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p); void TgtDbgSignalTracePoint(u8 bTracePointNumber_p);
void TgtDbgPostTraceValue(DWORD dwTraceValue_p); void TgtDbgPostTraceValue(DWORD dwTraceValue_p);
#define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p) #define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p)
#define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v) #define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v)
...@@ -282,9 +282,9 @@ typedef struct ...@@ -282,9 +282,9 @@ typedef struct
typedef struct { typedef struct {
struct pci_dev *m_pPciDev; // pointer to PCI device structure struct pci_dev *m_pPciDev; // pointer to PCI device structure
void *m_pIoAddr; // pointer to register space of Ethernet controller void *m_pIoAddr; // pointer to register space of Ethernet controller
BYTE *m_pbRxBuf; // pointer to Rx buffer u8 *m_pbRxBuf; // pointer to Rx buffer
dma_addr_t m_pRxBufDma; dma_addr_t m_pRxBufDma;
BYTE *m_pbTxBuf; // pointer to Tx buffer u8 *m_pbTxBuf; // pointer to Tx buffer
dma_addr_t m_pTxBufDma; dma_addr_t m_pTxBufDma;
BOOL m_afTxBufUsed[EDRV_MAX_TX_BUFFERS]; BOOL m_afTxBufUsed[EDRV_MAX_TX_BUFFERS];
unsigned int m_uiCurTxDesc; unsigned int m_uiCurTxDesc;
...@@ -359,7 +359,7 @@ static struct pci_driver EdrvDriver = { ...@@ -359,7 +359,7 @@ static struct pci_driver EdrvDriver = {
// local function prototypes // local function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static BYTE EdrvCalcHash(BYTE * pbMAC_p); static u8 EdrvCalcHash(u8 * pbMAC_p);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
...@@ -453,11 +453,11 @@ tEplKernel EdrvShutdown(void) ...@@ -453,11 +453,11 @@ tEplKernel EdrvShutdown(void)
// State: // State:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
tEplKernel EdrvDefineRxMacAddrEntry(BYTE * pbMacAddr_p) tEplKernel EdrvDefineRxMacAddrEntry(u8 * pbMacAddr_p)
{ {
tEplKernel Ret = kEplSuccessful; tEplKernel Ret = kEplSuccessful;
DWORD dwData; DWORD dwData;
BYTE bHash; u8 bHash;
bHash = EdrvCalcHash(pbMacAddr_p); bHash = EdrvCalcHash(pbMacAddr_p);
/* /*
...@@ -494,11 +494,11 @@ tEplKernel EdrvDefineRxMacAddrEntry(BYTE * pbMacAddr_p) ...@@ -494,11 +494,11 @@ tEplKernel EdrvDefineRxMacAddrEntry(BYTE * pbMacAddr_p)
// State: // State:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
tEplKernel EdrvUndefineRxMacAddrEntry(BYTE * pbMacAddr_p) tEplKernel EdrvUndefineRxMacAddrEntry(u8 * pbMacAddr_p)
{ {
tEplKernel Ret = kEplSuccessful; tEplKernel Ret = kEplSuccessful;
DWORD dwData; DWORD dwData;
BYTE bHash; u8 bHash;
bHash = EdrvCalcHash(pbMacAddr_p); bHash = EdrvCalcHash(pbMacAddr_p);
...@@ -720,7 +720,7 @@ tEplKernel EdrvTxMsgStart(tEdrvTxBuffer * pBuffer_p) ...@@ -720,7 +720,7 @@ tEplKernel EdrvTxMsgStart(tEdrvTxBuffer * pBuffer_p)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static void EdrvReinitRx(void) static void EdrvReinitRx(void)
{ {
BYTE bCmd; u8 bCmd;
// simply switch off and on the receiver // simply switch off and on the receiver
// this will reset the CAPR register // this will reset the CAPR register
...@@ -765,7 +765,7 @@ static int TgtEthIsr(int nIrqNum_p, void *ppDevInstData_p, ...@@ -765,7 +765,7 @@ static int TgtEthIsr(int nIrqNum_p, void *ppDevInstData_p,
DWORD dwTxStatus; DWORD dwTxStatus;
DWORD dwRxStatus; DWORD dwRxStatus;
WORD wCurRx; WORD wCurRx;
BYTE *pbRxBuf; u8 *pbRxBuf;
unsigned int uiLength; unsigned int uiLength;
int iHandled = IRQ_HANDLED; int iHandled = IRQ_HANDLED;
...@@ -1215,15 +1215,15 @@ static void EdrvRemoveOne(struct pci_dev *pPciDev) ...@@ -1215,15 +1215,15 @@ static void EdrvRemoveOne(struct pci_dev *pPciDev)
//#define CRC32_POLY 0xEDB88320 // //#define CRC32_POLY 0xEDB88320 //
// G(x) = x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1 // G(x) = x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1
static BYTE EdrvCalcHash(BYTE * pbMAC_p) static u8 EdrvCalcHash(u8 * pbMAC_p)
{ {
DWORD dwByteCounter; DWORD dwByteCounter;
DWORD dwBitCounter; DWORD dwBitCounter;
DWORD dwData; DWORD dwData;
DWORD dwCrc; DWORD dwCrc;
DWORD dwCarry; DWORD dwCarry;
BYTE *pbData; u8 *pbData;
BYTE bHash; u8 bHash;
pbData = pbMAC_p; pbData = pbMAC_p;
...@@ -1246,7 +1246,7 @@ static BYTE EdrvCalcHash(BYTE * pbMAC_p) ...@@ -1246,7 +1246,7 @@ static BYTE EdrvCalcHash(BYTE * pbMAC_p)
// printk("MyCRC = 0x%08lX\n", dwCrc); // printk("MyCRC = 0x%08lX\n", dwCrc);
// only upper 6 bits (HASH_BITS) are used // only upper 6 bits (HASH_BITS) are used
// which point to specific bit in the hash registers // which point to specific bit in the hash registers
bHash = (BYTE) ((dwCrc >> (32 - HASH_BITS)) & 0x3f); bHash = (u8) ((dwCrc >> (32 - HASH_BITS)) & 0x3f);
return bHash; return bHash;
} }
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
typedef struct { typedef struct {
WORD m_wStatus; // control / status --- used by edrv, do not change in application WORD m_wStatus; // control / status --- used by edrv, do not change in application
WORD m_wLength; // transfer length WORD m_wLength; // transfer length
BYTE *m_pbData; // buffer address u8 *m_pbData; // buffer address
} tBufferDescr; } tBufferDescr;
#if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282) #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282)
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void EdrvRxInterruptHandler(BYTE bBufferInFrame_p, BYTE * pbEthernetData_p, void EdrvRxInterruptHandler(u8 bBufferInFrame_p, u8 * pbEthernetData_p,
WORD wDataLen_p); WORD wDataLen_p);
#endif // #ifndef _EDRVSIM_H_ #endif // #ifndef _EDRVSIM_H_
...@@ -139,7 +139,7 @@ typedef struct { ...@@ -139,7 +139,7 @@ typedef struct {
unsigned int m_uiSizeOfStruct; unsigned int m_uiSizeOfStruct;
BOOL m_fAsyncOnly; // do not need to register PRes BOOL m_fAsyncOnly; // do not need to register PRes
unsigned int m_uiNodeId; // local node ID unsigned int m_uiNodeId; // local node ID
BYTE m_abMacAddress[6]; // local MAC address u8 m_abMacAddress[6]; // local MAC address
// 0x1F82: NMT_FeatureFlags_U32 // 0x1F82: NMT_FeatureFlags_U32
DWORD m_dwFeatureFlags; DWORD m_dwFeatureFlags;
...@@ -189,8 +189,8 @@ typedef struct { ...@@ -189,8 +189,8 @@ typedef struct {
DWORD m_dwIpAddress; DWORD m_dwIpAddress;
DWORD m_dwSubnetMask; DWORD m_dwSubnetMask;
DWORD m_dwDefaultGateway; DWORD m_dwDefaultGateway;
BYTE m_sHostname[32]; u8 m_sHostname[32];
BYTE m_abVendorSpecificExt2[48]; u8 m_abVendorSpecificExt2[48];
char *m_pszDevName; // NMT_ManufactDevName_VS (0x1008/0 local OD) char *m_pszDevName; // NMT_ManufactDevName_VS (0x1008/0 local OD)
char *m_pszHwVersion; // NMT_ManufactHwVers_VS (0x1009/0 local OD) char *m_pszHwVersion; // NMT_ManufactHwVers_VS (0x1009/0 local OD)
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
16.09.2002 -as 16.09.2002 -as
To save code space the functions AmiSetByte and AmiGetByte To save code space the functions AmiSetByte and AmiGetByte
are replaced by macros. For targets which assign BYTE by are replaced by macros. For targets which assign u8 by
an 16Bit type, the definition of macros must changed to an 16Bit type, the definition of macros must changed to
functions. functions.
...@@ -105,10 +105,10 @@ extern "C" { ...@@ -105,10 +105,10 @@ extern "C" {
// //
// To save code space the function AmiSetByte is replaced by // To save code space the function AmiSetByte is replaced by
// an macro. // an macro.
// void AmiSetByte (void * pAddr_p, BYTE bByteVal_p); // void AmiSetByte (void * pAddr_p, u8 bByteVal_p);
#define AmiSetByteToBe(pAddr_p, bByteVal_p) {*(BYTE *)(pAddr_p) = (bByteVal_p);} #define AmiSetByteToBe(pAddr_p, bByteVal_p) {*(u8 *)(pAddr_p) = (bByteVal_p);}
#define AmiSetByteToLe(pAddr_p, bByteVal_p) {*(BYTE *)(pAddr_p) = (bByteVal_p);} #define AmiSetByteToLe(pAddr_p, bByteVal_p) {*(u8 *)(pAddr_p) = (bByteVal_p);}
void AmiSetWordToBe(void *pAddr_p, WORD wWordVal_p); void AmiSetWordToBe(void *pAddr_p, WORD wWordVal_p);
void AmiSetDwordToBe(void *pAddr_p, DWORD dwDwordVal_p); void AmiSetDwordToBe(void *pAddr_p, DWORD dwDwordVal_p);
...@@ -121,10 +121,10 @@ void AmiSetDwordToLe(void *pAddr_p, DWORD dwDwordVal_p); ...@@ -121,10 +121,10 @@ void AmiSetDwordToLe(void *pAddr_p, DWORD dwDwordVal_p);
// //
// To save code space the function AmiGetByte is replaced by // To save code space the function AmiGetByte is replaced by
// an macro. // an macro.
// BYTE AmiGetByte (void * pAddr_p); // u8 AmiGetByte (void * pAddr_p);
#define AmiGetByteFromBe(pAddr_p) (*(BYTE *)(pAddr_p)) #define AmiGetByteFromBe(pAddr_p) (*(u8 *)(pAddr_p))
#define AmiGetByteFromLe(pAddr_p) (*(BYTE *)(pAddr_p)) #define AmiGetByteFromLe(pAddr_p) (*(u8 *)(pAddr_p))
WORD AmiGetWordFromBe(void *pAddr_p); WORD AmiGetWordFromBe(void *pAddr_p);
DWORD AmiGetDwordFromBe(void *pAddr_p); DWORD AmiGetDwordFromBe(void *pAddr_p);
......
...@@ -556,9 +556,9 @@ tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p, ...@@ -556,9 +556,9 @@ tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p,
tEplObdSize *pEntrySize_p, tEplObdSize *pEntrySize_p,
unsigned int uiFirstSubindex_p) unsigned int uiFirstSubindex_p)
{ {
BYTE bVarEntries; u8 bVarEntries;
BYTE bIndexEntries; u8 bIndexEntries;
BYTE *pbData; u8 *pbData;
unsigned int uiSubindex; unsigned int uiSubindex;
tEplVarParam VarParam; tEplVarParam VarParam;
tEplObdSize EntrySize; tEplObdSize EntrySize;
...@@ -574,8 +574,8 @@ tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p, ...@@ -574,8 +574,8 @@ tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p,
goto Exit; goto Exit;
} }
pbData = (BYTE *)pVar_p; pbData = (u8 *)pVar_p;
bVarEntries = (BYTE) * puiVarEntries_p; bVarEntries = (u8) * puiVarEntries_p;
UsedSize = 0; UsedSize = 0;
// init VarParam structure with default values // init VarParam structure with default values
...@@ -607,7 +607,7 @@ tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p, ...@@ -607,7 +607,7 @@ tEplKernel EplApiLinkObject(unsigned int uiObjIndex_p,
// object actually has. // object actually has.
if ((bIndexEntries > (bVarEntries + uiFirstSubindex_p - 1)) && if ((bIndexEntries > (bVarEntries + uiFirstSubindex_p - 1)) &&
(bVarEntries != 0x00)) { (bVarEntries != 0x00)) {
bIndexEntries = (BYTE) (bVarEntries + uiFirstSubindex_p - 1); bIndexEntries = (u8) (bVarEntries + uiFirstSubindex_p - 1);
} }
// map entries // map entries
for (uiSubindex = uiFirstSubindex_p; uiSubindex <= bIndexEntries; for (uiSubindex = uiFirstSubindex_p; uiSubindex <= bIndexEntries;
...@@ -1012,9 +1012,9 @@ tEplKernel EplApiCbObdAccess(tEplObdCbParam *pParam_p) ...@@ -1012,9 +1012,9 @@ tEplKernel EplApiCbObdAccess(tEplObdCbParam *pParam_p)
case 0x1F9E: // NMT_ResetCmd_U8 case 0x1F9E: // NMT_ResetCmd_U8
{ {
if (pParam_p->m_ObdEvent == kEplObdEvPreWrite) { if (pParam_p->m_ObdEvent == kEplObdEvPreWrite) {
BYTE bNmtCommand; u8 bNmtCommand;
bNmtCommand = *((BYTE *) pParam_p->m_pArg); bNmtCommand = *((u8 *) pParam_p->m_pArg);
// check value range // check value range
switch ((tEplNmtCommand) bNmtCommand) { switch ((tEplNmtCommand) bNmtCommand) {
case kEplNmtCmdResetNode: case kEplNmtCmdResetNode:
...@@ -1032,9 +1032,9 @@ tEplKernel EplApiCbObdAccess(tEplObdCbParam *pParam_p) ...@@ -1032,9 +1032,9 @@ tEplKernel EplApiCbObdAccess(tEplObdCbParam *pParam_p)
break; break;
} }
} else if (pParam_p->m_ObdEvent == kEplObdEvPostWrite) { } else if (pParam_p->m_ObdEvent == kEplObdEvPostWrite) {
BYTE bNmtCommand; u8 bNmtCommand;
bNmtCommand = *((BYTE *) pParam_p->m_pArg); bNmtCommand = *((u8 *) pParam_p->m_pArg);
// check value range // check value range
switch ((tEplNmtCommand) bNmtCommand) { switch ((tEplNmtCommand) bNmtCommand) {
case kEplNmtCmdResetNode: case kEplNmtCmdResetNode:
...@@ -1187,11 +1187,11 @@ static tEplKernel EplApiProcessEvent(tEplEvent *pEplEvent_p) ...@@ -1187,11 +1187,11 @@ static tEplKernel EplApiProcessEvent(tEplEvent *pEplEvent_p)
static tEplKernel EplApiCbNmtStateChange(tEplEventNmtStateChange NmtStateChange_p) static tEplKernel EplApiCbNmtStateChange(tEplEventNmtStateChange NmtStateChange_p)
{ {
tEplKernel Ret = kEplSuccessful; tEplKernel Ret = kEplSuccessful;
BYTE bNmtState; u8 bNmtState;
tEplApiEventArg EventArg; tEplApiEventArg EventArg;
// save NMT state in OD // save NMT state in OD
bNmtState = (BYTE) NmtStateChange_p.m_NewNmtState; bNmtState = (u8) NmtStateChange_p.m_NewNmtState;
Ret = EplObdWriteEntry(0x1F8C, 0, &bNmtState, 1); Ret = EplObdWriteEntry(0x1F8C, 0, &bNmtState, 1);
if (Ret != kEplSuccessful) { if (Ret != kEplSuccessful) {
goto Exit; goto Exit;
...@@ -1270,7 +1270,7 @@ static tEplKernel EplApiCbNmtStateChange(tEplEventNmtStateChange NmtStateChange_ ...@@ -1270,7 +1270,7 @@ static tEplKernel EplApiCbNmtStateChange(tEplEventNmtStateChange NmtStateChange_
case kEplNmtCsNotActive: case kEplNmtCsNotActive:
{ {
// indicate completion of reset in NMT_ResetCmd_U8 // indicate completion of reset in NMT_ResetCmd_U8
bNmtState = (BYTE) kEplNmtCmdInvalidService; bNmtState = (u8) kEplNmtCmdInvalidService;
Ret = EplObdWriteEntry(0x1F9E, 0, &bNmtState, 1); Ret = EplObdWriteEntry(0x1F9E, 0, &bNmtState, 1);
if (Ret != kEplSuccessful) { if (Ret != kEplSuccessful) {
goto Exit; goto Exit;
...@@ -1413,7 +1413,7 @@ static tEplKernel EplApiUpdateDllConfig(BOOL fUpdateIdentity_p) ...@@ -1413,7 +1413,7 @@ static tEplKernel EplApiUpdateDllConfig(BOOL fUpdateIdentity_p)
tEplDllIdentParam DllIdentParam; tEplDllIdentParam DllIdentParam;
tEplObdSize ObdSize; tEplObdSize ObdSize;
WORD wTemp; WORD wTemp;
BYTE bTemp; u8 bTemp;
// configure Dll // configure Dll
EPL_MEMSET(&DllConfigParam, 0, sizeof(DllConfigParam)); EPL_MEMSET(&DllConfigParam, 0, sizeof(DllConfigParam));
...@@ -1633,7 +1633,7 @@ static tEplKernel EplApiUpdateObd(void) ...@@ -1633,7 +1633,7 @@ static tEplKernel EplApiUpdateObd(void)
{ {
tEplKernel Ret = kEplSuccessful; tEplKernel Ret = kEplSuccessful;
WORD wTemp; WORD wTemp;
BYTE bTemp; u8 bTemp;
// set node id in OD // set node id in OD
Ret = EplObdSetNodeId(EplApiInstance_g.m_InitParam.m_uiNodeId, // node id Ret = EplObdSetNodeId(EplApiInstance_g.m_InitParam.m_uiNodeId, // node id
...@@ -1730,7 +1730,7 @@ static tEplKernel EplApiUpdateObd(void) ...@@ -1730,7 +1730,7 @@ static tEplKernel EplApiUpdateObd(void)
}*/ }*/
if (EplApiInstance_g.m_InitParam.m_uiMultiplCycleCnt <= 0xFF) { if (EplApiInstance_g.m_InitParam.m_uiMultiplCycleCnt <= 0xFF) {
bTemp = (BYTE) EplApiInstance_g.m_InitParam.m_uiMultiplCycleCnt; bTemp = (u8) EplApiInstance_g.m_InitParam.m_uiMultiplCycleCnt;
Ret = EplObdWriteEntry(0x1F98, 7, &bTemp, 1); Ret = EplObdWriteEntry(0x1F98, 7, &bTemp, 1);
/* if(Ret != kEplSuccessful) /* if(Ret != kEplSuccessful)
{ {
......
...@@ -139,7 +139,7 @@ MODULE_DESCRIPTION("EPL API driver"); ...@@ -139,7 +139,7 @@ MODULE_DESCRIPTION("EPL API driver");
// TracePoint support for realtime-debugging // TracePoint support for realtime-debugging
#ifdef _DBG_TRACE_POINTS_ #ifdef _DBG_TRACE_POINTS_
void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p); void TgtDbgSignalTracePoint(u8 bTracePointNumber_p);
#define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p) #define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p)
#else #else
#define TGT_DBG_SIGNAL_TRACE_POINT(p) #define TGT_DBG_SIGNAL_TRACE_POINT(p)
......
...@@ -126,10 +126,10 @@ ...@@ -126,10 +126,10 @@
#if ((EPL_API_PROCESS_IMAGE_SIZE_IN > 0) || (EPL_API_PROCESS_IMAGE_SIZE_OUT > 0)) #if ((EPL_API_PROCESS_IMAGE_SIZE_IN > 0) || (EPL_API_PROCESS_IMAGE_SIZE_OUT > 0))
typedef struct { typedef struct {
#if EPL_API_PROCESS_IMAGE_SIZE_IN > 0 #if EPL_API_PROCESS_IMAGE_SIZE_IN > 0
BYTE m_abProcessImageInput[EPL_API_PROCESS_IMAGE_SIZE_IN]; u8 m_abProcessImageInput[EPL_API_PROCESS_IMAGE_SIZE_IN];
#endif #endif
#if EPL_API_PROCESS_IMAGE_SIZE_OUT > 0 #if EPL_API_PROCESS_IMAGE_SIZE_OUT > 0
BYTE m_abProcessImageOutput[EPL_API_PROCESS_IMAGE_SIZE_OUT]; u8 m_abProcessImageOutput[EPL_API_PROCESS_IMAGE_SIZE_OUT];
#endif #endif
} tEplApiProcessImageInstance; } tEplApiProcessImageInstance;
......
...@@ -185,8 +185,8 @@ typedef struct { ...@@ -185,8 +185,8 @@ typedef struct {
DWORD m_dwIpAddress; DWORD m_dwIpAddress;
DWORD m_dwSubnetMask; DWORD m_dwSubnetMask;
DWORD m_dwDefaultGateway; DWORD m_dwDefaultGateway;
BYTE m_sHostname[32]; u8 m_sHostname[32];
BYTE m_abVendorSpecificExt2[48]; u8 m_abVendorSpecificExt2[48];
} tEplDllIdentParam; } tEplDllIdentParam;
......
...@@ -112,7 +112,7 @@ typedef struct { ...@@ -112,7 +112,7 @@ typedef struct {
typedef struct { typedef struct {
tEplDllReqServiceId m_Service; tEplDllReqServiceId m_Service;
unsigned int m_uiNodeId; unsigned int m_uiNodeId;
BYTE m_bSoaFlag1; u8 m_bSoaFlag1;
} tEplDllCalIssueRequest; } tEplDllCalIssueRequest;
......
This diff is collapsed.
...@@ -142,9 +142,9 @@ typedef struct { ...@@ -142,9 +142,9 @@ typedef struct {
tShbInstance m_ShbInstanceTxGen; // FIFO for Tx frames with generic priority tShbInstance m_ShbInstanceTxGen; // FIFO for Tx frames with generic priority
#else #else
unsigned int m_uiFrameSizeNmt; unsigned int m_uiFrameSizeNmt;
BYTE m_abFrameNmt[1500]; u8 m_abFrameNmt[1500];
unsigned int m_uiFrameSizeGen; unsigned int m_uiFrameSizeGen;
BYTE m_abFrameGen[1500]; u8 m_abFrameGen[1500];
#endif #endif
tEplDllkCalStatistics m_Statistics; tEplDllkCalStatistics m_Statistics;
...@@ -536,7 +536,7 @@ tEplKernel EplDllkCalAsyncGetTxFrame(void *pFrame_p, ...@@ -536,7 +536,7 @@ tEplKernel EplDllkCalAsyncGetTxFrame(void *pFrame_p,
case kEplDllAsyncReqPrioNmt: // NMT request priority case kEplDllAsyncReqPrioNmt: // NMT request priority
ShbError = ShbError =
ShbCirReadDataBlock(EplDllkCalInstance_g.m_ShbInstanceTxNmt, ShbCirReadDataBlock(EplDllkCalInstance_g.m_ShbInstanceTxNmt,
(BYTE *) pFrame_p, *puiFrameSize_p, (u8 *) pFrame_p, *puiFrameSize_p,
&ulFrameSize); &ulFrameSize);
// returns kShbOk, kShbDataTruncated, kShbInvalidArg, kShbNoReadableData // returns kShbOk, kShbDataTruncated, kShbInvalidArg, kShbNoReadableData
break; break;
...@@ -544,7 +544,7 @@ tEplKernel EplDllkCalAsyncGetTxFrame(void *pFrame_p, ...@@ -544,7 +544,7 @@ tEplKernel EplDllkCalAsyncGetTxFrame(void *pFrame_p,
default: // generic priority default: // generic priority
ShbError = ShbError =
ShbCirReadDataBlock(EplDllkCalInstance_g.m_ShbInstanceTxGen, ShbCirReadDataBlock(EplDllkCalInstance_g.m_ShbInstanceTxGen,
(BYTE *) pFrame_p, *puiFrameSize_p, (u8 *) pFrame_p, *puiFrameSize_p,
&ulFrameSize); &ulFrameSize);
// returns kShbOk, kShbDataTruncated, kShbInvalidArg, kShbNoReadableData // returns kShbOk, kShbDataTruncated, kShbInvalidArg, kShbNoReadableData
break; break;
...@@ -876,7 +876,7 @@ tEplKernel EplDllkCalGetStatistics(tEplDllkCalStatistics ** ppStatistics) ...@@ -876,7 +876,7 @@ tEplKernel EplDllkCalGetStatistics(tEplDllkCalStatistics ** ppStatistics)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
tEplKernel EplDllkCalIssueRequest(tEplDllReqServiceId Service_p, tEplKernel EplDllkCalIssueRequest(tEplDllReqServiceId Service_p,
unsigned int uiNodeId_p, BYTE bSoaFlag1_p) unsigned int uiNodeId_p, u8 bSoaFlag1_p)
{ {
tEplKernel Ret = kEplSuccessful; tEplKernel Ret = kEplSuccessful;
......
...@@ -355,7 +355,7 @@ tEplKernel EplDlluCalAsyncSend(tEplFrameInfo * pFrameInfo_p, ...@@ -355,7 +355,7 @@ tEplKernel EplDlluCalAsyncSend(tEplFrameInfo * pFrameInfo_p,
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
tEplKernel EplDlluCalIssueRequest(tEplDllReqServiceId Service_p, tEplKernel EplDlluCalIssueRequest(tEplDllReqServiceId Service_p,
unsigned int uiNodeId_p, BYTE bSoaFlag1_p) unsigned int uiNodeId_p, u8 bSoaFlag1_p)
{ {
tEplKernel Ret = kEplSuccessful; tEplKernel Ret = kEplSuccessful;
......
...@@ -770,7 +770,7 @@ static tEplKernel EplErrorHandlerkLinkArray(DWORD * pdwValue_p, ...@@ -770,7 +770,7 @@ static tEplKernel EplErrorHandlerkLinkArray(DWORD * pdwValue_p,
tEplKernel Ret = kEplSuccessful; tEplKernel Ret = kEplSuccessful;
tEplVarParam VarParam; tEplVarParam VarParam;
tEplObdSize EntrySize; tEplObdSize EntrySize;
BYTE bIndexEntries; u8 bIndexEntries;
EntrySize = (tEplObdSize) sizeof(bIndexEntries); EntrySize = (tEplObdSize) sizeof(bIndexEntries);
Ret = EplObdReadEntry(uiIndex_p, Ret = EplObdReadEntry(uiIndex_p,
......
...@@ -248,7 +248,7 @@ typedef struct { ...@@ -248,7 +248,7 @@ typedef struct {
tEplEventSource m_EventSource; // module which posted this error event tEplEventSource m_EventSource; // module which posted this error event
tEplKernel m_EplError; // EPL error which occured tEplKernel m_EplError; // EPL error which occured
union { union {
BYTE m_bArg; u8 m_bArg;
DWORD m_dwArg; DWORD m_dwArg;
tEplEventSource m_EventSource; // from Eventk/u module (originating error source) tEplEventSource m_EventSource; // from Eventk/u module (originating error source)
tEplEventObdError m_ObdError; // from Obd module tEplEventObdError m_ObdError; // from Obd module
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
// TracePoint support for realtime-debugging // TracePoint support for realtime-debugging
#ifdef _DBG_TRACE_POINTS_ #ifdef _DBG_TRACE_POINTS_
void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p); void TgtDbgSignalTracePoint(u8 bTracePointNumber_p);
void TgtDbgPostTraceValue(DWORD dwTraceValue_p); void TgtDbgPostTraceValue(DWORD dwTraceValue_p);
#define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p) #define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p)
#define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v) #define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v)
...@@ -760,7 +760,7 @@ tEplKernel EplEventkPostError(tEplEventSource EventSource_p, ...@@ -760,7 +760,7 @@ tEplKernel EplEventkPostError(tEplEventSource EventSource_p,
unsigned int uiArgSize_p, void *pArg_p) unsigned int uiArgSize_p, void *pArg_p)
{ {
tEplKernel Ret; tEplKernel Ret;
BYTE abBuffer[EPL_MAX_EVENT_ARG_SIZE]; u8 abBuffer[EPL_MAX_EVENT_ARG_SIZE];
tEplEventError *pEventError = (tEplEventError *) abBuffer; tEplEventError *pEventError = (tEplEventError *) abBuffer;
tEplEvent EplEvent; tEplEvent EplEvent;
...@@ -814,7 +814,7 @@ static void EplEventkRxSignalHandlerCb(tShbInstance pShbRxInstance_p, ...@@ -814,7 +814,7 @@ static void EplEventkRxSignalHandlerCb(tShbInstance pShbRxInstance_p,
tShbError ShbError; tShbError ShbError;
//unsigned long ulBlockCount; //unsigned long ulBlockCount;
//unsigned long ulDataSize; //unsigned long ulDataSize;
BYTE abDataBuffer[sizeof(tEplEvent) + EPL_MAX_EVENT_ARG_SIZE]; u8 abDataBuffer[sizeof(tEplEvent) + EPL_MAX_EVENT_ARG_SIZE];
// d.k.: abDataBuffer contains the complete tEplEvent structure // d.k.: abDataBuffer contains the complete tEplEvent structure
// and behind this the argument // and behind this the argument
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
// TracePoint support for realtime-debugging // TracePoint support for realtime-debugging
#ifdef _DBG_TRACE_POINTS_ #ifdef _DBG_TRACE_POINTS_
void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p); void TgtDbgSignalTracePoint(u8 bTracePointNumber_p);
void TgtDbgPostTraceValue(DWORD dwTraceValue_p); void TgtDbgPostTraceValue(DWORD dwTraceValue_p);
#define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p) #define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p)
#define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v) #define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v)
...@@ -693,7 +693,7 @@ tEplKernel EplEventuPostError(tEplEventSource EventSource_p, ...@@ -693,7 +693,7 @@ tEplKernel EplEventuPostError(tEplEventSource EventSource_p,
unsigned int uiArgSize_p, void *pArg_p) unsigned int uiArgSize_p, void *pArg_p)
{ {
tEplKernel Ret; tEplKernel Ret;
BYTE abBuffer[EPL_MAX_EVENT_ARG_SIZE]; u8 abBuffer[EPL_MAX_EVENT_ARG_SIZE];
tEplEventError *pEventError = (tEplEventError *) abBuffer; tEplEventError *pEventError = (tEplEventError *) abBuffer;
tEplEvent EplEvent; tEplEvent EplEvent;
...@@ -750,7 +750,7 @@ static void EplEventuRxSignalHandlerCb(tShbInstance pShbRxInstance_p, ...@@ -750,7 +750,7 @@ static void EplEventuRxSignalHandlerCb(tShbInstance pShbRxInstance_p,
tShbError ShbError; tShbError ShbError;
//unsigned long ulBlockCount; //unsigned long ulBlockCount;
//unsigned long ulDataSize; //unsigned long ulDataSize;
BYTE abDataBuffer[sizeof(tEplEvent) + EPL_MAX_EVENT_ARG_SIZE]; u8 abDataBuffer[sizeof(tEplEvent) + EPL_MAX_EVENT_ARG_SIZE];
// d.k.: abDataBuffer contains the complete tEplEvent structure // d.k.: abDataBuffer contains the complete tEplEvent structure
// and behind this the argument // and behind this the argument
......
...@@ -122,11 +122,11 @@ ...@@ -122,11 +122,11 @@
typedef struct { typedef struct {
// Offset 17 // Offset 17
BYTE m_le_bRes1; // reserved u8 m_le_bRes1; // reserved
// Offset 18 // Offset 18
BYTE m_le_bFlag1; // Flags: MC, PS u8 m_le_bFlag1; // Flags: MC, PS
// Offset 19 // Offset 19
BYTE m_le_bFlag2; // Flags: res u8 m_le_bFlag2; // Flags: res
// Offset 20 // Offset 20
tEplNetTime m_le_NetTime; // supported if D_NMT_NetTimeIsRealTime_BOOL is set tEplNetTime m_le_NetTime; // supported if D_NMT_NetTimeIsRealTime_BOOL is set
// Offset 28 // Offset 28
...@@ -136,54 +136,54 @@ typedef struct { ...@@ -136,54 +136,54 @@ typedef struct {
typedef struct { typedef struct {
// Offset 17 // Offset 17
BYTE m_le_bRes1; // reserved u8 m_le_bRes1; // reserved
// Offset 18 // Offset 18
BYTE m_le_bFlag1; // Flags: MS, EA, RD u8 m_le_bFlag1; // Flags: MS, EA, RD
// Offset 19 // Offset 19
BYTE m_le_bFlag2; // Flags: res u8 m_le_bFlag2; // Flags: res
// Offset 20 // Offset 20
BYTE m_le_bPdoVersion; u8 m_le_bPdoVersion;
// Offset 21 // Offset 21
BYTE m_le_bRes2; // reserved u8 m_le_bRes2; // reserved
// Offset 22 // Offset 22
WORD m_le_wSize; WORD m_le_wSize;
// Offset 24 // Offset 24
BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 */ ]; u8 m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 */ ];
} PACK_STRUCT tEplPreqFrame; } PACK_STRUCT tEplPreqFrame;
typedef struct { typedef struct {
// Offset 17 // Offset 17
BYTE m_le_bNmtStatus; // NMT state u8 m_le_bNmtStatus; // NMT state
// Offset 18 // Offset 18
BYTE m_le_bFlag1; // Flags: MS, EN, RD u8 m_le_bFlag1; // Flags: MS, EN, RD
// Offset 19 // Offset 19
BYTE m_le_bFlag2; // Flags: PR, RS u8 m_le_bFlag2; // Flags: PR, RS
// Offset 20 // Offset 20
BYTE m_le_bPdoVersion; u8 m_le_bPdoVersion;
// Offset 21 // Offset 21
BYTE m_le_bRes2; // reserved u8 m_le_bRes2; // reserved
// Offset 22 // Offset 22
WORD m_le_wSize; WORD m_le_wSize;
// Offset 24 // Offset 24
BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 u8 m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16
/ D_NMT_IsochrTxMaxPayload_U16 */ ]; / D_NMT_IsochrTxMaxPayload_U16 */ ];
} PACK_STRUCT tEplPresFrame; } PACK_STRUCT tEplPresFrame;
typedef struct { typedef struct {
// Offset 17 // Offset 17
BYTE m_le_bNmtStatus; // NMT state u8 m_le_bNmtStatus; // NMT state
// Offset 18 // Offset 18
BYTE m_le_bFlag1; // Flags: EA, ER u8 m_le_bFlag1; // Flags: EA, ER
// Offset 19 // Offset 19
BYTE m_le_bFlag2; // Flags: res u8 m_le_bFlag2; // Flags: res
// Offset 20 // Offset 20
BYTE m_le_bReqServiceId; u8 m_le_bReqServiceId;
// Offset 21 // Offset 21
BYTE m_le_bReqServiceTarget; u8 m_le_bReqServiceTarget;
// Offset 22 // Offset 22
BYTE m_le_bEplVersion; u8 m_le_bEplVersion;
} PACK_STRUCT tEplSoaFrame; } PACK_STRUCT tEplSoaFrame;
...@@ -191,16 +191,16 @@ typedef struct { ...@@ -191,16 +191,16 @@ typedef struct {
WORD m_wEntryType; WORD m_wEntryType;
WORD m_wErrorCode; WORD m_wErrorCode;
tEplNetTime m_TimeStamp; tEplNetTime m_TimeStamp;
BYTE m_abAddInfo[8]; u8 m_abAddInfo[8];
} PACK_STRUCT tEplErrHistoryEntry; } PACK_STRUCT tEplErrHistoryEntry;
typedef struct { typedef struct {
// Offset 18 // Offset 18
BYTE m_le_bFlag1; // Flags: EN, EC u8 m_le_bFlag1; // Flags: EN, EC
BYTE m_le_bFlag2; // Flags: PR, RS u8 m_le_bFlag2; // Flags: PR, RS
BYTE m_le_bNmtStatus; // NMT state u8 m_le_bNmtStatus; // NMT state
BYTE m_le_bRes1[3]; u8 m_le_bRes1[3];
QWORD m_le_qwStaticError; // static error bit field QWORD m_le_qwStaticError; // static error bit field
tEplErrHistoryEntry m_le_aErrHistoryEntry[14]; tEplErrHistoryEntry m_le_aErrHistoryEntry[14];
...@@ -208,12 +208,12 @@ typedef struct { ...@@ -208,12 +208,12 @@ typedef struct {
typedef struct { typedef struct {
// Offset 18 // Offset 18
BYTE m_le_bFlag1; // Flags: res u8 m_le_bFlag1; // Flags: res
BYTE m_le_bFlag2; // Flags: PR, RS u8 m_le_bFlag2; // Flags: PR, RS
BYTE m_le_bNmtStatus; // NMT state u8 m_le_bNmtStatus; // NMT state
BYTE m_le_bIdentRespFlags; // Flags: FW u8 m_le_bIdentRespFlags; // Flags: FW
BYTE m_le_bEplProfileVersion; u8 m_le_bEplProfileVersion;
BYTE m_le_bRes1; u8 m_le_bRes1;
DWORD m_le_dwFeatureFlags; // NMT_FeatureFlags_U32 DWORD m_le_dwFeatureFlags; // NMT_FeatureFlags_U32
WORD m_le_wMtu; // NMT_CycleTiming_REC.AsyncMTU_U16: C_IP_MIN_MTU - C_IP_MAX_MTU WORD m_le_wMtu; // NMT_CycleTiming_REC.AsyncMTU_U16: C_IP_MIN_MTU - C_IP_MAX_MTU
WORD m_le_wPollInSize; // NMT_CycleTiming_REC.PReqActPayload_U16 WORD m_le_wPollInSize; // NMT_CycleTiming_REC.PReqActPayload_U16
...@@ -233,44 +233,44 @@ typedef struct { ...@@ -233,44 +233,44 @@ typedef struct {
DWORD m_le_dwIpAddress; DWORD m_le_dwIpAddress;
DWORD m_le_dwSubnetMask; DWORD m_le_dwSubnetMask;
DWORD m_le_dwDefaultGateway; DWORD m_le_dwDefaultGateway;
BYTE m_le_sHostname[32]; u8 m_le_sHostname[32];
BYTE m_le_abVendorSpecificExt2[48]; u8 m_le_abVendorSpecificExt2[48];
} PACK_STRUCT tEplIdentResponse; } PACK_STRUCT tEplIdentResponse;
typedef struct { typedef struct {
// Offset 18 // Offset 18
BYTE m_le_bNmtCommandId; u8 m_le_bNmtCommandId;
BYTE m_le_bRes1; u8 m_le_bRes1;
BYTE m_le_abNmtCommandData[32]; u8 m_le_abNmtCommandData[32];
} PACK_STRUCT tEplNmtCommandService; } PACK_STRUCT tEplNmtCommandService;
typedef struct { typedef struct {
BYTE m_le_bReserved; u8 m_le_bReserved;
BYTE m_le_bTransactionId; u8 m_le_bTransactionId;
BYTE m_le_bFlags; u8 m_le_bFlags;
BYTE m_le_bCommandId; u8 m_le_bCommandId;
WORD m_le_wSegmentSize; WORD m_le_wSegmentSize;
WORD m_le_wReserved; WORD m_le_wReserved;
BYTE m_le_abCommandData[8]; // just reserve a minimum number of bytes as a placeholder u8 m_le_abCommandData[8]; // just reserve a minimum number of bytes as a placeholder
} PACK_STRUCT tEplAsySdoCom; } PACK_STRUCT tEplAsySdoCom;
// asynchronous SDO Sequence Header // asynchronous SDO Sequence Header
typedef struct { typedef struct {
BYTE m_le_bRecSeqNumCon; u8 m_le_bRecSeqNumCon;
BYTE m_le_bSendSeqNumCon; u8 m_le_bSendSeqNumCon;
BYTE m_le_abReserved[2]; u8 m_le_abReserved[2];
tEplAsySdoCom m_le_abSdoSeqPayload; tEplAsySdoCom m_le_abSdoSeqPayload;
} PACK_STRUCT tEplAsySdoSeq; } PACK_STRUCT tEplAsySdoSeq;
typedef struct { typedef struct {
// Offset 18 // Offset 18
BYTE m_le_bNmtCommandId; u8 m_le_bNmtCommandId;
BYTE m_le_bTargetNodeId; u8 m_le_bTargetNodeId;
BYTE m_le_abNmtCommandData[32]; u8 m_le_abNmtCommandData[32];
} PACK_STRUCT tEplNmtRequestService; } PACK_STRUCT tEplNmtRequestService;
...@@ -281,14 +281,14 @@ typedef union { ...@@ -281,14 +281,14 @@ typedef union {
tEplNmtCommandService m_NmtCommandService; tEplNmtCommandService m_NmtCommandService;
tEplNmtRequestService m_NmtRequestService; tEplNmtRequestService m_NmtRequestService;
tEplAsySdoSeq m_SdoSequenceFrame; tEplAsySdoSeq m_SdoSequenceFrame;
BYTE m_le_abPayload[256 /*D_NMT_ASndTxMaxPayload_U16 u8 m_le_abPayload[256 /*D_NMT_ASndTxMaxPayload_U16
/ D_NMT_ASndRxMaxPayload_U16 */ ]; / D_NMT_ASndRxMaxPayload_U16 */ ];
} tEplAsndPayload; } tEplAsndPayload;
typedef struct { typedef struct {
// Offset 17 // Offset 17
BYTE m_le_bServiceId; u8 m_le_bServiceId;
// Offset 18 // Offset 18
tEplAsndPayload m_Payload; tEplAsndPayload m_Payload;
...@@ -306,17 +306,17 @@ typedef union { ...@@ -306,17 +306,17 @@ typedef union {
typedef struct { typedef struct {
// Offset 0 // Offset 0
BYTE m_be_abDstMac[6]; // MAC address of the addressed nodes u8 m_be_abDstMac[6]; // MAC address of the addressed nodes
// Offset 6 // Offset 6
BYTE m_be_abSrcMac[6]; // MAC address of the transmitting node u8 m_be_abSrcMac[6]; // MAC address of the transmitting node
// Offset 12 // Offset 12
WORD m_be_wEtherType; // Ethernet message type (big endian) WORD m_be_wEtherType; // Ethernet message type (big endian)
// Offset 14 // Offset 14
BYTE m_le_bMessageType; // EPL message type u8 m_le_bMessageType; // EPL message type
// Offset 15 // Offset 15
BYTE m_le_bDstNodeId; // EPL node ID of the addressed nodes u8 m_le_bDstNodeId; // EPL node ID of the addressed nodes
// Offset 16 // Offset 16
BYTE m_le_bSrcNodeId; // EPL node ID of the transmitting node u8 m_le_bSrcNodeId; // EPL node ID of the transmitting node
// Offset 17 // Offset 17
tEplFrameData m_Data; tEplFrameData m_Data;
......
...@@ -71,6 +71,8 @@ ...@@ -71,6 +71,8 @@
#ifndef _EPLINSTDEF_H_ #ifndef _EPLINSTDEF_H_
#define _EPLINSTDEF_H_ #define _EPLINSTDEF_H_
#include <linux/kernel.h>
// ========================================================================= // =========================================================================
// types and macros for generating instances // types and macros for generating instances
// ========================================================================= // =========================================================================
...@@ -84,7 +86,7 @@ typedef enum { ...@@ -84,7 +86,7 @@ typedef enum {
//------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------
typedef void *tEplPtrInstance; typedef void *tEplPtrInstance;
typedef BYTE tEplInstanceHdl; typedef u8 tEplInstanceHdl;
// define const for illegale values // define const for illegale values
#define CCM_ILLINSTANCE NULL #define CCM_ILLINSTANCE NULL
...@@ -214,8 +216,8 @@ typedef BYTE tEplInstanceHdl; ...@@ -214,8 +216,8 @@ typedef BYTE tEplInstanceHdl;
tFastByte InstNumber = 0; \ tFastByte InstNumber = 0; \
tFastByte i = EPL_MAX_INSTANCES; \ tFastByte i = EPL_MAX_INSTANCES; \
do { \ do { \
pInstance->m_InstState = (BYTE) kStateUnused; \ pInstance->m_InstState = (u8) kStateUnused; \
pInstance->m_bInstIndex = (BYTE) InstNumber; \ pInstance->m_bInstIndex = (u8) InstNumber; \
pInstance++; InstNumber++; i--; \ pInstance++; InstNumber++; i--; \
} while (i != 0); \ } while (i != 0); \
} }
...@@ -243,8 +245,8 @@ typedef BYTE tEplInstanceHdl; ...@@ -243,8 +245,8 @@ typedef BYTE tEplInstanceHdl;
// 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
#define EPL_MCO_DECL_INSTANCE_MEMBER() \ #define EPL_MCO_DECL_INSTANCE_MEMBER() \
STATIC BYTE m_InstState; \ STATIC u8 m_InstState; \
STATIC BYTE m_bInstIndex; STATIC u8 m_bInstIndex;
#define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex)) #define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex))
#define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex)) #define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex))
......
...@@ -108,7 +108,7 @@ static tEplNmtCnuInstance EplNmtCnuInstance_g; ...@@ -108,7 +108,7 @@ static tEplNmtCnuInstance EplNmtCnuInstance_g;
static tEplNmtCommand EplNmtCnuGetNmtCommand(tEplFrameInfo * pFrameInfo_p); static tEplNmtCommand EplNmtCnuGetNmtCommand(tEplFrameInfo * pFrameInfo_p);
static BOOL EplNmtCnuNodeIdList(BYTE * pbNmtCommandDate_p); static BOOL EplNmtCnuNodeIdList(u8 * pbNmtCommandDate_p);
static tEplKernel EplNmtCnuCommandCb(tEplFrameInfo *pFrameInfo_p); static tEplKernel EplNmtCnuCommandCb(tEplFrameInfo *pFrameInfo_p);
...@@ -248,15 +248,15 @@ EPLDLLEXPORT tEplKernel EplNmtCnuSendNmtRequest(unsigned int uiNodeId_p, ...@@ -248,15 +248,15 @@ EPLDLLEXPORT tEplKernel EplNmtCnuSendNmtRequest(unsigned int uiNodeId_p,
EPL_MEMSET(&NmtRequestFrame.m_be_abSrcMac[0], 0x00, sizeof(NmtRequestFrame.m_be_abSrcMac)); // set by DLL EPL_MEMSET(&NmtRequestFrame.m_be_abSrcMac[0], 0x00, sizeof(NmtRequestFrame.m_be_abSrcMac)); // set by DLL
AmiSetWordToBe(&NmtRequestFrame.m_be_wEtherType, AmiSetWordToBe(&NmtRequestFrame.m_be_wEtherType,
EPL_C_DLL_ETHERTYPE_EPL); EPL_C_DLL_ETHERTYPE_EPL);
AmiSetByteToLe(&NmtRequestFrame.m_le_bDstNodeId, (BYTE) EPL_C_ADR_MN_DEF_NODE_ID); // node id of the MN AmiSetByteToLe(&NmtRequestFrame.m_le_bDstNodeId, (u8) EPL_C_ADR_MN_DEF_NODE_ID); // node id of the MN
AmiSetByteToLe(&NmtRequestFrame.m_le_bMessageType, AmiSetByteToLe(&NmtRequestFrame.m_le_bMessageType,
(BYTE) kEplMsgTypeAsnd); (u8) kEplMsgTypeAsnd);
AmiSetByteToLe(&NmtRequestFrame.m_Data.m_Asnd.m_le_bServiceId, AmiSetByteToLe(&NmtRequestFrame.m_Data.m_Asnd.m_le_bServiceId,
(BYTE) kEplDllAsndNmtRequest); (u8) kEplDllAsndNmtRequest);
AmiSetByteToLe(&NmtRequestFrame.m_Data.m_Asnd.m_Payload. AmiSetByteToLe(&NmtRequestFrame.m_Data.m_Asnd.m_Payload.
m_NmtRequestService.m_le_bNmtCommandId, m_NmtRequestService.m_le_bNmtCommandId,
(BYTE) NmtCommand_p); (u8) NmtCommand_p);
AmiSetByteToLe(&NmtRequestFrame.m_Data.m_Asnd.m_Payload.m_NmtRequestService.m_le_bTargetNodeId, (BYTE) uiNodeId_p); // target for the nmt command AmiSetByteToLe(&NmtRequestFrame.m_Data.m_Asnd.m_Payload.m_NmtRequestService.m_le_bTargetNodeId, (u8) uiNodeId_p); // target for the nmt command
EPL_MEMSET(&NmtRequestFrame.m_Data.m_Asnd.m_Payload.m_NmtRequestService. EPL_MEMSET(&NmtRequestFrame.m_Data.m_Asnd.m_Payload.m_NmtRequestService.
m_le_abNmtCommandData[0], 0x00, m_le_abNmtCommandData[0], 0x00,
sizeof(NmtRequestFrame.m_Data.m_Asnd.m_Payload. sizeof(NmtRequestFrame.m_Data.m_Asnd.m_Payload.
...@@ -673,18 +673,18 @@ static tEplNmtCommand EplNmtCnuGetNmtCommand(tEplFrameInfo * pFrameInfo_p) ...@@ -673,18 +673,18 @@ static tEplNmtCommand EplNmtCnuGetNmtCommand(tEplFrameInfo * pFrameInfo_p)
// State: // State:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static BOOL EplNmtCnuNodeIdList(BYTE * pbNmtCommandDate_p) static BOOL EplNmtCnuNodeIdList(u8 * pbNmtCommandDate_p)
{ {
BOOL fNodeIdInList; BOOL fNodeIdInList;
unsigned int uiByteOffset; unsigned int uiByteOffset;
BYTE bBitOffset; u8 bBitOffset;
BYTE bNodeListByte; u8 bNodeListByte;
// get byte-offset of the own nodeid in NodeIdList // get byte-offset of the own nodeid in NodeIdList
// devide though 8 // devide though 8
uiByteOffset = (unsigned int)(EplNmtCnuInstance_g.m_uiNodeId >> 3); uiByteOffset = (unsigned int)(EplNmtCnuInstance_g.m_uiNodeId >> 3);
// get bitoffset // get bitoffset
bBitOffset = (BYTE) EplNmtCnuInstance_g.m_uiNodeId % 8; bBitOffset = (u8) EplNmtCnuInstance_g.m_uiNodeId % 8;
bNodeListByte = AmiGetByteFromLe(&pbNmtCommandDate_p[uiByteOffset]); bNodeListByte = AmiGetByteFromLe(&pbNmtCommandDate_p[uiByteOffset]);
if ((bNodeListByte & bBitOffset) == 0) { if ((bNodeListByte & bBitOffset) == 0) {
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
// TracePoint support for realtime-debugging // TracePoint support for realtime-debugging
#ifdef _DBG_TRACE_POINTS_ #ifdef _DBG_TRACE_POINTS_
void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p); void TgtDbgSignalTracePoint(u8 bTracePointNumber_p);
void TgtDbgPostTraceValue(DWORD dwTraceValue_p); void TgtDbgPostTraceValue(DWORD dwTraceValue_p);
#define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p) #define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p)
#define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v) #define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v)
...@@ -417,7 +417,7 @@ tEplKernel EplNmtMnuSendNmtCommandEx(unsigned int uiNodeId_p, ...@@ -417,7 +417,7 @@ tEplKernel EplNmtMnuSendNmtCommandEx(unsigned int uiNodeId_p,
{ {
tEplKernel Ret = kEplSuccessful; tEplKernel Ret = kEplSuccessful;
tEplFrameInfo FrameInfo; tEplFrameInfo FrameInfo;
BYTE abBuffer[EPL_C_DLL_MINSIZE_NMTCMDEXT]; u8 abBuffer[EPL_C_DLL_MINSIZE_NMTCMDEXT];
tEplFrame *pFrame = (tEplFrame *) abBuffer; tEplFrame *pFrame = (tEplFrame *) abBuffer;
BOOL fSoftDeleteNode = FALSE; BOOL fSoftDeleteNode = FALSE;
...@@ -437,11 +437,11 @@ tEplKernel EplNmtMnuSendNmtCommandEx(unsigned int uiNodeId_p, ...@@ -437,11 +437,11 @@ tEplKernel EplNmtMnuSendNmtCommandEx(unsigned int uiNodeId_p,
// build frame // build frame
EPL_MEMSET(pFrame, 0x00, sizeof(abBuffer)); EPL_MEMSET(pFrame, 0x00, sizeof(abBuffer));
AmiSetByteToLe(&pFrame->m_le_bDstNodeId, (BYTE) uiNodeId_p); AmiSetByteToLe(&pFrame->m_le_bDstNodeId, (u8) uiNodeId_p);
AmiSetByteToLe(&pFrame->m_Data.m_Asnd.m_le_bServiceId, AmiSetByteToLe(&pFrame->m_Data.m_Asnd.m_le_bServiceId,
(BYTE) kEplDllAsndNmtCommand); (u8) kEplDllAsndNmtCommand);
AmiSetByteToLe(&pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService. AmiSetByteToLe(&pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService.
m_le_bNmtCommandId, (BYTE) NmtCommand_p); m_le_bNmtCommandId, (u8) NmtCommand_p);
if ((pNmtCommandData_p != NULL) && (uiDataSize_p > 0)) { // copy command data to frame if ((pNmtCommandData_p != NULL) && (uiDataSize_p > 0)) { // copy command data to frame
EPL_MEMCPY(&pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService. EPL_MEMCPY(&pFrame->m_Data.m_Asnd.m_Payload.m_NmtCommandService.
m_le_abNmtCommandData[0], pNmtCommandData_p, m_le_abNmtCommandData[0], pNmtCommandData_p,
...@@ -572,7 +572,7 @@ tEplKernel EplNmtMnuTriggerStateChange(unsigned int uiNodeId_p, ...@@ -572,7 +572,7 @@ tEplKernel EplNmtMnuTriggerStateChange(unsigned int uiNodeId_p,
tEplKernel Ret = kEplSuccessful; tEplKernel Ret = kEplSuccessful;
tEplNmtMnuIntNodeEvent NodeEvent; tEplNmtMnuIntNodeEvent NodeEvent;
tEplObdSize ObdSize; tEplObdSize ObdSize;
BYTE bNmtState; u8 bNmtState;
WORD wErrorCode = EPL_E_NO_ERROR; WORD wErrorCode = EPL_E_NO_ERROR;
if ((uiNodeId_p == 0) || (uiNodeId_p >= EPL_C_ADR_BROADCAST)) { if ((uiNodeId_p == 0) || (uiNodeId_p >= EPL_C_ADR_BROADCAST)) {
...@@ -967,7 +967,7 @@ EPLDLLEXPORT tEplKernel EplNmtMnuProcessEvent(tEplEvent *pEvent_p) ...@@ -967,7 +967,7 @@ EPLDLLEXPORT tEplKernel EplNmtMnuProcessEvent(tEplEvent *pEvent_p)
EPL_NMTMNU_TIMERARG_NODE_MASK); EPL_NMTMNU_TIMERARG_NODE_MASK);
if (uiNodeId != 0) { if (uiNodeId != 0) {
tEplObdSize ObdSize; tEplObdSize ObdSize;
BYTE bNmtState; u8 bNmtState;
tEplNmtMnuNodeInfo *pNodeInfo; tEplNmtMnuNodeInfo *pNodeInfo;
pNodeInfo = EPL_NMTMNU_GET_NODEINFO(uiNodeId); pNodeInfo = EPL_NMTMNU_GET_NODEINFO(uiNodeId);
...@@ -1147,7 +1147,7 @@ EPLDLLEXPORT tEplKernel EplNmtMnuProcessEvent(tEplEvent *pEvent_p) ...@@ -1147,7 +1147,7 @@ EPLDLLEXPORT tEplKernel EplNmtMnuProcessEvent(tEplEvent *pEvent_p)
tEplFrame *pFrame = (tEplFrame *) pEvent_p->m_pArg; tEplFrame *pFrame = (tEplFrame *) pEvent_p->m_pArg;
unsigned int uiNodeId; unsigned int uiNodeId;
tEplNmtCommand NmtCommand; tEplNmtCommand NmtCommand;
BYTE bNmtState; u8 bNmtState;
uiNodeId = AmiGetByteFromLe(&pFrame->m_le_bDstNodeId); uiNodeId = AmiGetByteFromLe(&pFrame->m_le_bDstNodeId);
NmtCommand = NmtCommand =
...@@ -1159,30 +1159,30 @@ EPLDLLEXPORT tEplKernel EplNmtMnuProcessEvent(tEplEvent *pEvent_p) ...@@ -1159,30 +1159,30 @@ EPLDLLEXPORT tEplKernel EplNmtMnuProcessEvent(tEplEvent *pEvent_p)
switch (NmtCommand) { switch (NmtCommand) {
case kEplNmtCmdStartNode: case kEplNmtCmdStartNode:
bNmtState = bNmtState =
(BYTE) (kEplNmtCsOperational & 0xFF); (u8) (kEplNmtCsOperational & 0xFF);
break; break;
case kEplNmtCmdStopNode: case kEplNmtCmdStopNode:
bNmtState = (BYTE) (kEplNmtCsStopped & 0xFF); bNmtState = (u8) (kEplNmtCsStopped & 0xFF);
break; break;
case kEplNmtCmdEnterPreOperational2: case kEplNmtCmdEnterPreOperational2:
bNmtState = bNmtState =
(BYTE) (kEplNmtCsPreOperational2 & 0xFF); (u8) (kEplNmtCsPreOperational2 & 0xFF);
break; break;
case kEplNmtCmdEnableReadyToOperate: case kEplNmtCmdEnableReadyToOperate:
// d.k. do not change expected node state, because of DS 1.0.0 7.3.1.2.1 Plain NMT State Command // d.k. do not change expected node state, because of DS 1.0.0 7.3.1.2.1 Plain NMT State Command
// and because node may not change NMT state within EPL_C_NMT_STATE_TOLERANCE // and because node may not change NMT state within EPL_C_NMT_STATE_TOLERANCE
bNmtState = bNmtState =
(BYTE) (kEplNmtCsPreOperational2 & 0xFF); (u8) (kEplNmtCsPreOperational2 & 0xFF);
break; break;
case kEplNmtCmdResetNode: case kEplNmtCmdResetNode:
case kEplNmtCmdResetCommunication: case kEplNmtCmdResetCommunication:
case kEplNmtCmdResetConfiguration: case kEplNmtCmdResetConfiguration:
case kEplNmtCmdSwReset: case kEplNmtCmdSwReset:
bNmtState = (BYTE) (kEplNmtCsNotActive & 0xFF); bNmtState = (u8) (kEplNmtCsNotActive & 0xFF);
// EplNmtMnuProcessInternalEvent() sets internal node state to kEplNmtMnuNodeStateUnknown // EplNmtMnuProcessInternalEvent() sets internal node state to kEplNmtMnuNodeStateUnknown
// after next unresponded IdentRequest/StatusRequest // after next unresponded IdentRequest/StatusRequest
break; break;
...@@ -1927,7 +1927,7 @@ static tEplKernel EplNmtMnuProcessInternalEvent(unsigned int uiNodeId_p, ...@@ -1927,7 +1927,7 @@ static tEplKernel EplNmtMnuProcessInternalEvent(unsigned int uiNodeId_p,
switch (NodeEvent_p) { switch (NodeEvent_p) {
case kEplNmtMnuIntNodeEventIdentResponse: case kEplNmtMnuIntNodeEventIdentResponse:
{ {
BYTE bNmtState; u8 bNmtState;
EPL_NMTMNU_DBG_POST_TRACE_VALUE(NodeEvent_p, EPL_NMTMNU_DBG_POST_TRACE_VALUE(NodeEvent_p,
uiNodeId_p, uiNodeId_p,
...@@ -1954,7 +1954,7 @@ static tEplKernel EplNmtMnuProcessInternalEvent(unsigned int uiNodeId_p, ...@@ -1954,7 +1954,7 @@ static tEplKernel EplNmtMnuProcessInternalEvent(unsigned int uiNodeId_p,
~EPL_NMTMNU_NODE_FLAG_NOT_SCANNED; ~EPL_NMTMNU_NODE_FLAG_NOT_SCANNED;
} }
// update object 0x1F8F NMT_MNNodeExpState_AU8 to PreOp1 (even if local state >= PreOp2) // update object 0x1F8F NMT_MNNodeExpState_AU8 to PreOp1 (even if local state >= PreOp2)
bNmtState = (BYTE) (kEplNmtCsPreOperational1 & 0xFF); bNmtState = (u8) (kEplNmtCsPreOperational1 & 0xFF);
Ret = Ret =
EplObduWriteEntry(0x1F8F, uiNodeId_p, &bNmtState, EplObduWriteEntry(0x1F8F, uiNodeId_p, &bNmtState,
1); 1);
...@@ -2434,11 +2434,11 @@ static tEplKernel EplNmtMnuProcessInternalEvent(unsigned int uiNodeId_p, ...@@ -2434,11 +2434,11 @@ static tEplKernel EplNmtMnuProcessInternalEvent(unsigned int uiNodeId_p,
case kEplNmtMnuIntNodeEventNmtCmdSent: case kEplNmtMnuIntNodeEventNmtCmdSent:
{ {
BYTE bNmtState; u8 bNmtState;
// update expected NMT state with the one that results // update expected NMT state with the one that results
// from the sent NMT command // from the sent NMT command
bNmtState = (BYTE) (NodeNmtState_p & 0xFF); bNmtState = (u8) (NodeNmtState_p & 0xFF);
// write object 0x1F8F NMT_MNNodeExpState_AU8 // write object 0x1F8F NMT_MNNodeExpState_AU8
Ret = Ret =
...@@ -2628,8 +2628,8 @@ static tEplKernel EplNmtMnuCheckNmtState(unsigned int uiNodeId_p, ...@@ -2628,8 +2628,8 @@ static tEplKernel EplNmtMnuCheckNmtState(unsigned int uiNodeId_p,
{ {
tEplKernel Ret = kEplSuccessful; tEplKernel Ret = kEplSuccessful;
tEplObdSize ObdSize; tEplObdSize ObdSize;
BYTE bNmtState; u8 bNmtState;
BYTE bNmtStatePrev; u8 bNmtStatePrev;
tEplNmtState ExpNmtState; tEplNmtState ExpNmtState;
ObdSize = 1; ObdSize = 1;
...@@ -2640,8 +2640,8 @@ static tEplKernel EplNmtMnuCheckNmtState(unsigned int uiNodeId_p, ...@@ -2640,8 +2640,8 @@ static tEplKernel EplNmtMnuCheckNmtState(unsigned int uiNodeId_p,
} }
// compute expected NMT state // compute expected NMT state
ExpNmtState = (tEplNmtState) (bNmtState | EPL_NMT_TYPE_CS); ExpNmtState = (tEplNmtState) (bNmtState | EPL_NMT_TYPE_CS);
// compute BYTE of current NMT state // compute u8 of current NMT state
bNmtState = ((BYTE) NodeNmtState_p & 0xFF); bNmtState = ((u8) NodeNmtState_p & 0xFF);
if (ExpNmtState == kEplNmtCsNotActive) { // ignore the current state, because the CN shall be not active if (ExpNmtState == kEplNmtCsNotActive) { // ignore the current state, because the CN shall be not active
Ret = kEplReject; Ret = kEplReject;
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
// TracePoint support for realtime-debugging // TracePoint support for realtime-debugging
#ifdef _DBG_TRACE_POINTS_ #ifdef _DBG_TRACE_POINTS_
void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p); void TgtDbgSignalTracePoint(u8 bTracePointNumber_p);
void TgtDbgPostTraceValue(DWORD dwTraceValue_p); void TgtDbgPostTraceValue(DWORD dwTraceValue_p);
#define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p) #define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p)
#define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v) #define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v)
......
...@@ -123,7 +123,7 @@ typedef union { ...@@ -123,7 +123,7 @@ typedef union {
EPL_MCO_DECL_INSTANCE_VAR() EPL_MCO_DECL_INSTANCE_VAR()
BYTE abEplObdTrashObject_g[8]; u8 abEplObdTrashObject_g[8];
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// local function prototypes // local function prototypes
...@@ -833,7 +833,7 @@ EPLDLLEXPORT unsigned int EplObdGetNodeId(EPL_MCO_DECL_INSTANCE_PTR) ...@@ -833,7 +833,7 @@ EPLDLLEXPORT unsigned int EplObdGetNodeId(EPL_MCO_DECL_INSTANCE_PTR)
{ {
tEplKernel Ret; tEplKernel Ret;
tEplObdSize ObdSize; tEplObdSize ObdSize;
BYTE bNodeId; u8 bNodeId;
bNodeId = 0; bNodeId = 0;
ObdSize = sizeof(bNodeId); ObdSize = sizeof(bNodeId);
...@@ -871,16 +871,16 @@ EPLDLLEXPORT tEplKernel EplObdSetNodeId(EPL_MCO_DECL_PTR_INSTANCE_PTR_ unsigned ...@@ -871,16 +871,16 @@ EPLDLLEXPORT tEplKernel EplObdSetNodeId(EPL_MCO_DECL_PTR_INSTANCE_PTR_ unsigned
{ {
tEplKernel Ret; tEplKernel Ret;
tEplObdSize ObdSize; tEplObdSize ObdSize;
BYTE fHwBool; u8 fHwBool;
BYTE bNodeId; u8 bNodeId;
// check Node Id // check Node Id
if (uiNodeId_p == EPL_C_ADR_INVALID) { if (uiNodeId_p == EPL_C_ADR_INVALID) {
Ret = kEplInvalidNodeId; Ret = kEplInvalidNodeId;
goto Exit; goto Exit;
} }
bNodeId = (BYTE) uiNodeId_p; bNodeId = (u8) uiNodeId_p;
ObdSize = sizeof(BYTE); ObdSize = sizeof(u8);
// write NodeId to OD entry // write NodeId to OD entry
Ret = EplObdWriteEntry(EPL_MCO_PTR_INSTANCE_PTR_ Ret = EplObdWriteEntry(EPL_MCO_PTR_INSTANCE_PTR_
EPL_OBD_NODE_ID_INDEX, EPL_OBD_NODE_ID_INDEX,
...@@ -1072,7 +1072,7 @@ EPLDLLEXPORT tEplKernel EplObdReadEntryToLe(EPL_MCO_DECL_INSTANCE_PTR_ unsigned ...@@ -1072,7 +1072,7 @@ EPLDLLEXPORT tEplKernel EplObdReadEntryToLe(EPL_MCO_DECL_INSTANCE_PTR_ unsigned
case kEplObdTypInt8: case kEplObdTypInt8:
case kEplObdTypUInt8: case kEplObdTypUInt8:
{ {
AmiSetByteToLe(pDstData_p, *((BYTE *) pSrcData)); AmiSetByteToLe(pDstData_p, *((u8 *) pSrcData));
break; break;
} }
...@@ -1222,7 +1222,7 @@ EPLDLLEXPORT tEplKernel EplObdWriteEntryFromLe(EPL_MCO_DECL_INSTANCE_PTR_ unsign ...@@ -1222,7 +1222,7 @@ EPLDLLEXPORT tEplKernel EplObdWriteEntryFromLe(EPL_MCO_DECL_INSTANCE_PTR_ unsign
case kEplObdTypInt8: case kEplObdTypInt8:
case kEplObdTypUInt8: case kEplObdTypUInt8:
{ {
*((BYTE *) pBuffer) = AmiGetByteFromLe(pSrcData_p); *((u8 *) pBuffer) = AmiGetByteFromLe(pSrcData_p);
break; break;
} }
...@@ -1503,7 +1503,7 @@ static tEplObdSize EplObdGetStrLen(void *pObjData_p, ...@@ -1503,7 +1503,7 @@ static tEplObdSize EplObdGetStrLen(void *pObjData_p,
{ {
tEplObdSize StrLen = 0; tEplObdSize StrLen = 0;
BYTE *pbString; u8 *pbString;
if (pObjData_p == NULL) { if (pObjData_p == NULL) {
goto Exit; goto Exit;
...@@ -2094,7 +2094,7 @@ static tEplKernel EplObdWriteEntryPost(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdEntryPt ...@@ -2094,7 +2094,7 @@ static tEplKernel EplObdWriteEntryPost(EPL_MCO_DECL_INSTANCE_PTR_ tEplObdEntryPt
// Function: EplObdGetObjectSize() // Function: EplObdGetObjectSize()
// //
// Description: function to get size of object // Description: function to get size of object
// The function determines if an object type an fixed data type (BYTE, WORD, ...) // The function determines if an object type an fixed data type (u8, WORD, ...)
// or non fixed object (string, domain). This information is used to decide // or non fixed object (string, domain). This information is used to decide
// if download data are stored temporary or not. For objects with fixed data length // if download data are stored temporary or not. For objects with fixed data length
// and types a value range checking can process. // and types a value range checking can process.
...@@ -2463,7 +2463,7 @@ static void *EplObdGetObjectCurrentPtr(tEplObdSubEntryPtr pSubIndexEntry_p) ...@@ -2463,7 +2463,7 @@ static void *EplObdGetObjectCurrentPtr(tEplObdSubEntryPtr pSubIndexEntry_p)
} else { } else {
Size = EplObdGetObjectSize(pSubIndexEntry_p); Size = EplObdGetObjectSize(pSubIndexEntry_p);
} }
pData = ((BYTE *) pData) + (Size * uiArrayIndex); pData = ((u8 *) pData) + (Size * uiArrayIndex);
} }
// check if VarEntry // check if VarEntry
if ((pSubIndexEntry_p->m_Access & kEplObdAccVar) != 0) { if ((pSubIndexEntry_p->m_Access & kEplObdAccVar) != 0) {
...@@ -2772,14 +2772,14 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_ ...@@ -2772,14 +2772,14 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_
Ret = kEplSuccessful; Ret = kEplSuccessful;
// prepare structure for STORE RESTORE callback function // prepare structure for STORE RESTORE callback function
CbStore.m_bCurrentOdPart = (BYTE) CurrentOdPart_p; CbStore.m_bCurrentOdPart = (u8) CurrentOdPart_p;
CbStore.m_pData = NULL; CbStore.m_pData = NULL;
CbStore.m_ObjSize = 0; CbStore.m_ObjSize = 0;
// command of first action depends on direction to access // command of first action depends on direction to access
#if (EPL_OBD_USE_STORE_RESTORE != FALSE) #if (EPL_OBD_USE_STORE_RESTORE != FALSE)
if (Direction_p == kEplObdDirLoad) { if (Direction_p == kEplObdDirLoad) {
CbStore.m_bCommand = (BYTE) kEplObdCommOpenRead; CbStore.m_bCommand = (u8) kEplObdCommOpenRead;
// call callback function for previous command // call callback function for previous command
Ret = EplObdCallStoreCallback(EPL_MCO_INSTANCE_PTR_ & CbStore); Ret = EplObdCallStoreCallback(EPL_MCO_INSTANCE_PTR_ & CbStore);
...@@ -2787,9 +2787,9 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_ ...@@ -2787,9 +2787,9 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_
goto Exit; goto Exit;
} }
// set command for index and subindex loop // set command for index and subindex loop
CbStore.m_bCommand = (BYTE) kEplObdCommReadObj; CbStore.m_bCommand = (u8) kEplObdCommReadObj;
} else if (Direction_p == kEplObdDirStore) { } else if (Direction_p == kEplObdDirStore) {
CbStore.m_bCommand = (BYTE) kEplObdCommOpenWrite; CbStore.m_bCommand = (u8) kEplObdCommOpenWrite;
// call callback function for previous command // call callback function for previous command
Ret = EplObdCallStoreCallback(EPL_MCO_INSTANCE_PTR_ & CbStore); Ret = EplObdCallStoreCallback(EPL_MCO_INSTANCE_PTR_ & CbStore);
...@@ -2797,7 +2797,7 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_ ...@@ -2797,7 +2797,7 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_
goto Exit; goto Exit;
} }
// set command for index and subindex loop // set command for index and subindex loop
CbStore.m_bCommand = (BYTE) kEplObdCommWriteObj; CbStore.m_bCommand = (u8) kEplObdCommWriteObj;
} }
#endif // (EPL_OBD_USE_STORE_RESTORE != FALSE) #endif // (EPL_OBD_USE_STORE_RESTORE != FALSE)
...@@ -2848,7 +2848,7 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_ ...@@ -2848,7 +2848,7 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_
} }
else else
{ {
EplObdInitVarEntry ((tEplObdVarEntry *) (((BYTE *) pSubIndex->m_pCurrent) + (sizeof (tEplObdVarEntry) * pSubIndex->m_uiSubIndex)), EplObdInitVarEntry ((tEplObdVarEntry *) (((u8 *) pSubIndex->m_pCurrent) + (sizeof (tEplObdVarEntry) * pSubIndex->m_uiSubIndex)),
pSubIndex->m_Type, ObjSize); pSubIndex->m_Type, ObjSize);
} }
*/ */
...@@ -3003,11 +3003,11 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_ ...@@ -3003,11 +3003,11 @@ static tEplKernel EplObdAccessOdPartIntern(EPL_MCO_DECL_INSTANCE_PTR_
#if (EPL_OBD_USE_STORE_RESTORE != FALSE) #if (EPL_OBD_USE_STORE_RESTORE != FALSE)
else { else {
if (Direction_p == kEplObdDirLoad) { if (Direction_p == kEplObdDirLoad) {
CbStore.m_bCommand = (BYTE) kEplObdCommCloseRead; CbStore.m_bCommand = (u8) kEplObdCommCloseRead;
} else if (Direction_p == kEplObdDirStore) { } else if (Direction_p == kEplObdDirStore) {
CbStore.m_bCommand = (BYTE) kEplObdCommCloseWrite; CbStore.m_bCommand = (u8) kEplObdCommCloseWrite;
} else if (Direction_p == kEplObdDirRestore) { } else if (Direction_p == kEplObdDirRestore) {
CbStore.m_bCommand = (BYTE) kEplObdCommClear; CbStore.m_bCommand = (u8) kEplObdCommClear;
} else { } else {
goto Exit; goto Exit;
} }
......
...@@ -309,7 +309,7 @@ typedef struct { ...@@ -309,7 +309,7 @@ typedef struct {
typedef struct { typedef struct {
tEplObdSize m_Size; tEplObdSize m_Size;
BYTE *m_pString; u8 *m_pString;
} tEplObdOString; // 000C } tEplObdOString; // 000C
...@@ -327,8 +327,8 @@ typedef struct { ...@@ -327,8 +327,8 @@ typedef struct {
typedef struct { typedef struct {
tEplObdSize m_Size; tEplObdSize m_Size;
BYTE *m_pDefString; // $$$ d.k. it is unused, so we could delete it u8 *m_pDefString; // $$$ d.k. it is unused, so we could delete it
BYTE *m_pString; u8 *m_pString;
} tEplObdOStringDef; } tEplObdOStringDef;
...@@ -431,7 +431,7 @@ typedef struct { ...@@ -431,7 +431,7 @@ typedef struct {
unsigned int m_uiUpperObjIndex; // upper limit of ObjIndex unsigned int m_uiUpperObjIndex; // upper limit of ObjIndex
tInitTabEntryCallback m_fpInitTabEntry; // will be called if ObjIndex was found tInitTabEntryCallback m_fpInitTabEntry; // will be called if ObjIndex was found
void *m_pTabBase; // base address of table void *m_pTabBase; // base address of table
unsigned int m_uiEntrySize; // size of table entry // 25-feb-2005 r.d.: expansion from BYTE to WORD necessary for PDO bit mapping unsigned int m_uiEntrySize; // size of table entry // 25-feb-2005 r.d.: expansion from u8 to WORD necessary for PDO bit mapping
unsigned int m_uiMaxEntries; // max. tabel entries unsigned int m_uiMaxEntries; // max. tabel entries
} tEplObdModulTabParam; } tEplObdModulTabParam;
......
...@@ -105,8 +105,8 @@ ...@@ -105,8 +105,8 @@
#define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static char szCur##ind##_##sub##_g[size+1]; \ #define EPL_OBD_SUBINDEX_RAM_VSTRING(ind,sub,acc,name,size,val) static char szCur##ind##_##sub##_g[size+1]; \
static tEplObdVStringDef xDef##ind##_##sub##_g = {size, val, szCur##ind##_##sub##_g}; static tEplObdVStringDef xDef##ind##_##sub##_g = {size, val, szCur##ind##_##sub##_g};
#define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static BYTE bCur##ind##_##sub##_g[size]; \ #define EPL_OBD_SUBINDEX_RAM_OSTRING(ind,sub,acc,name,size) static u8 bCur##ind##_##sub##_g[size]; \
static tEplObdOStringDef xDef##ind##_##sub##_g = {size, ((BYTE*)""), bCur##ind##_##sub##_g}; static tEplObdOStringDef xDef##ind##_##sub##_g = {size, ((u8*)""), bCur##ind##_##sub##_g};
#define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name) #define EPL_OBD_SUBINDEX_RAM_DOMAIN(ind,sub,acc,name)
#define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static dtyp xDef##ind##_##sub##_g = val; #define EPL_OBD_SUBINDEX_RAM_USERDEF(ind,sub,typ,acc,dtyp,name,val) static dtyp xDef##ind##_##sub##_g = val;
#define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp xDef##ind##_##sub##_g[3] = {val,low,high}; #define EPL_OBD_SUBINDEX_RAM_USERDEF_RG(ind,sub,typ,acc,dtyp,name,val,low,high) static dtyp xDef##ind##_##sub##_g[3] = {val,low,high};
......
...@@ -275,7 +275,7 @@ EPLDLLEXPORT tEplKernel EplObduRegisterUserOd(tEplObdEntryPtr pUserOd_p) ...@@ -275,7 +275,7 @@ EPLDLLEXPORT tEplKernel EplObduRegisterUserOd(tEplObdEntryPtr pUserOd_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
EPLDLLEXPORT void EplObduInitVarEntry(tEplObdVarEntry *pVarEntry_p, EPLDLLEXPORT void EplObduInitVarEntry(tEplObdVarEntry *pVarEntry_p,
BYTE bType_p, tEplObdSize ObdSize_p) u8 bType_p, tEplObdSize ObdSize_p)
{ {
EplObduCalInitVarEntry(pVarEntry_p, bType_p, ObdSize_p); EplObduCalInitVarEntry(pVarEntry_p, bType_p, ObdSize_p);
} }
......
...@@ -297,7 +297,7 @@ EPLDLLEXPORT tEplKernel EplObduCalRegisterUserOd(tEplObdEntryPtr pUserOd_p) ...@@ -297,7 +297,7 @@ EPLDLLEXPORT tEplKernel EplObduCalRegisterUserOd(tEplObdEntryPtr pUserOd_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
EPLDLLEXPORT void EplObduCalInitVarEntry(tEplObdVarEntry *pVarEntry_p, EPLDLLEXPORT void EplObduCalInitVarEntry(tEplObdVarEntry *pVarEntry_p,
BYTE bType_p, tEplObdSize ObdSize_p) u8 bType_p, tEplObdSize ObdSize_p)
{ {
#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0) #if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_OBDK)) != 0)
EplObdInitVarEntry(pVarEntry_p, bType_p, ObdSize_p); EplObdInitVarEntry(pVarEntry_p, bType_p, ObdSize_p);
......
...@@ -104,7 +104,7 @@ typedef struct { ...@@ -104,7 +104,7 @@ typedef struct {
// TPDO: 0x00=PRes, MN: CnNodeId=PReq // TPDO: 0x00=PRes, MN: CnNodeId=PReq
BOOL m_fTxRx; BOOL m_fTxRx;
BYTE m_bMappingVersion; u8 m_bMappingVersion;
unsigned int m_uiMaxMappingEntries; // maximum number of mapping entries, i.e. size of m_aPdoMapping unsigned int m_uiMaxMappingEntries; // maximum number of mapping entries, i.e. size of m_aPdoMapping
tEplPdoMapping m_aPdoMapping[1]; tEplPdoMapping m_aPdoMapping[1];
......
...@@ -319,14 +319,14 @@ tEplKernel EplPdokProcess(tEplEvent * pEvent_p) ...@@ -319,14 +319,14 @@ tEplKernel EplPdokProcess(tEplEvent * pEvent_p)
WORD wBitSize; WORD wBitSize;
WORD wVarSize; WORD wVarSize;
QWORD qwObjectMapping; QWORD qwObjectMapping;
BYTE bMappSubindex; u8 bMappSubindex;
BYTE bObdSubindex; u8 bObdSubindex;
WORD wObdMappIndex; WORD wObdMappIndex;
WORD wObdCommIndex; WORD wObdCommIndex;
WORD wPdoId; WORD wPdoId;
BYTE bObdData; u8 bObdData;
BYTE bObjectCount; u8 bObjectCount;
BYTE bFrameData; u8 bFrameData;
BOOL fValid; BOOL fValid;
tEplObdSize ObdSize; tEplObdSize ObdSize;
tEplFrame *pFrame; tEplFrame *pFrame;
...@@ -441,7 +441,7 @@ tEplKernel EplPdokProcess(tEplEvent * pEvent_p) ...@@ -441,7 +441,7 @@ tEplKernel EplPdokProcess(tEplEvent * pEvent_p)
(WORD) (qwObjectMapping & (WORD) (qwObjectMapping &
0x000000000000FFFFLL); 0x000000000000FFFFLL);
bObdSubindex = bObdSubindex =
(BYTE) ((qwObjectMapping & (u8) ((qwObjectMapping &
0x0000000000FF0000LL) >> 16); 0x0000000000FF0000LL) >> 16);
wBitOffset = wBitOffset =
(WORD) ((qwObjectMapping & (WORD) ((qwObjectMapping &
...@@ -571,7 +571,7 @@ tEplKernel EplPdokProcess(tEplEvent * pEvent_p) ...@@ -571,7 +571,7 @@ tEplKernel EplPdokProcess(tEplEvent * pEvent_p)
(WORD) (qwObjectMapping & (WORD) (qwObjectMapping &
0x000000000000FFFFLL); 0x000000000000FFFFLL);
bObdSubindex = bObdSubindex =
(BYTE) ((qwObjectMapping & (u8) ((qwObjectMapping &
0x0000000000FF0000LL) >> 16); 0x0000000000FF0000LL) >> 16);
wBitOffset = wBitOffset =
(WORD) ((qwObjectMapping & (WORD) ((qwObjectMapping &
......
...@@ -232,10 +232,10 @@ tEplKernel EplPdouCbObdAccess(tEplObdCbParam *pParam_p) ...@@ -232,10 +232,10 @@ tEplKernel EplPdouCbObdAccess(tEplObdCbParam *pParam_p)
unsigned int uiPdoId; unsigned int uiPdoId;
unsigned int uiIndexType; unsigned int uiIndexType;
tEplObdSize ObdSize; tEplObdSize ObdSize;
BYTE bObjectCount; u8 bObjectCount;
QWORD qwObjectMapping; QWORD qwObjectMapping;
tEplObdAccess AccessType; tEplObdAccess AccessType;
BYTE bMappSubindex; u8 bMappSubindex;
unsigned int uiCurPdoSize; unsigned int uiCurPdoSize;
WORD wMaxPdoSize; WORD wMaxPdoSize;
unsigned int uiSubIndex; unsigned int uiSubIndex;
...@@ -293,7 +293,7 @@ tEplKernel EplPdouCbObdAccess(tEplObdCbParam *pParam_p) ...@@ -293,7 +293,7 @@ tEplKernel EplPdouCbObdAccess(tEplObdCbParam *pParam_p)
if (pParam_p->m_uiSubIndex == 0) { // object mapping count accessed if (pParam_p->m_uiSubIndex == 0) { // object mapping count accessed
// PDO is enabled or disabled // PDO is enabled or disabled
bObjectCount = *((BYTE *) pParam_p->m_pArg); bObjectCount = *((u8 *) pParam_p->m_pArg);
if (bObjectCount == 0) { // PDO shall be disabled if (bObjectCount == 0) { // PDO shall be disabled
...@@ -399,7 +399,7 @@ static tEplKernel EplPdouCheckPdoValidity(tEplObdCbParam *pParam_p, ...@@ -399,7 +399,7 @@ static tEplKernel EplPdouCheckPdoValidity(tEplObdCbParam *pParam_p,
{ {
tEplKernel Ret = kEplSuccessful; tEplKernel Ret = kEplSuccessful;
tEplObdSize ObdSize; tEplObdSize ObdSize;
BYTE bObjectCount; u8 bObjectCount;
ObdSize = 1; ObdSize = 1;
// read number of mapped objects from OD; this indicates if the PDO is valid // read number of mapped objects from OD; this indicates if the PDO is valid
......
...@@ -339,10 +339,10 @@ tEplKernel EplSdoAsnduSendData(tEplSdoConHdl SdoConHandle_p, ...@@ -339,10 +339,10 @@ tEplKernel EplSdoAsnduSendData(tEplSdoConHdl SdoConHandle_p,
// own node id not needed -> filled by DLL // own node id not needed -> filled by DLL
// set message type // set message type
AmiSetByteToLe(&pSrcData_p->m_le_bMessageType, (BYTE) kEplMsgTypeAsnd); // ASnd == 0x06 AmiSetByteToLe(&pSrcData_p->m_le_bMessageType, (u8) kEplMsgTypeAsnd); // ASnd == 0x06
// target node id // target node id
AmiSetByteToLe(&pSrcData_p->m_le_bDstNodeId, AmiSetByteToLe(&pSrcData_p->m_le_bDstNodeId,
(BYTE) SdoAsndInstance_g. (u8) SdoAsndInstance_g.
m_auiSdoAsndConnection[uiArray]); m_auiSdoAsndConnection[uiArray]);
// set source-nodeid (filled by DLL 0) // set source-nodeid (filled by DLL 0)
AmiSetByteToLe(&pSrcData_p->m_le_bSrcNodeId, 0x00); AmiSetByteToLe(&pSrcData_p->m_le_bSrcNodeId, 0x00);
......
...@@ -128,11 +128,11 @@ typedef enum { ...@@ -128,11 +128,11 @@ typedef enum {
// structure for History-Buffer // structure for History-Buffer
typedef struct { typedef struct {
BYTE m_bFreeEntries; u8 m_bFreeEntries;
BYTE m_bWrite; // index of the next free buffer entry u8 m_bWrite; // index of the next free buffer entry
BYTE m_bAck; // index of the next message which should become acknowledged u8 m_bAck; // index of the next message which should become acknowledged
BYTE m_bRead; // index between m_bAck and m_bWrite to the next message for retransmission u8 m_bRead; // index between m_bAck and m_bWrite to the next message for retransmission
BYTE m_aabHistoryFrame[EPL_SDO_HISTORY_SIZE] u8 m_aabHistoryFrame[EPL_SDO_HISTORY_SIZE]
[EPL_SEQ_HISTROY_FRAME_SIZE]; [EPL_SEQ_HISTROY_FRAME_SIZE];
unsigned int m_auiFrameSize[EPL_SDO_HISTORY_SIZE]; unsigned int m_auiFrameSize[EPL_SDO_HISTORY_SIZE];
...@@ -152,8 +152,8 @@ typedef enum { ...@@ -152,8 +152,8 @@ typedef enum {
typedef struct { typedef struct {
tEplSdoConHdl m_ConHandle; tEplSdoConHdl m_ConHandle;
tEplAsySdoState m_SdoState; tEplAsySdoState m_SdoState;
BYTE m_bRecSeqNum; // name from view of the communication partner u8 m_bRecSeqNum; // name from view of the communication partner
BYTE m_bSendSeqNum; // name from view of the communication partner u8 m_bSendSeqNum; // name from view of the communication partner
tEplAsySdoConHistory m_SdoConHistory; tEplAsySdoConHistory m_SdoConHistory;
tEplTimerHdl m_EplTimerHdl; tEplTimerHdl m_EplTimerHdl;
unsigned int m_uiRetryCount; // retry counter unsigned int m_uiRetryCount; // retry counter
...@@ -214,7 +214,7 @@ static tEplKernel EplSdoAsyAddFrameToHistory(tEplAsySdoSeqCon * pAsySdoSeqCon_p, ...@@ -214,7 +214,7 @@ static tEplKernel EplSdoAsyAddFrameToHistory(tEplAsySdoSeqCon * pAsySdoSeqCon_p,
unsigned int uiSize_p); unsigned int uiSize_p);
static tEplKernel EplSdoAsyAckFrameToHistory(tEplAsySdoSeqCon * pAsySdoSeqCon_p, static tEplKernel EplSdoAsyAckFrameToHistory(tEplAsySdoSeqCon * pAsySdoSeqCon_p,
BYTE bRecSeqNumber_p); u8 bRecSeqNumber_p);
static tEplKernel EplSdoAsyReadFromHistory(tEplAsySdoSeqCon * pAsySdoSeqCon_p, static tEplKernel EplSdoAsyReadFromHistory(tEplAsySdoSeqCon * pAsySdoSeqCon_p,
tEplFrame ** ppFrame_p, tEplFrame ** ppFrame_p,
...@@ -1498,7 +1498,7 @@ static tEplKernel EplSdoAsySeqProcess(unsigned int uiHandle_p, ...@@ -1498,7 +1498,7 @@ static tEplKernel EplSdoAsySeqProcess(unsigned int uiHandle_p,
// frame received // frame received
case kAsySdoSeqEventFrameRec: case kAsySdoSeqEventFrameRec:
{ {
BYTE bSendSeqNumCon = u8 bSendSeqNumCon =
AmiGetByteFromLe(&pRecFrame_p-> AmiGetByteFromLe(&pRecFrame_p->
m_le_bSendSeqNumCon); m_le_bSendSeqNumCon);
...@@ -2016,7 +2016,7 @@ static tEplKernel EplSdoAsySeqSendIntern(tEplAsySdoSeqCon * pAsySdoSeqCon_p, ...@@ -2016,7 +2016,7 @@ static tEplKernel EplSdoAsySeqSendIntern(tEplAsySdoSeqCon * pAsySdoSeqCon_p,
BOOL fFrameInHistory_p) BOOL fFrameInHistory_p)
{ {
tEplKernel Ret; tEplKernel Ret;
BYTE abFrame[EPL_SEQ_FRAME_SIZE]; u8 abFrame[EPL_SEQ_FRAME_SIZE];
tEplFrame *pEplFrame; tEplFrame *pEplFrame;
unsigned int uiFreeEntries; unsigned int uiFreeEntries;
...@@ -2154,7 +2154,7 @@ tEplKernel EplSdoAsyReceiveCb(tEplSdoConHdl ConHdl_p, ...@@ -2154,7 +2154,7 @@ tEplKernel EplSdoAsyReceiveCb(tEplSdoConHdl ConHdl_p,
#endif #endif
EPL_DBGLVL_SDO_TRACE2("Handle: 0x%x , First Databyte 0x%x\n", ConHdl_p, EPL_DBGLVL_SDO_TRACE2("Handle: 0x%x , First Databyte 0x%x\n", ConHdl_p,
((BYTE *) pSdoSeqData_p)[0]); ((u8 *) pSdoSeqData_p)[0]);
// search controll structure for this connection // search controll structure for this connection
pAsySdoSeqCon = &AsySdoSequInstance_g.m_AsySdoConnection[uiCount]; pAsySdoSeqCon = &AsySdoSequInstance_g.m_AsySdoConnection[uiCount];
...@@ -2328,12 +2328,12 @@ static tEplKernel EplSdoAsyAddFrameToHistory(tEplAsySdoSeqCon * pAsySdoSeqCon_p, ...@@ -2328,12 +2328,12 @@ static tEplKernel EplSdoAsyAddFrameToHistory(tEplAsySdoSeqCon * pAsySdoSeqCon_p,
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static tEplKernel EplSdoAsyAckFrameToHistory(tEplAsySdoSeqCon * pAsySdoSeqCon_p, static tEplKernel EplSdoAsyAckFrameToHistory(tEplAsySdoSeqCon * pAsySdoSeqCon_p,
BYTE bRecSeqNumber_p) u8 bRecSeqNumber_p)
{ {
tEplKernel Ret; tEplKernel Ret;
tEplAsySdoConHistory *pHistory; tEplAsySdoConHistory *pHistory;
BYTE bAckIndex; u8 bAckIndex;
BYTE bCurrentSeqNum; u8 bCurrentSeqNum;
Ret = kEplSuccessful; Ret = kEplSuccessful;
......
...@@ -156,14 +156,14 @@ typedef enum { ...@@ -156,14 +156,14 @@ typedef enum {
typedef struct { typedef struct {
tEplSdoSeqConHdl m_SdoSeqConHdl; // if != 0 -> entry used tEplSdoSeqConHdl m_SdoSeqConHdl; // if != 0 -> entry used
tEplSdoComState m_SdoComState; tEplSdoComState m_SdoComState;
BYTE m_bTransactionId; u8 m_bTransactionId;
unsigned int m_uiNodeId; // NodeId of the target unsigned int m_uiNodeId; // NodeId of the target
// -> needed to reinit connection // -> needed to reinit connection
// after timeout // after timeout
tEplSdoTransType m_SdoTransType; // Auto, Expedited, Segmented tEplSdoTransType m_SdoTransType; // Auto, Expedited, Segmented
tEplSdoServiceType m_SdoServiceType; // WriteByIndex, ReadByIndex tEplSdoServiceType m_SdoServiceType; // WriteByIndex, ReadByIndex
tEplSdoType m_SdoProtType; // protocol layer: Auto, Udp, Asnd, Pdo tEplSdoType m_SdoProtType; // protocol layer: Auto, Udp, Asnd, Pdo
BYTE *m_pData; // pointer to data u8 *m_pData; // pointer to data
unsigned int m_uiTransSize; // number of bytes unsigned int m_uiTransSize; // number of bytes
// to transfer // to transfer
unsigned int m_uiTransferredByte; // number of bytes unsigned int m_uiTransferredByte; // number of bytes
...@@ -765,7 +765,7 @@ tEplKernel EplSdoComSdoAbort(tEplSdoComConHdl SdoComConHdl_p, ...@@ -765,7 +765,7 @@ tEplKernel EplSdoComSdoAbort(tEplSdoComConHdl SdoComConHdl_p,
goto Exit; goto Exit;
} }
// save pointer to abort code // save pointer to abort code
pSdoComCon->m_pData = (BYTE *) & dwAbortCode_p; pSdoComCon->m_pData = (u8 *) & dwAbortCode_p;
Ret = EplSdoComProcessIntern(SdoComConHdl_p, Ret = EplSdoComProcessIntern(SdoComConHdl_p,
kEplSdoComConEventAbort, kEplSdoComConEventAbort,
...@@ -998,7 +998,7 @@ static tEplKernel EplSdoComProcessIntern(tEplSdoComConHdl SdoComCon_p, ...@@ -998,7 +998,7 @@ static tEplKernel EplSdoComProcessIntern(tEplSdoComConHdl SdoComCon_p,
{ {
tEplKernel Ret; tEplKernel Ret;
tEplSdoComCon *pSdoComCon; tEplSdoComCon *pSdoComCon;
BYTE bFlag; u8 bFlag;
#if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDOS)) != 0) #if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDOS)) != 0)
DWORD dwAbortCode; DWORD dwAbortCode;
...@@ -1137,7 +1137,7 @@ static tEplKernel EplSdoComProcessIntern(tEplSdoComConHdl SdoComCon_p, ...@@ -1137,7 +1137,7 @@ static tEplKernel EplSdoComProcessIntern(tEplSdoComConHdl SdoComCon_p,
pSdoComCon-> pSdoComCon->
m_pData m_pData
= =
(BYTE (u8
*) *)
& &
dwAbortCode; dwAbortCode;
...@@ -1282,7 +1282,7 @@ static tEplKernel EplSdoComProcessIntern(tEplSdoComConHdl SdoComCon_p, ...@@ -1282,7 +1282,7 @@ static tEplKernel EplSdoComProcessIntern(tEplSdoComConHdl SdoComCon_p,
if (pSdoComCon-> if (pSdoComCon->
m_dwLastAbortCode == m_dwLastAbortCode ==
0) { 0) {
( /*(BYTE*) */ ( /*(u8*) */
pSdoComCon-> pSdoComCon->
m_pData) += m_pData) +=
uiSize; uiSize;
...@@ -1320,7 +1320,7 @@ static tEplKernel EplSdoComProcessIntern(tEplSdoComConHdl SdoComCon_p, ...@@ -1320,7 +1320,7 @@ static tEplKernel EplSdoComProcessIntern(tEplSdoComConHdl SdoComCon_p,
pSdoComCon-> pSdoComCon->
m_pData m_pData
= =
(BYTE (u8
*) *)
& &
pSdoComCon-> pSdoComCon->
...@@ -1986,7 +1986,7 @@ static tEplKernel EplSdoComServerInitReadByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -1986,7 +1986,7 @@ static tEplKernel EplSdoComServerInitReadByIndex(tEplSdoComCon * pSdoComCon_p,
if (Ret == kEplObdSubindexNotExist) { // subentry doesn't exist if (Ret == kEplObdSubindexNotExist) { // subentry doesn't exist
dwAbortCode = EPL_SDOAC_SUB_INDEX_NOT_EXIST; dwAbortCode = EPL_SDOAC_SUB_INDEX_NOT_EXIST;
// send abort // send abort
pSdoComCon_p->m_pData = (BYTE *) & dwAbortCode; pSdoComCon_p->m_pData = (u8 *) & dwAbortCode;
Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p, Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p,
uiIndex, uiIndex,
uiSubindex, uiSubindex,
...@@ -1995,7 +1995,7 @@ static tEplKernel EplSdoComServerInitReadByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -1995,7 +1995,7 @@ static tEplKernel EplSdoComServerInitReadByIndex(tEplSdoComCon * pSdoComCon_p,
} else if (Ret != kEplSuccessful) { // entry doesn't exist } else if (Ret != kEplSuccessful) { // entry doesn't exist
dwAbortCode = EPL_SDOAC_OBJECT_NOT_EXIST; dwAbortCode = EPL_SDOAC_OBJECT_NOT_EXIST;
// send abort // send abort
pSdoComCon_p->m_pData = (BYTE *) & dwAbortCode; pSdoComCon_p->m_pData = (u8 *) & dwAbortCode;
Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p, Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p,
uiIndex, uiIndex,
uiSubindex, uiSubindex,
...@@ -2013,7 +2013,7 @@ static tEplKernel EplSdoComServerInitReadByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -2013,7 +2013,7 @@ static tEplKernel EplSdoComServerInitReadByIndex(tEplSdoComCon * pSdoComCon_p,
dwAbortCode = EPL_SDOAC_UNSUPPORTED_ACCESS; dwAbortCode = EPL_SDOAC_UNSUPPORTED_ACCESS;
} }
// send abort // send abort
pSdoComCon_p->m_pData = (BYTE *) & dwAbortCode; pSdoComCon_p->m_pData = (u8 *) & dwAbortCode;
Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p, Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p,
uiIndex, uiIndex,
uiSubindex, uiSubindex,
...@@ -2050,7 +2050,7 @@ static tEplKernel EplSdoComServerInitReadByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -2050,7 +2050,7 @@ static tEplKernel EplSdoComServerInitReadByIndex(tEplSdoComCon * pSdoComCon_p,
// error -> abort // error -> abort
dwAbortCode = EPL_SDOAC_GENERAL_ERROR; dwAbortCode = EPL_SDOAC_GENERAL_ERROR;
// send abort // send abort
pSdoComCon_p->m_pData = (BYTE *) & dwAbortCode; pSdoComCon_p->m_pData = (u8 *) & dwAbortCode;
Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p, Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p,
uiIndex, uiIndex,
uiSubindex, uiSubindex,
...@@ -2089,11 +2089,11 @@ static tEplKernel EplSdoComServerSendFrameIntern(tEplSdoComCon * pSdoComCon_p, ...@@ -2089,11 +2089,11 @@ static tEplKernel EplSdoComServerSendFrameIntern(tEplSdoComCon * pSdoComCon_p,
tEplSdoComSendType SendType_p) tEplSdoComSendType SendType_p)
{ {
tEplKernel Ret; tEplKernel Ret;
BYTE abFrame[EPL_MAX_SDO_FRAME_SIZE]; u8 abFrame[EPL_MAX_SDO_FRAME_SIZE];
tEplFrame *pFrame; tEplFrame *pFrame;
tEplAsySdoCom *pCommandFrame; tEplAsySdoCom *pCommandFrame;
unsigned int uiSizeOfFrame; unsigned int uiSizeOfFrame;
BYTE bFlag; u8 bFlag;
Ret = kEplSuccessful; Ret = kEplSuccessful;
...@@ -2373,7 +2373,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -2373,7 +2373,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p,
tEplObdSize EntrySize; tEplObdSize EntrySize;
tEplObdAccess AccessType; tEplObdAccess AccessType;
DWORD dwAbortCode; DWORD dwAbortCode;
BYTE *pbSrcData; u8 *pbSrcData;
dwAbortCode = 0; dwAbortCode = 0;
...@@ -2426,7 +2426,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -2426,7 +2426,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p,
pSdoComCon_p->m_dwLastAbortCode = EPL_SDOAC_SUB_INDEX_NOT_EXIST; pSdoComCon_p->m_dwLastAbortCode = EPL_SDOAC_SUB_INDEX_NOT_EXIST;
// send abort // send abort
// d.k. This is wrong: k.t. not needed send abort on end of write // d.k. This is wrong: k.t. not needed send abort on end of write
/*pSdoComCon_p->m_pData = (BYTE*)pSdoComCon_p->m_dwLastAbortCode; /*pSdoComCon_p->m_pData = (u8*)pSdoComCon_p->m_dwLastAbortCode;
Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p, Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p,
uiIndex, uiIndex,
uiSubindex, uiSubindex,
...@@ -2437,7 +2437,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -2437,7 +2437,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p,
// send abort // send abort
// d.k. This is wrong: k.t. not needed send abort on end of write // d.k. This is wrong: k.t. not needed send abort on end of write
/* /*
pSdoComCon_p->m_pData = (BYTE*)&dwAbortCode; pSdoComCon_p->m_pData = (u8*)&dwAbortCode;
Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p, Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p,
uiIndex, uiIndex,
uiSubindex, uiSubindex,
...@@ -2457,7 +2457,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -2457,7 +2457,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p,
} }
// send abort // send abort
// d.k. This is wrong: k.t. not needed send abort on end of write // d.k. This is wrong: k.t. not needed send abort on end of write
/*pSdoComCon_p->m_pData = (BYTE*)&dwAbortCode; /*pSdoComCon_p->m_pData = (u8*)&dwAbortCode;
Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p, Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p,
uiIndex, uiIndex,
uiSubindex, uiSubindex,
...@@ -2548,7 +2548,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -2548,7 +2548,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p,
EPL_SDOAC_DATA_TYPE_LENGTH_TOO_HIGH; EPL_SDOAC_DATA_TYPE_LENGTH_TOO_HIGH;
// send abort // send abort
// d.k. This is wrong: k.t. not needed send abort on end of write // d.k. This is wrong: k.t. not needed send abort on end of write
/*pSdoComCon_p->m_pData = (BYTE*)&dwAbortCode; /*pSdoComCon_p->m_pData = (u8*)&dwAbortCode;
Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p, Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p,
uiIndex, uiIndex,
uiSubindex, uiSubindex,
...@@ -2570,7 +2570,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -2570,7 +2570,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p,
EPL_SDOAC_GENERAL_ERROR; EPL_SDOAC_GENERAL_ERROR;
// send abort // send abort
// d.k. This is wrong: k.t. not needed send abort on end of write // d.k. This is wrong: k.t. not needed send abort on end of write
/* pSdoComCon_p->m_pData = (BYTE*)&pSdoComCon_p->m_dwLastAbortCode; /* pSdoComCon_p->m_pData = (u8*)&pSdoComCon_p->m_dwLastAbortCode;
Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p, Ret = EplSdoComServerSendFrameIntern(pSdoComCon_p,
uiIndex, uiIndex,
uiSubindex, uiSubindex,
...@@ -2585,7 +2585,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -2585,7 +2585,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p,
pSdoComCon_p->m_uiTransSize -= uiBytesToTransfer; pSdoComCon_p->m_uiTransSize -= uiBytesToTransfer;
// update target pointer // update target pointer
( /*(BYTE*) */ pSdoComCon_p->m_pData) += uiBytesToTransfer; ( /*(u8*) */ pSdoComCon_p->m_pData) += uiBytesToTransfer;
// send acknowledge without any Command layer data // send acknowledge without any Command layer data
Ret = EplSdoAsySeqSendData(pSdoComCon_p->m_SdoSeqConHdl, Ret = EplSdoAsySeqSendData(pSdoComCon_p->m_SdoSeqConHdl,
...@@ -2597,7 +2597,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -2597,7 +2597,7 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p,
if (pSdoComCon_p->m_dwLastAbortCode != 0) { if (pSdoComCon_p->m_dwLastAbortCode != 0) {
// send abort // send abort
pSdoComCon_p->m_pData = pSdoComCon_p->m_pData =
(BYTE *) & pSdoComCon_p->m_dwLastAbortCode; (u8 *) & pSdoComCon_p->m_dwLastAbortCode;
Ret = Ret =
EplSdoComServerSendFrameIntern(pSdoComCon_p, uiIndex, EplSdoComServerSendFrameIntern(pSdoComCon_p, uiIndex,
uiSubindex, uiSubindex,
...@@ -2634,12 +2634,12 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p, ...@@ -2634,12 +2634,12 @@ static tEplKernel EplSdoComServerInitWriteByIndex(tEplSdoComCon * pSdoComCon_p,
static tEplKernel EplSdoComClientSend(tEplSdoComCon * pSdoComCon_p) static tEplKernel EplSdoComClientSend(tEplSdoComCon * pSdoComCon_p)
{ {
tEplKernel Ret; tEplKernel Ret;
BYTE abFrame[EPL_MAX_SDO_FRAME_SIZE]; u8 abFrame[EPL_MAX_SDO_FRAME_SIZE];
tEplFrame *pFrame; tEplFrame *pFrame;
tEplAsySdoCom *pCommandFrame; tEplAsySdoCom *pCommandFrame;
unsigned int uiSizeOfFrame; unsigned int uiSizeOfFrame;
BYTE bFlags; u8 bFlags;
BYTE *pbPayload; u8 *pbPayload;
Ret = kEplSuccessful; Ret = kEplSuccessful;
...@@ -2683,7 +2683,7 @@ static tEplKernel EplSdoComClientSend(tEplSdoComCon * pSdoComCon_p) ...@@ -2683,7 +2683,7 @@ static tEplKernel EplSdoComClientSend(tEplSdoComCon * pSdoComCon_p)
m_uiTargetIndex); m_uiTargetIndex);
pbPayload += 2; pbPayload += 2;
AmiSetByteToLe(pbPayload, AmiSetByteToLe(pbPayload,
(BYTE) pSdoComCon_p-> (u8) pSdoComCon_p->
m_uiTargetSubIndex); m_uiTargetSubIndex);
// calc size // calc size
uiSizeOfFrame += 4; uiSizeOfFrame += 4;
...@@ -2725,7 +2725,7 @@ static tEplKernel EplSdoComClientSend(tEplSdoComCon * pSdoComCon_p) ...@@ -2725,7 +2725,7 @@ static tEplKernel EplSdoComClientSend(tEplSdoComCon * pSdoComCon_p)
m_uiTargetIndex); m_uiTargetIndex);
pbPayload += 2; pbPayload += 2;
AmiSetByteToLe(pbPayload, AmiSetByteToLe(pbPayload,
(BYTE) (u8)
pSdoComCon_p-> pSdoComCon_p->
m_uiTargetSubIndex); m_uiTargetSubIndex);
// on byte for reserved // on byte for reserved
...@@ -2764,7 +2764,7 @@ static tEplKernel EplSdoComClientSend(tEplSdoComCon * pSdoComCon_p) ...@@ -2764,7 +2764,7 @@ static tEplKernel EplSdoComClientSend(tEplSdoComCon * pSdoComCon_p)
m_uiTargetIndex); m_uiTargetIndex);
pbPayload += 2; pbPayload += 2;
AmiSetByteToLe(pbPayload, AmiSetByteToLe(pbPayload,
(BYTE) (u8)
pSdoComCon_p-> pSdoComCon_p->
m_uiTargetSubIndex); m_uiTargetSubIndex);
// + 2 -> one byte for subindex and one byte reserved // + 2 -> one byte for subindex and one byte reserved
...@@ -2943,7 +2943,7 @@ static tEplKernel EplSdoComClientProcessFrame(tEplSdoComConHdl SdoComCon_p, ...@@ -2943,7 +2943,7 @@ static tEplKernel EplSdoComClientProcessFrame(tEplSdoComConHdl SdoComCon_p,
tEplAsySdoCom * pAsySdoCom_p) tEplAsySdoCom * pAsySdoCom_p)
{ {
tEplKernel Ret; tEplKernel Ret;
BYTE bBuffer; u8 bBuffer;
unsigned int uiBuffer; unsigned int uiBuffer;
unsigned int uiDataSize; unsigned int uiDataSize;
unsigned long ulBuffer; unsigned long ulBuffer;
...@@ -3219,7 +3219,7 @@ static tEplKernel EplSdoComClientSendAbort(tEplSdoComCon * pSdoComCon_p, ...@@ -3219,7 +3219,7 @@ static tEplKernel EplSdoComClientSendAbort(tEplSdoComCon * pSdoComCon_p,
DWORD dwAbortCode_p) DWORD dwAbortCode_p)
{ {
tEplKernel Ret; tEplKernel Ret;
BYTE abFrame[EPL_MAX_SDO_FRAME_SIZE]; u8 abFrame[EPL_MAX_SDO_FRAME_SIZE];
tEplFrame *pFrame; tEplFrame *pFrame;
tEplAsySdoCom *pCommandFrame; tEplAsySdoCom *pCommandFrame;
unsigned int uiSizeOfFrame; unsigned int uiSizeOfFrame;
......
...@@ -550,7 +550,7 @@ static int EplSdoUdpThread(void *pArg_p) ...@@ -550,7 +550,7 @@ static int EplSdoUdpThread(void *pArg_p)
int iError; int iError;
int iCount; int iCount;
int iFreeEntry; int iFreeEntry;
BYTE abBuffer[EPL_MAX_SDO_REC_FRAME_SIZE]; u8 abBuffer[EPL_MAX_SDO_REC_FRAME_SIZE];
unsigned int uiSize; unsigned int uiSize;
tEplSdoConHdl SdoConHdl; tEplSdoConHdl SdoConHdl;
......
...@@ -134,8 +134,8 @@ ...@@ -134,8 +134,8 @@
// functions for ethernet driver // functions for ethernet driver
tEplKernel TgtInitEthIsr(void); tEplKernel TgtInitEthIsr(void);
void TgtFreeEthIsr(void); void TgtFreeEthIsr(void);
void TgtEnableGlobalInterrupt(BYTE fEnable_p); void TgtEnableGlobalInterrupt(u8 fEnable_p);
void TgtEnableEthInterrupt0(BYTE fEnable_p, unsigned int uiInterruptMask_p); void TgtEnableEthInterrupt0(u8 fEnable_p, unsigned int uiInterruptMask_p);
void TgtEnableEthInterrupt1(BYTE fEnable_p, unsigned int uiInterruptMask_p); void TgtEnableEthInterrupt1(u8 fEnable_p, unsigned int uiInterruptMask_p);
#endif // #ifndef _EPLTARGET_H_ #endif // #ifndef _EPLTARGET_H_
...@@ -677,7 +677,7 @@ void *ShbIpcGetShMemPtr(tShbInstance pShbInstance_p) ...@@ -677,7 +677,7 @@ void *ShbIpcGetShMemPtr(tShbInstance pShbInstance_p)
pShbMemHeader = pShbMemHeader =
ShbIpcGetShbMemHeader(ShbIpcGetShbMemInst(pShbInstance_p)); ShbIpcGetShbMemHeader(ShbIpcGetShbMemInst(pShbInstance_p));
if (pShbMemHeader != NULL) { if (pShbMemHeader != NULL) {
pShbShMemPtr = (BYTE *) pShbMemHeader + sizeof(tShbMemHeader); pShbShMemPtr = (u8 *) pShbMemHeader + sizeof(tShbMemHeader);
} else { } else {
pShbShMemPtr = NULL; pShbShMemPtr = NULL;
} }
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
// TracePoint support for realtime-debugging // TracePoint support for realtime-debugging
#ifdef _DBG_TRACE_POINTS_ #ifdef _DBG_TRACE_POINTS_
void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p); void TgtDbgSignalTracePoint(u8 bTracePointNumber_p);
void TgtDbgPostTraceValue(DWORD dwTraceValue_p); void TgtDbgPostTraceValue(DWORD dwTraceValue_p);
#define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p) #define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p)
#define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v) #define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v)
......
...@@ -115,12 +115,12 @@ typedef struct { ...@@ -115,12 +115,12 @@ typedef struct {
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//------------< write BYTE in big endian >-------------------------- //------------< write u8 in big endian >--------------------------
/* /*
void AmiSetByteToBe (void *pAddr_p, BYTE bByteVal_p) void AmiSetByteToBe (void *pAddr_p, u8 bByteVal_p)
{ {
*(BYTE *)pAddr_p = bByteVal_p; *(u8 *)pAddr_p = bByteVal_p;
} }
*/ */
...@@ -173,12 +173,12 @@ void AmiSetDwordToBe(void *pAddr_p, DWORD dwDwordVal_p) ...@@ -173,12 +173,12 @@ void AmiSetDwordToBe(void *pAddr_p, DWORD dwDwordVal_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//------------< write BYTE in little endian >-------------------------- //------------< write u8 in little endian >--------------------------
/* /*
void AmiSetByteToLe (void *pAddr_p, BYTE bByteVal_p) void AmiSetByteToLe (void *pAddr_p, u8 bByteVal_p)
{ {
*(BYTE *)pAddr_p = bByteVal_p; *(u8 *)pAddr_p = bByteVal_p;
} }
*/ */
...@@ -220,12 +220,12 @@ void AmiSetDwordToLe(void *pAddr_p, DWORD dwDwordVal_p) ...@@ -220,12 +220,12 @@ void AmiSetDwordToLe(void *pAddr_p, DWORD dwDwordVal_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//------------< read BYTE in big endian >--------------------------- //------------< read u8 in big endian >---------------------------
/* /*
BYTE AmiGetByteFromBe (void *pAddr_p) u8 AmiGetByteFromBe (void *pAddr_p)
{ {
return ( *(BYTE *)pAddr_p ); return ( *(u8 *)pAddr_p );
} }
*/ */
...@@ -279,12 +279,12 @@ DWORD AmiGetDwordFromBe(void *pAddr_p) ...@@ -279,12 +279,12 @@ DWORD AmiGetDwordFromBe(void *pAddr_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//------------< read BYTE in little endian >--------------------------- //------------< read u8 in little endian >---------------------------
/* /*
BYTE AmiGetByteFromLe (void *pAddr_p) u8 AmiGetByteFromLe (void *pAddr_p)
{ {
return ( *(BYTE *)pAddr_p ); return ( *(u8 *)pAddr_p );
} }
*/ */
...@@ -326,9 +326,9 @@ DWORD AmiGetDwordFromLe(void *pAddr_p) ...@@ -326,9 +326,9 @@ DWORD AmiGetDwordFromLe(void *pAddr_p)
void AmiSetDword24ToBe(void *pAddr_p, DWORD dwDwordVal_p) void AmiSetDword24ToBe(void *pAddr_p, DWORD dwDwordVal_p)
{ {
((BYTE *) pAddr_p)[0] = ((BYTE *) & dwDwordVal_p)[2]; ((u8 *) pAddr_p)[0] = ((u8 *) & dwDwordVal_p)[2];
((BYTE *) pAddr_p)[1] = ((BYTE *) & dwDwordVal_p)[1]; ((u8 *) pAddr_p)[1] = ((u8 *) & dwDwordVal_p)[1];
((BYTE *) pAddr_p)[2] = ((BYTE *) & dwDwordVal_p)[0]; ((u8 *) pAddr_p)[2] = ((u8 *) & dwDwordVal_p)[0];
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -348,9 +348,9 @@ void AmiSetDword24ToBe(void *pAddr_p, DWORD dwDwordVal_p) ...@@ -348,9 +348,9 @@ void AmiSetDword24ToBe(void *pAddr_p, DWORD dwDwordVal_p)
void AmiSetDword24ToLe(void *pAddr_p, DWORD dwDwordVal_p) void AmiSetDword24ToLe(void *pAddr_p, DWORD dwDwordVal_p)
{ {
((BYTE *) pAddr_p)[0] = ((BYTE *) & dwDwordVal_p)[0]; ((u8 *) pAddr_p)[0] = ((u8 *) & dwDwordVal_p)[0];
((BYTE *) pAddr_p)[1] = ((BYTE *) & dwDwordVal_p)[1]; ((u8 *) pAddr_p)[1] = ((u8 *) & dwDwordVal_p)[1];
((BYTE *) pAddr_p)[2] = ((BYTE *) & dwDwordVal_p)[2]; ((u8 *) pAddr_p)[2] = ((u8 *) & dwDwordVal_p)[2];
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -417,14 +417,14 @@ DWORD AmiGetDword24FromLe(void *pAddr_p) ...@@ -417,14 +417,14 @@ DWORD AmiGetDword24FromLe(void *pAddr_p)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void AmiSetQword64ToBe(void *pAddr_p, QWORD qwQwordVal_p) void AmiSetQword64ToBe(void *pAddr_p, QWORD qwQwordVal_p)
{ {
((BYTE *) pAddr_p)[0] = ((BYTE *) & qwQwordVal_p)[7]; ((u8 *) pAddr_p)[0] = ((u8 *) & qwQwordVal_p)[7];
((BYTE *) pAddr_p)[1] = ((BYTE *) & qwQwordVal_p)[6]; ((u8 *) pAddr_p)[1] = ((u8 *) & qwQwordVal_p)[6];
((BYTE *) pAddr_p)[2] = ((BYTE *) & qwQwordVal_p)[5]; ((u8 *) pAddr_p)[2] = ((u8 *) & qwQwordVal_p)[5];
((BYTE *) pAddr_p)[3] = ((BYTE *) & qwQwordVal_p)[4]; ((u8 *) pAddr_p)[3] = ((u8 *) & qwQwordVal_p)[4];
((BYTE *) pAddr_p)[4] = ((BYTE *) & qwQwordVal_p)[3]; ((u8 *) pAddr_p)[4] = ((u8 *) & qwQwordVal_p)[3];
((BYTE *) pAddr_p)[5] = ((BYTE *) & qwQwordVal_p)[2]; ((u8 *) pAddr_p)[5] = ((u8 *) & qwQwordVal_p)[2];
((BYTE *) pAddr_p)[6] = ((BYTE *) & qwQwordVal_p)[1]; ((u8 *) pAddr_p)[6] = ((u8 *) & qwQwordVal_p)[1];
((BYTE *) pAddr_p)[7] = ((BYTE *) & qwQwordVal_p)[0]; ((u8 *) pAddr_p)[7] = ((u8 *) & qwQwordVal_p)[0];
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -466,14 +466,14 @@ QWORD AmiGetQword64FromBe(void *pAddr_p) ...@@ -466,14 +466,14 @@ QWORD AmiGetQword64FromBe(void *pAddr_p)
{ {
tqwStruct qwStruct; tqwStruct qwStruct;
((BYTE *) & qwStruct.m_qwQword)[0] = ((BYTE *) pAddr_p)[7]; ((u8 *) & qwStruct.m_qwQword)[0] = ((u8 *) pAddr_p)[7];
((BYTE *) & qwStruct.m_qwQword)[1] = ((BYTE *) pAddr_p)[6]; ((u8 *) & qwStruct.m_qwQword)[1] = ((u8 *) pAddr_p)[6];
((BYTE *) & qwStruct.m_qwQword)[2] = ((BYTE *) pAddr_p)[5]; ((u8 *) & qwStruct.m_qwQword)[2] = ((u8 *) pAddr_p)[5];
((BYTE *) & qwStruct.m_qwQword)[3] = ((BYTE *) pAddr_p)[4]; ((u8 *) & qwStruct.m_qwQword)[3] = ((u8 *) pAddr_p)[4];
((BYTE *) & qwStruct.m_qwQword)[4] = ((BYTE *) pAddr_p)[3]; ((u8 *) & qwStruct.m_qwQword)[4] = ((u8 *) pAddr_p)[3];
((BYTE *) & qwStruct.m_qwQword)[5] = ((BYTE *) pAddr_p)[2]; ((u8 *) & qwStruct.m_qwQword)[5] = ((u8 *) pAddr_p)[2];
((BYTE *) & qwStruct.m_qwQword)[6] = ((BYTE *) pAddr_p)[1]; ((u8 *) & qwStruct.m_qwQword)[6] = ((u8 *) pAddr_p)[1];
((BYTE *) & qwStruct.m_qwQword)[7] = ((BYTE *) pAddr_p)[0]; ((u8 *) & qwStruct.m_qwQword)[7] = ((u8 *) pAddr_p)[0];
return (qwStruct.m_qwQword); return (qwStruct.m_qwQword);
} }
...@@ -520,11 +520,11 @@ QWORD AmiGetQword64FromLe(void *pAddr_p) ...@@ -520,11 +520,11 @@ QWORD AmiGetQword64FromLe(void *pAddr_p)
void AmiSetQword40ToBe(void *pAddr_p, QWORD qwQwordVal_p) void AmiSetQword40ToBe(void *pAddr_p, QWORD qwQwordVal_p)
{ {
((BYTE *) pAddr_p)[0] = ((BYTE *) & qwQwordVal_p)[4]; ((u8 *) pAddr_p)[0] = ((u8 *) & qwQwordVal_p)[4];
((BYTE *) pAddr_p)[1] = ((BYTE *) & qwQwordVal_p)[3]; ((u8 *) pAddr_p)[1] = ((u8 *) & qwQwordVal_p)[3];
((BYTE *) pAddr_p)[2] = ((BYTE *) & qwQwordVal_p)[2]; ((u8 *) pAddr_p)[2] = ((u8 *) & qwQwordVal_p)[2];
((BYTE *) pAddr_p)[3] = ((BYTE *) & qwQwordVal_p)[1]; ((u8 *) pAddr_p)[3] = ((u8 *) & qwQwordVal_p)[1];
((BYTE *) pAddr_p)[4] = ((BYTE *) & qwQwordVal_p)[0]; ((u8 *) pAddr_p)[4] = ((u8 *) & qwQwordVal_p)[0];
} }
...@@ -547,7 +547,7 @@ void AmiSetQword40ToLe(void *pAddr_p, QWORD qwQwordVal_p) ...@@ -547,7 +547,7 @@ void AmiSetQword40ToLe(void *pAddr_p, QWORD qwQwordVal_p)
{ {
((DWORD *) pAddr_p)[0] = ((DWORD *) & qwQwordVal_p)[0]; ((DWORD *) pAddr_p)[0] = ((DWORD *) & qwQwordVal_p)[0];
((BYTE *) pAddr_p)[4] = ((BYTE *) & qwQwordVal_p)[4]; ((u8 *) pAddr_p)[4] = ((u8 *) & qwQwordVal_p)[4];
} }
...@@ -621,12 +621,12 @@ QWORD AmiGetQword40FromLe(void *pAddr_p) ...@@ -621,12 +621,12 @@ QWORD AmiGetQword40FromLe(void *pAddr_p)
void AmiSetQword48ToBe(void *pAddr_p, QWORD qwQwordVal_p) void AmiSetQword48ToBe(void *pAddr_p, QWORD qwQwordVal_p)
{ {
((BYTE *) pAddr_p)[0] = ((BYTE *) & qwQwordVal_p)[5]; ((u8 *) pAddr_p)[0] = ((u8 *) & qwQwordVal_p)[5];
((BYTE *) pAddr_p)[1] = ((BYTE *) & qwQwordVal_p)[4]; ((u8 *) pAddr_p)[1] = ((u8 *) & qwQwordVal_p)[4];
((BYTE *) pAddr_p)[2] = ((BYTE *) & qwQwordVal_p)[3]; ((u8 *) pAddr_p)[2] = ((u8 *) & qwQwordVal_p)[3];
((BYTE *) pAddr_p)[3] = ((BYTE *) & qwQwordVal_p)[2]; ((u8 *) pAddr_p)[3] = ((u8 *) & qwQwordVal_p)[2];
((BYTE *) pAddr_p)[4] = ((BYTE *) & qwQwordVal_p)[1]; ((u8 *) pAddr_p)[4] = ((u8 *) & qwQwordVal_p)[1];
((BYTE *) pAddr_p)[5] = ((BYTE *) & qwQwordVal_p)[0]; ((u8 *) pAddr_p)[5] = ((u8 *) & qwQwordVal_p)[0];
} }
...@@ -723,13 +723,13 @@ QWORD AmiGetQword48FromLe(void *pAddr_p) ...@@ -723,13 +723,13 @@ QWORD AmiGetQword48FromLe(void *pAddr_p)
void AmiSetQword56ToBe(void *pAddr_p, QWORD qwQwordVal_p) void AmiSetQword56ToBe(void *pAddr_p, QWORD qwQwordVal_p)
{ {
((BYTE *) pAddr_p)[0] = ((BYTE *) & qwQwordVal_p)[6]; ((u8 *) pAddr_p)[0] = ((u8 *) & qwQwordVal_p)[6];
((BYTE *) pAddr_p)[1] = ((BYTE *) & qwQwordVal_p)[5]; ((u8 *) pAddr_p)[1] = ((u8 *) & qwQwordVal_p)[5];
((BYTE *) pAddr_p)[2] = ((BYTE *) & qwQwordVal_p)[4]; ((u8 *) pAddr_p)[2] = ((u8 *) & qwQwordVal_p)[4];
((BYTE *) pAddr_p)[3] = ((BYTE *) & qwQwordVal_p)[3]; ((u8 *) pAddr_p)[3] = ((u8 *) & qwQwordVal_p)[3];
((BYTE *) pAddr_p)[4] = ((BYTE *) & qwQwordVal_p)[2]; ((u8 *) pAddr_p)[4] = ((u8 *) & qwQwordVal_p)[2];
((BYTE *) pAddr_p)[5] = ((BYTE *) & qwQwordVal_p)[1]; ((u8 *) pAddr_p)[5] = ((u8 *) & qwQwordVal_p)[1];
((BYTE *) pAddr_p)[6] = ((BYTE *) & qwQwordVal_p)[0]; ((u8 *) pAddr_p)[6] = ((u8 *) & qwQwordVal_p)[0];
} }
...@@ -753,7 +753,7 @@ void AmiSetQword56ToLe(void *pAddr_p, QWORD qwQwordVal_p) ...@@ -753,7 +753,7 @@ void AmiSetQword56ToLe(void *pAddr_p, QWORD qwQwordVal_p)
((DWORD *) pAddr_p)[0] = ((DWORD *) & qwQwordVal_p)[0]; ((DWORD *) pAddr_p)[0] = ((DWORD *) & qwQwordVal_p)[0];
((WORD *) pAddr_p)[2] = ((WORD *) & qwQwordVal_p)[2]; ((WORD *) pAddr_p)[2] = ((WORD *) & qwQwordVal_p)[2];
((BYTE *) pAddr_p)[6] = ((BYTE *) & qwQwordVal_p)[6]; ((u8 *) pAddr_p)[6] = ((u8 *) & qwQwordVal_p)[6];
} }
...@@ -827,8 +827,8 @@ QWORD AmiGetQword56FromLe(void *pAddr_p) ...@@ -827,8 +827,8 @@ QWORD AmiGetQword56FromLe(void *pAddr_p)
void AmiSetTimeOfDay(void *pAddr_p, tTimeOfDay *pTimeOfDay_p) void AmiSetTimeOfDay(void *pAddr_p, tTimeOfDay *pTimeOfDay_p)
{ {
AmiSetDwordToLe(((BYTE *) pAddr_p), pTimeOfDay_p->m_dwMs & 0x0FFFFFFF); AmiSetDwordToLe(((u8 *) pAddr_p), pTimeOfDay_p->m_dwMs & 0x0FFFFFFF);
AmiSetWordToLe(((BYTE *) pAddr_p) + 4, pTimeOfDay_p->m_wDays); AmiSetWordToLe(((u8 *) pAddr_p) + 4, pTimeOfDay_p->m_wDays);
} }
...@@ -850,8 +850,8 @@ void AmiSetTimeOfDay(void *pAddr_p, tTimeOfDay *pTimeOfDay_p) ...@@ -850,8 +850,8 @@ void AmiSetTimeOfDay(void *pAddr_p, tTimeOfDay *pTimeOfDay_p)
void AmiGetTimeOfDay(void *pAddr_p, tTimeOfDay *pTimeOfDay_p) void AmiGetTimeOfDay(void *pAddr_p, tTimeOfDay *pTimeOfDay_p)
{ {
pTimeOfDay_p->m_dwMs = AmiGetDwordFromLe(((BYTE *) pAddr_p)) & 0x0FFFFFFF; pTimeOfDay_p->m_dwMs = AmiGetDwordFromLe(((u8 *) pAddr_p)) & 0x0FFFFFFF;
pTimeOfDay_p->m_wDays = AmiGetWordFromLe(((BYTE *) pAddr_p) + 4); pTimeOfDay_p->m_wDays = AmiGetWordFromLe(((u8 *) pAddr_p) + 4);
} }
......
...@@ -118,7 +118,7 @@ MODULE_DESCRIPTION("EPL MN demo"); ...@@ -118,7 +118,7 @@ MODULE_DESCRIPTION("EPL MN demo");
// TracePoint support for realtime-debugging // TracePoint support for realtime-debugging
#ifdef _DBG_TRACE_POINTS_ #ifdef _DBG_TRACE_POINTS_
void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p); void TgtDbgSignalTracePoint(u8 bTracePointNumber_p);
#define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p) #define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p)
#else #else
#define TGT_DBG_SIGNAL_TRACE_POINT(p) #define TGT_DBG_SIGNAL_TRACE_POINT(p)
...@@ -148,25 +148,25 @@ void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p); ...@@ -148,25 +148,25 @@ void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p);
// modul globale vars // modul globale vars
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
const BYTE abMacAddr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; const u8 abMacAddr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
BYTE bVarIn1_l; u8 bVarIn1_l;
BYTE bVarOut1_l; u8 bVarOut1_l;
BYTE bVarOut1Old_l; u8 bVarOut1Old_l;
BYTE bModeSelect_l; // state of the pushbuttons to select the mode u8 bModeSelect_l; // state of the pushbuttons to select the mode
BYTE bSpeedSelect_l; // state of the pushbuttons to increase/decrease the speed u8 bSpeedSelect_l; // state of the pushbuttons to increase/decrease the speed
BYTE bSpeedSelectOld_l; // old state of the pushbuttons u8 bSpeedSelectOld_l; // old state of the pushbuttons
DWORD dwLeds_l; // current state of all LEDs DWORD dwLeds_l; // current state of all LEDs
BYTE bLedsRow1_l; // current state of the LEDs in row 1 u8 bLedsRow1_l; // current state of the LEDs in row 1
BYTE bLedsRow2_l; // current state of the LEDs in row 2 u8 bLedsRow2_l; // current state of the LEDs in row 2
BYTE abSelect_l[3]; // pushbuttons from CNs u8 abSelect_l[3]; // pushbuttons from CNs
DWORD dwMode_l; // current mode DWORD dwMode_l; // current mode
int iCurCycleCount_l; // current cycle count int iCurCycleCount_l; // current cycle count
int iMaxCycleCount_l; // maximum cycle count (i.e. number of cycles until next light movement step) int iMaxCycleCount_l; // maximum cycle count (i.e. number of cycles until next light movement step)
int iToggle; // indicates the light movement direction int iToggle; // indicates the light movement direction
BYTE abDomain_l[3000]; u8 abDomain_l[3000];
static wait_queue_head_t WaitQueueShutdown_g; // wait queue for tEplNmtEventSwitchOff static wait_queue_head_t WaitQueueShutdown_g; // wait queue for tEplNmtEventSwitchOff
static atomic_t AtomicShutdown_g = ATOMIC_INIT(FALSE); static atomic_t AtomicShutdown_g = ATOMIC_INIT(FALSE);
...@@ -263,7 +263,7 @@ static int __init EplLinInit(void) ...@@ -263,7 +263,7 @@ static int __init EplLinInit(void)
EplApiInitParam.m_uiSizeOfStruct = sizeof(EplApiInitParam); EplApiInitParam.m_uiSizeOfStruct = sizeof(EplApiInitParam);
EPL_MEMCPY(EplApiInitParam.m_abMacAddress, abMacAddr, EPL_MEMCPY(EplApiInitParam.m_abMacAddress, abMacAddr,
sizeof(EplApiInitParam.m_abMacAddress)); sizeof(EplApiInitParam.m_abMacAddress));
// EplApiInitParam.m_abMacAddress[5] = (BYTE) EplApiInitParam.m_uiNodeId; // EplApiInitParam.m_abMacAddress[5] = (u8) EplApiInitParam.m_uiNodeId;
EplApiInitParam.m_dwFeatureFlags = -1; EplApiInitParam.m_dwFeatureFlags = -1;
EplApiInitParam.m_dwCycleLen = uiCycleLen_g; // required for error detection EplApiInitParam.m_dwCycleLen = uiCycleLen_g; // required for error detection
EplApiInitParam.m_uiIsochrTxMaxPayload = 100; // const EplApiInitParam.m_uiIsochrTxMaxPayload = 100; // const
......
...@@ -104,7 +104,7 @@ typedef struct _tEdrvTxBuffer { ...@@ -104,7 +104,7 @@ typedef struct _tEdrvTxBuffer {
unsigned int m_uiTxMsgLen; // IN: length of message to be send (set for each transmit call) unsigned int m_uiTxMsgLen; // IN: length of message to be send (set for each transmit call)
// ---------------------- // ----------------------
unsigned int m_uiBufferNumber; // OUT: number of the buffer, set by ethernetdriver unsigned int m_uiBufferNumber; // OUT: number of the buffer, set by ethernetdriver
BYTE *m_pbBuffer; // OUT: pointer to the buffer, set by ethernetdriver u8 *m_pbBuffer; // OUT: pointer to the buffer, set by ethernetdriver
tEplNetTime m_NetTime; // OUT: Timestamp of end of transmission, set by ethernetdriver tEplNetTime m_NetTime; // OUT: Timestamp of end of transmission, set by ethernetdriver
// ---------------------- // ----------------------
unsigned int m_uiMaxBufferLen; // IN/OUT: maximum length of the buffer unsigned int m_uiMaxBufferLen; // IN/OUT: maximum length of the buffer
...@@ -114,21 +114,21 @@ typedef struct _tEdrvTxBuffer { ...@@ -114,21 +114,21 @@ typedef struct _tEdrvTxBuffer {
typedef struct _tEdrvRxBuffer { typedef struct _tEdrvRxBuffer {
tEdrvBufferInFrame m_BufferInFrame; // OUT position of received buffer in an ethernet-frame tEdrvBufferInFrame m_BufferInFrame; // OUT position of received buffer in an ethernet-frame
unsigned int m_uiRxMsgLen; // OUT: length of received buffer (without CRC) unsigned int m_uiRxMsgLen; // OUT: length of received buffer (without CRC)
BYTE *m_pbBuffer; // OUT: pointer to the buffer, set by ethernetdriver u8 *m_pbBuffer; // OUT: pointer to the buffer, set by ethernetdriver
tEplNetTime m_NetTime; // OUT: Timestamp of end of receiption tEplNetTime m_NetTime; // OUT: Timestamp of end of receiption
} tEdrvRxBuffer; } tEdrvRxBuffer;
//typedef void (*tEdrvRxHandler) (BYTE bBufferInFrame_p, tBufferDescr * pbBuffer_p); //typedef void (*tEdrvRxHandler) (u8 bBufferInFrame_p, tBufferDescr * pbBuffer_p);
//typedef void (*tEdrvRxHandler) (BYTE bBufferInFrame_p, BYTE * pbEthernetData_p, WORD wDataLen_p); //typedef void (*tEdrvRxHandler) (u8 bBufferInFrame_p, u8 * pbEthernetData_p, WORD wDataLen_p);
typedef void (*tEdrvRxHandler) (tEdrvRxBuffer * pRxBuffer_p); typedef void (*tEdrvRxHandler) (tEdrvRxBuffer * pRxBuffer_p);
typedef void (*tEdrvTxHandler) (tEdrvTxBuffer * pTxBuffer_p); typedef void (*tEdrvTxHandler) (tEdrvTxBuffer * pTxBuffer_p);
// format of init structure // format of init structure
typedef struct { typedef struct {
BYTE m_abMyMacAddr[6]; // the own MAC address u8 m_abMyMacAddr[6]; // the own MAC address
// BYTE m_bNoOfRxBuffDescr; // number of entries in rx bufferdescriptor table // u8 m_bNoOfRxBuffDescr; // number of entries in rx bufferdescriptor table
// tBufferDescr * m_pRxBuffDescrTable; // rx bufferdescriptor table // tBufferDescr * m_pRxBuffDescrTable; // rx bufferdescriptor table
// WORD m_wRxBufferSize; // size of the whole rx buffer // WORD m_wRxBufferSize; // size of the whole rx buffer
...@@ -145,11 +145,11 @@ tEplKernel EdrvInit(tEdrvInitParam * pEdrvInitParam_p); ...@@ -145,11 +145,11 @@ tEplKernel EdrvInit(tEdrvInitParam * pEdrvInitParam_p);
tEplKernel EdrvShutdown(void); tEplKernel EdrvShutdown(void);
tEplKernel EdrvDefineRxMacAddrEntry(BYTE * pbMacAddr_p); tEplKernel EdrvDefineRxMacAddrEntry(u8 * pbMacAddr_p);
tEplKernel EdrvUndefineRxMacAddrEntry(BYTE * pbMacAddr_p); tEplKernel EdrvUndefineRxMacAddrEntry(u8 * pbMacAddr_p);
//tEplKernel EdrvDefineUnicastEntry (BYTE * pbUCEntry_p); //tEplKernel EdrvDefineUnicastEntry (u8 * pbUCEntry_p);
//tEplKernel EdrvUndfineUnicastEntry (BYTE * pbUCEntry_p); //tEplKernel EdrvUndfineUnicastEntry (u8 * pbUCEntry_p);
tEplKernel EdrvAllocTxMsgBuffer(tEdrvTxBuffer * pBuffer_p); tEplKernel EdrvAllocTxMsgBuffer(tEdrvTxBuffer * pBuffer_p);
tEplKernel EdrvReleaseTxMsgBuffer(tEdrvTxBuffer * pBuffer_p); tEplKernel EdrvReleaseTxMsgBuffer(tEdrvTxBuffer * pBuffer_p);
......
...@@ -30,9 +30,6 @@ ...@@ -30,9 +30,6 @@
#define TRACE printk #define TRACE printk
// --- logic types --- // --- logic types ---
#ifndef BYTE
#define BYTE unsigned char
#endif
#ifndef WORD #ifndef WORD
#define WORD unsigned short int #define WORD unsigned short int
#endif #endif
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
typedef tEplKernel(*tEplDllkCbAsync) (tEplFrameInfo * pFrameInfo_p); typedef tEplKernel(*tEplDllkCbAsync) (tEplFrameInfo * pFrameInfo_p);
typedef struct { typedef struct {
BYTE m_be_abSrcMac[6]; u8 m_be_abSrcMac[6];
} tEplDllkInitParam; } tEplDllkInitParam;
...@@ -100,8 +100,8 @@ struct _tEplDllkNodeInfo { ...@@ -100,8 +100,8 @@ struct _tEplDllkNodeInfo {
unsigned long m_ulDllErrorEvents; unsigned long m_ulDllErrorEvents;
tEplNmtState m_NmtState; tEplNmtState m_NmtState;
WORD m_wPresPayloadLimit; WORD m_wPresPayloadLimit;
BYTE m_be_abMacAddr[6]; u8 m_be_abMacAddr[6];
BYTE m_bSoaFlag1; u8 m_bSoaFlag1;
BOOL m_fSoftDelete; // delete node after error and ignore error BOOL m_fSoftDelete; // delete node after error and ignore error
}; };
...@@ -154,7 +154,7 @@ tEplKernel EplDllkDeleteNode(unsigned int uiNodeId_p); ...@@ -154,7 +154,7 @@ tEplKernel EplDllkDeleteNode(unsigned int uiNodeId_p);
tEplKernel EplDllkSoftDeleteNode(unsigned int uiNodeId_p); tEplKernel EplDllkSoftDeleteNode(unsigned int uiNodeId_p);
tEplKernel EplDllkSetFlag1OfNode(unsigned int uiNodeId_p, BYTE bSoaFlag1_p); tEplKernel EplDllkSetFlag1OfNode(unsigned int uiNodeId_p, u8 bSoaFlag1_p);
tEplKernel EplDllkGetFirstNodeInfo(tEplDllkNodeInfo ** ppNodeInfo_p); tEplKernel EplDllkGetFirstNodeInfo(tEplDllkNodeInfo ** ppNodeInfo_p);
......
...@@ -124,7 +124,7 @@ tEplKernel EplDllkCalProcess(tEplEvent * pEvent_p); ...@@ -124,7 +124,7 @@ tEplKernel EplDllkCalProcess(tEplEvent * pEvent_p);
tEplKernel EplDllkCalAsyncClearQueues(void); tEplKernel EplDllkCalAsyncClearQueues(void);
tEplKernel EplDllkCalIssueRequest(tEplDllReqServiceId Service_p, tEplKernel EplDllkCalIssueRequest(tEplDllReqServiceId Service_p,
unsigned int uiNodeId_p, BYTE bSoaFlag1_p); unsigned int uiNodeId_p, u8 bSoaFlag1_p);
tEplKernel EplDllkCalAsyncGetSoaRequest(tEplDllReqServiceId * pReqServiceId_p, tEplKernel EplDllkCalAsyncGetSoaRequest(tEplDllReqServiceId * pReqServiceId_p,
unsigned int *puiNodeId_p); unsigned int *puiNodeId_p);
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
// global variables // global variables
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
extern BYTE abEplObdTrashObject_g[8]; extern u8 abEplObdTrashObject_g[8];
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
......
...@@ -145,7 +145,7 @@ static int EplLinProcRead(char *pcBuffer_p, char **ppcStart_p, off_t Offset_p, ...@@ -145,7 +145,7 @@ static int EplLinProcRead(char *pcBuffer_p, char **ppcStart_p, off_t Offset_p,
static int EplLinProcWrite(struct file *file, const char __user * buffer, static int EplLinProcWrite(struct file *file, const char __user * buffer,
unsigned long count, void *data); unsigned long count, void *data);
void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p); void TgtDbgSignalTracePoint(u8 bTracePointNumber_p);
void TgtDbgPostTraceValue(DWORD dwTraceValue_p); void TgtDbgPostTraceValue(DWORD dwTraceValue_p);
EPLDLLEXPORT DWORD EplIdentuGetRunningRequests(void); EPLDLLEXPORT DWORD EplIdentuGetRunningRequests(void);
...@@ -191,7 +191,7 @@ tEplKernel EplLinProcFree(void) ...@@ -191,7 +191,7 @@ tEplKernel EplLinProcFree(void)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#ifdef _DBG_TRACE_POINTS_ #ifdef _DBG_TRACE_POINTS_
void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p) void TgtDbgSignalTracePoint(u8 bTracePointNumber_p)
{ {
if (bTracePointNumber_p >= if (bTracePointNumber_p >=
......
...@@ -133,18 +133,18 @@ typedef struct { ...@@ -133,18 +133,18 @@ typedef struct {
tEplSdoComConHdl m_SdoComConHdl; // handle for sdo connection tEplSdoComConHdl m_SdoComConHdl; // handle for sdo connection
DWORD m_dwLastAbortCode; DWORD m_dwLastAbortCode;
unsigned int m_uiLastIndex; // last index of configuration, to compair with actual index unsigned int m_uiLastIndex; // last index of configuration, to compair with actual index
BYTE *m_pbConcise; // Ptr to concise DCF u8 *m_pbConcise; // Ptr to concise DCF
BYTE *m_pbActualIndex; // Ptr to actual index in the DCF segment u8 *m_pbActualIndex; // Ptr to actual index in the DCF segment
tfpEplCfgMaCb m_pfnCfgMaCb; // Ptr to CfgMa Callback, is call if configuration finished tfpEplCfgMaCb m_pfnCfgMaCb; // Ptr to CfgMa Callback, is call if configuration finished
tEplKernel m_EplKernelError; // errorcode tEplKernel m_EplKernelError; // errorcode
DWORD m_dwNumValueCopy; // numeric values are copied in this variable DWORD m_dwNumValueCopy; // numeric values are copied in this variable
unsigned int m_uiPdoNodeId; // buffer for PDO node id unsigned int m_uiPdoNodeId; // buffer for PDO node id
BYTE m_bNrOfMappedObject; // number of mapped objects u8 m_bNrOfMappedObject; // number of mapped objects
unsigned int m_uiNodeId; // Epl node addresse unsigned int m_uiNodeId; // Epl node addresse
tEplSdocState m_SdocState; // bitcoded state of the SDO transfer tEplSdocState m_SdocState; // bitcoded state of the SDO transfer
unsigned int m_uiLastSubIndex; // last subindex of configuration unsigned int m_uiLastSubIndex; // last subindex of configuration
BOOL m_fOneTranferOk; // atleased one transfer was successful BOOL m_fOneTranferOk; // atleased one transfer was successful
BYTE m_bEventFlag; // for Eventsignaling to the State Maschine u8 m_bEventFlag; // for Eventsignaling to the State Maschine
DWORD m_dwCntObjectInDcf; // number of Objects in DCF DWORD m_dwCntObjectInDcf; // number of Objects in DCF
tEplCfgMaIndexType m_SkipCfg; // TRUE if a adsitional Configurationprocess tEplCfgMaIndexType m_SkipCfg; // TRUE if a adsitional Configurationprocess
// have to insert e.g. PDO-mapping // have to insert e.g. PDO-mapping
...@@ -199,13 +199,13 @@ tEplKernel plCfgMaDelInstance(void); ...@@ -199,13 +199,13 @@ tEplKernel plCfgMaDelInstance(void);
// Parameters: uiNodeId_p = NodeId of the node to configure // Parameters: uiNodeId_p = NodeId of the node to configure
// pbConcise_p = pointer to DCF // pbConcise_p = pointer to DCF
// fpCfgMaCb_p = pointer to callback function (should not be NULL) // fpCfgMaCb_p = pointer to callback function (should not be NULL)
// SizeOfConcise_p = size of DCF in BYTE -> for future use // SizeOfConcise_p = size of DCF in u8 -> for future use
// DcfType_p = type of the DCF // DcfType_p = type of the DCF
// //
// Returns: tCopKernel = error code // Returns: tCopKernel = error code
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
tEplKernel EplCfgMaStartConfig(unsigned int uiNodeId_p, tEplKernel EplCfgMaStartConfig(unsigned int uiNodeId_p,
BYTE * pbConcise_p, u8 * pbConcise_p,
tfpEplCfgMaCb fpCfgMaCb_p, tfpEplCfgMaCb fpCfgMaCb_p,
tEplObdSize SizeOfConcise_p, tEplObdSize SizeOfConcise_p,
tEplCfgMaDcfTyp DcfType_p); tEplCfgMaDcfTyp DcfType_p);
...@@ -235,13 +235,13 @@ tEplKernel EplCfgMaStartConfigNode(unsigned int uiNodeId_p, ...@@ -235,13 +235,13 @@ tEplKernel EplCfgMaStartConfigNode(unsigned int uiNodeId_p,
// Parameters: uiNodeId_p = NodeId of the node to configure // Parameters: uiNodeId_p = NodeId of the node to configure
// pbConcise_p = pointer to DCF // pbConcise_p = pointer to DCF
// fpCfgMaCb_p = pointer to callback function (should not be NULL) // fpCfgMaCb_p = pointer to callback function (should not be NULL)
// SizeOfConcise_p = size of DCF in BYTE -> for future use // SizeOfConcise_p = size of DCF in u8 -> for future use
// DcfType_p = type of the DCF // DcfType_p = type of the DCF
// //
// Returns: tCopKernel = error code // Returns: tCopKernel = error code
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
tEplKernel EplCfgMaStartConfigNodeDcf(unsigned int uiNodeId_p, tEplKernel EplCfgMaStartConfigNodeDcf(unsigned int uiNodeId_p,
BYTE * pbConcise_p, u8 * pbConcise_p,
tfpEplCfgMaCb fpCfgMaCb_p, tfpEplCfgMaCb fpCfgMaCb_p,
tEplObdSize SizeOfConcise_p, tEplObdSize SizeOfConcise_p,
tEplCfgMaDcfTyp DcfType_p); tEplCfgMaDcfTyp DcfType_p);
...@@ -253,13 +253,13 @@ tEplKernel EplCfgMaStartConfigNodeDcf(unsigned int uiNodeId_p, ...@@ -253,13 +253,13 @@ tEplKernel EplCfgMaStartConfigNodeDcf(unsigned int uiNodeId_p,
// //
// Parameters: uiNodeId_p = NodeId of the node to configure // Parameters: uiNodeId_p = NodeId of the node to configure
// pbConcise_p = pointer to DCF // pbConcise_p = pointer to DCF
// SizeOfConcise_p = size of DCF in BYTE -> for future use // SizeOfConcise_p = size of DCF in u8 -> for future use
// DcfType_p = type of the DCF // DcfType_p = type of the DCF
// //
// Returns: tCopKernel = error code // Returns: tCopKernel = error code
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
tEplKernel EplCfgMaLinkDcf(unsigned int uiNodeId_p, tEplKernel EplCfgMaLinkDcf(unsigned int uiNodeId_p,
BYTE * pbConcise_p, u8 * pbConcise_p,
tEplObdSize SizeOfConcise_p, tEplObdSize SizeOfConcise_p,
tEplCfgMaDcfTyp DcfType_p); tEplCfgMaDcfTyp DcfType_p);
......
...@@ -110,7 +110,7 @@ tEplKernel EplDlluCalDeleteNode(unsigned int uiNodeId_p); ...@@ -110,7 +110,7 @@ tEplKernel EplDlluCalDeleteNode(unsigned int uiNodeId_p);
tEplKernel EplDlluCalSoftDeleteNode(unsigned int uiNodeId_p); tEplKernel EplDlluCalSoftDeleteNode(unsigned int uiNodeId_p);
tEplKernel EplDlluCalIssueRequest(tEplDllReqServiceId Service_p, tEplKernel EplDlluCalIssueRequest(tEplDllReqServiceId Service_p,
unsigned int uiNodeId_p, BYTE bSoaFlag1_p); unsigned int uiNodeId_p, u8 bSoaFlag1_p);
#endif #endif
......
...@@ -117,7 +117,7 @@ EPLDLLEXPORT tEplKernel EplObduRegisterUserOd(tEplObdEntryPtr pUserOd_p); ...@@ -117,7 +117,7 @@ EPLDLLEXPORT tEplKernel EplObduRegisterUserOd(tEplObdEntryPtr pUserOd_p);
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
EPLDLLEXPORT void EplObduInitVarEntry(tEplObdVarEntry *pVarEntry_p, EPLDLLEXPORT void EplObduInitVarEntry(tEplObdVarEntry *pVarEntry_p,
BYTE bType_p, tEplObdSize ObdSize_p); u8 bType_p, tEplObdSize ObdSize_p);
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
EPLDLLEXPORT tEplObdSize EplObduGetDataSize(unsigned int uiIndex_p, EPLDLLEXPORT tEplObdSize EplObduGetDataSize(unsigned int uiIndex_p,
......
...@@ -106,7 +106,7 @@ EPLDLLEXPORT void *EplObduCalGetObjectDataPtr(unsigned int uiIndex_p, ...@@ -106,7 +106,7 @@ EPLDLLEXPORT void *EplObduCalGetObjectDataPtr(unsigned int uiIndex_p,
EPLDLLEXPORT tEplKernel EplObduCalRegisterUserOd(tEplObdEntryPtr pUserOd_p); EPLDLLEXPORT tEplKernel EplObduCalRegisterUserOd(tEplObdEntryPtr pUserOd_p);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
EPLDLLEXPORT void EplObduCalInitVarEntry(tEplObdVarEntry *pVarEntry_p, EPLDLLEXPORT void EplObduCalInitVarEntry(tEplObdVarEntry *pVarEntry_p,
BYTE bType_p, tEplObdSize ObdSize_p); u8 bType_p, tEplObdSize ObdSize_p);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
EPLDLLEXPORT tEplObdSize EplObduCalGetDataSize(unsigned int uiIndex_p, EPLDLLEXPORT tEplObdSize EplObduCalGetDataSize(unsigned int uiIndex_p,
unsigned int uiSubIndex_p); unsigned int uiSubIndex_p);
......
...@@ -97,12 +97,12 @@ tEplKernel EplPdouCbObdAccess(tEplObdCbParam *pParam_p); ...@@ -97,12 +97,12 @@ tEplKernel EplPdouCbObdAccess(tEplObdCbParam *pParam_p);
// returns error if bPdoId_p is already valid // returns error if bPdoId_p is already valid
/* /*
tEplKernel EplPdouSetMapping( tEplKernel EplPdouSetMapping(
BYTE bPdoId_p, BOOL fTxRx_p, BYTE bNodeId, BYTE bMappingVersion, u8 bPdoId_p, BOOL fTxRx_p, u8 bNodeId, u8 bMappingVersion,
tEplPdoMapping * pMapping_p, BYTE bMaxEntries_p); tEplPdoMapping * pMapping_p, u8 bMaxEntries_p);
tEplKernel EplPdouGetMapping( tEplKernel EplPdouGetMapping(
BYTE bPdoId_p, BOOL fTxRx_p, BYTE * pbNodeId, BYTE * pbMappingVersion, u8 bPdoId_p, BOOL fTxRx_p, u8 * pbNodeId, u8 * pbMappingVersion,
tEplPdoMapping * pMapping_p, BYTE * pbMaxEntries_p); tEplPdoMapping * pMapping_p, u8 * pbMaxEntries_p);
*/ */
#endif // #ifndef _EPL_PDOU_H_ #endif // #ifndef _EPL_PDOU_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment