Home | History | Annotate | Download | only in src

Lines Matching defs:Hal4Ctxt

59                         phHal4Nfc_Hal4Ctxt_t      *Hal4Ctxt
65 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt
77 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt = NULL;
110 Hal4Ctxt = (phHal4Nfc_Hal4Ctxt_t *)psHwReference->hal_context;
112 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt = pContext;
114 Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb = pNotifyConnectCb;
116 if((eHal4StateTargetDiscovered == Hal4Ctxt->Hal4CurrentState)
117 && (NULL == Hal4Ctxt->sTgtConnectInfo.psConnectedDevice))
119 RemoteDevCount = Hal4Ctxt->psADDCtxtInfo->nbr_of_devices;
126 == (Hal4Ctxt->rem_dev_list[RemoteDevCount]))
129 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice
130 = Hal4Ctxt->rem_dev_list[RemoteDevCount];
135 if(NULL == Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
145 (void *)&(Hal4Ctxt->rem_dev_list[Hal4Ctxt
152 RetStatus = phHciNfc_Connect(Hal4Ctxt->psHciHandle,
154 Hal4Ctxt->rem_dev_list[RemoteDevCount]);
157 Hal4Ctxt->Hal4NextState = eHal4StateTargetConnected;
164 Hal4Ctxt->psHciHandle,
166 Hal4Ctxt->rem_dev_list[RemoteDevCount]
168 Hal4Ctxt->Hal4NextState = eHal4StateTargetActivate;
173 Hal4Ctxt->Hal4CurrentState = eHal4StateOpenAndReady;
174 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice = NULL;
175 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt = NULL;
176 Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb = NULL;
182 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
185 Hal4Ctxt->psHciHandle,
189 Hal4Ctxt->Hal4NextState = eHal4StateTargetActivate;
193 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
196 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice;
198 RemoteDevCount = Hal4Ctxt->psADDCtxtInfo->nbr_of_devices;
205 if(psRemoteDevInfo == (Hal4Ctxt->rem_dev_list[RemoteDevCount]))
212 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
214 RetStatus = phHciNfc_Reactivate (Hal4Ctxt->psHciHandle,
220 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice =
221 Hal4Ctxt->rem_dev_list[RemoteDevCount];
222 Hal4Ctxt->Hal4NextState = eHal4StateTargetActivate;
227 else if(NULL == Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
245 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt
251 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.cmd_type
256 if (Hal4Ctxt->SelectSectorFlag == PH_HAL4NFC_FLAG_0)
262 Hal4Ctxt->SelectSectorFlag++;
275 Hal4Ctxt->SelectSectorFlag = 0;
278 else if (Hal4Ctxt->SelectSectorFlag == PH_HAL4NFC_FLAG_1)
285 Hal4Ctxt->SelectSectorFlag++;
298 Hal4Ctxt->SelectSectorFlag = 0;
303 Hal4Ctxt->SelectSectorFlag = 0;
315 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.cmd_type =
318 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.addr =
334 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.cmd_type
345 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt
359 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.cmd_type
371 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.cmd_type =
374 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.addr =
391 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.cmd_type
409 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt = (phHal4Nfc_Hal4Ctxt_t *)pContext;
442 Hal4Ctxt = (phHal4Nfc_Hal4Ctxt_t *)psHwReference->hal_context;
444 if((eHal4StateTargetConnected != Hal4Ctxt->Hal4CurrentState)
445 ||(eHal4StateInvalid != Hal4Ctxt->Hal4NextState))
451 else if(psRemoteDevInfo != Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
459 if(NULL == Hal4Ctxt->psTrcvCtxtInfo)
461 Hal4Ctxt->psTrcvCtxtInfo= (pphHal4Nfc_TrcvCtxtInfo_t)
463 if(NULL != Hal4Ctxt->psTrcvCtxtInfo)
465 (void)memset(Hal4Ctxt->psTrcvCtxtInfo,0,
467 Hal4Ctxt->psTrcvCtxtInfo->RecvDataBufferStatus
469 Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
473 if(NULL == Hal4Ctxt->psTrcvCtxtInfo)
482 switch(Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemDevType)
487 Hal4Ctxt
495 Hal4Ctxt
499 Hal4Ctxt->psTrcvCtxtInfo->
507 Hal4Ctxt->psTrcvCtxtInfo->
513 Hal4Ctxt->psTrcvCtxtInfo->
520 Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData
522 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData =
528 Hal4Ctxt->psTrcvCtxtInfo->
534 Hal4Ctxt->psTrcvCtxtInfo->
555 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemDevType)
557 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt = pContext;
559 Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb = pTrcvCallback;
563 Hal4Ctxt->psTrcvCtxtInfo->
565 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_length
567 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_buffer
570 Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData->length = 0;
574 Hal4Ctxt->psTrcvCtxtInfo->
576 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_buffer
577 = Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData->buffer;
578 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_length
581 Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData->buffer
584 Hal4Ctxt->psTrcvCtxtInfo->NumberOfBytesSent
588 Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData->length
591 Hal4Ctxt->Hal4NextState = eHal4StateTransaction;
594 if(Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
598 Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
601 if(Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
612 Hal4Ctxt->psHciHandle,
614 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
615 &(Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo)
619 Hal4Ctxt->psTrcvCtxtInfo->P2P_Send_In_Progress = TRUE;
628 && (Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length != 0))
631 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData
635 if(Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length
636 < Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length)
638 (void)memcpy(Hal4Ctxt->psTrcvCtxtInfo
640 (Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer
641 + Hal4Ctxt->psTrcvCtxtInfo->LowerRecvBufferOffset)
642 ,Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length);
643 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length -=
644 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length;
645 Hal4Ctxt->psTrcvCtxtInfo->LowerRecvBufferOffset
646 += Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length;
653 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length
654 = Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length;
655 (void)memcpy(Hal4Ctxt->psTrcvCtxtInfo
658 (Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer
659 + Hal4Ctxt->psTrcvCtxtInfo->LowerRecvBufferOffset)
660 ,Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length);
661 phOsalNfc_FreeMemory(Hal4Ctxt->psTrcvCtxtInfo
663 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer = NULL;
664 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length = 0;
665 Hal4Ctxt->psTrcvCtxtInfo->LowerRecvBufferOffset = 0;
672 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt = pContext;
674 Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb = pTrcvCallback;
675 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params.tag_info.addr
677 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_length
679 Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.tx_buffer
681 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData
685 if(Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
689 Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
692 if(Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId
703 Hal4Ctxt->psHciHandle,
705 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
706 &(Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo)
711 Hal4Ctxt->Hal4NextState = eHal4StateTransaction;
715 Hal4Ctxt->psTrcvCtxtInfo->TransactionTimerId,
723 Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
736 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt = gpphHal4Nfc_Hwref->hal_context;
741 Hal4Ctxt
742 Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
744 if(Hal4Ctxt->psTrcvCtxtInfo->pP2PRecvCb != NULL)
746 pUpperRecvCb = Hal4Ctxt->psTrcvCtxtInfo->pP2PRecvCb;
747 Hal4Ctxt->psTrcvCtxtInfo->pP2PRecvCb = NULL;
749 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
757 if(Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb != NULL)
759 pUpperTrcvCb = Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb;
760 Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb = NULL;
762 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
763 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
783 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt = NULL;
812 Hal4Ctxt = (phHal4Nfc_Hal4Ctxt_t *)psHwReference->hal_context;
813 if((Hal4Ctxt->sTgtConnectInfo.psConnectedDevice == NULL)
814 || (psRemoteDevInfo != Hal4Ctxt->sTgtConnectInfo.psConnectedDevice))
822 Hal4Ctxt->sUpperLayerInfo.psUpperLayerDisconnectCtxt = pContext;
824 Hal4Ctxt->sTgtConnectInfo.pUpperDisconnectCb = pDscntCallback;
826 Hal4Ctxt->sTgtConnectInfo.ReleaseType = ReleaseType;
827 if((eHal4StateTransaction == Hal4Ctxt->Hal4NextState)
832 Hal4Ctxt->sTgtConnectInfo.ReleaseType
837 else if((eHal4StateTransaction == Hal4Ctxt->Hal4NextState)
838 &&(NULL != Hal4Ctxt->psTrcvCtxtInfo)
839 &&(TRUE == Hal4Ctxt->psTrcvCtxtInfo->P2P_Send_In_Progress))
860 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt =
864 switch(Hal4Ctxt->sTgtConnectInfo.ReleaseType)
870 Hal4Ctxt->psHciHandle,
873 &(Hal4Ctxt->psADDCtxtInfo->sADDCfg)
880 Hal4Ctxt->psHciHandle,
888 (void *)Hal4Ctxt->psHciHandle,
902 Hal4Ctxt->psHciHandle,
912 Hal4Ctxt->sTgtConnectInfo.ReleaseType = NFC_INVALID_RELEASE_TYPE;
914 Hal4Ctxt->Hal4NextState = (NFCSTATUS_PENDING == RetStatus?
915 eHal4StateOpenAndReady:Hal4Ctxt->Hal4NextState);
928 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt = NULL;
961 Hal4Ctxt = (phHal4Nfc_Hal4Ctxt_t *)psHwReference->hal_context;
963 if (eHal4StatePresenceCheck != Hal4Ctxt->Hal4NextState)
965 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt = context;
966 Hal4Ctxt->sTgtConnectInfo.pPresenceChkCb = pPresenceChkCb;
967 RetStatus = phHciNfc_Presence_Check(Hal4Ctxt->psHciHandle,
970 Hal4Ctxt->Hal4NextState = (NFCSTATUS_PENDING == RetStatus?
971 eHal4StatePresenceCheck:Hal4Ctxt->Hal4NextState);
982 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt,
987 Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
989 if(NULL != Hal4Ctxt->sTgtConnectInfo.pPresenceChkCb)
991 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->SessionOpened
993 (*Hal4Ctxt->sTgtConnectInfo.pPresenceChkCb)(
994 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
1004 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt,
1014 Hal4Ctxt->Hal4NextState = eHal4StateTargetConnected;
1016 Hal4Ctxt->psHciHandle,
1018 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice
1025 Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
1026 if(NULL != Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb)
1028 (*Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb)(
1029 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
1030 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
1040 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt,
1046 = Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb;
1051 ||(eHal4StateTargetConnected == Hal4Ctxt->Hal4CurrentState))
1054 Hal4Ctxt->Hal4CurrentState = eHal4StateTargetConnected;
1055 Hal4Ctxt->Hal4NextState = eHal4StateInvalid;
1057 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->SessionOpened =
1059 Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb = NULL;
1064 Hal4Ctxt->Hal4CurrentState = eHal4StateOpenAndReady;
1065 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->SessionOpened = FALSE;
1069 == Hal4Ctxt->rem_dev_list[0]->RemDevType)
1070 || (NULL != Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb))
1072 Hal4Ctxt->sTgtConnectInfo.pUpperConnectCb = NULL;
1081 Hal4Ctxt->psADDCtxtInfo->nbr_of_devices--;
1082 if(NULL != Hal4Ctxt->rem_dev_list[
1083 Hal4Ctxt->psADDCtxtInfo->nbr_of_devices])
1086 (Hal4Ctxt->rem_dev_list[
1087 Hal4Ctxt->psADDCtxtInfo->nbr_of_devices]));
1088 Hal4Ctxt->rem_dev_list[
1089 Hal4Ctxt->psADDCtxtInfo->nbr_of_devices] = NULL;
1091 }while(0 < Hal4Ctxt->psADDCtxtInfo->nbr_of_devices);
1093 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice = NULL;
1100 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
1101 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
1110 (void *)Hal4Ctxt->psHciHandle,
1114 Hal4Ctxt->Hal4NextState = (NFCSTATUS_PENDING == ConnectStatus?
1124 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt,
1133 if(NULL == Hal4Ctxt)
1140 Hal4Ctxt->psHciHandle,
1144 Hal4Ctxt->Hal4NextState = (NFCSTATUS_PENDING == ConnectStatus?
1149 psConnectedDevice = Hal4Ctxt->sTgtConnectInfo.psConnectedDevice;
1150 pUpperDisconnectCb = Hal4Ctxt->sTgtConnectInfo.pUpperDisconnectCb;
1152 if(NULL != Hal4Ctxt->psTrcvCtxtInfo)
1154 if(NULL == Hal4Ctxt->sTgtConnectInfo.psConnectedDevice)
1156 if(NULL != Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData)
1159 Hal4Ctxt->psTrcvCtxtInfo->psUpperSendData);
1165 == Hal4Ctxt->sTgtConnectInfo.psConnectedDevice->RemDevType)
1167 pUpperTrcvCb = Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb;
1168 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length = 0;
1169 pUpperTrcvCb = Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb;
1170 Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb = NULL;
1173 if(NULL != Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer)
1176 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer);
1179 phOsalNfc_FreeMemory(Hal4Ctxt->psTrcvCtxtInfo);
1180 Hal4Ctxt->psTrcvCtxtInfo = NULL;
1185 if(NULL != Hal4Ctxt->rem_dev_list[Hal4Ctxt->
1189 (Hal4Ctxt->rem_dev_list[Hal4Ctxt->
1191 Hal4Ctxt->rem_dev_list[Hal4Ctxt->
1194 }while(--(Hal4Ctxt->psADDCtxtInfo->nbr_of_devices));
1196 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice = NULL;
1198 Hal4Ctxt->Hal4CurrentState = Hal4Ctxt->Hal4NextState;
1199 Hal4Ctxt->sTgtConnectInfo.pUpperDisconnectCb = NULL;
1200 Hal4Ctxt->Hal4NextState = (
1201 eHal4StateOpenAndReady == Hal4Ctxt->Hal4NextState?
1202 eHal4StateInvalid:Hal4Ctxt->Hal4NextState);
1207 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
1218 Hal4Ctxt->sUpperLayerInfo.psUpperLayerDisconnectCtxt,
1230 phHal4Nfc_Hal4Ctxt_t *Hal4Ctxt,
1237 Hal4Ctxt->Hal4NextState = (eHal4StateTransaction
1238 == Hal4Ctxt->Hal4NextState?eHal4StateInvalid:Hal4Ctxt->Hal4NextState);
1240 if (Hal4Ctxt->SelectSectorFlag == 2)
1244 Hal4Ctxt->SelectSectorFlag = 0;
1247 if(NULL == Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData)
1261 ->length > Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length )
1264 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length
1266 - Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length;
1268 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer
1270 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length
1272 if(NULL != Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer)
1275 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.buffer,
1277 + Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData
1279 ,Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length
1293 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length
1295 Hal4Ctxt->psTrcvCtxtInfo->sLowerRecvData.length = 0;
1297 (void)memcpy(Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->buffer,
1299 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length
1305 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData->length = 0;
1307 (void)memset((void *)&(Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params),
1309 sizeof(Hal4Ctxt->psTrcvCtxtInfo->XchangeInfo.params)
1311 Hal4Ctxt->psTrcvCtxtInfo->LowerRecvBufferOffset = 0;
1313 (*Hal4Ctxt->psTrcvCtxtInfo->pUpperTranceiveCb)(
1314 Hal4Ctxt->sUpperLayerInfo.psUpperLayerCtxt,
1315 Hal4Ctxt->sTgtConnectInfo.psConnectedDevice,
1316 Hal4Ctxt->psTrcvCtxtInfo->psUpperRecvData,