Lines Matching refs:pDlCtxt

150   pphDnldNfc_DlContext_t pDlCtxt = (pphDnldNfc_DlContext_t)pContext;  in phDnldNfc_CmdHandler()  local
152 if (NULL == pDlCtxt) { in phDnldNfc_CmdHandler()
162 if (phDnldNfc_EventInvalid == (pDlCtxt->tCurrEvent)) { in phDnldNfc_CmdHandler()
164 pDlCtxt->tCurrEvent = TrigEvent; in phDnldNfc_CmdHandler()
165 pDlCtxt->tDnldInProgress = phDnldNfc_TransitionBusy; in phDnldNfc_CmdHandler()
167 phDnldNfc_ProcessSeqState(pDlCtxt, NULL); in phDnldNfc_CmdHandler()
169 status = pDlCtxt->wCmdSendStatus; in phDnldNfc_CmdHandler()
180 if (phDnldNfc_EventInvalid == (pDlCtxt->tCurrEvent)) { in phDnldNfc_CmdHandler()
182 pDlCtxt->tCurrEvent = TrigEvent; in phDnldNfc_CmdHandler()
183 pDlCtxt->tDnldInProgress = phDnldNfc_TransitionBusy; in phDnldNfc_CmdHandler()
185 phDnldNfc_ProcessRWSeqState(pDlCtxt, NULL); in phDnldNfc_CmdHandler()
187 status = pDlCtxt->wCmdSendStatus; in phDnldNfc_CmdHandler()
224 pphDnldNfc_DlContext_t pDlCtxt = (pphDnldNfc_DlContext_t)pContext; in phDnldNfc_ProcessSeqState() local
226 if (NULL == pDlCtxt) { in phDnldNfc_ProcessSeqState()
230 switch (pDlCtxt->tCurrState) { in phDnldNfc_ProcessSeqState()
234 if (0 == (pDlCtxt->TimerInfo.dwRspTimerId)) { in phDnldNfc_ProcessSeqState()
240 pDlCtxt->wCmdSendStatus = wStatus; in phDnldNfc_ProcessSeqState()
244 (pDlCtxt->TimerInfo.dwRspTimerId) = TimerId; in phDnldNfc_ProcessSeqState()
245 (pDlCtxt->TimerInfo.TimerStatus) = 0; in phDnldNfc_ProcessSeqState()
246 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ProcessSeqState()
249 pDlCtxt->tCurrState = phDnldNfc_StateSend; in phDnldNfc_ProcessSeqState()
252 wStatus = phDnldNfc_BuildFramePkt(pDlCtxt); in phDnldNfc_ProcessSeqState()
255 pDlCtxt->tCurrState = phDnldNfc_StateRecv; in phDnldNfc_ProcessSeqState()
258 (pDlCtxt->tCmdRspFrameInfo.aFrameBuff), in phDnldNfc_ProcessSeqState()
259 (uint16_t)(pDlCtxt->tCmdRspFrameInfo.dwSendlength), in phDnldNfc_ProcessSeqState()
261 pDlCtxt); in phDnldNfc_ProcessSeqState()
263 pDlCtxt->wCmdSendStatus = wStatus; in phDnldNfc_ProcessSeqState()
270 wStatus = phOsalNfc_Timer_Start((pDlCtxt->TimerInfo.dwRspTimerId), in phDnldNfc_ProcessSeqState()
272 &phDnldNfc_RspTimeOutCb, pDlCtxt); in phDnldNfc_ProcessSeqState()
276 pDlCtxt->TimerInfo.TimerStatus = 1; in phDnldNfc_ProcessSeqState()
277 pDlCtxt->tCurrState = phDnldNfc_StateTimer; in phDnldNfc_ProcessSeqState()
280 pDlCtxt->tCurrState = phDnldNfc_StateResponse; in phDnldNfc_ProcessSeqState()
284 pDlCtxt->tCmdRspFrameInfo.aFrameBuff, in phDnldNfc_ProcessSeqState()
287 (void*)pDlCtxt); in phDnldNfc_ProcessSeqState()
290 pDlCtxt->wCmdSendStatus = wStatus; in phDnldNfc_ProcessSeqState()
295 (pDlCtxt->TimerInfo.wTimerExpStatus) = NFCSTATUS_RF_TIMEOUT; in phDnldNfc_ProcessSeqState()
296 pDlCtxt->tCurrState = phDnldNfc_StateResponse; in phDnldNfc_ProcessSeqState()
300 if (1 == (pDlCtxt->TimerInfo.TimerStatus)) /*Is Timer Running*/ in phDnldNfc_ProcessSeqState()
303 (void)phOsalNfc_Timer_Stop(pDlCtxt->TimerInfo.dwRspTimerId); in phDnldNfc_ProcessSeqState()
304 (pDlCtxt->TimerInfo.TimerStatus) = 0; /*timer stopped*/ in phDnldNfc_ProcessSeqState()
306 pDlCtxt->tCurrState = phDnldNfc_StateResponse; in phDnldNfc_ProcessSeqState()
309 if (NFCSTATUS_RF_TIMEOUT != (pDlCtxt->TimerInfo.wTimerExpStatus)) { in phDnldNfc_ProcessSeqState()
313 if (phDnldNfc_EventReset != pDlCtxt->tCurrEvent) { in phDnldNfc_ProcessSeqState()
314 wStatus = (pDlCtxt->TimerInfo.wTimerExpStatus); in phDnldNfc_ProcessSeqState()
318 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ProcessSeqState()
329 pDlCtxt->tCurrEvent = phDnldNfc_EventInvalid; in phDnldNfc_ProcessSeqState()
330 pDlCtxt->tDnldInProgress = phDnldNfc_TransitionIdle; in phDnldNfc_ProcessSeqState()
331 pDlCtxt->tCurrState = phDnldNfc_StateInit; in phDnldNfc_ProcessSeqState()
334 (void)phOsalNfc_Timer_Delete(pDlCtxt->TimerInfo.dwRspTimerId); in phDnldNfc_ProcessSeqState()
335 (pDlCtxt->TimerInfo.dwRspTimerId) = 0; in phDnldNfc_ProcessSeqState()
336 (pDlCtxt->TimerInfo.TimerStatus) = 0; in phDnldNfc_ProcessSeqState()
337 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ProcessSeqState()
339 if ((NULL != (pDlCtxt->UserCb)) && (NULL != (pDlCtxt->UserCtxt))) { in phDnldNfc_ProcessSeqState()
340 pDlCtxt->UserCb((pDlCtxt->UserCtxt), wStatus, in phDnldNfc_ProcessSeqState()
341 &(pDlCtxt->tRspBuffInfo)); in phDnldNfc_ProcessSeqState()
346 pDlCtxt->tCurrEvent = phDnldNfc_EventInvalid; in phDnldNfc_ProcessSeqState()
347 pDlCtxt->tDnldInProgress = phDnldNfc_TransitionIdle; in phDnldNfc_ProcessSeqState()
374 pphDnldNfc_DlContext_t pDlCtxt = (pphDnldNfc_DlContext_t)pContext; in phDnldNfc_ProcessRWSeqState() local
376 if (NULL == pDlCtxt) { in phDnldNfc_ProcessRWSeqState()
380 switch (pDlCtxt->tCurrState) { in phDnldNfc_ProcessRWSeqState()
382 if (0 == (pDlCtxt->TimerInfo.dwRspTimerId)) { in phDnldNfc_ProcessRWSeqState()
390 (pDlCtxt->TimerInfo.dwRspTimerId) = TimerId; in phDnldNfc_ProcessRWSeqState()
391 (pDlCtxt->TimerInfo.TimerStatus) = 0; in phDnldNfc_ProcessRWSeqState()
392 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ProcessRWSeqState()
395 pDlCtxt->tCurrState = phDnldNfc_StateSend; in phDnldNfc_ProcessRWSeqState()
398 if (pDlCtxt->bResendLastFrame == false) { in phDnldNfc_ProcessRWSeqState()
399 wStatus = phDnldNfc_BuildFramePkt(pDlCtxt); in phDnldNfc_ProcessRWSeqState()
401 pDlCtxt->bResendLastFrame = false; in phDnldNfc_ProcessRWSeqState()
405 pDlCtxt->tCurrState = phDnldNfc_StateRecv; in phDnldNfc_ProcessRWSeqState()
408 (pDlCtxt->tCmdRspFrameInfo.aFrameBuff), in phDnldNfc_ProcessRWSeqState()
409 (uint16_t)(pDlCtxt->tCmdRspFrameInfo.dwSendlength), in phDnldNfc_ProcessRWSeqState()
411 pDlCtxt); in phDnldNfc_ProcessRWSeqState()
413 pDlCtxt->wCmdSendStatus = wStatus; in phDnldNfc_ProcessRWSeqState()
421 wStatus = phOsalNfc_Timer_Start((pDlCtxt->TimerInfo.dwRspTimerId), in phDnldNfc_ProcessRWSeqState()
423 &phDnldNfc_RspTimeOutCb, pDlCtxt); in phDnldNfc_ProcessRWSeqState()
427 pDlCtxt->TimerInfo.TimerStatus = 1; in phDnldNfc_ProcessRWSeqState()
428 pDlCtxt->tCurrState = phDnldNfc_StateTimer; in phDnldNfc_ProcessRWSeqState()
431 pDlCtxt->tCurrState = phDnldNfc_StateResponse; in phDnldNfc_ProcessRWSeqState()
436 pDlCtxt->tCmdRspFrameInfo.aFrameBuff, in phDnldNfc_ProcessRWSeqState()
439 (void*)pDlCtxt); in phDnldNfc_ProcessRWSeqState()
442 pDlCtxt->wCmdSendStatus = wStatus; in phDnldNfc_ProcessRWSeqState()
447 (pDlCtxt->TimerInfo.wTimerExpStatus) = NFCSTATUS_RF_TIMEOUT; in phDnldNfc_ProcessRWSeqState()
448 pDlCtxt->tCurrState = phDnldNfc_StateResponse; in phDnldNfc_ProcessRWSeqState()
452 if (1 == (pDlCtxt->TimerInfo.TimerStatus)) /*Is Timer Running*/ in phDnldNfc_ProcessRWSeqState()
455 (void)phOsalNfc_Timer_Stop(pDlCtxt->TimerInfo.dwRspTimerId); in phDnldNfc_ProcessRWSeqState()
456 (pDlCtxt->TimerInfo.TimerStatus) = 0; /*timer stopped*/ in phDnldNfc_ProcessRWSeqState()
458 pDlCtxt->tCurrState = phDnldNfc_StateResponse; in phDnldNfc_ProcessRWSeqState()
461 if (NFCSTATUS_RF_TIMEOUT != (pDlCtxt->TimerInfo.wTimerExpStatus)) { in phDnldNfc_ProcessRWSeqState()
470 wStatus = phDnldNfc_SetupResendTimer(pDlCtxt); in phDnldNfc_ProcessRWSeqState()
479 wStatus = (pDlCtxt->TimerInfo.wTimerExpStatus); in phDnldNfc_ProcessRWSeqState()
480 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ProcessRWSeqState()
483 if ((0 != (pDlCtxt->tRWInfo.wRemBytes)) && in phDnldNfc_ProcessRWSeqState()
492 wStatus = phDnldNfc_BuildFramePkt(pDlCtxt); in phDnldNfc_ProcessRWSeqState()
495 pDlCtxt->tCurrState = phDnldNfc_StateRecv; in phDnldNfc_ProcessRWSeqState()
497 (pDlCtxt->tCmdRspFrameInfo.aFrameBuff), in phDnldNfc_ProcessRWSeqState()
498 (uint16_t)(pDlCtxt->tCmdRspFrameInfo.dwSendlength), in phDnldNfc_ProcessRWSeqState()
500 pDlCtxt); in phDnldNfc_ProcessRWSeqState()
510 (pDlCtxt->tRWInfo.bFramesSegmented) = false; in phDnldNfc_ProcessRWSeqState()
518 pDlCtxt->tCurrEvent = phDnldNfc_EventInvalid; in phDnldNfc_ProcessRWSeqState()
519 pDlCtxt->tDnldInProgress = phDnldNfc_TransitionIdle; in phDnldNfc_ProcessRWSeqState()
520 pDlCtxt->tCurrState = phDnldNfc_StateInit; in phDnldNfc_ProcessRWSeqState()
521 pDlCtxt->bResendLastFrame = false; in phDnldNfc_ProcessRWSeqState()
524 (void)phOsalNfc_Timer_Delete(pDlCtxt->TimerInfo.dwRspTimerId); in phDnldNfc_ProcessRWSeqState()
525 (pDlCtxt->TimerInfo.dwRspTimerId) = 0; in phDnldNfc_ProcessRWSeqState()
526 (pDlCtxt->TimerInfo.TimerStatus) = 0; in phDnldNfc_ProcessRWSeqState()
527 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ProcessRWSeqState()
529 if ((NULL != (pDlCtxt->UserCb)) && (NULL != (pDlCtxt->UserCtxt))) { in phDnldNfc_ProcessRWSeqState()
530 pDlCtxt->UserCb((pDlCtxt->UserCtxt), wStatus, in phDnldNfc_ProcessRWSeqState()
531 &(pDlCtxt->tRspBuffInfo)); in phDnldNfc_ProcessRWSeqState()
537 pDlCtxt->tCurrEvent = phDnldNfc_EventInvalid; in phDnldNfc_ProcessRWSeqState()
538 pDlCtxt->tDnldInProgress = phDnldNfc_TransitionIdle; in phDnldNfc_ProcessRWSeqState()
845 pphDnldNfc_DlContext_t pDlCtxt = (pphDnldNfc_DlContext_t)pContext; in phDnldNfc_ProcessFrame() local
847 if ((NULL == pDlCtxt) || (NULL == pInfo)) { in phDnldNfc_ProcessFrame()
856 if (phDnldNfc_FTRaw == (pDlCtxt->FrameInp.Type)) { in phDnldNfc_ProcessFrame()
857 if ((0 != (pDlCtxt->tRspBuffInfo.wLen)) && in phDnldNfc_ProcessFrame()
858 (NULL != (pDlCtxt->tRspBuffInfo.pBuff))) { in phDnldNfc_ProcessFrame()
859 memcpy((pDlCtxt->tRspBuffInfo.pBuff), (pInfo->pBuff), in phDnldNfc_ProcessFrame()
862 (pDlCtxt->tRspBuffInfo.wLen) = (pInfo->wLength); in phDnldNfc_ProcessFrame()
887 wStatus = phDnldNfc_UpdateRsp(pDlCtxt, pInfo, (wPldLen - 1)); in phDnldNfc_ProcessFrame()
989 pphDnldNfc_DlContext_t pDlCtxt = (pphDnldNfc_DlContext_t)pContext; in phDnldNfc_RspTimeOutCb() local
991 if (NULL != pDlCtxt) { in phDnldNfc_RspTimeOutCb()
994 if (1 == pDlCtxt->TimerInfo.TimerStatus) { in phDnldNfc_RspTimeOutCb()
996 pDlCtxt->TimerInfo.TimerStatus = 0; /* Reset timer status flag */ in phDnldNfc_RspTimeOutCb()
998 NXPLOG_FWDNLD_D("%x", pDlCtxt->tLastStatus); in phDnldNfc_RspTimeOutCb()
1001 if (PH_DL_STATUS_SIGNATURE_ERROR == pDlCtxt->tLastStatus) { in phDnldNfc_RspTimeOutCb()
1010 (pDlCtxt->TimerInfo.wTimerExpStatus) = NFCSTATUS_RF_TIMEOUT; in phDnldNfc_RspTimeOutCb()
1012 if ((phDnldNfc_EventRead == pDlCtxt->tCurrEvent) || in phDnldNfc_RspTimeOutCb()
1013 (phDnldNfc_EventWrite == pDlCtxt->tCurrEvent)) { in phDnldNfc_RspTimeOutCb()
1014 phDnldNfc_ProcessRWSeqState(pDlCtxt, NULL); in phDnldNfc_RspTimeOutCb()
1016 phDnldNfc_ProcessSeqState(pDlCtxt, NULL); in phDnldNfc_RspTimeOutCb()
1038 pphDnldNfc_DlContext_t pDlCtxt = (pphDnldNfc_DlContext_t)pContext; in phDnldNfc_ResendTimeOutCb() local
1040 if (NULL != pDlCtxt) { in phDnldNfc_ResendTimeOutCb()
1043 if (1 == pDlCtxt->TimerInfo.TimerStatus) { in phDnldNfc_ResendTimeOutCb()
1045 pDlCtxt->TimerInfo.TimerStatus = 0; /* Reset timer status flag */ in phDnldNfc_ResendTimeOutCb()
1047 (pDlCtxt->TimerInfo.wTimerExpStatus) = 0; in phDnldNfc_ResendTimeOutCb()
1049 pDlCtxt->tCurrState = phDnldNfc_StateSend; in phDnldNfc_ResendTimeOutCb()
1052 pDlCtxt->bResendLastFrame = true; in phDnldNfc_ResendTimeOutCb()
1054 phDnldNfc_ProcessRWSeqState(pDlCtxt, NULL); in phDnldNfc_ResendTimeOutCb()