Lines Matching refs:gpphDnldContext
31 static pphDnldNfc_DlContext_t gpphDnldContext = NULL; /* Download contex */ variable
68 if(phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) in phDnldNfc_Reset()
75 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTNone; in phDnldNfc_Reset()
76 (gpphDnldContext->tCmdId) = PH_DL_CMD_RESET; in phDnldNfc_Reset()
77 (gpphDnldContext->tRspBuffInfo.pBuff) = NULL; in phDnldNfc_Reset()
78 (gpphDnldContext->tRspBuffInfo.wLen) = 0; in phDnldNfc_Reset()
79 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_Reset()
80 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_Reset()
81 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Reset()
82 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Reset()
84 wStatus = phDnldNfc_CmdHandler(gpphDnldContext,phDnldNfc_EventReset); in phDnldNfc_Reset()
131 if(phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) in phDnldNfc_GetVersion()
140 (gpphDnldContext->tRspBuffInfo.pBuff) = pVersionInfo->pBuff; in phDnldNfc_GetVersion()
141 (gpphDnldContext->tRspBuffInfo.wLen) = pVersionInfo->wLen; in phDnldNfc_GetVersion()
142 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTNone; in phDnldNfc_GetVersion()
143 (gpphDnldContext->tCmdId) = PH_DL_CMD_GETVERSION; in phDnldNfc_GetVersion()
144 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_GetVersion()
145 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_GetVersion()
146 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_GetVersion()
147 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_GetVersion()
149 wStatus = phDnldNfc_CmdHandler(gpphDnldContext,phDnldNfc_EventGetVer); in phDnldNfc_GetVersion()
201 if(phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) in phDnldNfc_GetSessionState()
210 (gpphDnldContext->tRspBuffInfo.pBuff) = pSession->pBuff; in phDnldNfc_GetSessionState()
211 (gpphDnldContext->tRspBuffInfo.wLen) = pSession->wLen; in phDnldNfc_GetSessionState()
212 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTNone; in phDnldNfc_GetSessionState()
213 (gpphDnldContext->tCmdId) = PH_DL_CMD_GETSESSIONSTATE; in phDnldNfc_GetSessionState()
214 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_GetSessionState()
215 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_GetSessionState()
216 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_GetSessionState()
217 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_GetSessionState()
219 wStatus = phDnldNfc_CmdHandler(gpphDnldContext,phDnldNfc_EventGetSesnSt); in phDnldNfc_GetSessionState()
275 if(phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) in phDnldNfc_CheckIntegrity()
285 (gpphDnldContext->FrameInp.Type) = phDnldNfc_ChkIntg; in phDnldNfc_CheckIntegrity()
289 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTNone; in phDnldNfc_CheckIntegrity()
294 (gpphDnldContext->tRspBuffInfo.pBuff) = pCRCData->pBuff; in phDnldNfc_CheckIntegrity()
295 (gpphDnldContext->tRspBuffInfo.wLen) = pCRCData->wLen; in phDnldNfc_CheckIntegrity()
296 (gpphDnldContext->tCmdId) = PH_DL_CMD_CHECKINTEGRITY; in phDnldNfc_CheckIntegrity()
297 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_CheckIntegrity()
298 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_CheckIntegrity()
299 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_CheckIntegrity()
300 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_CheckIntegrity()
302 wStatus = phDnldNfc_CmdHandler(gpphDnldContext,phDnldNfc_EventIntegChk); in phDnldNfc_CheckIntegrity()
353 if(phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) in phDnldNfc_ReadLog()
362 (gpphDnldContext->tCmdId) = PH_DL_CMD_READ; in phDnldNfc_ReadLog()
363 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTRead; in phDnldNfc_ReadLog()
364 (gpphDnldContext->FrameInp.dwAddr) = PHDNLDNFC_EEPROM_LOG_START_ADDR; in phDnldNfc_ReadLog()
365 (gpphDnldContext->tRspBuffInfo.pBuff) = pData->pBuff; in phDnldNfc_ReadLog()
366 (gpphDnldContext->tRspBuffInfo.wLen) = pData->wLen; in phDnldNfc_ReadLog()
367 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_ReadLog()
368 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_ReadLog()
369 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_ReadLog()
370 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_ReadLog()
372 memset(&(gpphDnldContext->tRWInfo),0,sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_ReadLog()
374 wStatus = phDnldNfc_CmdHandler(gpphDnldContext,phDnldNfc_EventRead); in phDnldNfc_ReadLog()
428 if(phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) in phDnldNfc_Write()
445 pImgPtr = (uint8_t *)gpphDnldContext->nxp_nfc_fw; in phDnldNfc_Write()
446 wLen = gpphDnldContext->nxp_nfc_fw_len; in phDnldNfc_Write()
451 if(PH_DL_STATUS_PLL_ERROR == (gpphDnldContext->tLastStatus)) in phDnldNfc_Write()
455 else if(PH_DL_STATUS_SIGNATURE_ERROR == (gpphDnldContext->tLastStatus)) in phDnldNfc_Write()
465 pImgPtr = (uint8_t *)gpphDnldContext->nxp_nfc_fwp; in phDnldNfc_Write()
466 wLen = gpphDnldContext->nxp_nfc_fwp_len; in phDnldNfc_Write()
482 (gpphDnldContext->tCmdId) = PH_DL_CMD_WRITE; in phDnldNfc_Write()
483 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTWrite; in phDnldNfc_Write()
484 (gpphDnldContext->tRspBuffInfo.pBuff) = NULL; in phDnldNfc_Write()
485 (gpphDnldContext->tRspBuffInfo.wLen) = 0; in phDnldNfc_Write()
486 (gpphDnldContext->tUserData.pBuff) = pImgPtr; in phDnldNfc_Write()
487 (gpphDnldContext->tUserData.wLen) = wLen; in phDnldNfc_Write()
488 (gpphDnldContext->bResendLastFrame) = FALSE; in phDnldNfc_Write()
490 memset(&(gpphDnldContext->tRWInfo),0,sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_Write()
491 (gpphDnldContext->tRWInfo.bFirstWrReq) = TRUE; in phDnldNfc_Write()
492 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Write()
493 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Write()
495 wStatus = phDnldNfc_CmdHandler(gpphDnldContext,phDnldNfc_EventWrite); in phDnldNfc_Write()
547 if(phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) in phDnldNfc_Log()
556 (gpphDnldContext->tCmdId) = PH_DL_CMD_LOG; in phDnldNfc_Log()
557 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTLog; in phDnldNfc_Log()
558 (gpphDnldContext->tRspBuffInfo.pBuff) = NULL; in phDnldNfc_Log()
559 (gpphDnldContext->tRspBuffInfo.wLen) = 0; in phDnldNfc_Log()
560 (gpphDnldContext->tUserData.pBuff) = (pData->pBuff); in phDnldNfc_Log()
561 (gpphDnldContext->tUserData.wLen) = (pData->wLen); in phDnldNfc_Log()
563 memset(&(gpphDnldContext->tRWInfo),0,sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_Log()
564 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Log()
565 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Log()
567 wStatus = phDnldNfc_CmdHandler(gpphDnldContext,phDnldNfc_EventLog); in phDnldNfc_Log()
620 if(phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) in phDnldNfc_Force()
627 (gpphDnldContext->tCmdId) = PH_DL_CMD_FORCE; in phDnldNfc_Force()
628 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTForce; in phDnldNfc_Force()
629 (gpphDnldContext->tRspBuffInfo.pBuff) = NULL; in phDnldNfc_Force()
630 (gpphDnldContext->tRspBuffInfo.wLen) = 0; in phDnldNfc_Force()
690 (gpphDnldContext->tUserData.pBuff) = bPldVal; in phDnldNfc_Force()
691 (gpphDnldContext->tUserData.wLen) = sizeof(bPldVal); in phDnldNfc_Force()
693 memset(&(gpphDnldContext->tRWInfo),0,sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_Force()
694 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Force()
695 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Force()
697 wStatus = phDnldNfc_CmdHandler(gpphDnldContext,phDnldNfc_EventForce); in phDnldNfc_Force()
728 if(NULL == gpphDnldContext) in phDnldNfc_SetHwDevHandle()
739 gpphDnldContext = psDnldContext; in phDnldNfc_SetHwDevHandle()
748 (void ) memset((void *)gpphDnldContext,0, in phDnldNfc_SetHwDevHandle()
767 if (gpphDnldContext != NULL) in phDnldNfc_ReSetHwDevHandle()
770 free(gpphDnldContext); in phDnldNfc_ReSetHwDevHandle()
771 gpphDnldContext = NULL; in phDnldNfc_ReSetHwDevHandle()
808 if(phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) in phDnldNfc_RawReq()
819 (gpphDnldContext->tRspBuffInfo.pBuff) = pRspData->pBuff; in phDnldNfc_RawReq()
820 (gpphDnldContext->tRspBuffInfo.wLen) = pRspData->wLen; in phDnldNfc_RawReq()
821 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTRaw; in phDnldNfc_RawReq()
822 (gpphDnldContext->tCmdId) = PH_DL_CMD_NONE; in phDnldNfc_RawReq()
823 (gpphDnldContext->tUserData.pBuff) = pFrameData->pBuff; in phDnldNfc_RawReq()
824 (gpphDnldContext->tUserData.wLen) = pFrameData->wLen; in phDnldNfc_RawReq()
825 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_RawReq()
826 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_RawReq()
828 wStatus = phDnldNfc_CmdHandler(gpphDnldContext,phDnldNfc_EventRaw); in phDnldNfc_RawReq()
898 gpphDnldContext->nxp_nfc_fw = (uint8_t*)pImageInfo; in phDnldNfc_InitImgInfo()
899 gpphDnldContext->nxp_nfc_fw_len = ImageInfoLen; in phDnldNfc_InitImgInfo()
900 if((NULL != gpphDnldContext->nxp_nfc_fw) && (0 != gpphDnldContext->nxp_nfc_fw_len)) in phDnldNfc_InitImgInfo()
902 NXPLOG_FWDNLD_D("FW Major Version Num - %x",gpphDnldContext->nxp_nfc_fw[5]); in phDnldNfc_InitImgInfo()
903 NXPLOG_FWDNLD_D("FW Minor Version Num - %x",gpphDnldContext->nxp_nfc_fw[4]); in phDnldNfc_InitImgInfo()
908 … wFwVer = (((uint16_t)(gpphDnldContext->nxp_nfc_fw[5]) << 8U) | (gpphDnldContext->nxp_nfc_fw[4])); in phDnldNfc_InitImgInfo()
960 gpphDnldContext->nxp_nfc_fwp = (uint8_t*)pImageInfo; in phDnldNfc_LoadRecInfo()
961 gpphDnldContext->nxp_nfc_fwp_len = ImageInfoLen; in phDnldNfc_LoadRecInfo()
962 if((NULL != gpphDnldContext->nxp_nfc_fwp) && (0 != gpphDnldContext->nxp_nfc_fwp_len)) in phDnldNfc_LoadRecInfo()
1016 gpphDnldContext->nxp_nfc_fwp = (uint8_t*)pImageInfo; in phDnldNfc_LoadPKInfo()
1017 gpphDnldContext->nxp_nfc_fwp_len = ImageInfoLen; in phDnldNfc_LoadPKInfo()
1019 if((NULL != gpphDnldContext->nxp_nfc_fwp) && (0 != gpphDnldContext->nxp_nfc_fwp_len)) in phDnldNfc_LoadPKInfo()
1234 …Status = phDnldNfc_Read(&Data, wRdAddr,(pphDnldNfc_RspCb_t)phDnldNfc_ReadComplete,gpphDnldContext); in phDnldNfc_ReadMem()
1318 if(phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) in phDnldNfc_Read()
1327 (gpphDnldContext->tCmdId) = PH_DL_CMD_READ; in phDnldNfc_Read()
1328 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTRead; in phDnldNfc_Read()
1329 (gpphDnldContext->FrameInp.dwAddr) = dwRdAddr; in phDnldNfc_Read()
1330 (gpphDnldContext->tRspBuffInfo.pBuff) = pData->pBuff; in phDnldNfc_Read()
1331 (gpphDnldContext->tRspBuffInfo.wLen) = pData->wLen; in phDnldNfc_Read()
1332 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_Read()
1333 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_Read()
1334 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Read()
1335 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Read()
1337 memset(&(gpphDnldContext->tRWInfo),0,sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_Read()
1339 wStatus = phDnldNfc_CmdHandler(gpphDnldContext,phDnldNfc_EventRead); in phDnldNfc_Read()