Lines Matching refs:gpphDnldContext

35 static pphDnldNfc_DlContext_t gpphDnldContext = NULL; /* Download contex */  variable
68 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_Reset()
72 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTNone; in phDnldNfc_Reset()
73 (gpphDnldContext->tCmdId) = PH_DL_CMD_RESET; in phDnldNfc_Reset()
74 (gpphDnldContext->tRspBuffInfo.pBuff) = NULL; in phDnldNfc_Reset()
75 (gpphDnldContext->tRspBuffInfo.wLen) = 0; in phDnldNfc_Reset()
76 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_Reset()
77 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_Reset()
78 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Reset()
79 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Reset()
81 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventReset); in phDnldNfc_Reset()
123 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_GetVersion()
128 (gpphDnldContext->tRspBuffInfo.pBuff) = pVersionInfo->pBuff; in phDnldNfc_GetVersion()
129 (gpphDnldContext->tRspBuffInfo.wLen) = pVersionInfo->wLen; in phDnldNfc_GetVersion()
130 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTNone; in phDnldNfc_GetVersion()
131 (gpphDnldContext->tCmdId) = PH_DL_CMD_GETVERSION; in phDnldNfc_GetVersion()
132 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_GetVersion()
133 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_GetVersion()
134 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_GetVersion()
135 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_GetVersion()
137 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventGetVer); in phDnldNfc_GetVersion()
183 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_GetSessionState()
188 (gpphDnldContext->tRspBuffInfo.pBuff) = pSession->pBuff; in phDnldNfc_GetSessionState()
189 (gpphDnldContext->tRspBuffInfo.wLen) = pSession->wLen; in phDnldNfc_GetSessionState()
190 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTNone; in phDnldNfc_GetSessionState()
191 (gpphDnldContext->tCmdId) = PH_DL_CMD_GETSESSIONSTATE; in phDnldNfc_GetSessionState()
192 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_GetSessionState()
193 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_GetSessionState()
194 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_GetSessionState()
195 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_GetSessionState()
198 phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventGetSesnSt); in phDnldNfc_GetSessionState()
248 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_CheckIntegrity()
263 (gpphDnldContext->FrameInp.Type) = phDnldNfc_ChkIntg; in phDnldNfc_CheckIntegrity()
265 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTNone; in phDnldNfc_CheckIntegrity()
269 (gpphDnldContext->tRspBuffInfo.pBuff) = pCRCData->pBuff; in phDnldNfc_CheckIntegrity()
270 (gpphDnldContext->tRspBuffInfo.wLen) = pCRCData->wLen; in phDnldNfc_CheckIntegrity()
271 (gpphDnldContext->tCmdId) = PH_DL_CMD_CHECKINTEGRITY; in phDnldNfc_CheckIntegrity()
272 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_CheckIntegrity()
273 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_CheckIntegrity()
274 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_CheckIntegrity()
275 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_CheckIntegrity()
278 phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventIntegChk); in phDnldNfc_CheckIntegrity()
320 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_ReadLog()
325 (gpphDnldContext->tCmdId) = PH_DL_CMD_READ; in phDnldNfc_ReadLog()
326 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTRead; in phDnldNfc_ReadLog()
327 (gpphDnldContext->FrameInp.dwAddr) = PHDNLDNFC_EEPROM_LOG_START_ADDR; in phDnldNfc_ReadLog()
328 (gpphDnldContext->tRspBuffInfo.pBuff) = pData->pBuff; in phDnldNfc_ReadLog()
329 (gpphDnldContext->tRspBuffInfo.wLen) = pData->wLen; in phDnldNfc_ReadLog()
330 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_ReadLog()
331 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_ReadLog()
332 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_ReadLog()
333 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_ReadLog()
335 memset(&(gpphDnldContext->tRWInfo), 0, in phDnldNfc_ReadLog()
336 sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_ReadLog()
338 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventRead); in phDnldNfc_ReadLog()
387 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_Write()
396 pImgPtr = (uint8_t*)gpphDnldContext->nxp_nfc_fw; in phDnldNfc_Write()
397 wLen = gpphDnldContext->nxp_nfc_fw_len; in phDnldNfc_Write()
400 if (PH_DL_STATUS_PLL_ERROR == (gpphDnldContext->tLastStatus)) { in phDnldNfc_Write()
403 (gpphDnldContext->tLastStatus)) { in phDnldNfc_Write()
409 pImgPtr = (uint8_t*)gpphDnldContext->nxp_nfc_fwp; in phDnldNfc_Write()
410 wLen = gpphDnldContext->nxp_nfc_fwp_len; in phDnldNfc_Write()
423 (gpphDnldContext->tCmdId) = PH_DL_CMD_WRITE; in phDnldNfc_Write()
424 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTWrite; in phDnldNfc_Write()
425 (gpphDnldContext->tRspBuffInfo.pBuff) = NULL; in phDnldNfc_Write()
426 (gpphDnldContext->tRspBuffInfo.wLen) = 0; in phDnldNfc_Write()
427 (gpphDnldContext->tUserData.pBuff) = pImgPtr; in phDnldNfc_Write()
428 (gpphDnldContext->tUserData.wLen) = wLen; in phDnldNfc_Write()
429 (gpphDnldContext->bResendLastFrame) = false; in phDnldNfc_Write()
431 memset(&(gpphDnldContext->tRWInfo), 0, in phDnldNfc_Write()
432 sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_Write()
433 (gpphDnldContext->tRWInfo.bFirstWrReq) = true; in phDnldNfc_Write()
434 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Write()
435 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Write()
437 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventWrite); in phDnldNfc_Write()
480 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_Log()
486 (gpphDnldContext->tCmdId) = PH_DL_CMD_LOG; in phDnldNfc_Log()
487 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTLog; in phDnldNfc_Log()
488 (gpphDnldContext->tRspBuffInfo.pBuff) = NULL; in phDnldNfc_Log()
489 (gpphDnldContext->tRspBuffInfo.wLen) = 0; in phDnldNfc_Log()
490 (gpphDnldContext->tUserData.pBuff) = (pData->pBuff); in phDnldNfc_Log()
491 (gpphDnldContext->tUserData.wLen) = (pData->wLen); in phDnldNfc_Log()
493 memset(&(gpphDnldContext->tRWInfo), 0, in phDnldNfc_Log()
494 sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_Log()
495 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Log()
496 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Log()
498 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventLog); in phDnldNfc_Log()
547 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_Force()
551 (gpphDnldContext->tCmdId) = PH_DL_CMD_FORCE; in phDnldNfc_Force()
552 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTForce; in phDnldNfc_Force()
553 (gpphDnldContext->tRspBuffInfo.pBuff) = NULL; in phDnldNfc_Force()
554 (gpphDnldContext->tRspBuffInfo.wLen) = 0; in phDnldNfc_Force()
592 (gpphDnldContext->tUserData.pBuff) = bPldVal; in phDnldNfc_Force()
593 (gpphDnldContext->tUserData.wLen) = sizeof(bPldVal); in phDnldNfc_Force()
595 memset(&(gpphDnldContext->tRWInfo), 0, sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_Force()
596 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Force()
597 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Force()
599 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventForce); in phDnldNfc_Force()
627 if (NULL == gpphDnldContext) { in phDnldNfc_SetHwDevHandle()
635 gpphDnldContext = psDnldContext; in phDnldNfc_SetHwDevHandle()
640 (void)memset((void*)gpphDnldContext, 0, sizeof(phDnldNfc_DlContext_t)); in phDnldNfc_SetHwDevHandle()
657 if (gpphDnldContext != NULL) { in phDnldNfc_ReSetHwDevHandle()
659 free(gpphDnldContext); in phDnldNfc_ReSetHwDevHandle()
660 gpphDnldContext = NULL; in phDnldNfc_ReSetHwDevHandle()
697 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_RawReq()
703 (gpphDnldContext->tRspBuffInfo.pBuff) = pRspData->pBuff; in phDnldNfc_RawReq()
704 (gpphDnldContext->tRspBuffInfo.wLen) = pRspData->wLen; in phDnldNfc_RawReq()
705 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTRaw; in phDnldNfc_RawReq()
706 (gpphDnldContext->tCmdId) = PH_DL_CMD_NONE; in phDnldNfc_RawReq()
707 (gpphDnldContext->tUserData.pBuff) = pFrameData->pBuff; in phDnldNfc_RawReq()
708 (gpphDnldContext->tUserData.wLen) = pFrameData->wLen; in phDnldNfc_RawReq()
709 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_RawReq()
710 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_RawReq()
712 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventRaw); in phDnldNfc_RawReq()
790 gpphDnldContext->nxp_nfc_fw = (uint8_t*)pImageInfo; in phDnldNfc_InitImgInfo()
791 gpphDnldContext->nxp_nfc_fw_len = ImageInfoLen; in phDnldNfc_InitImgInfo()
792 if ((NULL != gpphDnldContext->nxp_nfc_fw) && in phDnldNfc_InitImgInfo()
793 (0 != gpphDnldContext->nxp_nfc_fw_len)) { in phDnldNfc_InitImgInfo()
795 gpphDnldContext->nxp_nfc_fw[5]); in phDnldNfc_InitImgInfo()
797 gpphDnldContext->nxp_nfc_fw[4]); in phDnldNfc_InitImgInfo()
802 wFwVer = (((uint16_t)(gpphDnldContext->nxp_nfc_fw[5]) << 8U) | in phDnldNfc_InitImgInfo()
803 (gpphDnldContext->nxp_nfc_fw[4])); in phDnldNfc_InitImgInfo()
855 gpphDnldContext->nxp_nfc_fwp = (uint8_t*)pImageInfo; in phDnldNfc_LoadRecInfo()
856 gpphDnldContext->nxp_nfc_fwp_len = ImageInfoLen; in phDnldNfc_LoadRecInfo()
857 if ((NULL != gpphDnldContext->nxp_nfc_fwp) && in phDnldNfc_LoadRecInfo()
858 (0 != gpphDnldContext->nxp_nfc_fwp_len)) { in phDnldNfc_LoadRecInfo()
913 gpphDnldContext->nxp_nfc_fwp = (uint8_t*)pImageInfo; in phDnldNfc_LoadPKInfo()
914 gpphDnldContext->nxp_nfc_fwp_len = ImageInfoLen; in phDnldNfc_LoadPKInfo()
916 if ((NULL != gpphDnldContext->nxp_nfc_fwp) && in phDnldNfc_LoadPKInfo()
917 (0 != gpphDnldContext->nxp_nfc_fwp_len)) { in phDnldNfc_LoadPKInfo()
1183 gpphDnldContext); in phDnldNfc_ReadMem()
1258 if (phDnldNfc_TransitionIdle != gpphDnldContext->tDnldInProgress) { in phDnldNfc_Read()
1263 (gpphDnldContext->tCmdId) = PH_DL_CMD_READ; in phDnldNfc_Read()
1264 (gpphDnldContext->FrameInp.Type) = phDnldNfc_FTRead; in phDnldNfc_Read()
1265 (gpphDnldContext->FrameInp.dwAddr) = dwRdAddr; in phDnldNfc_Read()
1266 (gpphDnldContext->tRspBuffInfo.pBuff) = pData->pBuff; in phDnldNfc_Read()
1267 (gpphDnldContext->tRspBuffInfo.wLen) = pData->wLen; in phDnldNfc_Read()
1268 (gpphDnldContext->tUserData.pBuff) = NULL; in phDnldNfc_Read()
1269 (gpphDnldContext->tUserData.wLen) = 0; in phDnldNfc_Read()
1270 (gpphDnldContext->UserCb) = pNotify; in phDnldNfc_Read()
1271 (gpphDnldContext->UserCtxt) = pContext; in phDnldNfc_Read()
1273 memset(&(gpphDnldContext->tRWInfo), 0, in phDnldNfc_Read()
1274 sizeof(gpphDnldContext->tRWInfo)); in phDnldNfc_Read()
1276 wStatus = phDnldNfc_CmdHandler(gpphDnldContext, phDnldNfc_EventRead); in phDnldNfc_Read()