Lines Matching refs:gpphLibContext
127 pClientCb =gpphLibContext->CBInfo.pClientNtfRegRespCB;
152 if((TRUE == gpphLibContext->RegNtfType.MifareUL)&& (sak_byte==0x00))
155 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
157 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
158 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
159 gpphLibContext->Discov_handle[DeviceIndx1] =
160 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
165 if((TRUE == gpphLibContext->RegNtfType.MifareStd)&&
170 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
172 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
173 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
174 gpphLibContext->Discov_handle[DeviceIndx1]=
175 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
184 if(TRUE == gpphLibContext->RegNtfType.ISO14443_4A)
187 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
189 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
190 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
191 gpphLibContext->Discov_handle[DeviceIndx1] =
192 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
200 if(TRUE == gpphLibContext->RegNtfType.MifareUL)
203 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
205 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
206 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
207 gpphLibContext->Discov_handle[DeviceIndx1] =
208 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
216 if(TRUE == gpphLibContext->RegNtfType.ISO14443_4B)
219 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
221 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
222 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
223 gpphLibContext->Discov_handle[DeviceIndx1] =
224 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
232 if(TRUE == gpphLibContext->RegNtfType.Felica)
235 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
237 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
238 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
239 gpphLibContext->Discov_handle[DeviceIndx1] =
240 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
248 if(TRUE == gpphLibContext->RegNtfType.Jewel)
251 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
253 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
254 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
255 gpphLibContext->Discov_handle[DeviceIndx1] =
256 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
265 if(TRUE == gpphLibContext->RegNtfType.ISO15693)
268 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
270 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
271 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
272 gpphLibContext->Discov_handle[DeviceIndx1] =
273 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
281 if(TRUE == gpphLibContext->RegNtfType.NFC)
283 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
285 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
286 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
287 gpphLibContext->Discov_handle[DeviceIndx1] =
288 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
296 if(TRUE == gpphLibContext->RegNtfType.NFC)
298 gpphLibContext->LibNfcState.cur_state=eLibNfcHalStateConnect;
299 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
301 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
302 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo;
303 gpphLibContext->sNfcIp_Context.Rem_Initiator_Handle=
304 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
321 gpphLibContext->dev_cnt = tag_disc_flg;
324 if((gpphLibContext->dev_cnt > 1)&&(
339 (void*)gpphLibContext->CBInfo.pClientNtfRegRespCntx,
340 gpphLibContext->psRemoteDevList,
341 gpphLibContext->dev_cnt,
352 gpphLibContext->LibNfcState.cur_state=eLibNfcHalStateRelease;
353 pClientCb((void*)gpphLibContext->CBInfo.pClientNtfRegRespCntx,
362 RetVal = phHal4Nfc_ConfigureDiscovery ( gpphLibContext->psHwReference,
364 &(gpphLibContext->sADDconfig),
366 gpphLibContext);
378 pClientCb(gpphLibContext->CBInfo.pClientNtfRegRespCntx,
407 else if((NULL == gpphLibContext) ||
408 (gpphLibContext->LibNfcState.cur_state
413 else if(gpphLibContext->LibNfcState.next_state
425 (void) memcpy(&(gpphLibContext->RegNtfType),pRegistryInfo,
431 gpphLibContext->psHwReference,
434 (void*)gpphLibContext
438 gpphLibContext->psHwReference,
441 (void*)gpphLibContext
443 gpphLibContext->CBInfo.pClientNtfRegRespCB = pNotificationHandler;
444 gpphLibContext->CBInfo.pClientNtfRegRespCntx = pContext;
456 if((NULL == gpphLibContext) ||
457 (gpphLibContext->LibNfcState.cur_state
463 else if(gpphLibContext->LibNfcState.next_state
473 gpphLibContext->psHwReference,
475 gpphLibContext);
478 gpphLibContext->psHwReference,
480 gpphLibContext);
482 gpphLibContext->CBInfo.pClientNtfRegRespCB = NULL;
483 gpphLibContext->CBInfo.pClientNtfRegRespCntx =NULL;
501 if ((NULL == gpphLibContext)
503 gpphLibContext->LibNfcState.cur_state))
515 else if (gpphLibContext->LibNfcState.next_state
520 else if (0 == gpphLibContext->Connected_handle)
524 else if ((gpphLibContext->Discov_handle[0] != hRemoteDevice)
525 && (gpphLibContext->Discov_handle[1] != hRemoteDevice)
526 && (gpphLibContext->Discov_handle[2] != hRemoteDevice)
527 && (gpphLibContext->Discov_handle[3] != hRemoteDevice)
528 && (gpphLibContext->Discov_handle[4] != hRemoteDevice)
529 && (gpphLibContext->Discov_handle[5] != hRemoteDevice)
530 && (gpphLibContext->Discov_handle[6] != hRemoteDevice)
531 && (gpphLibContext->Discov_handle[7] != hRemoteDevice)
532 && (gpphLibContext->Discov_handle[8] != hRemoteDevice)
533 && (gpphLibContext->Discov_handle[9] != hRemoteDevice))
542 ret_val = phHal4Nfc_Connect (gpphLibContext->psHwReference,
545 (void *)gpphLibContext);
552 gpphLibContext->CBInfo.pClientConnectCb = pNotifyReConnect_RspCb;
553 gpphLibContext->CBInfo.pClientConCntx = pContext;
554 gpphLibContext->status.GenCb_pending_status = TRUE;
555 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateConnect;
557 gpphLibContext->Prev_Connected_handle = gpphLibContext->Connected_handle;
559 gpphLibContext->Connected_handle = hRemoteDevice;
591 if((NULL == gpphLibContext) ||
592 (gpphLibContext->LibNfcState.cur_state == eLibNfcHalStateShutdown))
603 else if(gpphLibContext->LibNfcState.next_state
608 else if((gpphLibContext->Discov_handle[0] != hRemoteDevice)&&
609 (gpphLibContext->Discov_handle[1] != hRemoteDevice)&&
610 (gpphLibContext->Discov_handle[2] != hRemoteDevice)&&
611 (gpphLibContext->Discov_handle[3] != hRemoteDevice)&&
612 (gpphLibContext->Discov_handle[4] != hRemoteDevice)&&
613 (gpphLibContext->Discov_handle[5] != hRemoteDevice)&&
614 (gpphLibContext->Discov_handle[6] != hRemoteDevice)&&
615 (gpphLibContext->Discov_handle[7] != hRemoteDevice)&&
616 (gpphLibContext->Discov_handle[8] != hRemoteDevice)&&
617 (gpphLibContext->Discov_handle[9] != hRemoteDevice))
621 else if ((hRemoteDevice != gpphLibContext->Connected_handle)
622 && (0 != gpphLibContext->Connected_handle))
631 RetVal = phHal4Nfc_Connect(gpphLibContext->psHwReference,
634 (void* )gpphLibContext);
640 gpphLibContext->CBInfo.pClientConnectCb = pNotifyConnect_RspCb;
641 gpphLibContext->CBInfo.pClientConCntx = pContext;
642 gpphLibContext->status.GenCb_pending_status=TRUE;
643 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateConnect;
644 gpphLibContext->Prev_Connected_handle = gpphLibContext->Connected_handle;
645 gpphLibContext->Connected_handle = hRemoteDevice;
668 if((phLibNfc_LibContext_t *)context == gpphLibContext)
671 gpphLibContext->CBInfo.pClientConnectCb;
673 if(eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state)
681 gpphLibContext->status.GenCb_pending_status = FALSE;
682 gpphLibContext->status.DiscEnbl_status = FALSE;
685 phLibNfc_UpdateCurState (status,gpphLibContext);
687 if(gpphLibContext->status.Discovery_pending_status == TRUE)
693 gpphLibContext->status.Discovery_pending_status = FALSE;
695 gpphLibContext->psHwReference,
696 gpphLibContext->eLibNfcCfgMode,
697 &gpphLibContext->sADDconfig,
700 (void *)gpphLibContext);
703 (void)phLibNfc_UpdateNextState(gpphLibContext,
705 gpphLibContext->status.GenCb_pending_status = TRUE;
706 gpphLibContext->status.DiscEnbl_status = TRUE;
715 gpphLibContext->CBInfo.pClientConnectCb = NULL;
717 ps_client_con_cb (gpphLibContext->CBInfo.pClientConCntx,
741 if((phLibNfc_LibContext_t *)pContext == gpphLibContext)
743 gpphLibContext->LastTrancvSuccess = FALSE;
746 gpphLibContext->status.GenCb_pending_status = FALSE;
750 if((eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state))
759 gpphLibContext->Connected_handle =(uint32_t) pRmtdev_info;
761 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateConnect;
769 gpphLibContext->Connected_handle = gpphLibContext->Prev_Connected_handle ;
771 gpphLibContext->ndef_cntx.is_ndef = CHK_NDEF_NOT_DONE;
775 gpphLibContext->CBInfo.pClientConnectCb(
776 gpphLibContext->CBInfo.pClientConCntx,
801 if((NULL == gpphLibContext) ||
802 (gpphLibContext->LibNfcState.cur_state
814 else if(gpphLibContext->LibNfcState.next_state
819 else if(gpphLibContext->Connected_handle==0)
824 else if(hRemoteDevice != gpphLibContext->Connected_handle )
830 if((eLibNfcHalStateRelease == gpphLibContext->LibNfcState.next_state)
831 ||((gpphLibContext->sSeContext.eActivatedMode == phLibNfc_SE_ActModeWired)&&
833 ||((gpphLibContext->sSeContext.eActivatedMode != phLibNfc_SE_ActModeWired)&&
839 else if(eLibNfcHalStateTransaction == gpphLibContext->LibNfcState.next_state)
847 gpphLibContext->ReleaseType = ReleaseType;
849 RetVal = phHal4Nfc_Disconnect(gpphLibContext->psHwReference,
851 gpphLibContext->ReleaseType,
854 (void *)gpphLibContext);
858 gpphLibContext->CBInfo.pClientDisConnectCb = pDscntCallback;
859 gpphLibContext->CBInfo.pClientDConCntx = pContext;
861 gpphLibContext->status.GenCb_pending_status=TRUE;
862 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateRelease;
889 pUpper_NtfCb = gpphLibContext->CBInfo.pClientDisConnectCb;
890 pUpper_Context = gpphLibContext->CBInfo.pClientDConCntx;
893 if((phLibNfc_LibContext_t *)context != gpphLibContext)
901 gpphLibContext->status.GenCb_pending_status = FALSE;
902 gpphLibContext->CBInfo.pClientDisConnectCb = NULL;
903 gpphLibContext->CBInfo.pClientDConCntx = NULL;
905 gpphLibContext->ndef_cntx.is_ndef = CHK_NDEF_NOT_DONE;
906 gpphLibContext->LastTrancvSuccess = FALSE;
908 gpphLibContext->Connected_handle=0x0000;
910 gpphLibContext->Prev_Connected_handle = 0x0000;
912 if(gpphLibContext->sSeContext.eActivatedMode == phLibNfc_SE_ActModeWired)
914 gpphLibContext->sSeContext.eActivatedMode = phLibNfc_SE_ActModeDefault;
916 if(NULL != gpphLibContext->psBufferedAuth)
918 if(NULL != gpphLibContext->psBufferedAuth->sRecvData.buffer)
921 gpphLibContext->psBufferedAuth->sRecvData.buffer);
923 if(NULL != gpphLibContext->psBufferedAuth->sSendData.buffer)
926 gpphLibContext->psBufferedAuth->sSendData.buffer);
928 phOsalNfc_FreeMemory(gpphLibContext->psBufferedAuth);
929 gpphLibContext->psBufferedAuth = NULL;
933 if(eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state)
942 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateRelease;
970 if((NULL == gpphLibContext) ||
971 (gpphLibContext->LibNfcState.cur_state
986 else if(gpphLibContext->LibNfcState.next_state
991 else if(gpphLibContext->Connected_handle==0)
995 else if(gpphLibContext->Connected_handle!= hRemoteDevice )
1001 gpphLibContext->LibNfcState.next_state)
1008 else if ((LLCP_STATE_RESET_INIT != gpphLibContext->llcp_cntx.sLlcpContext.state)
1009 && (LLCP_STATE_CHECKED != gpphLibContext->llcp_cntx.sLlcpContext.state))
1016 gpphLibContext->ndef_cntx.eLast_Call = RawTrans;
1017 (void)memcpy((void *)(gpphLibContext->psTransInfo),
1024 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareRaw ) &&
1025 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareAuthentA ) &&
1026 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareAuthentB ) &&
1027 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareRead16 ) &&
1028 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareRead ) &&
1029 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareWrite16 ) &&
1030 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareWrite4 ) &&
1031 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareDec ) &&
1032 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareTransfer ) &&
1033 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareRestore ) &&
1034 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareReadSector ) &&
1035 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareWriteSector ))
1040 gpphLibContext->LibNfcState.next_state)
1046 (phHal_eMifareAuthentA == gpphLibContext->psTransInfo->cmd.MfCmd))
1048 if(NULL != gpphLibContext->psBufferedAuth)
1050 if(NULL != gpphLibContext->psBufferedAuth->sRecvData.buffer)
1053 gpphLibContext->psBufferedAuth->sRecvData.buffer);
1055 if(NULL != gpphLibContext->psBufferedAuth->sSendData.buffer)
1058 gpphLibContext->psBufferedAuth->sSendData.buffer);
1060 phOsalNfc_FreeMemory(gpphLibContext->psBufferedAuth);
1062 gpphLibContext->psBufferedAuth
1065 gpphLibContext->psBufferedAuth->addr = psTransceiveInfo->addr;
1066 gpphLibContext->psBufferedAuth->cmd = psTransceiveInfo->cmd;
1067 gpphLibContext->psBufferedAuth->sSendData.length
1069 gpphLibContext->psBufferedAuth->sRecvData.length
1071 gpphLibContext->psBufferedAuth->sSendData.buffer
1074 gpphLibContext->psTransInfo->sSendData.length);
1077 (gpphLibContext->psBufferedAuth->sSendData.buffer),
1081 gpphLibContext->psBufferedAuth->sRecvData.buffer
1084 gpphLibContext->psTransInfo->sRecvData.length);
1087 RetVal = phHal4Nfc_Transceive( gpphLibContext->psHwReference,
1088 (phHal_sTransceiveInfo_t*)gpphLibContext->psTransInfo,
1092 (void* )gpphLibContext);
1096 gpphLibContext->CBInfo.pClientTransceiveCb = pTransceive_RspCb;
1097 gpphLibContext->CBInfo.pClientTranseCntx = pContext;
1099 gpphLibContext->status.GenCb_pending_status = TRUE;
1103 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateTransaction;
1108 gpphLibContext->status.GenCb_pending_status = FALSE;
1128 gpphLibContext->CBInfo.pClientTransceiveCb;
1131 if((phLibNfc_LibContext_t *)context == gpphLibContext)
1133 trans_resp = &gpphLibContext->psTransInfo->sRecvData;
1135 pUpper_Context = gpphLibContext->CBInfo.pClientTranseCntx;
1136 gpphLibContext->status.GenCb_pending_status = FALSE;
1140 if(gpphLibContext->LibNfcState.next_state
1148 gpphLibContext->LibNfcState.next_state)
1161 gpphLibContext->LastTrancvSuccess = FALSE;
1164 trans_status = phHal4Nfc_Connect(gpphLibContext->psHwReference,
1168 (void *)gpphLibContext);
1182 phLibNfc_UpdateCurState(status,gpphLibContext);
1183 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateConnect;
1192 gpphLibContext->LastTrancvSuccess = TRUE;
1193 pUpper_Context = gpphLibContext->CBInfo.pClientTranseCntx;
1199 gpphLibContext->CBInfo.pClientTransceiveCb(pUpper_Context,
1206 gpphLibContext->LastTrancvSuccess = FALSE;
1207 pUpper_Context = gpphLibContext->CBInfo.pClientTranseCntx;
1212 gpphLibContext->CBInfo.pClientTransceiveCb(pUpper_Context,
1239 if((NULL == gpphLibContext)||
1240 (gpphLibContext->LibNfcState.cur_state == eLibNfcHalStateShutdown))
1249 else if(gpphLibContext->LibNfcState.next_state == eLibNfcHalStateShutdown)
1253 else if(TRUE == gpphLibContext->status.GenCb_pending_status)
1260 gpphLibContext->LibNfcState.next_state)
1271 gpphLibContext->psHwReference,
1275 (void *)gpphLibContext
1280 gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCb= NULL;
1286 gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCb = pConfigRspCb;
1287 gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCntx = pContext;
1288 gpphLibContext->status.GenCb_pending_status=TRUE;
1290 gpphLibContext->LibNfcState.next_state =eLibNfcHalStateConfigReady;
1308 if((phLibNfc_LibContext_t *)context != gpphLibContext)
1314 if(eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state)
1322 gpphLibContext->status.GenCb_pending_status = FALSE;
1333 phLibNfc_UpdateCurState(status,gpphLibContext);
1335 pClientCb = gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCb;
1336 pUpperLayerContext = gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCntx;
1338 gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCb = NULL;
1339 gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCntx = NULL;