Lines Matching refs:gpphLibContext
127 if((NULL == gpphLibContext)|| in phLibNfc_Ndef_Read()
128 (gpphLibContext->LibNfcState.cur_state == eLibNfcHalStateShutdown)) in phLibNfc_Ndef_Read()
140 else if(gpphLibContext->LibNfcState.next_state == eLibNfcHalStateShutdown) in phLibNfc_Ndef_Read()
144 else if(0 == gpphLibContext->Connected_handle) in phLibNfc_Ndef_Read()
148 else if(hRemoteDevice != gpphLibContext->Connected_handle) in phLibNfc_Ndef_Read()
152 else if((TRUE == gpphLibContext->status.GenCb_pending_status) in phLibNfc_Ndef_Read()
153 ||(NULL!=gpphLibContext->CBInfo.pClientRdNdefCb) in phLibNfc_Ndef_Read()
154 ||(CHK_NDEF_NOT_DONE == gpphLibContext->ndef_cntx.is_ndef)) in phLibNfc_Ndef_Read()
159 else if(gpphLibContext->ndef_cntx.is_ndef == FALSE) in phLibNfc_Ndef_Read()
164 else if((gpphLibContext->ndef_cntx.is_ndef == TRUE) in phLibNfc_Ndef_Read()
165 &&(0 == gpphLibContext->ndef_cntx.NdefActualSize)) in phLibNfc_Ndef_Read()
172 else if ((LLCP_STATE_RESET_INIT != gpphLibContext->llcp_cntx.sLlcpContext.state) in phLibNfc_Ndef_Read()
173 && (LLCP_STATE_CHECKED != gpphLibContext->llcp_cntx.sLlcpContext.state)) in phLibNfc_Ndef_Read()
180 gpphLibContext->psRemoteDevList->psRemoteDevInfo->SessionOpened = SESSION_OPEN; in phLibNfc_Ndef_Read()
181 gpphLibContext->ndef_cntx.eLast_Call = NdefRd; in phLibNfc_Ndef_Read()
185 ((NULL == gpphLibContext->psBufferedAuth) in phLibNfc_Ndef_Read()
186 ||(phHal_eMifareAuthentA == gpphLibContext->psBufferedAuth->cmd.MfCmd)) in phLibNfc_Ndef_Read()
189 if(NULL != gpphLibContext->psBufferedAuth) in phLibNfc_Ndef_Read()
191 if(NULL != gpphLibContext->psBufferedAuth->sRecvData.buffer) in phLibNfc_Ndef_Read()
194 gpphLibContext->psBufferedAuth->sRecvData.buffer); in phLibNfc_Ndef_Read()
196 if(NULL != gpphLibContext->psBufferedAuth->sSendData.buffer) in phLibNfc_Ndef_Read()
199 gpphLibContext->psBufferedAuth->sSendData.buffer); in phLibNfc_Ndef_Read()
201 phOsalNfc_FreeMemory(gpphLibContext->psBufferedAuth); in phLibNfc_Ndef_Read()
203 gpphLibContext->psBufferedAuth in phLibNfc_Ndef_Read()
206 gpphLibContext->psBufferedAuth->addr = in phLibNfc_Ndef_Read()
207 (uint8_t)gpphLibContext->ndef_cntx.psNdefMap in phLibNfc_Ndef_Read()
209 gpphLibContext->psBufferedAuth->cmd.MfCmd = phHal_eMifareRead16; in phLibNfc_Ndef_Read()
210 gpphLibContext->psBufferedAuth->sSendData.length in phLibNfc_Ndef_Read()
212 gpphLibContext->psBufferedAuth->sRecvData.length in phLibNfc_Ndef_Read()
214 gpphLibContext->psBufferedAuth->sRecvData.buffer in phLibNfc_Ndef_Read()
216 gpphLibContext->psBufferedAuth->sSendData.buffer in phLibNfc_Ndef_Read()
220 gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_Read()
223 gpphLibContext->ndef_cntx.psUpperNdefMsg = psRd; in phLibNfc_Ndef_Read()
227 gpphLibContext->ndef_cntx.psNdefMap, in phLibNfc_Ndef_Read()
230 (void *)gpphLibContext); in phLibNfc_Ndef_Read()
233 gpphLibContext->ndef_cntx.NdefContinueRead =(uint8_t) ((phLibNfc_Ndef_EBegin==Offset) ? in phLibNfc_Ndef_Read()
237 RetVal = phFriNfc_NdefMap_RdNdef(gpphLibContext->ndef_cntx.psNdefMap, in phLibNfc_Ndef_Read()
238 gpphLibContext->ndef_cntx.psUpperNdefMsg->buffer, in phLibNfc_Ndef_Read()
239 (uint32_t*)&gpphLibContext->ndef_cntx.psUpperNdefMsg->length, in phLibNfc_Ndef_Read()
240 gpphLibContext->ndef_cntx.NdefContinueRead); in phLibNfc_Ndef_Read()
245 gpphLibContext->ndef_cntx.psUpperNdefMsg->length = 0; in phLibNfc_Ndef_Read()
251 gpphLibContext->CBInfo.pClientRdNdefCb= NULL; in phLibNfc_Ndef_Read()
256 gpphLibContext->CBInfo.pClientRdNdefCb = pNdefRead_RspCb; in phLibNfc_Ndef_Read()
257 gpphLibContext->CBInfo.pClientRdNdefCntx = pContext; in phLibNfc_Ndef_Read()
258 gpphLibContext->status.GenCb_pending_status=TRUE; in phLibNfc_Ndef_Read()
259 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateTransaction; in phLibNfc_Ndef_Read()
284 if(pLibNfc_Ctxt != gpphLibContext) in phLibNfc_Ndef_Read_Cb()
291 if(eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_Read_Cb()
297 else if(eLibNfcHalStateRelease == gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_Read_Cb()
303 gpphLibContext->status.GenCb_pending_status = FALSE; in phLibNfc_Ndef_Read_Cb()
304 … if (gpphLibContext->psBufferedAuth != NULL && gpphLibContext->ndef_cntx.psNdefMap != NULL) { in phLibNfc_Ndef_Read_Cb()
305 gpphLibContext->psBufferedAuth->addr = (uint8_t) in phLibNfc_Ndef_Read_Cb()
306 gpphLibContext->ndef_cntx.psNdefMap->StdMifareContainer.currentBlock; in phLibNfc_Ndef_Read_Cb()
314 gpphLibContext->LastTrancvSuccess = FALSE; in phLibNfc_Ndef_Read_Cb()
315 gpphLibContext->ndef_cntx.is_ndef = FALSE; in phLibNfc_Ndef_Read_Cb()
317 gpphLibContext->Connected_handle; in phLibNfc_Ndef_Read_Cb()
324 RetStatus = phHal4Nfc_Connect(gpphLibContext->psHwReference, in phLibNfc_Ndef_Read_Cb()
328 (void *)gpphLibContext); in phLibNfc_Ndef_Read_Cb()
334 gpphLibContext->LastTrancvSuccess = TRUE; in phLibNfc_Ndef_Read_Cb()
339 gpphLibContext->LastTrancvSuccess = FALSE; in phLibNfc_Ndef_Read_Cb()
344 phLibNfc_UpdateCurState(status,gpphLibContext); in phLibNfc_Ndef_Read_Cb()
346 pClientCb = gpphLibContext->CBInfo.pClientRdNdefCb; in phLibNfc_Ndef_Read_Cb()
347 pUpperLayerContext = gpphLibContext->CBInfo.pClientRdNdefCntx; in phLibNfc_Ndef_Read_Cb()
349 gpphLibContext->CBInfo.pClientRdNdefCb = NULL; in phLibNfc_Ndef_Read_Cb()
350 gpphLibContext->CBInfo.pClientRdNdefCntx = NULL; in phLibNfc_Ndef_Read_Cb()
381 if((NULL == gpphLibContext)|| in phLibNfc_Ndef_Write()
382 (gpphLibContext->LibNfcState.cur_state in phLibNfc_Ndef_Write()
394 else if(gpphLibContext->LibNfcState.next_state in phLibNfc_Ndef_Write()
399 else if(0 == gpphLibContext->Connected_handle) in phLibNfc_Ndef_Write()
403 else if(hRemoteDevice != gpphLibContext->Connected_handle) in phLibNfc_Ndef_Write()
407 else if((TRUE == gpphLibContext->status.GenCb_pending_status)|| in phLibNfc_Ndef_Write()
408 (gpphLibContext->ndef_cntx.is_ndef == CHK_NDEF_NOT_DONE)) in phLibNfc_Ndef_Write()
414 else if(FALSE == gpphLibContext->ndef_cntx.is_ndef) in phLibNfc_Ndef_Write()
418 else if(psWr->length > gpphLibContext->ndef_cntx.NdefLength) in phLibNfc_Ndef_Write()
423 else if ((LLCP_STATE_RESET_INIT != gpphLibContext->llcp_cntx.sLlcpContext.state) in phLibNfc_Ndef_Write()
424 && (LLCP_STATE_CHECKED != gpphLibContext->llcp_cntx.sLlcpContext.state)) in phLibNfc_Ndef_Write()
432 gpphLibContext->ndef_cntx.psUpperNdefMsg = psWr; in phLibNfc_Ndef_Write()
433 gpphLibContext->ndef_cntx.AppWrLength= psWr->length; in phLibNfc_Ndef_Write()
434 gpphLibContext->ndef_cntx.eLast_Call = NdefWr; in phLibNfc_Ndef_Write()
435 gpphLibContext->psRemoteDevList->psRemoteDevInfo->SessionOpened in phLibNfc_Ndef_Write()
440 ((NULL == gpphLibContext->psBufferedAuth) in phLibNfc_Ndef_Write()
442 gpphLibContext->psBufferedAuth->cmd.MfCmd)) in phLibNfc_Ndef_Write()
445 if(NULL != gpphLibContext->psBufferedAuth) in phLibNfc_Ndef_Write()
447 if(NULL != gpphLibContext->psBufferedAuth->sRecvData.buffer) in phLibNfc_Ndef_Write()
450 gpphLibContext->psBufferedAuth->sRecvData.buffer); in phLibNfc_Ndef_Write()
452 if(NULL != gpphLibContext->psBufferedAuth->sSendData.buffer) in phLibNfc_Ndef_Write()
455 gpphLibContext->psBufferedAuth->sSendData.buffer); in phLibNfc_Ndef_Write()
457 phOsalNfc_FreeMemory(gpphLibContext->psBufferedAuth); in phLibNfc_Ndef_Write()
459 gpphLibContext->psBufferedAuth in phLibNfc_Ndef_Write()
462 gpphLibContext->psBufferedAuth->addr = in phLibNfc_Ndef_Write()
463 (uint8_t)gpphLibContext->ndef_cntx.psNdefMap in phLibNfc_Ndef_Write()
465 gpphLibContext->psBufferedAuth->cmd.MfCmd = phHal_eMifareRead16; in phLibNfc_Ndef_Write()
466 gpphLibContext->psBufferedAuth->sSendData.length in phLibNfc_Ndef_Write()
468 gpphLibContext->psBufferedAuth->sRecvData.length in phLibNfc_Ndef_Write()
470 gpphLibContext->psBufferedAuth->sRecvData.buffer in phLibNfc_Ndef_Write()
472 gpphLibContext->psBufferedAuth->sSendData.buffer in phLibNfc_Ndef_Write()
476 gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_Write()
478 gpphLibContext->CBInfo.pClientWrNdefCb = NULL; in phLibNfc_Ndef_Write()
487 gpphLibContext->ndef_cntx.psNdefMap, in phLibNfc_Ndef_Write()
490 (void *)gpphLibContext); in phLibNfc_Ndef_Write()
496 RetVal = phFriNfc_NdefMap_EraseNdef(gpphLibContext->ndef_cntx.psNdefMap); in phLibNfc_Ndef_Write()
503 RetVal=phFriNfc_NdefMap_WrNdef(gpphLibContext->ndef_cntx.psNdefMap, in phLibNfc_Ndef_Write()
504 gpphLibContext->ndef_cntx.psUpperNdefMsg->buffer, in phLibNfc_Ndef_Write()
505 (uint32_t*)&gpphLibContext->ndef_cntx.psUpperNdefMsg->length, in phLibNfc_Ndef_Write()
510 gpphLibContext->CBInfo.pClientWrNdefCb = pNdefWrite_RspCb; in phLibNfc_Ndef_Write()
511 gpphLibContext->CBInfo.pClientWrNdefCntx = pContext; in phLibNfc_Ndef_Write()
512 gpphLibContext->status.GenCb_pending_status=TRUE; in phLibNfc_Ndef_Write()
513 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateTransaction; in phLibNfc_Ndef_Write()
534 if(pLibNfc_Ctxt != gpphLibContext) in phLibNfc_Ndef_Write_Cb()
540 if(eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_Write_Cb()
546 else if(eLibNfcHalStateRelease == gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_Write_Cb()
552 gpphLibContext->status.GenCb_pending_status = FALSE; in phLibNfc_Ndef_Write_Cb()
553 … if (gpphLibContext->psBufferedAuth != NULL && gpphLibContext->ndef_cntx.psNdefMap != NULL) { in phLibNfc_Ndef_Write_Cb()
554 gpphLibContext->psBufferedAuth->addr = (uint8_t) in phLibNfc_Ndef_Write_Cb()
555 gpphLibContext->ndef_cntx.psNdefMap->TLVStruct.NdefTLVBlock; in phLibNfc_Ndef_Write_Cb()
560 gpphLibContext->LastTrancvSuccess = FALSE; in phLibNfc_Ndef_Write_Cb()
564 gpphLibContext->Connected_handle; in phLibNfc_Ndef_Write_Cb()
571 status = phHal4Nfc_Connect(gpphLibContext->psHwReference, in phLibNfc_Ndef_Write_Cb()
575 (void *)gpphLibContext); in phLibNfc_Ndef_Write_Cb()
580 gpphLibContext->LastTrancvSuccess = TRUE; in phLibNfc_Ndef_Write_Cb()
582 if(gpphLibContext->ndef_cntx.AppWrLength > in phLibNfc_Ndef_Write_Cb()
583 gpphLibContext->ndef_cntx.NdefLength) in phLibNfc_Ndef_Write_Cb()
595 gpphLibContext->LastTrancvSuccess = FALSE; in phLibNfc_Ndef_Write_Cb()
599 phLibNfc_UpdateCurState(status,gpphLibContext); in phLibNfc_Ndef_Write_Cb()
601 pClientCb = gpphLibContext->CBInfo.pClientWrNdefCb; in phLibNfc_Ndef_Write_Cb()
602 pUpperLayerContext = gpphLibContext->CBInfo.pClientWrNdefCntx; in phLibNfc_Ndef_Write_Cb()
604 gpphLibContext->CBInfo.pClientWrNdefCb = NULL; in phLibNfc_Ndef_Write_Cb()
605 gpphLibContext->CBInfo.pClientWrNdefCntx = NULL; in phLibNfc_Ndef_Write_Cb()
627 if(gpphLibContext->psTransInfo==NULL) in phLibNfc_Ndef_Init()
630 gpphLibContext->psTransInfo = (phLibNfc_sTransceiveInfo_t *) in phLibNfc_Ndef_Init()
633 if(gpphLibContext->psTransInfo==NULL) in phLibNfc_Ndef_Init()
639 if(NULL == gpphLibContext->ndef_cntx.psNdefMap) in phLibNfc_Ndef_Init()
642 gpphLibContext->ndef_cntx.psNdefMap = (phFriNfc_NdefMap_t *) in phLibNfc_Ndef_Init()
645 if(NULL != gpphLibContext->ndef_cntx.psNdefMap) in phLibNfc_Ndef_Init()
648 (void)memset(gpphLibContext->ndef_cntx.psNdefMap,0,sizeof(phFriNfc_NdefMap_t)); in phLibNfc_Ndef_Init()
649 gpphLibContext->ndef_cntx.NdefSendRecvLen = NDEF_SENDRCV_BUF_LEN; in phLibNfc_Ndef_Init()
650 gpphLibContext->ndef_cntx.psNdefMap->SendRecvBuf = in phLibNfc_Ndef_Init()
651 (uint8_t*) phOsalNfc_GetMemory(gpphLibContext-> in phLibNfc_Ndef_Init()
654 if(NULL != gpphLibContext->ndef_cntx.psNdefMap->SendRecvBuf) in phLibNfc_Ndef_Init()
656 (void)memset(gpphLibContext->ndef_cntx.psNdefMap->SendRecvBuf, in phLibNfc_Ndef_Init()
658 gpphLibContext->ndef_cntx.NdefSendRecvLen); in phLibNfc_Ndef_Init()
660 gpphLibContext->psOverHalCtxt =(phFriNfc_OvrHal_t *) in phLibNfc_Ndef_Init()
664 if(NULL == gpphLibContext->psOverHalCtxt) in phLibNfc_Ndef_Init()
671 (void)memset(gpphLibContext->psOverHalCtxt,0, in phLibNfc_Ndef_Init()
675 gpphLibContext->psOverHalCtxt->psHwReference = in phLibNfc_Ndef_Init()
676 gpphLibContext->psHwReference; in phLibNfc_Ndef_Init()
677 if(NULL == gpphLibContext->psDevInputParam ) in phLibNfc_Ndef_Init()
679 gpphLibContext->psDevInputParam = (phHal_sDevInputParam_t *) in phLibNfc_Ndef_Init()
682 gpphLibContext->ndef_cntx.is_ndef = CHK_NDEF_NOT_DONE; in phLibNfc_Ndef_Init()
684 if(NULL == gpphLibContext->ndef_cntx.ndef_fmt) in phLibNfc_Ndef_Init()
687 gpphLibContext->ndef_cntx.ndef_fmt = (phFriNfc_sNdefSmtCrdFmt_t *) in phLibNfc_Ndef_Init()
690 if(NULL != gpphLibContext->ndef_cntx.ndef_fmt) in phLibNfc_Ndef_Init()
692 (void)memset(gpphLibContext->ndef_cntx.ndef_fmt, in phLibNfc_Ndef_Init()
709 if(gpphLibContext->ndef_cntx.psNdefMap !=NULL) in phLibNfc_Ndef_DeInit()
711 if(gpphLibContext->ndef_cntx.psNdefMap->SendRecvBuf !=NULL) in phLibNfc_Ndef_DeInit()
713 phOsalNfc_FreeMemory(gpphLibContext->ndef_cntx.psNdefMap->SendRecvBuf); in phLibNfc_Ndef_DeInit()
714 gpphLibContext->ndef_cntx.psNdefMap->SendRecvBuf=NULL; in phLibNfc_Ndef_DeInit()
716 phOsalNfc_FreeMemory(gpphLibContext->ndef_cntx.psNdefMap); in phLibNfc_Ndef_DeInit()
717 gpphLibContext->ndef_cntx.psNdefMap =NULL; in phLibNfc_Ndef_DeInit()
720 if(NULL != gpphLibContext->ndef_cntx.ndef_fmt) in phLibNfc_Ndef_DeInit()
722 phOsalNfc_FreeMemory(gpphLibContext->ndef_cntx.ndef_fmt); in phLibNfc_Ndef_DeInit()
723 gpphLibContext->ndef_cntx.ndef_fmt = NULL; in phLibNfc_Ndef_DeInit()
726 if(gpphLibContext->psOverHalCtxt !=NULL) in phLibNfc_Ndef_DeInit()
728 phOsalNfc_FreeMemory(gpphLibContext->psOverHalCtxt); in phLibNfc_Ndef_DeInit()
729 gpphLibContext->psOverHalCtxt =NULL; in phLibNfc_Ndef_DeInit()
731 if(gpphLibContext->psDevInputParam !=NULL) in phLibNfc_Ndef_DeInit()
733 phOsalNfc_FreeMemory(gpphLibContext->psDevInputParam); in phLibNfc_Ndef_DeInit()
734 gpphLibContext->psDevInputParam = NULL; in phLibNfc_Ndef_DeInit()
736 if(gpphLibContext->psTransInfo!=NULL) in phLibNfc_Ndef_DeInit()
738 phOsalNfc_FreeMemory(gpphLibContext->psTransInfo); in phLibNfc_Ndef_DeInit()
739 gpphLibContext->psTransInfo= NULL; in phLibNfc_Ndef_DeInit()
755 if((NULL == gpphLibContext)|| in phLibNfc_Ndef_CheckNdef()
756 (gpphLibContext->LibNfcState.cur_state == eLibNfcHalStateShutdown)) in phLibNfc_Ndef_CheckNdef()
768 else if(gpphLibContext->LibNfcState.next_state == eLibNfcHalStateShutdown) in phLibNfc_Ndef_CheckNdef()
772 else if(0 == gpphLibContext->Connected_handle) in phLibNfc_Ndef_CheckNdef()
776 else if(hRemoteDevice != gpphLibContext->Connected_handle) in phLibNfc_Ndef_CheckNdef()
781 else if ((LLCP_STATE_RESET_INIT != gpphLibContext->llcp_cntx.sLlcpContext.state) in phLibNfc_Ndef_CheckNdef()
782 && (LLCP_STATE_CHECKED != gpphLibContext->llcp_cntx.sLlcpContext.state)) in phLibNfc_Ndef_CheckNdef()
792 gpphLibContext->ndef_cntx.NdefSendRecvLen=300; in phLibNfc_Ndef_CheckNdef()
793 gpphLibContext->ndef_cntx.eLast_Call = ChkNdef; in phLibNfc_Ndef_CheckNdef()
796 RetVal = phFriNfc_NdefMap_Reset( gpphLibContext->ndef_cntx.psNdefMap, in phLibNfc_Ndef_CheckNdef()
797 gpphLibContext->psOverHalCtxt, in phLibNfc_Ndef_CheckNdef()
799 gpphLibContext->psDevInputParam, in phLibNfc_Ndef_CheckNdef()
800 gpphLibContext->ndef_cntx.psNdefMap->SendRecvBuf, in phLibNfc_Ndef_CheckNdef()
801 gpphLibContext->ndef_cntx.NdefSendRecvLen, in phLibNfc_Ndef_CheckNdef()
802 gpphLibContext->ndef_cntx.psNdefMap->SendRecvBuf, in phLibNfc_Ndef_CheckNdef()
803 &(gpphLibContext->ndef_cntx.NdefSendRecvLen), in phLibNfc_Ndef_CheckNdef()
811 gpphLibContext->ndef_cntx.psNdefMap, in phLibNfc_Ndef_CheckNdef()
814 (void *)gpphLibContext); in phLibNfc_Ndef_CheckNdef()
817 RetVal = phFriNfc_NdefMap_ChkNdef(gpphLibContext->ndef_cntx.psNdefMap); in phLibNfc_Ndef_CheckNdef()
831 if((0x00 == gpphLibContext->ndef_cntx.Chk_Ndef_Timer_Id)|| in phLibNfc_Ndef_CheckNdef()
832 (PH_OSALNFC_INVALID_TIMER_ID == gpphLibContext->ndef_cntx.Chk_Ndef_Timer_Id)) in phLibNfc_Ndef_CheckNdef()
834 gpphLibContext->ndef_cntx.Chk_Ndef_Timer_Id = in phLibNfc_Ndef_CheckNdef()
837 if((0x00 == gpphLibContext->ndef_cntx.Chk_Ndef_Timer_Id)|| in phLibNfc_Ndef_CheckNdef()
838 (PH_OSALNFC_INVALID_TIMER_ID == gpphLibContext->ndef_cntx.Chk_Ndef_Timer_Id)) in phLibNfc_Ndef_CheckNdef()
844 phOsalNfc_Timer_Start(gpphLibContext->ndef_cntx.Chk_Ndef_Timer_Id, in phLibNfc_Ndef_CheckNdef()
851 gpphLibContext->CBInfo.pClientCkNdefCb = pCheckNdef_RspCb; in phLibNfc_Ndef_CheckNdef()
852 gpphLibContext->CBInfo.pClientCkNdefCntx = pContext; in phLibNfc_Ndef_CheckNdef()
853 gpphLibContext->status.GenCb_pending_status=TRUE; in phLibNfc_Ndef_CheckNdef()
854 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateTransaction; in phLibNfc_Ndef_CheckNdef()
876 if(pLibNfc_Ctxt != gpphLibContext) in phLibNfc_Ndef_CheckNdef_Cb()
883 gpphLibContext->Connected_handle; in phLibNfc_Ndef_CheckNdef_Cb()
884 if(eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_CheckNdef_Cb()
890 else if(eLibNfcHalStateRelease == gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_CheckNdef_Cb()
899 gpphLibContext->ndef_cntx.is_ndef = TRUE; in phLibNfc_Ndef_CheckNdef_Cb()
907 gpphLibContext->LastTrancvSuccess = TRUE; in phLibNfc_Ndef_CheckNdef_Cb()
915 gpphLibContext->psHwReference, in phLibNfc_Ndef_CheckNdef_Cb()
917 (void *)gpphLibContext in phLibNfc_Ndef_CheckNdef_Cb()
923 gpphLibContext->LastTrancvSuccess = FALSE; in phLibNfc_Ndef_CheckNdef_Cb()
924 gpphLibContext->ndef_cntx.is_ndef = FALSE; in phLibNfc_Ndef_CheckNdef_Cb()
931 RetStatus = phHal4Nfc_Connect(gpphLibContext->psHwReference, in phLibNfc_Ndef_CheckNdef_Cb()
935 (void *)gpphLibContext); in phLibNfc_Ndef_CheckNdef_Cb()
943 gpphLibContext->ndef_cntx.is_ndef = TRUE; in phLibNfc_Ndef_CheckNdef_Cb()
960 gpphLibContext->LibNfcState.cur_state=eLibNfcHalStateConnect; in phLibNfc_Ndef_CheckNdef_Cb()
962 gpphLibContext->status.GenCb_pending_status = FALSE; in phLibNfc_Ndef_CheckNdef_Cb()
964 phLibNfc_UpdateCurState(RetStatus,gpphLibContext); in phLibNfc_Ndef_CheckNdef_Cb()
969 ((NULL == gpphLibContext->psBufferedAuth) in phLibNfc_Ndef_CheckNdef_Cb()
970 ||(phHal_eMifareAuthentA == gpphLibContext->psBufferedAuth->cmd.MfCmd))) in phLibNfc_Ndef_CheckNdef_Cb()
973 if(NULL != gpphLibContext->psBufferedAuth) in phLibNfc_Ndef_CheckNdef_Cb()
975 if(NULL != gpphLibContext->psBufferedAuth->sRecvData.buffer) in phLibNfc_Ndef_CheckNdef_Cb()
978 gpphLibContext->psBufferedAuth->sRecvData.buffer); in phLibNfc_Ndef_CheckNdef_Cb()
980 if(NULL != gpphLibContext->psBufferedAuth->sSendData.buffer) in phLibNfc_Ndef_CheckNdef_Cb()
983 gpphLibContext->psBufferedAuth->sSendData.buffer); in phLibNfc_Ndef_CheckNdef_Cb()
985 phOsalNfc_FreeMemory(gpphLibContext->psBufferedAuth); in phLibNfc_Ndef_CheckNdef_Cb()
987 gpphLibContext->psBufferedAuth in phLibNfc_Ndef_CheckNdef_Cb()
990 gpphLibContext->psBufferedAuth->addr = in phLibNfc_Ndef_CheckNdef_Cb()
991 (uint8_t)gpphLibContext->ndef_cntx.psNdefMap in phLibNfc_Ndef_CheckNdef_Cb()
993 gpphLibContext->psBufferedAuth->cmd.MfCmd = phHal_eMifareRead16; in phLibNfc_Ndef_CheckNdef_Cb()
994 gpphLibContext->psBufferedAuth->sSendData.length in phLibNfc_Ndef_CheckNdef_Cb()
996 gpphLibContext->psBufferedAuth->sRecvData.length in phLibNfc_Ndef_CheckNdef_Cb()
998 gpphLibContext->psBufferedAuth->sRecvData.buffer in phLibNfc_Ndef_CheckNdef_Cb()
1000 gpphLibContext->psBufferedAuth->sSendData.buffer in phLibNfc_Ndef_CheckNdef_Cb()
1003 pClientCb = gpphLibContext->CBInfo.pClientCkNdefCb; in phLibNfc_Ndef_CheckNdef_Cb()
1004 pUpperLayerContext = gpphLibContext->CBInfo.pClientCkNdefCntx; in phLibNfc_Ndef_CheckNdef_Cb()
1005 gpphLibContext->CBInfo.pClientCkNdefCb = NULL; in phLibNfc_Ndef_CheckNdef_Cb()
1006 gpphLibContext->CBInfo.pClientCkNdefCntx = NULL; in phLibNfc_Ndef_CheckNdef_Cb()
1065 gpphLibContext->ndef_cntx.is_ndef = FALSE; in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1071 if(pLibNfc_Ctxt != gpphLibContext) in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1078 gpphLibContext->Connected_handle; in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1081 ((NULL == gpphLibContext->psBufferedAuth) in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1082 ||(phHal_eMifareAuthentA == gpphLibContext->psBufferedAuth->cmd.MfCmd))) in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1085 if(NULL != gpphLibContext->psBufferedAuth) in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1087 if(NULL != gpphLibContext->psBufferedAuth->sRecvData.buffer) in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1090 gpphLibContext->psBufferedAuth->sRecvData.buffer); in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1092 if(NULL != gpphLibContext->psBufferedAuth->sSendData.buffer) in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1095 gpphLibContext->psBufferedAuth->sSendData.buffer); in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1097 phOsalNfc_FreeMemory(gpphLibContext->psBufferedAuth); in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1099 gpphLibContext->psBufferedAuth in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1102 gpphLibContext->psBufferedAuth->addr = in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1103 (uint8_t)gpphLibContext->ndef_cntx.psNdefMap in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1105 gpphLibContext->psBufferedAuth->cmd.MfCmd = phHal_eMifareRead16; in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1106 gpphLibContext->psBufferedAuth->sSendData.length in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1108 gpphLibContext->psBufferedAuth->sRecvData.length in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1110 gpphLibContext->psBufferedAuth->sRecvData.buffer in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1112 gpphLibContext->psBufferedAuth->sSendData.buffer in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1115 pClientCb = gpphLibContext->CBInfo.pClientCkNdefCb; in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1116 pUpperLayerContext = gpphLibContext->CBInfo.pClientCkNdefCntx; in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1117 gpphLibContext->CBInfo.pClientCkNdefCb = NULL; in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1118 gpphLibContext->CBInfo.pClientCkNdefCntx = NULL; in phLibNfc_Ndef_ChkNdef_Pchk_Cb()
1133 phOsalNfc_Timer_Delete(gpphLibContext->ndef_cntx.Chk_Ndef_Timer_Id); in CheckNdef_timer_cb()
1134 gpphLibContext->ndef_cntx.Chk_Ndef_Timer_Id = 0x00; in CheckNdef_timer_cb()
1135 phLibNfc_Ndef_CheckNdef_Cb((void *)gpphLibContext,NFCSTATUS_MORE_INFORMATION); in CheckNdef_timer_cb()
1147 switch(gpphLibContext->ndef_cntx.eLast_Call) in phLibNfc_Reconnect_Mifare_Cb()
1257 if((NULL == gpphLibContext) in phLibNfc_RemoteDev_FormatNdef()
1258 ||(gpphLibContext->LibNfcState.cur_state in phLibNfc_RemoteDev_FormatNdef()
1271 else if(gpphLibContext->LibNfcState.next_state in phLibNfc_RemoteDev_FormatNdef()
1276 else if(0 == gpphLibContext->Connected_handle) in phLibNfc_RemoteDev_FormatNdef()
1280 else if(hRemoteDevice != gpphLibContext->Connected_handle) in phLibNfc_RemoteDev_FormatNdef()
1284 else if((TRUE == gpphLibContext->status.GenCb_pending_status)|| in phLibNfc_RemoteDev_FormatNdef()
1285 (NULL != gpphLibContext->ndef_cntx.pClientNdefFmtCb) in phLibNfc_RemoteDev_FormatNdef()
1286 ||(gpphLibContext->ndef_cntx.is_ndef == TRUE)) in phLibNfc_RemoteDev_FormatNdef()
1293 else if ((LLCP_STATE_RESET_INIT != gpphLibContext->llcp_cntx.sLlcpContext.state) in phLibNfc_RemoteDev_FormatNdef()
1294 && (LLCP_STATE_CHECKED != gpphLibContext->llcp_cntx.sLlcpContext.state)) in phLibNfc_RemoteDev_FormatNdef()
1302 gpphLibContext->ndef_cntx.eLast_Call = NdefFmt; in phLibNfc_RemoteDev_FormatNdef()
1303 gpphLibContext->ndef_cntx.NdefSendRecvLen = NDEF_SENDRCV_BUF_LEN; in phLibNfc_RemoteDev_FormatNdef()
1307 RetVal = phFriNfc_NdefSmtCrd_Reset(gpphLibContext->ndef_cntx.ndef_fmt, in phLibNfc_RemoteDev_FormatNdef()
1308 gpphLibContext->psOverHalCtxt, in phLibNfc_RemoteDev_FormatNdef()
1310 gpphLibContext->psDevInputParam, in phLibNfc_RemoteDev_FormatNdef()
1311 gpphLibContext->ndef_cntx.psNdefMap->SendRecvBuf, in phLibNfc_RemoteDev_FormatNdef()
1312 &(gpphLibContext->ndef_cntx.NdefSendRecvLen)); in phLibNfc_RemoteDev_FormatNdef()
1316 RetVal = phFriNfc_NdefSmtCrd_SetCR(gpphLibContext->ndef_cntx.ndef_fmt, in phLibNfc_RemoteDev_FormatNdef()
1319 gpphLibContext); in phLibNfc_RemoteDev_FormatNdef()
1327 RetVal = phFriNfc_NdefSmtCrd_Format(gpphLibContext->ndef_cntx.ndef_fmt, in phLibNfc_RemoteDev_FormatNdef()
1332 gpphLibContext->ndef_cntx.pClientNdefFmtCb = pNdefformat_RspCb; in phLibNfc_RemoteDev_FormatNdef()
1333 gpphLibContext->ndef_cntx.pClientNdefFmtCntx = pContext; in phLibNfc_RemoteDev_FormatNdef()
1334 gpphLibContext->status.GenCb_pending_status=TRUE; in phLibNfc_RemoteDev_FormatNdef()
1335 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateTransaction; in phLibNfc_RemoteDev_FormatNdef()
1359 if ((NULL == gpphLibContext) in phLibNfc_ConvertToReadOnlyNdef()
1360 || (gpphLibContext->LibNfcState.cur_state in phLibNfc_ConvertToReadOnlyNdef()
1372 else if (gpphLibContext->LibNfcState.next_state in phLibNfc_ConvertToReadOnlyNdef()
1377 else if (0 == gpphLibContext->Connected_handle) in phLibNfc_ConvertToReadOnlyNdef()
1381 else if (hRemoteDevice != gpphLibContext->Connected_handle) in phLibNfc_ConvertToReadOnlyNdef()
1385 else if ((TRUE == gpphLibContext->status.GenCb_pending_status) in phLibNfc_ConvertToReadOnlyNdef()
1386 || (NULL != gpphLibContext->ndef_cntx.pClientNdefFmtCb) in phLibNfc_ConvertToReadOnlyNdef()
1387 || (FALSE == gpphLibContext->ndef_cntx.is_ndef)) in phLibNfc_ConvertToReadOnlyNdef()
1395 gpphLibContext->ndef_cntx.eLast_Call = NdefReadOnly; in phLibNfc_ConvertToReadOnlyNdef()
1397 if(eLibNfcHalStatePresenceChk != gpphLibContext->LibNfcState.next_state) in phLibNfc_ConvertToReadOnlyNdef()
1415 gpphLibContext->ndef_cntx.psNdefMap, in phLibNfc_ConvertToReadOnlyNdef()
1417 (void *)gpphLibContext); in phLibNfc_ConvertToReadOnlyNdef()
1430 gpphLibContext->ndef_cntx.psNdefMap, mif_std_key); in phLibNfc_ConvertToReadOnlyNdef()
1436 gpphLibContext->ndef_cntx.NdefSendRecvLen = NDEF_SENDRCV_BUF_LEN; in phLibNfc_ConvertToReadOnlyNdef()
1440 ret_val = phFriNfc_NdefSmtCrd_Reset (gpphLibContext->ndef_cntx.ndef_fmt, in phLibNfc_ConvertToReadOnlyNdef()
1441 gpphLibContext->psOverHalCtxt, in phLibNfc_ConvertToReadOnlyNdef()
1443 gpphLibContext->psDevInputParam, in phLibNfc_ConvertToReadOnlyNdef()
1444 gpphLibContext->ndef_cntx.psNdefMap->SendRecvBuf, in phLibNfc_ConvertToReadOnlyNdef()
1445 &(gpphLibContext->ndef_cntx.NdefSendRecvLen)); in phLibNfc_ConvertToReadOnlyNdef()
1450 ret_val = phFriNfc_NdefSmtCrd_SetCR (gpphLibContext->ndef_cntx.ndef_fmt, in phLibNfc_ConvertToReadOnlyNdef()
1452 gpphLibContext); in phLibNfc_ConvertToReadOnlyNdef()
1457 gpphLibContext->ndef_cntx.ndef_fmt); in phLibNfc_ConvertToReadOnlyNdef()
1472 ret_val = phFriNfc_NdefMap_Reset (gpphLibContext->ndef_cntx.psNdefMap, in phLibNfc_ConvertToReadOnlyNdef()
1473 gpphLibContext->psOverHalCtxt, in phLibNfc_ConvertToReadOnlyNdef()
1475 gpphLibContext->psDevInputParam, in phLibNfc_ConvertToReadOnlyNdef()
1476 gpphLibContext->ndef_cntx.psNdefMap->SendRecvBuf, in phLibNfc_ConvertToReadOnlyNdef()
1477 gpphLibContext->ndef_cntx.NdefSendRecvLen, in phLibNfc_ConvertToReadOnlyNdef()
1478 gpphLibContext->ndef_cntx.psNdefMap->SendRecvBuf, in phLibNfc_ConvertToReadOnlyNdef()
1479 &(gpphLibContext->ndef_cntx.NdefSendRecvLen), in phLibNfc_ConvertToReadOnlyNdef()
1488 gpphLibContext->ndef_cntx.psNdefMap, in phLibNfc_ConvertToReadOnlyNdef()
1490 (void *)gpphLibContext); in phLibNfc_ConvertToReadOnlyNdef()
1495 gpphLibContext->ndef_cntx.psNdefMap); in phLibNfc_ConvertToReadOnlyNdef()
1510 gpphLibContext->ndef_cntx.pClientNdefFmtCb= NULL; in phLibNfc_ConvertToReadOnlyNdef()
1516 gpphLibContext->ndef_cntx.pClientNdefFmtCb = pNdefReadOnly_RspCb; in phLibNfc_ConvertToReadOnlyNdef()
1517 gpphLibContext->ndef_cntx.pClientNdefFmtCntx = pContext; in phLibNfc_ConvertToReadOnlyNdef()
1519 gpphLibContext->status.GenCb_pending_status = TRUE; in phLibNfc_ConvertToReadOnlyNdef()
1520 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateTransaction; in phLibNfc_ConvertToReadOnlyNdef()
1543 if(pLibNfc_Ctxt != gpphLibContext) in phLibNfc_Ndef_format_Cb()
1549 if(eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_format_Cb()
1555 else if(eLibNfcHalStateRelease == gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_format_Cb()
1561 gpphLibContext->status.GenCb_pending_status = FALSE; in phLibNfc_Ndef_format_Cb()
1570 gpphLibContext->Connected_handle; in phLibNfc_Ndef_format_Cb()
1576 RetStatus = phHal4Nfc_Connect(gpphLibContext->psHwReference, in phLibNfc_Ndef_format_Cb()
1578 gpphLibContext->Connected_handle, in phLibNfc_Ndef_format_Cb()
1581 (void *)gpphLibContext); in phLibNfc_Ndef_format_Cb()
1589 gpphLibContext->LibNfcState.cur_state =eLibNfcHalStateConnect; in phLibNfc_Ndef_format_Cb()
1591 phLibNfc_UpdateCurState(status,gpphLibContext); in phLibNfc_Ndef_format_Cb()
1593 pClientCb = gpphLibContext->ndef_cntx.pClientNdefFmtCb; in phLibNfc_Ndef_format_Cb()
1594 pUpperLayerContext= gpphLibContext->ndef_cntx.pClientNdefFmtCntx; in phLibNfc_Ndef_format_Cb()
1595 gpphLibContext->ndef_cntx.pClientNdefFmtCb = NULL; in phLibNfc_Ndef_format_Cb()
1596 gpphLibContext->ndef_cntx.pClientNdefFmtCntx = NULL; in phLibNfc_Ndef_format_Cb()
1621 if(pLibNfc_Ctxt != gpphLibContext) in phLibNfc_Ndef_ReadOnly_Cb()
1628 if(eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_ReadOnly_Cb()
1634 else if(eLibNfcHalStateRelease == gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_ReadOnly_Cb()
1640 gpphLibContext->status.GenCb_pending_status = FALSE; in phLibNfc_Ndef_ReadOnly_Cb()
1643 gpphLibContext->ndef_cntx.psNdefMap->CardState = in phLibNfc_Ndef_ReadOnly_Cb()
1651 gpphLibContext->LibNfcState.cur_state =eLibNfcHalStateConnect; in phLibNfc_Ndef_ReadOnly_Cb()
1654 phLibNfc_UpdateCurState(status, gpphLibContext); in phLibNfc_Ndef_ReadOnly_Cb()
1656 p_client_cb = gpphLibContext->ndef_cntx.pClientNdefFmtCb; in phLibNfc_Ndef_ReadOnly_Cb()
1657 p_upper_layer_ctxt = gpphLibContext->ndef_cntx.pClientNdefFmtCntx; in phLibNfc_Ndef_ReadOnly_Cb()
1658 gpphLibContext->ndef_cntx.pClientNdefFmtCb = NULL; in phLibNfc_Ndef_ReadOnly_Cb()
1659 gpphLibContext->ndef_cntx.pClientNdefFmtCntx = NULL; in phLibNfc_Ndef_ReadOnly_Cb()
1682 if(eLibNfcHalStateShutdown == gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_SrchNdefCnt_Cb()
1688 else if(eLibNfcHalStateRelease == gpphLibContext->LibNfcState.next_state) in phLibNfc_Ndef_SrchNdefCnt_Cb()
1700 gpphLibContext->status.GenCb_pending_status = FALSE; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1702 phLibNfc_UpdateCurState(status,gpphLibContext); in phLibNfc_Ndef_SrchNdefCnt_Cb()
1710 gpphLibContext->CBInfo.pClientNdefNtfRespCb( in phLibNfc_Ndef_SrchNdefCnt_Cb()
1711 gpphLibContext->CBInfo.pClientNdefNtfRespCntx, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1713 gpphLibContext->Connected_handle, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1715 gpphLibContext->CBInfo.pClientNdefNtfRespCb = NULL; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1716 gpphLibContext->CBInfo.pClientNdefNtfRespCntx = NULL; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1722 gpphLibContext->phLib_NdefRecCntx.ndef_message.buffer, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1723 gpphLibContext->phLib_NdefRecCntx.ndef_message.length, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1725 gpphLibContext->phLib_NdefRecCntx.IsChunked, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1726 &(gpphLibContext->phLib_NdefRecCntx.NumberOfRawRecords)); in phLibNfc_Ndef_SrchNdefCnt_Cb()
1728 NdefInfo.pNdefMessage = gpphLibContext->phLib_NdefRecCntx.ndef_message.buffer; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1729 NdefInfo.NdefMessageLengthActual = gpphLibContext->ndef_cntx.NdefActualSize; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1730 NdefInfo.NdefMessageLengthMaximum = gpphLibContext->ndef_cntx.NdefLength; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1735 (sizeof(phFriNfc_NdefRecord_t)* gpphLibContext->phLib_NdefRecCntx.NumberOfRawRecords ); in phLibNfc_Ndef_SrchNdefCnt_Cb()
1738 gpphLibContext->CBInfo.pClientNdefNtfRespCb( in phLibNfc_Ndef_SrchNdefCnt_Cb()
1739 gpphLibContext->CBInfo.pClientNdefNtfRespCntx, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1741 gpphLibContext->Connected_handle, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1743 gpphLibContext->CBInfo.pClientNdefNtfRespCb = NULL; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1744 gpphLibContext->CBInfo.pClientNdefNtfRespCntx = NULL; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1750 if(gpphLibContext->ndef_cntx.pNdef_NtfSrch_Type==NULL) in phLibNfc_Ndef_SrchNdefCnt_Cb()
1753 gpphLibContext->phLib_NdefRecCntx.ndef_message.buffer, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1754 gpphLibContext->phLib_NdefRecCntx.ndef_message.length, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1755 gpphLibContext->phLib_NdefRecCntx.RawRecords, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1756 gpphLibContext->phLib_NdefRecCntx.IsChunked, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1757 &(gpphLibContext->phLib_NdefRecCntx.NumberOfRawRecords)); in phLibNfc_Ndef_SrchNdefCnt_Cb()
1759 for (Index = 0; Index < gpphLibContext->phLib_NdefRecCntx.NumberOfRawRecords; Index++) in phLibNfc_Ndef_SrchNdefCnt_Cb()
1763 gpphLibContext->phLib_NdefRecCntx.RawRecords[Index]); in phLibNfc_Ndef_SrchNdefCnt_Cb()
1773 &(gpphLibContext->phLib_NdefRecCntx.NdefReg), in phLibNfc_Ndef_SrchNdefCnt_Cb()
1774 gpphLibContext->phLib_NdefRecCntx.ndef_message.buffer, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1775 (uint16_t)gpphLibContext->phLib_NdefRecCntx.ndef_message.length); in phLibNfc_Ndef_SrchNdefCnt_Cb()
1779 … gpphLibContext->CBInfo.pClientNdefNtfRespCb(gpphLibContext->CBInfo.pClientNdefNtfRespCntx, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1780 … NULL,gpphLibContext->Connected_handle,NFCSTATUS_FAILED); in phLibNfc_Ndef_SrchNdefCnt_Cb()
1781 gpphLibContext->CBInfo.pClientNdefNtfRespCb = NULL; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1782 gpphLibContext->CBInfo.pClientNdefNtfRespCntx = NULL; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1789 RegStatus = phFriNfc_NdefReg_Process( &(gpphLibContext->phLib_NdefRecCntx.NdefReg), in phLibNfc_Ndef_SrchNdefCnt_Cb()
1797 for(Index=0;Index<gpphLibContext->phLib_NdefRecCntx.CbParam.Count;Index++) in phLibNfc_Ndef_SrchNdefCnt_Cb()
1799 pNdefRecord->Tnf = gpphLibContext->phLib_NdefRecCntx.CbParam.Records[Index].Tnf; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1801 gpphLibContext->phLib_NdefRecCntx.CbParam.Records[Index].TypeLength; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1803 gpphLibContext->phLib_NdefRecCntx.CbParam.Records[Index].PayloadLength; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1805 gpphLibContext->phLib_NdefRecCntx.CbParam.Records[Index].IdLength; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1807 gpphLibContext->phLib_NdefRecCntx.CbParam.Records[Index].Flags; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1814 gpphLibContext->phLib_NdefRecCntx.CbParam.Records[Index].Id, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1817 gpphLibContext->phLib_NdefRecCntx.CbParam.Records[Index].PayloadData, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1820 gpphLibContext->phLib_NdefRecCntx.CbParam.Records[Index].Type, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1832 gpphLibContext->CBInfo.pClientNdefNtfRespCb( in phLibNfc_Ndef_SrchNdefCnt_Cb()
1833 gpphLibContext->CBInfo.pClientNdefNtfRespCntx, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1834 &NdefInfo,gpphLibContext->Connected_handle, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1842 gpphLibContext->CBInfo.pClientNdefNtfRespCb( in phLibNfc_Ndef_SrchNdefCnt_Cb()
1843 gpphLibContext->CBInfo.pClientNdefNtfRespCntx, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1844 &NdefInfo,gpphLibContext->Connected_handle, in phLibNfc_Ndef_SrchNdefCnt_Cb()
1848 &(gpphLibContext->phLib_NdefRecCntx.NdefReg), in phLibNfc_Ndef_SrchNdefCnt_Cb()
1849 gpphLibContext->phLib_NdefRecCntx.NdefCb ); in phLibNfc_Ndef_SrchNdefCnt_Cb()
1851 if(gpphLibContext->ndef_cntx.pNdef_NtfSrch_Type!=NULL) in phLibNfc_Ndef_SrchNdefCnt_Cb()
1854 for(Index=0;Index<gpphLibContext->phLib_NdefRecCntx.CbParam.Count;Index++) in phLibNfc_Ndef_SrchNdefCnt_Cb()
1864 gpphLibContext->CBInfo.pClientNdefNtfRespCb = NULL; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1865 gpphLibContext->CBInfo.pClientNdefNtfRespCntx = NULL; in phLibNfc_Ndef_SrchNdefCnt_Cb()
1891 if((NULL == gpphLibContext) || in phLibNfc_Ndef_SearchNdefContent()
1892 (gpphLibContext->LibNfcState.cur_state in phLibNfc_Ndef_SearchNdefContent()
1898 else if(gpphLibContext->LibNfcState.next_state in phLibNfc_Ndef_SearchNdefContent()
1913 else if(0 == gpphLibContext->Connected_handle) in phLibNfc_Ndef_SearchNdefContent()
1917 else if(hRemoteDevice != gpphLibContext->Connected_handle) in phLibNfc_Ndef_SearchNdefContent()
1921 else if((TRUE == gpphLibContext->status.GenCb_pending_status) in phLibNfc_Ndef_SearchNdefContent()
1922 ||(NULL!=gpphLibContext->CBInfo.pClientNdefNtfRespCb)) in phLibNfc_Ndef_SearchNdefContent()
1929 gpphLibContext->ndef_cntx.pNdef_NtfSrch_Type = psSrchTypeList; in phLibNfc_Ndef_SearchNdefContent()
1934 gpphLibContext->phLib_NdefRecCntx.NumberOfRecords = 255; in phLibNfc_Ndef_SearchNdefContent()
1937 &(gpphLibContext->phLib_NdefRecCntx.NdefReg), in phLibNfc_Ndef_SearchNdefContent()
1938 gpphLibContext->phLib_NdefRecCntx.NdefTypes_array, in phLibNfc_Ndef_SearchNdefContent()
1939 &(gpphLibContext->phLib_NdefRecCntx.RecordsExtracted), in phLibNfc_Ndef_SearchNdefContent()
1940 &(gpphLibContext->phLib_NdefRecCntx.CbParam), in phLibNfc_Ndef_SearchNdefContent()
1941 gpphLibContext->phLib_NdefRecCntx.ChunkedRecordsarray, in phLibNfc_Ndef_SearchNdefContent()
1942 gpphLibContext->phLib_NdefRecCntx.NumberOfRecords); in phLibNfc_Ndef_SearchNdefContent()
1944 … gpphLibContext->phLib_NdefRecCntx.NdefCb = phOsalNfc_GetMemory(sizeof(phFriNfc_NdefReg_Cb_t)); in phLibNfc_Ndef_SearchNdefContent()
1945 if(gpphLibContext->phLib_NdefRecCntx.NdefCb==NULL) in phLibNfc_Ndef_SearchNdefContent()
1950 gpphLibContext->phLib_NdefRecCntx.NdefCb->NdefCallback = phLibNfc_Ndef_Rtd_Cb; in phLibNfc_Ndef_SearchNdefContent()
1952 gpphLibContext->phLib_NdefRecCntx.NdefCb->NumberOfRTDs = uNoSrchRecords; in phLibNfc_Ndef_SearchNdefContent()
1955 gpphLibContext->phLib_NdefRecCntx.NdefCb->NdefType[Index] = psSrchTypeList->Type; in phLibNfc_Ndef_SearchNdefContent()
1956 gpphLibContext->phLib_NdefRecCntx.NdefCb->Tnf[Index] = psSrchTypeList->Tnf ; in phLibNfc_Ndef_SearchNdefContent()
1957 … gpphLibContext->phLib_NdefRecCntx.NdefCb->NdeftypeLength[Index] = psSrchTypeList->TypeLength; in phLibNfc_Ndef_SearchNdefContent()
1962 RetVal = phFriNfc_NdefReg_AddCb(&(gpphLibContext->phLib_NdefRecCntx.NdefReg), in phLibNfc_Ndef_SearchNdefContent()
1963 gpphLibContext->phLib_NdefRecCntx.NdefCb ); in phLibNfc_Ndef_SearchNdefContent()
1966 gpphLibContext->phLib_NdefRecCntx.ndef_message.buffer = in phLibNfc_Ndef_SearchNdefContent()
1967 phOsalNfc_GetMemory(gpphLibContext->ndef_cntx.NdefActualSize); in phLibNfc_Ndef_SearchNdefContent()
1968 gpphLibContext->phLib_NdefRecCntx.ndef_message.length = in phLibNfc_Ndef_SearchNdefContent()
1969 gpphLibContext->ndef_cntx.NdefActualSize; in phLibNfc_Ndef_SearchNdefContent()
1974 gpphLibContext->ndef_cntx.psNdefMap, in phLibNfc_Ndef_SearchNdefContent()
1977 (void *)gpphLibContext); in phLibNfc_Ndef_SearchNdefContent()
1980 gpphLibContext->ndef_cntx.NdefContinueRead = PH_FRINFC_NDEFMAP_SEEK_BEGIN; in phLibNfc_Ndef_SearchNdefContent()
1982 RetVal = phFriNfc_NdefMap_RdNdef(gpphLibContext->ndef_cntx.psNdefMap, in phLibNfc_Ndef_SearchNdefContent()
1983 gpphLibContext->phLib_NdefRecCntx.ndef_message.buffer, in phLibNfc_Ndef_SearchNdefContent()
1984 (uint32_t*)&gpphLibContext->phLib_NdefRecCntx.ndef_message.length, in phLibNfc_Ndef_SearchNdefContent()
1989 gpphLibContext->CBInfo.pClientNdefNtfRespCb = pNdefNtfRspCb; in phLibNfc_Ndef_SearchNdefContent()
1990 gpphLibContext->CBInfo.pClientNdefNtfRespCntx = pContext; in phLibNfc_Ndef_SearchNdefContent()
1991 gpphLibContext->status.GenCb_pending_status=TRUE; in phLibNfc_Ndef_SearchNdefContent()
1992 gpphLibContext->LibNfcState.next_state = eLibNfcHalStateTransaction; in phLibNfc_Ndef_SearchNdefContent()