Lines Matching refs:pDlCtxt

111     pphDnldNfc_DlContext_t  pDlCtxt = (pphDnldNfc_DlContext_t)pContext;  in phDnldNfc_CmdHandler()  local
113 if(NULL == pDlCtxt) in phDnldNfc_CmdHandler()
128 if(phDnldNfc_EventInvalid == (pDlCtxt->tCurrEvent)) in phDnldNfc_CmdHandler()
131 pDlCtxt->tCurrEvent = TrigEvent; in phDnldNfc_CmdHandler()
132 pDlCtxt->tDnldInProgress = phDnldNfc_TransitionBusy; in phDnldNfc_CmdHandler()
134 phDnldNfc_ProcessSeqState(pDlCtxt,NULL); in phDnldNfc_CmdHandler()
136 status = pDlCtxt->wCmdSendStatus; in phDnldNfc_CmdHandler()
150 if(phDnldNfc_EventInvalid == (pDlCtxt->tCurrEvent)) in phDnldNfc_CmdHandler()
153 pDlCtxt->tCurrEvent = TrigEvent; in phDnldNfc_CmdHandler()
154 pDlCtxt->tDnldInProgress = phDnldNfc_TransitionBusy; in phDnldNfc_CmdHandler()
156 phDnldNfc_ProcessRWSeqState(pDlCtxt,NULL); in phDnldNfc_CmdHandler()
158 status = pDlCtxt->wCmdSendStatus; in phDnldNfc_CmdHandler()
197 pphDnldNfc_DlContext_t pDlCtxt = (pphDnldNfc_DlContext_t)pContext; in phDnldNfc_ProcessSeqState() local
199 if(NULL == pDlCtxt) in phDnldNfc_ProcessSeqState()
206 switch(pDlCtxt->tCurrState) in phDnldNfc_ProcessSeqState()
212 if(0 == (pDlCtxt->TimerInfo.dwRspTimerId)) in phDnldNfc_ProcessSeqState()
220 pDlCtxt->wCmdSendStatus = wStatus; in phDnldNfc_ProcessSeqState()
226 (pDlCtxt->TimerInfo.dwRspTimerId) = TimerId; in phDnldNfc_ProcessSeqState()
227 (pDlCtxt->TimerInfo.TimerStatus) = 0; in phDnldNfc_ProcessSeqState()
228 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ProcessSeqState()
231 pDlCtxt->tCurrState = phDnldNfc_StateSend; in phDnldNfc_ProcessSeqState()
235 wStatus = phDnldNfc_BuildFramePkt(pDlCtxt); in phDnldNfc_ProcessSeqState()
239 pDlCtxt->tCurrState = phDnldNfc_StateRecv; in phDnldNfc_ProcessSeqState()
241 wStatus = phTmlNfc_Write( (pDlCtxt->tCmdRspFrameInfo.aFrameBuff), in phDnldNfc_ProcessSeqState()
242 (uint16_t)(pDlCtxt->tCmdRspFrameInfo.dwSendlength), in phDnldNfc_ProcessSeqState()
244 pDlCtxt); in phDnldNfc_ProcessSeqState()
246 pDlCtxt->wCmdSendStatus = wStatus; in phDnldNfc_ProcessSeqState()
255 wStatus = phOsalNfc_Timer_Start((pDlCtxt->TimerInfo.dwRspTimerId), in phDnldNfc_ProcessSeqState()
258 pDlCtxt); in phDnldNfc_ProcessSeqState()
263 pDlCtxt->TimerInfo.TimerStatus = 1; in phDnldNfc_ProcessSeqState()
264 pDlCtxt->tCurrState = phDnldNfc_StateTimer; in phDnldNfc_ProcessSeqState()
269 pDlCtxt->tCurrState = phDnldNfc_StateResponse; in phDnldNfc_ProcessSeqState()
273 pDlCtxt->tCmdRspFrameInfo.aFrameBuff, in phDnldNfc_ProcessSeqState()
276 (void *)pDlCtxt); in phDnldNfc_ProcessSeqState()
283 (pDlCtxt->TimerInfo.wTimerExpStatus) = NFCSTATUS_RF_TIMEOUT; in phDnldNfc_ProcessSeqState()
284 pDlCtxt->tCurrState = phDnldNfc_StateResponse; in phDnldNfc_ProcessSeqState()
289 if (1 == (pDlCtxt->TimerInfo.TimerStatus)) /*Is Timer Running*/ in phDnldNfc_ProcessSeqState()
292 (void)phOsalNfc_Timer_Stop(pDlCtxt->TimerInfo.dwRspTimerId); in phDnldNfc_ProcessSeqState()
293 (pDlCtxt->TimerInfo.TimerStatus) = 0; /*timer stopped*/ in phDnldNfc_ProcessSeqState()
295 pDlCtxt->tCurrState = phDnldNfc_StateResponse; in phDnldNfc_ProcessSeqState()
299 if(NFCSTATUS_RF_TIMEOUT != (pDlCtxt->TimerInfo.wTimerExpStatus)) in phDnldNfc_ProcessSeqState()
306 if(phDnldNfc_EventReset != pDlCtxt->tCurrEvent) in phDnldNfc_ProcessSeqState()
308 wStatus = (pDlCtxt->TimerInfo.wTimerExpStatus); in phDnldNfc_ProcessSeqState()
314 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ProcessSeqState()
326 pDlCtxt->tCurrEvent = phDnldNfc_EventInvalid; in phDnldNfc_ProcessSeqState()
327 pDlCtxt->tDnldInProgress = phDnldNfc_TransitionIdle; in phDnldNfc_ProcessSeqState()
328 pDlCtxt->tCurrState = phDnldNfc_StateInit; in phDnldNfc_ProcessSeqState()
331 (void)phOsalNfc_Timer_Delete(pDlCtxt->TimerInfo.dwRspTimerId); in phDnldNfc_ProcessSeqState()
332 (pDlCtxt->TimerInfo.dwRspTimerId) = 0; in phDnldNfc_ProcessSeqState()
333 (pDlCtxt->TimerInfo.TimerStatus) = 0; in phDnldNfc_ProcessSeqState()
334 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ProcessSeqState()
336 if((NULL != (pDlCtxt->UserCb)) && (NULL != (pDlCtxt->UserCtxt))) in phDnldNfc_ProcessSeqState()
338 pDlCtxt->UserCb((pDlCtxt->UserCtxt),wStatus,&(pDlCtxt->tRspBuffInfo)); in phDnldNfc_ProcessSeqState()
344 pDlCtxt->tCurrEvent = phDnldNfc_EventInvalid; in phDnldNfc_ProcessSeqState()
345 pDlCtxt->tDnldInProgress = phDnldNfc_TransitionIdle; in phDnldNfc_ProcessSeqState()
371 pphDnldNfc_DlContext_t pDlCtxt = (pphDnldNfc_DlContext_t)pContext; in phDnldNfc_ProcessRWSeqState() local
373 if(NULL == pDlCtxt) in phDnldNfc_ProcessRWSeqState()
380 switch(pDlCtxt->tCurrState) in phDnldNfc_ProcessRWSeqState()
384 if(0 == (pDlCtxt->TimerInfo.dwRspTimerId)) in phDnldNfc_ProcessRWSeqState()
396 (pDlCtxt->TimerInfo.dwRspTimerId) = TimerId; in phDnldNfc_ProcessRWSeqState()
397 (pDlCtxt->TimerInfo.TimerStatus) = 0; in phDnldNfc_ProcessRWSeqState()
398 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ProcessRWSeqState()
401 pDlCtxt->tCurrState = phDnldNfc_StateSend; in phDnldNfc_ProcessRWSeqState()
405 if(FALSE == pDlCtxt->bResendLastFrame) in phDnldNfc_ProcessRWSeqState()
407 wStatus = phDnldNfc_BuildFramePkt(pDlCtxt); in phDnldNfc_ProcessRWSeqState()
411 pDlCtxt->bResendLastFrame = FALSE; in phDnldNfc_ProcessRWSeqState()
416 pDlCtxt->tCurrState = phDnldNfc_StateRecv; in phDnldNfc_ProcessRWSeqState()
418 wStatus = phTmlNfc_Write((pDlCtxt->tCmdRspFrameInfo.aFrameBuff), in phDnldNfc_ProcessRWSeqState()
419 (uint16_t)(pDlCtxt->tCmdRspFrameInfo.dwSendlength), in phDnldNfc_ProcessRWSeqState()
421 pDlCtxt); in phDnldNfc_ProcessRWSeqState()
423 pDlCtxt->wCmdSendStatus = wStatus; in phDnldNfc_ProcessRWSeqState()
433 wStatus = phOsalNfc_Timer_Start((pDlCtxt->TimerInfo.dwRspTimerId), in phDnldNfc_ProcessRWSeqState()
436 pDlCtxt); in phDnldNfc_ProcessRWSeqState()
441 pDlCtxt->TimerInfo.TimerStatus = 1; in phDnldNfc_ProcessRWSeqState()
442 pDlCtxt->tCurrState = phDnldNfc_StateTimer; in phDnldNfc_ProcessRWSeqState()
447 pDlCtxt->tCurrState = phDnldNfc_StateResponse; in phDnldNfc_ProcessRWSeqState()
452 pDlCtxt->tCmdRspFrameInfo.aFrameBuff, in phDnldNfc_ProcessRWSeqState()
455 (void *)pDlCtxt); in phDnldNfc_ProcessRWSeqState()
462 (pDlCtxt->TimerInfo.wTimerExpStatus) = NFCSTATUS_RF_TIMEOUT; in phDnldNfc_ProcessRWSeqState()
463 pDlCtxt->tCurrState = phDnldNfc_StateResponse; in phDnldNfc_ProcessRWSeqState()
468 if (1 == (pDlCtxt->TimerInfo.TimerStatus)) /*Is Timer Running*/ in phDnldNfc_ProcessRWSeqState()
471 (void)phOsalNfc_Timer_Stop(pDlCtxt->TimerInfo.dwRspTimerId); in phDnldNfc_ProcessRWSeqState()
472 (pDlCtxt->TimerInfo.TimerStatus) = 0; /*timer stopped*/ in phDnldNfc_ProcessRWSeqState()
474 pDlCtxt->tCurrState = phDnldNfc_StateResponse; in phDnldNfc_ProcessRWSeqState()
478 if(NFCSTATUS_RF_TIMEOUT != (pDlCtxt->TimerInfo.wTimerExpStatus)) in phDnldNfc_ProcessRWSeqState()
489 wStatus = phDnldNfc_SetupResendTimer(pDlCtxt); in phDnldNfc_ProcessRWSeqState()
500 wStatus = (pDlCtxt->TimerInfo.wTimerExpStatus); in phDnldNfc_ProcessRWSeqState()
501 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ProcessRWSeqState()
504 if((0 != (pDlCtxt->tRWInfo.wRemBytes)) && (NFCSTATUS_SUCCESS == wStatus)) in phDnldNfc_ProcessRWSeqState()
514 wStatus = phDnldNfc_BuildFramePkt(pDlCtxt); in phDnldNfc_ProcessRWSeqState()
518 pDlCtxt->tCurrState = phDnldNfc_StateRecv; in phDnldNfc_ProcessRWSeqState()
519 wStatus = phTmlNfc_Write((pDlCtxt->tCmdRspFrameInfo.aFrameBuff), in phDnldNfc_ProcessRWSeqState()
520 (uint16_t)(pDlCtxt->tCmdRspFrameInfo.dwSendlength), in phDnldNfc_ProcessRWSeqState()
522 pDlCtxt); in phDnldNfc_ProcessRWSeqState()
534 (pDlCtxt->tRWInfo.bFramesSegmented) = FALSE; in phDnldNfc_ProcessRWSeqState()
543 pDlCtxt->tCurrEvent = phDnldNfc_EventInvalid; in phDnldNfc_ProcessRWSeqState()
544 pDlCtxt->tDnldInProgress = phDnldNfc_TransitionIdle; in phDnldNfc_ProcessRWSeqState()
545 pDlCtxt->tCurrState = phDnldNfc_StateInit; in phDnldNfc_ProcessRWSeqState()
546 pDlCtxt->bResendLastFrame = FALSE; in phDnldNfc_ProcessRWSeqState()
549 (void)phOsalNfc_Timer_Delete(pDlCtxt->TimerInfo.dwRspTimerId); in phDnldNfc_ProcessRWSeqState()
550 (pDlCtxt->TimerInfo.dwRspTimerId) = 0; in phDnldNfc_ProcessRWSeqState()
551 (pDlCtxt->TimerInfo.TimerStatus) = 0; in phDnldNfc_ProcessRWSeqState()
552 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ProcessRWSeqState()
554 if((NULL != (pDlCtxt->UserCb)) && (NULL != (pDlCtxt->UserCtxt))) in phDnldNfc_ProcessRWSeqState()
556 pDlCtxt->UserCb((pDlCtxt->UserCtxt),wStatus,&(pDlCtxt->tRspBuffInfo)); in phDnldNfc_ProcessRWSeqState()
563 pDlCtxt->tCurrEvent = phDnldNfc_EventInvalid; in phDnldNfc_ProcessRWSeqState()
564 pDlCtxt->tDnldInProgress = phDnldNfc_TransitionIdle; in phDnldNfc_ProcessRWSeqState()
898 pphDnldNfc_DlContext_t pDlCtxt = (pphDnldNfc_DlContext_t)pContext; in phDnldNfc_ProcessFrame() local
900 if((NULL == pDlCtxt) || in phDnldNfc_ProcessFrame()
918 if(phDnldNfc_FTRaw == (pDlCtxt->FrameInp.Type)) in phDnldNfc_ProcessFrame()
920 if((0 != (pDlCtxt->tRspBuffInfo.wLen)) && in phDnldNfc_ProcessFrame()
921 (NULL != (pDlCtxt->tRspBuffInfo.pBuff))) in phDnldNfc_ProcessFrame()
923 memcpy((pDlCtxt->tRspBuffInfo.pBuff),(pInfo->pBuff),(pInfo->wLength)); in phDnldNfc_ProcessFrame()
925 (pDlCtxt->tRspBuffInfo.wLen) = (pInfo->wLength); in phDnldNfc_ProcessFrame()
955 wStatus = phDnldNfc_UpdateRsp(pDlCtxt,pInfo,(wPldLen - 1)); in phDnldNfc_ProcessFrame()
1072 pphDnldNfc_DlContext_t pDlCtxt = (pphDnldNfc_DlContext_t)pContext; in phDnldNfc_RspTimeOutCb() local
1074 if (NULL != pDlCtxt) in phDnldNfc_RspTimeOutCb()
1078 if(1 == pDlCtxt->TimerInfo.TimerStatus) in phDnldNfc_RspTimeOutCb()
1081 pDlCtxt->TimerInfo.TimerStatus = 0; /* Reset timer status flag */ in phDnldNfc_RspTimeOutCb()
1083 NXPLOG_FWDNLD_D("%x",pDlCtxt->tLastStatus); in phDnldNfc_RspTimeOutCb()
1086 if ( PH_DL_STATUS_SIGNATURE_ERROR == pDlCtxt->tLastStatus ) { in phDnldNfc_RspTimeOutCb()
1096 (pDlCtxt->TimerInfo.wTimerExpStatus) = NFCSTATUS_RF_TIMEOUT; in phDnldNfc_RspTimeOutCb()
1098 … if((phDnldNfc_EventRead == pDlCtxt->tCurrEvent) || (phDnldNfc_EventWrite == pDlCtxt->tCurrEvent)) in phDnldNfc_RspTimeOutCb()
1100 phDnldNfc_ProcessRWSeqState(pDlCtxt,NULL); in phDnldNfc_RspTimeOutCb()
1104 phDnldNfc_ProcessSeqState(pDlCtxt,NULL); in phDnldNfc_RspTimeOutCb()
1126 pphDnldNfc_DlContext_t pDlCtxt = (pphDnldNfc_DlContext_t)pContext; in phDnldNfc_ResendTimeOutCb() local
1128 if (NULL != pDlCtxt) in phDnldNfc_ResendTimeOutCb()
1132 if(1 == pDlCtxt->TimerInfo.TimerStatus) in phDnldNfc_ResendTimeOutCb()
1135 pDlCtxt->TimerInfo.TimerStatus = 0; /* Reset timer status flag */ in phDnldNfc_ResendTimeOutCb()
1137 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ResendTimeOutCb()
1139 pDlCtxt->tCurrState = phDnldNfc_StateSend; in phDnldNfc_ResendTimeOutCb()
1142 pDlCtxt->bResendLastFrame = TRUE; in phDnldNfc_ResendTimeOutCb()
1144 phDnldNfc_ProcessRWSeqState(pDlCtxt,NULL); in phDnldNfc_ResendTimeOutCb()