Lines Matching refs:gpphDnldContext
33 static pphDnldNfc_DlContext_t gpphDnldContext = NULL; /* Download contex */ variable
60 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_Reset()
64 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTNone; in phDnldNfc_Reset()
65 (gpphDnldContext->tCmdId) = PH_DL_CMD_RESET; in phDnldNfc_Reset()
66 (gpphDnldContext->tRspBuffInfo.pBuff) = NULL; in phDnldNfc_Reset()
67 (gpphDnldContext->tRspBuffInfo.wLen) = 0; in phDnldNfc_Reset()
68 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_Reset()
69 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_Reset()
70 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Reset()
71 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Reset()
73 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventReset); in phDnldNfc_Reset()
115 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_GetVersion()
120 (gpphDnldContext->tRspBuffInfo.pBuff) = pVersionInfo->pBuff; in phDnldNfc_GetVersion()
121 (gpphDnldContext->tRspBuffInfo.wLen) = pVersionInfo->wLen; in phDnldNfc_GetVersion()
122 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTNone; in phDnldNfc_GetVersion()
123 (gpphDnldContext->tCmdId) = PH_DL_CMD_GETVERSION; in phDnldNfc_GetVersion()
124 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_GetVersion()
125 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_GetVersion()
126 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_GetVersion()
127 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_GetVersion()
129 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventGetVer); in phDnldNfc_GetVersion()
175 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_GetSessionState()
180 (gpphDnldContext->tRspBuffInfo.pBuff) = pSession->pBuff; in phDnldNfc_GetSessionState()
181 (gpphDnldContext->tRspBuffInfo.wLen) = pSession->wLen; in phDnldNfc_GetSessionState()
182 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTNone; in phDnldNfc_GetSessionState()
183 (gpphDnldContext->tCmdId) = PH_DL_CMD_GETSESSIONSTATE; in phDnldNfc_GetSessionState()
184 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_GetSessionState()
185 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_GetSessionState()
186 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_GetSessionState()
187 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_GetSessionState()
190 phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventGetSesnSt); in phDnldNfc_GetSessionState()
240 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_CheckIntegrity()
252 (gpphDnldContext->FrameInp.Type) = phDnldNfc_ChkIntg; in phDnldNfc_CheckIntegrity()
254 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTNone; in phDnldNfc_CheckIntegrity()
258 (gpphDnldContext->tRspBuffInfo.pBuff) = pCRCData->pBuff; in phDnldNfc_CheckIntegrity()
259 (gpphDnldContext->tRspBuffInfo.wLen) = pCRCData->wLen; in phDnldNfc_CheckIntegrity()
260 (gpphDnldContext->tCmdId) = PH_DL_CMD_CHECKINTEGRITY; in phDnldNfc_CheckIntegrity()
261 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_CheckIntegrity()
262 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_CheckIntegrity()
263 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_CheckIntegrity()
264 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_CheckIntegrity()
267 phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventIntegChk); in phDnldNfc_CheckIntegrity()
309 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_ReadLog()
314 (gpphDnldContext->tCmdId) = PH_DL_CMD_READ; in phDnldNfc_ReadLog()
315 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTRead; in phDnldNfc_ReadLog()
316 (gpphDnldContext->FrameInp.dwAddr) = PHDNLDNFC_EEPROM_LOG_START_ADDR; in phDnldNfc_ReadLog()
317 (gpphDnldContext->tRspBuffInfo.pBuff) = pData->pBuff; in phDnldNfc_ReadLog()
318 (gpphDnldContext->tRspBuffInfo.wLen) = pData->wLen; in phDnldNfc_ReadLog()
319 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_ReadLog()
320 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_ReadLog()
321 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_ReadLog()
322 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_ReadLog()
324 memset(&(gpphDnldContext->tRWInfo), 0, in phDnldNfc_ReadLog()
325 sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_ReadLog()
327 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventRead); in phDnldNfc_ReadLog()
376 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_Write()
385 pImgPtr = (uint8_t*)gpphDnldContext->nxp_nfc_fw; in phDnldNfc_Write()
386 wLen = gpphDnldContext->nxp_nfc_fw_len; in phDnldNfc_Write()
389 if (PH_DL_STATUS_PLL_ERROR == (gpphDnldContext->tLastStatus)) { in phDnldNfc_Write()
392 (gpphDnldContext->tLastStatus)) { in phDnldNfc_Write()
398 pImgPtr = (uint8_t*)gpphDnldContext->nxp_nfc_fwp; in phDnldNfc_Write()
399 wLen = gpphDnldContext->nxp_nfc_fwp_len; in phDnldNfc_Write()
412 (gpphDnldContext->tCmdId) = PH_DL_CMD_WRITE; in phDnldNfc_Write()
413 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTWrite; in phDnldNfc_Write()
414 (gpphDnldContext->tRspBuffInfo.pBuff) = NULL; in phDnldNfc_Write()
415 (gpphDnldContext->tRspBuffInfo.wLen) = 0; in phDnldNfc_Write()
416 (gpphDnldContext->tUserData.pBuff) = pImgPtr; in phDnldNfc_Write()
417 (gpphDnldContext->tUserData.wLen) = wLen; in phDnldNfc_Write()
418 (gpphDnldContext->bResendLastFrame) = false; in phDnldNfc_Write()
420 memset(&(gpphDnldContext->tRWInfo), 0, in phDnldNfc_Write()
421 sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_Write()
422 (gpphDnldContext->tRWInfo.bFirstWrReq) = true; in phDnldNfc_Write()
423 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Write()
424 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Write()
426 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventWrite); in phDnldNfc_Write()
469 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_Log()
475 (gpphDnldContext->tCmdId) = PH_DL_CMD_LOG; in phDnldNfc_Log()
476 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTLog; in phDnldNfc_Log()
477 (gpphDnldContext->tRspBuffInfo.pBuff) = NULL; in phDnldNfc_Log()
478 (gpphDnldContext->tRspBuffInfo.wLen) = 0; in phDnldNfc_Log()
479 (gpphDnldContext->tUserData.pBuff) = (pData->pBuff); in phDnldNfc_Log()
480 (gpphDnldContext->tUserData.wLen) = (pData->wLen); in phDnldNfc_Log()
482 memset(&(gpphDnldContext->tRWInfo), 0, in phDnldNfc_Log()
483 sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_Log()
484 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Log()
485 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Log()
487 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventLog); in phDnldNfc_Log()
536 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_Force()
540 (gpphDnldContext->tCmdId) = PH_DL_CMD_FORCE; in phDnldNfc_Force()
541 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTForce; in phDnldNfc_Force()
542 (gpphDnldContext->tRspBuffInfo.pBuff) = NULL; in phDnldNfc_Force()
543 (gpphDnldContext->tRspBuffInfo.wLen) = 0; in phDnldNfc_Force()
581 (gpphDnldContext->tUserData.pBuff) = bPldVal; in phDnldNfc_Force()
582 (gpphDnldContext->tUserData.wLen) = sizeof(bPldVal); in phDnldNfc_Force()
584 memset(&(gpphDnldContext->tRWInfo), 0, sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_Force()
585 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Force()
586 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Force()
588 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventForce); in phDnldNfc_Force()
616 if (NULL == gpphDnldContext) { in phDnldNfc_SetHwDevHandle()
624 gpphDnldContext = psDnldContext; in phDnldNfc_SetHwDevHandle()
629 (void)memset((void*)gpphDnldContext, 0, sizeof(phDnldNfc_DlContext_t)); in phDnldNfc_SetHwDevHandle()
646 if (gpphDnldContext != NULL) { in phDnldNfc_ReSetHwDevHandle()
648 free(gpphDnldContext); in phDnldNfc_ReSetHwDevHandle()
649 gpphDnldContext = NULL; in phDnldNfc_ReSetHwDevHandle()
686 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_RawReq()
692 (gpphDnldContext->tRspBuffInfo.pBuff) = pRspData->pBuff; in phDnldNfc_RawReq()
693 (gpphDnldContext->tRspBuffInfo.wLen) = pRspData->wLen; in phDnldNfc_RawReq()
694 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTRaw; in phDnldNfc_RawReq()
695 (gpphDnldContext->tCmdId) = PH_DL_CMD_NONE; in phDnldNfc_RawReq()
696 (gpphDnldContext->tUserData.pBuff) = pFrameData->pBuff; in phDnldNfc_RawReq()
697 (gpphDnldContext->tUserData.wLen) = pFrameData->wLen; in phDnldNfc_RawReq()
698 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_RawReq()
699 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_RawReq()
701 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventRaw); in phDnldNfc_RawReq()
740 gpphDnldContext->FwFormat = FW_FORMAT_UNKNOWN; in phDnldNfc_InitImgInfo()
750 gpphDnldContext->FwFormat = FW_FORMAT_BIN; in phDnldNfc_InitImgInfo()
753 gpphDnldContext->FwFormat = FW_FORMAT_SO; in phDnldNfc_InitImgInfo()
785 gpphDnldContext->nxp_nfc_fw = (uint8_t*)pImageInfo; in phDnldNfc_InitImgInfo()
786 gpphDnldContext->nxp_nfc_fw_len = ImageInfoLen; in phDnldNfc_InitImgInfo()
787 if ((NULL != gpphDnldContext->nxp_nfc_fw) && in phDnldNfc_InitImgInfo()
788 (0 != gpphDnldContext->nxp_nfc_fw_len)) { in phDnldNfc_InitImgInfo()
790 gpphDnldContext->nxp_nfc_fw[5]); in phDnldNfc_InitImgInfo()
792 gpphDnldContext->nxp_nfc_fw[4]); in phDnldNfc_InitImgInfo()
797 wFwVer = (((uint16_t)(gpphDnldContext->nxp_nfc_fw[5]) << 8U) | in phDnldNfc_InitImgInfo()
798 (gpphDnldContext->nxp_nfc_fw[4])); in phDnldNfc_InitImgInfo()
848 gpphDnldContext->nxp_nfc_fwp = (uint8_t*)pImageInfo; in phDnldNfc_LoadRecInfo()
849 gpphDnldContext->nxp_nfc_fwp_len = ImageInfoLen; in phDnldNfc_LoadRecInfo()
850 if ((NULL != gpphDnldContext->nxp_nfc_fwp) && in phDnldNfc_LoadRecInfo()
851 (0 != gpphDnldContext->nxp_nfc_fwp_len)) { in phDnldNfc_LoadRecInfo()
902 gpphDnldContext->nxp_nfc_fwp = (uint8_t*)pImageInfo; in phDnldNfc_LoadPKInfo()
903 gpphDnldContext->nxp_nfc_fwp_len = ImageInfoLen; in phDnldNfc_LoadPKInfo()
905 if ((NULL != gpphDnldContext->nxp_nfc_fwp) && in phDnldNfc_LoadPKInfo()
906 (0 != gpphDnldContext->nxp_nfc_fwp_len)) { in phDnldNfc_LoadPKInfo()
933 if (gpphDnldContext->FwFormat == FW_FORMAT_SO) { in phDnldNfc_CloseFwLibHandle()
940 } else if (gpphDnldContext->FwFormat == FW_FORMAT_BIN) { in phDnldNfc_CloseFwLibHandle()
1238 gpphDnldContext); in phDnldNfc_ReadMem()
1313 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_Read()
1318 (gpphDnldContext->tCmdId) = PH_DL_CMD_READ; in phDnldNfc_Read()
1319 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTRead; in phDnldNfc_Read()
1320 (gpphDnldContext->FrameInp.dwAddr) = dwRdAddr; in phDnldNfc_Read()
1321 (gpphDnldContext->tRspBuffInfo.pBuff) = pData->pBuff; in phDnldNfc_Read()
1322 (gpphDnldContext->tRspBuffInfo.wLen) = pData->wLen; in phDnldNfc_Read()
1323 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_Read()
1324 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_Read()
1325 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Read()
1326 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Read()
1328 memset(&(gpphDnldContext->tRWInfo), 0, in phDnldNfc_Read()
1329 sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_Read()
1331 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventRead); in phDnldNfc_Read()