diff options
Diffstat (limited to 'drivers/staging/epl/EplDllk.c')
-rw-r--r-- | drivers/staging/epl/EplDllk.c | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/drivers/staging/epl/EplDllk.c b/drivers/staging/epl/EplDllk.c index 8fafe7524428..d22e74ee25ea 100644 --- a/drivers/staging/epl/EplDllk.c +++ b/drivers/staging/epl/EplDllk.c @@ -121,7 +121,7 @@ // TracePoint support for realtime-debugging #ifdef _DBG_TRACE_POINTS_ -void TgtDbgSignalTracePoint(BYTE bTracePointNumber_p); +void TgtDbgSignalTracePoint(u8 bTracePointNumber_p); void TgtDbgPostTraceValue(DWORD dwTraceValue_p); #define TGT_DBG_SIGNAL_TRACE_POINT(p) TgtDbgSignalTracePoint(p) #define TGT_DBG_POST_TRACE_VALUE(v) TgtDbgPostTraceValue(v) @@ -195,12 +195,12 @@ typedef enum { } tEplDllState; typedef struct { - BYTE m_be_abSrcMac[6]; + u8 m_be_abSrcMac[6]; tEdrvTxBuffer *m_pTxBuffer; // Buffers for Tx-Frames unsigned int m_uiMaxTxFrames; - BYTE m_bFlag1; // Flag 1 with EN, EC for PRes, StatusRes - BYTE m_bMnFlag1; // Flag 1 with EA, ER from PReq, SoA of MN - BYTE m_bFlag2; // Flag 2 with PR and RS for PRes, StatusRes, IdentRes + u8 m_bFlag1; // Flag 1 with EN, EC for PRes, StatusRes + u8 m_bMnFlag1; // Flag 1 with EA, ER from PReq, SoA of MN + u8 m_bFlag2; // Flag 2 with PR and RS for PRes, StatusRes, IdentRes tEplDllConfigParam m_DllConfigParam; tEplDllIdentParam m_DllIdentParam; tEplDllState m_DllState; @@ -513,7 +513,7 @@ tEplKernel EplDllkCreateTxFrame(unsigned int *puiHandle_p, EPL_C_DLL_ETHERTYPE_EPL); // source node ID AmiSetByteToLe(&pTxFrame->m_le_bSrcNodeId, - (BYTE) EplDllkInstance_g.m_DllConfigParam. + (u8) EplDllkInstance_g.m_DllConfigParam. m_uiNodeId); // source MAC address EPL_MEMCPY(&pTxFrame->m_be_abSrcMac[0], @@ -530,7 +530,7 @@ tEplKernel EplDllkCreateTxFrame(unsigned int *puiHandle_p, { // IdentResponses and StatusResponses are Broadcast AmiSetByteToLe(&pTxFrame-> m_le_bDstNodeId, - (BYTE) + (u8) EPL_C_ADR_BROADCAST); break; } @@ -549,10 +549,10 @@ tEplKernel EplDllkCreateTxFrame(unsigned int *puiHandle_p, EPL_C_DLL_MULTICAST_SOC); // destination node ID AmiSetByteToLe(&pTxFrame->m_le_bDstNodeId, - (BYTE) EPL_C_ADR_BROADCAST); + (u8) EPL_C_ADR_BROADCAST); // reset Flags - //AmiSetByteToLe(&pTxFrame->m_Data.m_Soc.m_le_bFlag1, (BYTE) 0); - //AmiSetByteToLe(&pTxFrame->m_Data.m_Soc.m_le_bFlag2, (BYTE) 0); + //AmiSetByteToLe(&pTxFrame->m_Data.m_Soc.m_le_bFlag1, (u8) 0); + //AmiSetByteToLe(&pTxFrame->m_Data.m_Soc.m_le_bFlag2, (u8) 0); break; case kEplMsgTypeSoa: @@ -561,13 +561,13 @@ tEplKernel EplDllkCreateTxFrame(unsigned int *puiHandle_p, EPL_C_DLL_MULTICAST_SOA); // destination node ID AmiSetByteToLe(&pTxFrame->m_le_bDstNodeId, - (BYTE) EPL_C_ADR_BROADCAST); + (u8) EPL_C_ADR_BROADCAST); // reset Flags - //AmiSetByteToLe(&pTxFrame->m_Data.m_Soa.m_le_bFlag1, (BYTE) 0); - //AmiSetByteToLe(&pTxFrame->m_Data.m_Soa.m_le_bFlag2, (BYTE) 0); + //AmiSetByteToLe(&pTxFrame->m_Data.m_Soa.m_le_bFlag1, (u8) 0); + //AmiSetByteToLe(&pTxFrame->m_Data.m_Soa.m_le_bFlag2, (u8) 0); // EPL profile version AmiSetByteToLe(&pTxFrame->m_Data.m_Soa.m_le_bEplVersion, - (BYTE) EPL_SPEC_VERSION); + (u8) EPL_SPEC_VERSION); break; case kEplMsgTypePres: @@ -576,18 +576,18 @@ tEplKernel EplDllkCreateTxFrame(unsigned int *puiHandle_p, EPL_C_DLL_MULTICAST_PRES); // destination node ID AmiSetByteToLe(&pTxFrame->m_le_bDstNodeId, - (BYTE) EPL_C_ADR_BROADCAST); + (u8) EPL_C_ADR_BROADCAST); // reset Flags - //AmiSetByteToLe(&pTxFrame->m_Data.m_Pres.m_le_bFlag1, (BYTE) 0); - //AmiSetByteToLe(&pTxFrame->m_Data.m_Pres.m_le_bFlag2, (BYTE) 0); + //AmiSetByteToLe(&pTxFrame->m_Data.m_Pres.m_le_bFlag1, (u8) 0); + //AmiSetByteToLe(&pTxFrame->m_Data.m_Pres.m_le_bFlag2, (u8) 0); // PDO size //AmiSetWordToLe(&pTxFrame->m_Data.m_Pres.m_le_wSize, 0); break; case kEplMsgTypePreq: // reset Flags - //AmiSetByteToLe(&pTxFrame->m_Data.m_Preq.m_le_bFlag1, (BYTE) 0); - //AmiSetByteToLe(&pTxFrame->m_Data.m_Preq.m_le_bFlag2, (BYTE) 0); + //AmiSetByteToLe(&pTxFrame->m_Data.m_Preq.m_le_bFlag1, (u8) 0); + //AmiSetByteToLe(&pTxFrame->m_Data.m_Preq.m_le_bFlag2, (u8) 0); // PDO size //AmiSetWordToLe(&pTxFrame->m_Data.m_Preq.m_le_wSize, 0); break; @@ -596,7 +596,7 @@ tEplKernel EplDllkCreateTxFrame(unsigned int *puiHandle_p, break; } // EPL message type - AmiSetByteToLe(&pTxFrame->m_le_bMessageType, (BYTE) MsgType_p); + AmiSetByteToLe(&pTxFrame->m_le_bMessageType, (u8) MsgType_p); } *ppFrame_p = pTxFrame; @@ -672,7 +672,7 @@ tEplKernel EplDllkProcess(tEplEvent * pEvent_p) tEdrvTxBuffer *pTxBuffer; unsigned int uiHandle; unsigned int uiFrameSize; - BYTE abMulticastMac[6]; + u8 abMulticastMac[6]; tEplDllAsyncReqPriority AsyncReqPriority; unsigned int uiFrameCount; tEplNmtState NmtState; @@ -711,7 +711,7 @@ tEplKernel EplDllkProcess(tEplEvent * pEvent_p) // EPL profile version AmiSetByteToLe(&pTxFrame->m_Data.m_Asnd.m_Payload. m_IdentResponse.m_le_bEplProfileVersion, - (BYTE) EPL_SPEC_VERSION); + (u8) EPL_SPEC_VERSION); // FeatureFlags AmiSetDwordToLe(&pTxFrame->m_Data.m_Asnd.m_Payload. m_IdentResponse.m_le_dwFeatureFlags, @@ -1232,7 +1232,7 @@ tEplKernel EplDllkProcess(tEplEvent * pEvent_p) } if (uiFrameCount > 0) { EplDllkInstance_g.m_bFlag2 = - (BYTE) (((AsyncReqPriority << + (u8) (((AsyncReqPriority << EPL_FRAME_FLAG2_PR_SHIFT) & EPL_FRAME_FLAG2_PR) | (uiFrameCount & @@ -1306,7 +1306,7 @@ tEplKernel EplDllkProcess(tEplEvent * pEvent_p) } AmiSetByteToLe(&pTxFrame->m_Data.m_Pres. m_le_bNmtStatus, - (BYTE) NmtState); + (u8) NmtState); AmiSetByteToLe(&pTxFrame->m_Data.m_Pres. m_le_bFlag2, EplDllkInstance_g. @@ -1532,7 +1532,7 @@ tEplKernel EplDllkSetAsndServiceIdFilter(tEplDllAsndServiceId ServiceId_p, // //--------------------------------------------------------------------------- -tEplKernel EplDllkSetFlag1OfNode(unsigned int uiNodeId_p, BYTE bSoaFlag1_p) +tEplKernel EplDllkSetFlag1OfNode(unsigned int uiNodeId_p, u8 bSoaFlag1_p) { tEplKernel Ret = kEplSuccessful; tEplDllkNodeInfo *pNodeInfo; @@ -1663,7 +1663,7 @@ tEplKernel EplDllkAddNode(tEplDllNodeInfo * pNodeInfo_p) pIntNodeInfo->m_pPreqTxBuffer = &EplDllkInstance_g.m_pTxBuffer[uiHandle]; AmiSetByteToLe(&pFrame->m_le_bDstNodeId, - (BYTE) pNodeInfo_p->m_uiNodeId); + (u8) pNodeInfo_p->m_uiNodeId); // set up destination MAC address EPL_MEMCPY(pFrame->m_be_abDstMac, pIntNodeInfo->m_be_abMacAddr, @@ -2430,7 +2430,7 @@ static void EplDllkCbFrameReceived(tEdrvRxBuffer * pRxBuffer_p) tEplDllReqServiceId ReqServiceId; unsigned int uiAsndServiceId; unsigned int uiNodeId; - BYTE bFlag1; + u8 bFlag1; BENCHMARK_MOD_02_SET(3); NmtState = EplNmtkGetNmtState(); @@ -2465,7 +2465,7 @@ static void EplDllkCbFrameReceived(tEdrvRxBuffer * pRxBuffer_p) // update frame (NMT state, RD, RS, PR, MS, EN flags) AmiSetByteToLe(&pTxFrame->m_Data.m_Pres. m_le_bNmtStatus, - (BYTE) NmtState); + (u8) NmtState); AmiSetByteToLe(&pTxFrame->m_Data.m_Pres. m_le_bFlag2, EplDllkInstance_g. @@ -2540,7 +2540,7 @@ static void EplDllkCbFrameReceived(tEdrvRxBuffer * pRxBuffer_p) // update frame (NMT state, RD, RS, PR, MS, EN flags) AmiSetByteToLe(&pTxFrame->m_Data.m_Pres. m_le_bNmtStatus, - (BYTE) NmtState); + (u8) NmtState); AmiSetByteToLe(&pTxFrame->m_Data.m_Pres. m_le_bFlag2, EplDllkInstance_g. @@ -2802,7 +2802,7 @@ static void EplDllkCbFrameReceived(tEdrvRxBuffer * pRxBuffer_p) } AmiSetByteToLe(&pTxFrame->m_Data.m_Pres. m_le_bNmtStatus, - (BYTE) NmtState); + (u8) NmtState); AmiSetByteToLe(&pTxFrame->m_Data.m_Pres. m_le_bFlag2, EplDllkInstance_g.m_bFlag2); @@ -2887,7 +2887,7 @@ static void EplDllkCbFrameReceived(tEdrvRxBuffer * pRxBuffer_p) m_Payload. m_StatusResponse. m_le_bNmtStatus, - (BYTE) NmtState); + (u8) NmtState); AmiSetByteToLe(&pTxFrame-> m_Data.m_Asnd. m_Payload. @@ -2953,7 +2953,7 @@ static void EplDllkCbFrameReceived(tEdrvRxBuffer * pRxBuffer_p) m_Payload. m_IdentResponse. m_le_bNmtStatus, - (BYTE) NmtState); + (u8) NmtState); AmiSetByteToLe(&pTxFrame-> m_Data.m_Asnd. m_Payload. @@ -3285,7 +3285,7 @@ static void EplDllkCbFrameTransmitted(tEdrvTxBuffer * pTxBuffer_p) m_Payload. m_StatusResponse. m_le_bNmtStatus, - (BYTE) NmtState); + (u8) NmtState); AmiSetByteToLe(&pTxFrame->m_Data.m_Asnd. m_Payload. m_StatusResponse. @@ -3321,7 +3321,7 @@ static void EplDllkCbFrameTransmitted(tEdrvTxBuffer * pTxBuffer_p) m_Payload. m_IdentResponse. m_le_bNmtStatus, - (BYTE) NmtState); + (u8) NmtState); AmiSetByteToLe(&pTxFrame->m_Data.m_Asnd. m_Payload. m_IdentResponse. @@ -3361,12 +3361,12 @@ static void EplDllkCbFrameTransmitted(tEdrvTxBuffer * pTxBuffer_p) if ((AmiGetByteFromLe (&pTxFrame-> m_le_bMessageType) - == (BYTE) kEplMsgTypeAsnd) + == (u8) kEplMsgTypeAsnd) && (AmiGetByteFromLe (&pTxFrame->m_Data.m_Asnd. m_le_bServiceId) - == (BYTE) kEplDllAsndNmtCommand)) { // post event directly to NmtMnu module + == (u8) kEplDllAsndNmtCommand)) { // post event directly to NmtMnu module Event.m_EventSink = kEplEventSinkNmtMnu; Event.m_EventType = @@ -3505,7 +3505,7 @@ static tEplKernel EplDllkCheckFrame(tEplFrame * pFrame_p, if (wEtherType == EPL_C_DLL_ETHERTYPE_EPL) { // source node ID AmiSetByteToLe(&pFrame_p->m_le_bSrcNodeId, - (BYTE) EplDllkInstance_g. + (u8) EplDllkInstance_g. m_DllConfigParam.m_uiNodeId); // check message type @@ -3514,7 +3514,7 @@ static tEplKernel EplDllkCheckFrame(tEplFrame * pFrame_p, if (MsgType == 0) { MsgType = kEplMsgTypeAsnd; AmiSetByteToLe(&pFrame_p->m_le_bMessageType, - (BYTE) MsgType); + (u8) MsgType); } if (MsgType == kEplMsgTypeAsnd) { @@ -3825,24 +3825,24 @@ static tEplKernel EplDllkMnSendSoa(tEplNmtState NmtState_p, // update frame (target) AmiSetByteToLe(&pTxFrame->m_Data.m_Soa. m_le_bReqServiceId, - (BYTE) EplDllkInstance_g. + (u8) EplDllkInstance_g. m_LastReqServiceId); AmiSetByteToLe(&pTxFrame->m_Data.m_Soa. m_le_bReqServiceTarget, - (BYTE) EplDllkInstance_g. + (u8) EplDllkInstance_g. m_uiLastTargetNodeId); } else { // invite nobody // update frame (target) AmiSetByteToLe(&pTxFrame->m_Data.m_Soa. - m_le_bReqServiceId, (BYTE) 0); + m_le_bReqServiceId, (u8) 0); AmiSetByteToLe(&pTxFrame->m_Data.m_Soa. - m_le_bReqServiceTarget, (BYTE) 0); + m_le_bReqServiceTarget, (u8) 0); } // update frame (NMT state) AmiSetByteToLe(&pTxFrame->m_Data.m_Soa.m_le_bNmtStatus, - (BYTE) NmtState_p); + (u8) NmtState_p); // send SoA frame Ret = EdrvSendTxMsg(pTxBuffer); @@ -3919,7 +3919,7 @@ static tEplKernel EplDllkMnSendPreq(tEplNmtState NmtState_p, tEplKernel Ret = kEplSuccessful; tEdrvTxBuffer *pTxBuffer = NULL; tEplFrame *pTxFrame; - BYTE bFlag1 = 0; + u8 bFlag1 = 0; if (EplDllkInstance_g.m_pCurNodeInfo == NULL) { // start with first isochronous CN EplDllkInstance_g.m_pCurNodeInfo = @@ -3970,7 +3970,7 @@ static tEplKernel EplDllkMnSendPreq(tEplNmtState NmtState_p, if (pTxBuffer == &EplDllkInstance_g.m_pTxBuffer[EPL_DLLK_TXFRAME_PRES]) { // PRes of MN will be sent // update NMT state AmiSetByteToLe(&pTxFrame->m_Data.m_Pres.m_le_bNmtStatus, - (BYTE) NmtState_p); + (u8) NmtState_p); *pDllStateProposed_p = kEplDllMsWaitSoaTrig; } // $$$ d.k. set EPL_FRAME_FLAG1_MS if necessary @@ -4013,7 +4013,7 @@ static tEplKernel EplDllkAsyncFrameNotReceived(tEplDllReqServiceId unsigned int uiNodeId_p) { tEplKernel Ret = kEplSuccessful; - BYTE abBuffer[18]; + u8 abBuffer[18]; tEplFrame *pFrame = (tEplFrame *) abBuffer; tEplFrameInfo FrameInfo; @@ -4024,13 +4024,13 @@ static tEplKernel EplDllkAsyncFrameNotReceived(tEplDllReqServiceId // ASnd service registered? if (EplDllkInstance_g.m_aAsndFilter[ReqServiceId_p] == kEplDllAsndFilterAny) { // ASnd service ID is registered AmiSetByteToLe(&pFrame->m_le_bSrcNodeId, - (BYTE) uiNodeId_p); + (u8) uiNodeId_p); // EPL MsgType ASnd AmiSetByteToLe(&pFrame->m_le_bMessageType, - (BYTE) kEplMsgTypeAsnd); + (u8) kEplMsgTypeAsnd); // ASnd Service ID AmiSetByteToLe(&pFrame->m_Data.m_Asnd.m_le_bServiceId, - (BYTE) ReqServiceId_p); + (u8) ReqServiceId_p); // create frame info structure FrameInfo.m_pFrame = pFrame; FrameInfo.m_uiFrameSize = 18; // empty non existing ASnd frame |