Lines Matching refs:Hal4Ctxt
60 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt
66 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt
78 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt = NULL;
111 Hal4Ctxt = (phHal4Nfc_Hal4Ctxt_t *)psHwReference->hal_context;
113 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt = pContext;
115 Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb = pNotifyConnectCb;
117 if((eHal4StateTargetDiscovered == Hal4Ctxt->Hal4CurrentState)
118 && (NULL == Hal4Ctxt->sTgtConnectInfo.psConnectedDevice))
120 RemoteDevCount = Hal4Ctxt->psADDCtxtInfo->nbr_of_devices;
127 == (Hal4Ctxt->rem_dev_list[RemoteDevCount]))
130 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice
131 = Hal4Ctxt->rem_dev_list[RemoteDevCount];
136 if(NULL == Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
146 (void *)&(Hal4Ctxt->rem_dev_list[Hal4Ctxt
153 RetStatus = phHciNfc_Connect(Hal4Ctxt->psHciHandle,
155 Hal4Ctxt->rem_dev_list[RemoteDevCount]);
158 Hal4Ctxt->Hal4NextState = eHal4StateTargetConnected;
165 Hal4Ctxt->psHciHandle,
167 Hal4Ctxt->rem_dev_list[RemoteDevCount]
169 Hal4Ctxt->Hal4NextState = eHal4StateTargetActivate;
174 Hal4Ctxt->Hal4CurrentState = eHal4StateOpenAndReady;
175 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice = NULL;
176 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt = NULL;
177 Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb = NULL;
183 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
186 Hal4Ctxt->psHciHandle,
190 Hal4Ctxt->Hal4NextState = eHal4StateTargetActivate;
194 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
197 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice;
199 RemoteDevCount = Hal4Ctxt->psADDCtxtInfo->nbr_of_devices;
206 if(psRemoteDevInfo == (Hal4Ctxt->rem_dev_list[RemoteDevCount]))
213 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
215 RetStatus = phHciNfc_Reactivate (Hal4Ctxt->psHciHandle,
221 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice =
222 Hal4Ctxt->rem_dev_list[RemoteDevCount];
223 Hal4Ctxt->Hal4NextState = eHal4StateTargetActivate;
228 else if(NULL == Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
242 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt = NULL;
243 Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb = NULL;
251 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt
257 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.cmd_type
262 if (Hal4Ctxt->SelectSectorFlag == PH_HAL4NFC_FLAG_0)
268 Hal4Ctxt->SelectSectorFlag++;
281 Hal4Ctxt->SelectSectorFlag = 0;
284 else if (Hal4Ctxt->SelectSectorFlag == PH_HAL4NFC_FLAG_1)
291 Hal4Ctxt->SelectSectorFlag++;
304 Hal4Ctxt->SelectSectorFlag = 0;
309 Hal4Ctxt->SelectSectorFlag = 0;
321 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.cmd_type =
324 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.addr =
340 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.cmd_type
351 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt
365 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.cmd_type
377 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.cmd_type =
380 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.addr =
397 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.cmd_type
415 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt = (phHal4Nfc_Hal4Ctxt_t *)pContext;
448 Hal4Ctxt = (phHal4Nfc_Hal4Ctxt_t *)psHwReference->hal_context;
450 if((eHal4StateTargetConnected != Hal4Ctxt->Hal4CurrentState)
451 ||(eHal4StateInvalid != Hal4Ctxt->Hal4NextState))
457 else if(psRemoteDevInfo != Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
465 if(NULL == Hal4Ctxt->psTrcvCtxtInfo)
467 Hal4Ctxt->psTrcvCtxtInfo= (pphHal4Nfc_TrcvCtxtInfo_t)
469 if(NULL != Hal4Ctxt->psTrcvCtxtInfo)
471 (void)memset(Hal4Ctxt->psTrcvCtxtInfo,0,
473 Hal4Ctxt->psTrcvCtxtInfo->RecvDataBufferStatus
475 Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
479 if(NULL == Hal4Ctxt->psTrcvCtxtInfo)
488 switch(Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemDevType)
493 Hal4Ctxt
501 Hal4Ctxt
505 Hal4Ctxt->psTrcvCtxtInfo->
513 Hal4Ctxt->psTrcvCtxtInfo->
519 Hal4Ctxt->psTrcvCtxtInfo->
526 Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData
528 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData =
534 Hal4Ctxt->psTrcvCtxtInfo->
540 Hal4Ctxt->psTrcvCtxtInfo->
561 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemDevType)
563 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt = pContext;
565 Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb = pTrcvCallback;
569 Hal4Ctxt->psTrcvCtxtInfo->
571 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_length
573 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_buffer
576 Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData->length = 0;
580 Hal4Ctxt->psTrcvCtxtInfo->
582 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_buffer
583 = Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData->buffer;
584 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_length
587 Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData->buffer
590 Hal4Ctxt->psTrcvCtxtInfo->NumberOfBytesSent
594 Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData->length
597 Hal4Ctxt->Hal4NextState = eHal4StateTransaction;
600 if(Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
604 Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
607 if(Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
618 Hal4Ctxt->psHciHandle,
620 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
621 &(Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo)
625 Hal4Ctxt->psTrcvCtxtInfo->P2P_Send_In_Progress = TRUE;
634 && (Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length != 0))
637 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData
641 if(Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length
642 < Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length)
644 (void)memcpy(Hal4Ctxt->psTrcvCtxtInfo
646 (Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer
647 + Hal4Ctxt->psTrcvCtxtInfo->LowerRecvBufferOffset)
648 ,Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length);
649 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length -=
650 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length;
651 Hal4Ctxt->psTrcvCtxtInfo->LowerRecvBufferOffset
652 += Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length;
659 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length
660 = Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length;
661 (void)memcpy(Hal4Ctxt->psTrcvCtxtInfo
664 (Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer
665 + Hal4Ctxt->psTrcvCtxtInfo->LowerRecvBufferOffset)
666 ,Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length);
667 phOsalNfc_FreeMemory(Hal4Ctxt->psTrcvCtxtInfo
669 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer = NULL;
670 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length = 0;
671 Hal4Ctxt->psTrcvCtxtInfo->LowerRecvBufferOffset = 0;
678 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt = pContext;
680 Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb = pTrcvCallback;
681 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.addr
683 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_length
685 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_buffer
687 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData
691 if(Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
695 Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
698 if(Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
709 Hal4Ctxt->psHciHandle,
711 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
712 &(Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo)
717 Hal4Ctxt->Hal4NextState = eHal4StateTransaction;
721 Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId,
729 Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
742 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt = gpphHal4Nfc_Hwref->hal_context;
747 Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId = PH_OSALNFC_INVALID_TIMER_ID;
748 Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
750 if(Hal4Ctxt->psTrcvCtxtInfo->pP2PRecvCb != NULL)
752 pUpperRecvCb = Hal4Ctxt->psTrcvCtxtInfo->pP2PRecvCb;
753 Hal4Ctxt->psTrcvCtxtInfo->pP2PRecvCb = NULL;
755 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
763 if(Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb != NULL)
765 pUpperTrcvCb = Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb;
766 Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb = NULL;
768 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
769 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
789 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt = NULL;
818 Hal4Ctxt = (phHal4Nfc_Hal4Ctxt_t *)psHwReference->hal_context;
819 if((Hal4Ctxt->sTgtConnectInfo.psConnectedDevice == NULL)
820 || (psRemoteDevInfo != Hal4Ctxt->sTgtConnectInfo.psConnectedDevice))
828 Hal4Ctxt->sUpperLayerInfo.psUpperLayerDisconnectCtxt = pContext;
830 Hal4Ctxt->sTgtConnectInfo.pUpperDisconnectCb = pDscntCallback;
832 Hal4Ctxt->sTgtConnectInfo.ReleaseType = ReleaseType;
833 if((eHal4StateTransaction == Hal4Ctxt->Hal4NextState)
838 Hal4Ctxt->sTgtConnectInfo.ReleaseType
843 else if((eHal4StateTransaction == Hal4Ctxt->Hal4NextState)
844 &&(NULL != Hal4Ctxt->psTrcvCtxtInfo)
845 &&(TRUE == Hal4Ctxt->psTrcvCtxtInfo->P2P_Send_In_Progress))
866 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt =
870 switch(Hal4Ctxt->sTgtConnectInfo.ReleaseType)
876 Hal4Ctxt->psHciHandle,
879 &(Hal4Ctxt->psADDCtxtInfo->sADDCfg)
886 Hal4Ctxt->psHciHandle,
894 (void *)Hal4Ctxt->psHciHandle,
908 Hal4Ctxt->psHciHandle,
918 Hal4Ctxt->sTgtConnectInfo.ReleaseType = NFC_INVALID_RELEASE_TYPE;
920 Hal4Ctxt->Hal4NextState = (NFCSTATUS_PENDING == RetStatus?
921 eHal4StateOpenAndReady:Hal4Ctxt->Hal4NextState);
934 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt = NULL;
967 Hal4Ctxt = (phHal4Nfc_Hal4Ctxt_t *)psHwReference->hal_context;
969 if (eHal4StatePresenceCheck != Hal4Ctxt->Hal4NextState)
972 if (Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemDevType ==
978 (void) memcpy(Hal4Ctxt->FelicaIDm,
979 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemoteDevInfo.Felica_Info.IDm,
980 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemoteDevInfo.Felica_Info.IDmLength);
982 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt = context;
983 Hal4Ctxt->sTgtConnectInfo.pPresenceChkCb = pPresenceChkCb;
984 RetStatus = phHciNfc_Presence_Check(Hal4Ctxt->psHciHandle,
987 Hal4Ctxt->Hal4NextState = (NFCSTATUS_PENDING == RetStatus?
988 eHal4StatePresenceCheck:Hal4Ctxt->Hal4NextState);
999 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt,
1004 Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
1006 if(NULL != Hal4Ctxt->sTgtConnectInfo.pPresenceChkCb)
1008 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->SessionOpened
1011 if (Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemDevType ==
1015 if (0 != phOsalNfc_MemCompare(Hal4Ctxt->FelicaIDm,
1016 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemoteDevInfo.Felica_Info.IDm,
1017 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemoteDevInfo.Felica_Info.IDmLength))
1022 (void) memset(Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemoteDevInfo.Felica_Info.IDm,
1024 (void) memset(Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemoteDevInfo.Felica_Info.PMm,
1029 (void) memset(Hal4Ctxt->FelicaIDm, 0, PHHAL_FEL_ID_LEN + 2);
1032 (*Hal4Ctxt->sTgtConnectInfo.pPresenceChkCb)(
1033 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
1043 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt,
1053 Hal4Ctxt->Hal4NextState = eHal4StateTargetConnected;
1055 Hal4Ctxt->psHciHandle,
1057 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice
1064 Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
1065 if(NULL != Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb)
1067 (*Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb)(
1068 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
1069 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
1080 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt = gpHal4Ctxt;
1082 = Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb;
1084 Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb = NULL;
1091 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
1092 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
1100 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt,
1106 = Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb;
1113 ||(eHal4StateTargetConnected == Hal4Ctxt->Hal4CurrentState))
1116 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice;
1118 Hal4Ctxt->Hal4CurrentState = eHal4StateTargetConnected;
1119 Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
1123 Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb = NULL;
1131 Hal4Ctxt->Hal4CurrentState = eHal4StateOpenAndReady;
1132 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->SessionOpened = FALSE;
1136 == Hal4Ctxt->rem_dev_list[0]->RemDevType)
1137 || (NULL != Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb))
1139 Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb = NULL;
1148 Hal4Ctxt->psADDCtxtInfo->nbr_of_devices--;
1149 if(NULL != Hal4Ctxt->rem_dev_list[
1150 Hal4Ctxt->psADDCtxtInfo->nbr_of_devices])
1153 (Hal4Ctxt->rem_dev_list[
1154 Hal4Ctxt->psADDCtxtInfo->nbr_of_devices]));
1155 Hal4Ctxt->rem_dev_list[
1156 Hal4Ctxt->psADDCtxtInfo->nbr_of_devices] = NULL;
1158 }while(0 < Hal4Ctxt->psADDCtxtInfo->nbr_of_devices);
1160 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice = NULL;
1171 (void) memcpy(Hal4Ctxt->FelicaIDm,
1172 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemoteDevInfo.Felica_Info.IDm,
1173 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemoteDevInfo.Felica_Info.IDmLength);
1175 gpHal4Ctxt = Hal4Ctxt;
1176 Hal4Ctxt->sTgtConnectInfo.pPresenceChkCb = phHal4Nfc_Felica_RePoll;
1177 ConnectStatus = phHciNfc_Presence_Check(Hal4Ctxt->psHciHandle,
1180 Hal4Ctxt->Hal4NextState = (NFCSTATUS_PENDING == ConnectStatus?
1181 eHal4StatePresenceCheck:Hal4Ctxt->Hal4NextState);
1183 Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb = pUpperConnectCb;
1190 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
1191 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
1201 (void *)Hal4Ctxt->psHciHandle,
1205 Hal4Ctxt->Hal4NextState = (NFCSTATUS_PENDING == ConnectStatus?
1215 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt,
1224 if(NULL == Hal4Ctxt)
1231 (void *)Hal4Ctxt->psHciHandle,
1235 Hal4Ctxt->Hal4NextState = (NFCSTATUS_PENDING == ConnectStatus?
1240 psConnectedDevice = Hal4Ctxt->sTgtConnectInfo.psConnectedDevice;
1241 pUpperDisconnectCb = Hal4Ctxt->sTgtConnectInfo.pUpperDisconnectCb;
1243 if(NULL != Hal4Ctxt->psTrcvCtxtInfo)
1245 if(NULL == Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
1247 if(NULL != Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData)
1250 Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData);
1256 == Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemDevType)
1258 pUpperTrcvCb = Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb;
1259 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length = 0;
1260 pUpperTrcvCb = Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb;
1261 Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb = NULL;
1264 if(NULL != Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer)
1267 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer);
1270 phOsalNfc_FreeMemory(Hal4Ctxt->psTrcvCtxtInfo);
1271 Hal4Ctxt->psTrcvCtxtInfo = NULL;
1276 if(NULL != Hal4Ctxt->rem_dev_list[Hal4Ctxt->
1280 (Hal4Ctxt->rem_dev_list[Hal4Ctxt->
1282 Hal4Ctxt->rem_dev_list[Hal4Ctxt->
1285 }while(--(Hal4Ctxt->psADDCtxtInfo->nbr_of_devices));
1287 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice = NULL;
1289 Hal4Ctxt->Hal4CurrentState = Hal4Ctxt->Hal4NextState;
1290 Hal4Ctxt->sTgtConnectInfo.pUpperDisconnectCb = NULL;
1291 Hal4Ctxt->Hal4NextState = (
1292 eHal4StateOpenAndReady == Hal4Ctxt->Hal4NextState?
1293 eHal4StateInvalid:Hal4Ctxt->Hal4NextState);
1298 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
1309 Hal4Ctxt->sUpperLayerInfo.psUpperLayerDisconnectCtxt,
1321 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt,
1328 Hal4Ctxt->Hal4NextState = (eHal4StateTransaction
1329 == Hal4Ctxt->Hal4NextState?eHal4StateInvalid:Hal4Ctxt->Hal4NextState);
1331 if (Hal4Ctxt->SelectSectorFlag == 2)
1335 Hal4Ctxt->SelectSectorFlag = 0;
1338 if(NULL == Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData)
1352 ->length > Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length )
1355 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length
1357 - Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length;
1359 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer
1361 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length
1363 if(NULL != Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer)
1366 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer,
1368 + Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData
1370 ,Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length
1384 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length
1386 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length = 0;
1388 (void)memcpy(Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->buffer,
1390 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length
1396 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length = 0;
1398 (void)memset((void *)&(Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params),
1400 sizeof(Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params)
1402 Hal4Ctxt->psTrcvCtxtInfo->LowerRecvBufferOffset = 0;
1404 (*Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb)(
1405 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
1406 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
1407 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData,