Lines Matching refs:gpphLibContext
119 pClientCb =gpphLibContext->CBInfo.pClientNtfRegRespCB;
140 if((TRUE == gpphLibContext->RegNtfType.MifareUL)&& (sak_byte==0x00))
143 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
145 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
146 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
147 gpphLibContext->Discov_handle[DeviceIndx1] =
148 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
153 if((TRUE == gpphLibContext->RegNtfType.MifareStd)&&
157 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
159 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
160 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
161 gpphLibContext->Discov_handle[DeviceIndx1]=
162 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
171 if(TRUE == gpphLibContext->RegNtfType.ISO14443_4A)
174 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
176 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
177 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
178 gpphLibContext->Discov_handle[DeviceIndx1] =
179 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
187 if(TRUE == gpphLibContext->RegNtfType.MifareUL)
190 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
192 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
193 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
194 gpphLibContext->Discov_handle[DeviceIndx1] =
195 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
203 if(TRUE == gpphLibContext->RegNtfType.ISO14443_4B)
206 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
208 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
209 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
210 gpphLibContext->Discov_handle[DeviceIndx1] =
211 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
219 if(TRUE == gpphLibContext->RegNtfType.Felica)
222 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
224 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
225 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
226 gpphLibContext->Discov_handle[DeviceIndx1] =
227 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
235 if(TRUE == gpphLibContext->RegNtfType.Jewel)
238 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
240 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
241 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
242 gpphLibContext->Discov_handle[DeviceIndx1] =
243 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
252 if(TRUE == gpphLibContext->RegNtfType.ISO15693)
255 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
257 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
258 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
259 gpphLibContext->Discov_handle[DeviceIndx1] =
260 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
268 if(TRUE == gpphLibContext->RegNtfType.NFC)
270 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
272 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
273 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx].psRemoteDevInfo;
274 gpphLibContext->Discov_handle[DeviceIndx1] =
275 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
283 if(TRUE == gpphLibContext->RegNtfType.NFC)
285 gpphLibContext->LibNfcState.cur_state=eLibNfcHalStateConnect;
286 gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo=
288 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev =
289 (uint32_t)gpphLibContext->psRemoteDevList[DeviceIndx1].psRemoteDevInfo;
290 gpphLibContext->sNfcIp_Context.Rem_Initiator_Handle=
291 gpphLibContext->psRemoteDevList[DeviceIndx1].hTargetDev;
308 gpphLibContext->dev_cnt = tag_disc_flg;
311 if((gpphLibContext->dev_cnt > 1)&&(
326 (void*)gpphLibContext->CBInfo.pClientNtfRegRespCntx,
327 gpphLibContext->psRemoteDevList,
328 gpphLibContext->dev_cnt,
339 gpphLibContext->LibNfcState.cur_state=eLibNfcHalStateRelease;
340 pClientCb((void*)gpphLibContext->CBInfo.pClientNtfRegRespCntx,
349 RetVal = phHal4Nfc_ConfigureDiscovery ( gpphLibContext->psHwReference,
351 &(gpphLibContext->sADDconfig),
353 gpphLibContext);
365 pClientCb(gpphLibContext->CBInfo.pClientNtfRegRespCntx,
394 else if((NULL == gpphLibContext) ||
395 (gpphLibContext->LibNfcState.cur_state
400 else if(gpphLibContext->LibNfcState.next_state
412 (void) memcpy(&(gpphLibContext->RegNtfType),pRegistryInfo,
418 gpphLibContext->psHwReference,
421 (void*)gpphLibContext
425 gpphLibContext->psHwReference,
428 (void*)gpphLibContext
430 gpphLibContext->CBInfo.pClientNtfRegRespCB = pNotificationHandler;
431 gpphLibContext->CBInfo.pClientNtfRegRespCntx = pContext;
443 if((NULL == gpphLibContext) ||
444 (gpphLibContext->LibNfcState.cur_state
450 else if(gpphLibContext->LibNfcState.next_state
460 gpphLibContext->psHwReference,
462 gpphLibContext);
465 gpphLibContext->psHwReference,
467 gpphLibContext);
469 gpphLibContext->CBInfo.pClientNtfRegRespCB = NULL;
470 gpphLibContext->CBInfo.pClientNtfRegRespCntx =NULL;
490 if((NULL == gpphLibContext) ||
491 (gpphLibContext->LibNfcState.cur_state == eLibNfcHalStateShutdown))
502 else if(gpphLibContext->LibNfcState.next_state
507 else if((gpphLibContext->Discov_handle[0] != hRemoteDevice)&&
508 (gpphLibContext->Discov_handle[1] != hRemoteDevice)&&
509 (gpphLibContext->Discov_handle[2] != hRemoteDevice)&&
510 (gpphLibContext->Discov_handle[3] != hRemoteDevice)&&
511 (gpphLibContext->Discov_handle[4] != hRemoteDevice)&&
512 (gpphLibContext->Discov_handle[5] != hRemoteDevice)&&
513 (gpphLibContext->Discov_handle[6] != hRemoteDevice)&&
514 (gpphLibContext->Discov_handle[7] != hRemoteDevice)&&
515 (gpphLibContext->Discov_handle[8] != hRemoteDevice)&&
516 (gpphLibContext->Discov_handle[9] != hRemoteDevice))
525 RetVal = phHal4Nfc_Connect(gpphLibContext->psHwReference,
528 (void* )gpphLibContext);
534 gpphLibContext->CBInfo.pClientConnectCb = pNotifyConnect_RspCb;
535 gpphLibContext->CBInfo.pClientConCntx = pContext;
536 gpphLibContext->status.GenCb_pending_status=TRUE;
537 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateConnect;
538 gpphLibContext->Connected_handle = hRemoteDevice;
564 if((phLibNfc_LibContext_t *)pContext == gpphLibContext)
568 gpphLibContext->status.GenCb_pending_status = FALSE;
572 if((eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state))
581 gpphLibContext->Connected_handle =(uint32_t) pRmtdev_info;
583 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateConnect;
592 gpphLibContext->ndef_cntx.is_ndef = CHK_NDEF_NOT_DONE;
596 gpphLibContext->CBInfo.pClientConnectCb(
597 gpphLibContext->CBInfo.pClientConCntx,
622 if((NULL == gpphLibContext) ||
623 (gpphLibContext->LibNfcState.cur_state
635 else if(gpphLibContext->LibNfcState.next_state
640 else if(gpphLibContext->Connected_handle==0)
645 else if(hRemoteDevice != gpphLibContext->Connected_handle )
651 if((eLibNfcHalStateRelease == gpphLibContext->LibNfcState.next_state)
652 ||((gpphLibContext->sSeContext.eActivatedMode == phLibNfc_SE_ActModeWired)&&
654 ||((gpphLibContext->sSeContext.eActivatedMode != phLibNfc_SE_ActModeWired)&&
659 else if(eLibNfcHalStateTransaction == gpphLibContext->LibNfcState.next_state)
666 gpphLibContext->ReleaseType = ReleaseType;
668 RetVal = phHal4Nfc_Disconnect(gpphLibContext->psHwReference,
670 gpphLibContext->ReleaseType,
673 (void *)gpphLibContext);
677 gpphLibContext->CBInfo.pClientDisConnectCb = pDscntCallback;
678 gpphLibContext->CBInfo.pClientDConCntx = pContext;
680 gpphLibContext->status.GenCb_pending_status=TRUE;
681 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateRelease;
708 pUpper_NtfCb = gpphLibContext->CBInfo.pClientDisConnectCb;
709 pUpper_Context = gpphLibContext->CBInfo.pClientDConCntx;
712 if((phLibNfc_LibContext_t *)context != gpphLibContext)
720 gpphLibContext->status.GenCb_pending_status = FALSE;
721 gpphLibContext->CBInfo.pClientDisConnectCb = NULL;
722 gpphLibContext->CBInfo.pClientDConCntx = NULL;
724 gpphLibContext->ndef_cntx.is_ndef = CHK_NDEF_NOT_DONE;
725 gpphLibContext->LastTrancvSuccess = FALSE;
727 gpphLibContext->Connected_handle=0x0000;
728 if(NULL != gpphLibContext->psBufferedAuth)
730 if(NULL != gpphLibContext->psBufferedAuth->sRecvData.buffer)
733 gpphLibContext->psBufferedAuth->sRecvData.buffer);
735 if(NULL != gpphLibContext->psBufferedAuth->sSendData.buffer)
738 gpphLibContext->psBufferedAuth->sSendData.buffer);
740 phOsalNfc_FreeMemory(gpphLibContext->psBufferedAuth);
741 gpphLibContext->psBufferedAuth = NULL;
745 if(eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state)
754 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateRelease;
782 if((NULL == gpphLibContext) ||
783 (gpphLibContext->LibNfcState.cur_state
798 else if(gpphLibContext->LibNfcState.next_state
803 else if(gpphLibContext->Connected_handle==0)
807 else if(gpphLibContext->Connected_handle!= hRemoteDevice )
813 gpphLibContext->LibNfcState.next_state)
821 gpphLibContext->ndef_cntx.eLast_Call = RawTrans;
822 (void)memcpy((void *)(gpphLibContext->psTransInfo),
829 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareRaw ) &&
830 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareAuthentA ) &&
831 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareAuthentB ) &&
832 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareRead16 ) &&
833 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareRead ) &&
834 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareWrite16 ) &&
835 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareWrite4 ) &&
836 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareDec ) &&
837 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareTransfer ) &&
838 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareRestore ) &&
839 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareReadSector ) &&
840 ( gpphLibContext->psTransInfo->cmd.MfCmd != phHal_eMifareWriteSector ))
845 gpphLibContext->LibNfcState.next_state)
851 (phHal_eMifareAuthentA == gpphLibContext->psTransInfo->cmd.MfCmd))
853 if(NULL != gpphLibContext->psBufferedAuth)
855 if(NULL != gpphLibContext->psBufferedAuth->sRecvData.buffer)
858 gpphLibContext->psBufferedAuth->sRecvData.buffer);
860 if(NULL != gpphLibContext->psBufferedAuth->sSendData.buffer)
863 gpphLibContext->psBufferedAuth->sSendData.buffer);
865 gpphLibContext->psBufferedAuth);
867 gpphLibContext->psBufferedAuth
870 gpphLibContext->psBufferedAuth->addr = psTransceiveInfo->addr;
871 gpphLibContext->psBufferedAuth->cmd = psTransceiveInfo->cmd;
872 gpphLibContext->psBufferedAuth->sSendData.length
874 gpphLibContext->psBufferedAuth->sRecvData.length
876 gpphLibContext->psBufferedAuth->sSendData.buffer
879 gpphLibContext->psTransInfo->sSendData.length);
882 (gpphLibContext->psBufferedAuth->sSendData.buffer),
886 gpphLibContext->psBufferedAuth->sRecvData.buffer
889 gpphLibContext->psTransInfo->sRecvData.length);
892 RetVal = phHal4Nfc_Transceive( gpphLibContext->psHwReference,
893 (phHal_sTransceiveInfo_t*)gpphLibContext->psTransInfo,
897 (void* )gpphLibContext);
901 gpphLibContext->CBInfo.pClientTransceiveCb = pTransceive_RspCb;
902 gpphLibContext->CBInfo.pClientTranseCntx = pContext;
904 gpphLibContext->status.GenCb_pending_status = TRUE;
908 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateTransaction;
913 gpphLibContext->status.GenCb_pending_status = FALSE;
933 gpphLibContext->CBInfo.pClientTransceiveCb;
936 if((phLibNfc_LibContext_t *)context == gpphLibContext)
938 trans_resp = &gpphLibContext->psTransInfo->sRecvData;
940 pUpper_Context = gpphLibContext->CBInfo.pClientTranseCntx;
941 gpphLibContext->status.GenCb_pending_status = FALSE;
945 if(gpphLibContext->LibNfcState.next_state
953 gpphLibContext->LibNfcState.next_state)
968 trans_status = phHal4Nfc_Connect(gpphLibContext->psHwReference,
972 (void *)gpphLibContext);
979 phLibNfc_UpdateCurState(status,gpphLibContext);
980 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateConnect;
989 gpphLibContext->LastTrancvSuccess = TRUE;
990 pUpper_Context = gpphLibContext->CBInfo.pClientTranseCntx;
996 gpphLibContext->CBInfo.pClientTransceiveCb(pUpper_Context,
1003 gpphLibContext->LastTrancvSuccess = FALSE;
1004 pUpper_Context = gpphLibContext->CBInfo.pClientTranseCntx;
1009 gpphLibContext->CBInfo.pClientTransceiveCb(pUpper_Context,
1036 if((NULL == gpphLibContext)||
1037 (gpphLibContext->LibNfcState.cur_state == eLibNfcHalStateShutdown))
1046 else if(gpphLibContext->LibNfcState.next_state == eLibNfcHalStateShutdown)
1050 else if(TRUE == gpphLibContext->status.GenCb_pending_status)
1057 gpphLibContext->LibNfcState.next_state)
1068 gpphLibContext->psHwReference,
1072 (void *)gpphLibContext
1077 gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCb= NULL;
1083 gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCb = pConfigRspCb;
1084 gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCntx = pContext;
1085 gpphLibContext->status.GenCb_pending_status=TRUE;
1087 gpphLibContext->LibNfcState.next_state =eLibNfcHalStateConfigReady;
1105 if((phLibNfc_LibContext_t *)context != gpphLibContext)
1111 if(eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state)
1119 gpphLibContext->status.GenCb_pending_status = FALSE;
1130 phLibNfc_UpdateCurState(status,gpphLibContext);
1132 pClientCb = gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCb;
1133 pUpperLayerContext = gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCntx;
1135 gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCb = NULL;
1136 gpphLibContext->sNfcIp_Context.pClientNfcIpCfgCntx = NULL;