• Home
  • Raw
  • Download

Lines Matching refs:StdMifareContainer

474         NdefMap->StdMifareContainer.currentBlock = PH_FRINFC_MIFARESTD_VAL0;  in phFriNfc_MifareStdMap_H_Reset()
480 NdefMap->StdMifareContainer.internalBuf[index] = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifareStdMap_H_Reset()
483 NdefMap->StdMifareContainer.internalLength = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifareStdMap_H_Reset()
488 NdefMap->StdMifareContainer.RemainingBufFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
492 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
495 NdefMap->StdMifareContainer.internalBufFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
498 NdefMap->StdMifareContainer.AuthDone = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
501 NdefMap->StdMifareContainer.SectorIndex = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifareStdMap_H_Reset()
503 NdefMap->StdMifareContainer.NdefBlocks = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifareStdMap_H_Reset()
505 NdefMap->StdMifareContainer.NoOfNdefCompBlocks = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifareStdMap_H_Reset()
507 NdefMap->StdMifareContainer.ReadAcsBitFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
509 NdefMap->StdMifareContainer.remSizeUpdFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
523 NdefMap->StdMifareContainer.remainingSize = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifareStdMap_H_Reset()
525 NdefMap->StdMifareContainer.ReadNdefFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
527 NdefMap->StdMifareContainer.WrNdefFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
529 NdefMap->StdMifareContainer.ChkNdefFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
531 NdefMap->StdMifareContainer.aidCompleteFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
533 NdefMap->StdMifareContainer.NFCforumSectFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
535 NdefMap->StdMifareContainer.ProprforumSectFlag = PH_FRINFC_MIFARESTD_PROP_1ST_CONFIG; in phFriNfc_MifareStdMap_H_Reset()
537 NdefMap->StdMifareContainer.ReadCompleteFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
539 NdefMap->StdMifareContainer.FirstReadFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
541 NdefMap->StdMifareContainer.WrLength = PH_FRINFC_MIFARESTD_VAL1; in phFriNfc_MifareStdMap_H_Reset()
543 NdefMap->StdMifareContainer.ChkNdefCompleteFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
545 NdefMap->StdMifareContainer.ReadOnlySectorIndex = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
547 NdefMap->StdMifareContainer.TotalNoSectors = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
549 NdefMap->StdMifareContainer.SectorTrailerBlockNo = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_H_Reset()
585 NdefMap->StdMifareContainer.CRIndex = PH_FRINFC_NDEFMAP_CR_CHK_NDEF; in phFriNfc_MifareStdMap_ChkNdef()
603 NdefMap->StdMifareContainer.NoOfNdefCompBlocks = in phFriNfc_MifareStdMap_ChkNdef()
605 NdefMap->StdMifareContainer.remainingSize = in phFriNfc_MifareStdMap_ChkNdef()
609 NdefMap->StdMifareContainer.remainingSize); in phFriNfc_MifareStdMap_ChkNdef()
615 NdefMap->StdMifareContainer.NoOfNdefCompBlocks = in phFriNfc_MifareStdMap_ChkNdef()
617 NdefMap->StdMifareContainer.remainingSize = in phFriNfc_MifareStdMap_ChkNdef()
621 NdefMap->StdMifareContainer.remainingSize); in phFriNfc_MifareStdMap_ChkNdef()
630 if((NdefMap->StdMifareContainer.currentBlock != 0) && in phFriNfc_MifareStdMap_ChkNdef()
631 (NdefMap->StdMifareContainer.currentBlock != 1) && in phFriNfc_MifareStdMap_ChkNdef()
632 (NdefMap->StdMifareContainer.currentBlock != 2) && in phFriNfc_MifareStdMap_ChkNdef()
633 (NdefMap->StdMifareContainer.currentBlock != 64) && in phFriNfc_MifareStdMap_ChkNdef()
634 (NdefMap->StdMifareContainer.currentBlock != 65) && in phFriNfc_MifareStdMap_ChkNdef()
635 (NdefMap->StdMifareContainer.currentBlock != 66) ) in phFriNfc_MifareStdMap_ChkNdef()
639 else if( NdefMap->StdMifareContainer.AuthDone == 0) in phFriNfc_MifareStdMap_ChkNdef()
645 if(NdefMap->StdMifareContainer.currentBlock == 0) in phFriNfc_MifareStdMap_ChkNdef()
647 NdefMap->StdMifareContainer.currentBlock = 1; in phFriNfc_MifareStdMap_ChkNdef()
662 NdefMap->StdMifareContainer.ChkNdefFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifareStdMap_ChkNdef()
673 NdefMap->SendRecvBuf[0] = NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifareStdMap_ChkNdef()
721 NdefMap->StdMifareContainer.CRIndex = PH_FRINFC_NDEFMAP_CR_RD_NDEF; in phFriNfc_MifareStdMap_RdNdef()
736 NdefMap->StdMifareContainer.ReadNdefFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifareStdMap_RdNdef()
741 (NdefMap->StdMifareContainer.ReadWriteCompleteFlag == in phFriNfc_MifareStdMap_RdNdef()
759 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_RdNdef()
763 ((NdefMap->StdMifareContainer.AuthDone == PH_FRINFC_MIFARESTD_FLAG1)? in phFriNfc_MifareStdMap_RdNdef()
793 NdefMap->StdMifareContainer.CRIndex = PH_FRINFC_NDEFMAP_CR_WR_NDEF; in phFriNfc_MifareStdMap_WrNdef()
808 NdefMap->StdMifareContainer.RdBeforeWrFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifareStdMap_WrNdef()
809 NdefMap->StdMifareContainer.WrNdefFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifareStdMap_WrNdef()
810 NdefMap->StdMifareContainer.internalLength = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifareStdMap_WrNdef()
811 NdefMap->StdMifareContainer.RdAfterWrFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_WrNdef()
812 NdefMap->StdMifareContainer.AuthDone = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_WrNdef()
816 NdefMap->StdMifareContainer.FirstReadFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_WrNdef()
817 NdefMap->StdMifareContainer.remainingSize = in phFriNfc_MifareStdMap_WrNdef()
818 (NdefMap->StdMifareContainer.NoOfNdefCompBlocks * in phFriNfc_MifareStdMap_WrNdef()
820 NdefMap->StdMifareContainer.currentBlock = in phFriNfc_MifareStdMap_WrNdef()
822 NdefMap->StdMifareContainer.NdefBlocks = PH_FRINFC_MIFARESTD_VAL1; in phFriNfc_MifareStdMap_WrNdef()
823 NdefMap->StdMifareContainer.NFCforumSectFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_WrNdef()
833 NdefMap->StdMifareContainer.PollFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_WrNdef()
835 NdefMap->StdMifareContainer.PollFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifareStdMap_WrNdef()
837 NdefMap->StdMifareContainer.WrLength = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifareStdMap_WrNdef()
838 NdefMap->StdMifareContainer.FirstWriteFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifareStdMap_WrNdef()
842 (NdefMap->StdMifareContainer.ReadWriteCompleteFlag == in phFriNfc_MifareStdMap_WrNdef()
843 PH_FRINFC_MIFARESTD_FLAG1)) || ((NdefMap->StdMifareContainer.PollFlag == in phFriNfc_MifareStdMap_WrNdef()
857 NdefMap->StdMifareContainer.AuthDone = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_WrNdef()
859 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_WrNdef()
862 if(NdefMap->StdMifareContainer.PollFlag == in phFriNfc_MifareStdMap_WrNdef()
870 else if(NdefMap->StdMifareContainer.AuthDone == PH_FRINFC_MIFARESTD_FLAG1) in phFriNfc_MifareStdMap_WrNdef()
974 NdefMap->StdMifareContainer.FirstReadFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_Process()
989 if(NdefMap->StdMifareContainer.RdAfterWrFlag == in phFriNfc_MifareStdMap_Process()
1000 if(NdefMap->StdMifareContainer.TempBlockNo == in phFriNfc_MifareStdMap_Process()
1001 NdefMap->StdMifareContainer.currentBlock) in phFriNfc_MifareStdMap_Process()
1003 (void)memcpy( NdefMap->StdMifareContainer.internalBuf, in phFriNfc_MifareStdMap_Process()
1004 NdefMap->StdMifareContainer.Buffer, in phFriNfc_MifareStdMap_Process()
1005 NdefMap->StdMifareContainer.internalLength); in phFriNfc_MifareStdMap_Process()
1008 NdefMap->StdMifareContainer.currentBlock = in phFriNfc_MifareStdMap_Process()
1009 NdefMap->StdMifareContainer.TempBlockNo; in phFriNfc_MifareStdMap_Process()
1038 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifareStdMap_Process()
1060 if(((NdefMap->StdMifareContainer.ReadNdefFlag == in phFriNfc_MifareStdMap_Process()
1062 (NdefMap->StdMifareContainer.WrNdefFlag == in phFriNfc_MifareStdMap_Process()
1066 NdefMap->StdMifareContainer.NFCforumSectFlag = in phFriNfc_MifareStdMap_Process()
1071 if(((NdefMap->StdMifareContainer.WrNdefFlag == in phFriNfc_MifareStdMap_Process()
1074 ((NdefMap->StdMifareContainer.ReadNdefFlag == in phFriNfc_MifareStdMap_Process()
1081 if(NdefMap->StdMifareContainer.AuthDone == in phFriNfc_MifareStdMap_Process()
1088 Status = ((NdefMap->StdMifareContainer.ReadNdefFlag == in phFriNfc_MifareStdMap_Process()
1093 NdefMap->StdMifareContainer.ReadNdefFlag = in phFriNfc_MifareStdMap_Process()
1095 NdefMap->StdMifareContainer.WrNdefFlag = in phFriNfc_MifareStdMap_Process()
1099 if(NdefMap->StdMifareContainer.ChkNdefFlag == in phFriNfc_MifareStdMap_Process()
1132 NdefMap->StdMifareContainer.currentBlock = in phFriNfc_MifareStdMap_Process()
1141 NdefMap->StdMifareContainer.PollFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_Process()
1159 if(NdefMap->StdMifareContainer.FirstReadFlag == PH_FRINFC_MIFARESTD_FLAG1) in phFriNfc_MifareStdMap_Process()
1161 NdefMap->StdMifareContainer.FirstReadFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_Process()
1166 (NdefMap->StdMifareContainer.ReadOnlySectorIndex && in phFriNfc_MifareStdMap_Process()
1167 … NdefMap->StdMifareContainer.SectorTrailerBlockNo == NdefMap->StdMifareContainer.currentBlock)) in phFriNfc_MifareStdMap_Process()
1169 NdefMap->StdMifareContainer.ReadOnlySectorIndex = in phFriNfc_MifareStdMap_Process()
1171 NdefMap->StdMifareContainer.SectorTrailerBlockNo = in phFriNfc_MifareStdMap_Process()
1173 NdefMap->StdMifareContainer.currentBlock = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_Process()
1180 (NdefMap->StdMifareContainer.WrLength > in phFriNfc_MifareStdMap_Process()
1196 (NdefMap->StdMifareContainer.WriteAcsBitFlag == PH_FRINFC_MIFARESTD_FLAG0)) in phFriNfc_MifareStdMap_Process()
1205 NdefMap->StdMifareContainer.WriteAcsBitFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifareStdMap_Process()
1236 NdefMap->StdMifareContainer.PollFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifareStdMap_Process()
1237 if(NdefMap->StdMifareContainer.FirstWriteFlag == in phFriNfc_MifareStdMap_Process()
1240 NdefMap->StdMifareContainer.FirstWriteFlag = in phFriNfc_MifareStdMap_Process()
1242 NdefMap->StdMifareContainer.WrLength = in phFriNfc_MifareStdMap_Process()
1243 ((NdefMap->StdMifareContainer.NFCforumSectFlag == in phFriNfc_MifareStdMap_Process()
1246 NdefMap->StdMifareContainer.WrLength); in phFriNfc_MifareStdMap_Process()
1256 else*/ if(NdefMap->StdMifareContainer.WrLength == PH_FRINFC_MIFARESTD_VAL0) in phFriNfc_MifareStdMap_Process()
1302 if(NdefMap->StdMifareContainer.internalLength > PH_FRINFC_MIFARESTD_VAL0) in phFriNfc_MifStd_H_RdABlock()
1309 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_RdABlock()
1333 if((((NdefMap->StdMifareContainer.NoOfNdefCompBlocks - in phFriNfc_MifStd_H_RdABlock()
1334 NdefMap->StdMifareContainer.NdefBlocks) * in phFriNfc_MifStd_H_RdABlock()
1338 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = in phFriNfc_MifStd_H_RdABlock()
1339 (uint8_t)((((NdefMap->StdMifareContainer.NoOfNdefCompBlocks - in phFriNfc_MifStd_H_RdABlock()
1340 NdefMap->StdMifareContainer.NdefBlocks) * in phFriNfc_MifStd_H_RdABlock()
1389 NdefMap->StdMifareContainer.remainingSize )? in phFriNfc_MifStd_H_WrABlock()
1392 NdefMap->StdMifareContainer.remainingSize); in phFriNfc_MifStd_H_WrABlock()
1394 NdefMap->SendRecvBuf[0] = NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_WrABlock()
1398 if(NdefMap->StdMifareContainer.internalLength > 0) in phFriNfc_MifStd_H_WrABlock()
1402 NdefMap->StdMifareContainer.internalBuf, in phFriNfc_MifStd_H_WrABlock()
1403 NdefMap->StdMifareContainer.internalLength); in phFriNfc_MifStd_H_WrABlock()
1405 Temp16Bytes += (uint8_t)(NdefMap->StdMifareContainer.internalLength); in phFriNfc_MifStd_H_WrABlock()
1426 NdefMap->StdMifareContainer.internalBufFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifStd_H_WrABlock()
1470 NdefMap->StdMifareContainer.RemainingBufFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifStd_H_WrABlock()
1489 (void)memcpy( NdefMap->StdMifareContainer.Buffer, in phFriNfc_MifStd_H_WrABlock()
1514 if(NdefMap->StdMifareContainer.NdefBlocks > in phFriNfc_MifStd_H_WrABlock()
1515 NdefMap->StdMifareContainer.NoOfNdefCompBlocks) in phFriNfc_MifStd_H_WrABlock()
1517 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = in phFriNfc_MifStd_H_WrABlock()
1566 NdefMap->StdMifareContainer.currentBlock); in phFriNfc_MifStd_H_AuthSector()
1571 if(( (NdefMap->StdMifareContainer.currentBlock != PH_FRINFC_MIFARESTD_MAD_BLK0) && in phFriNfc_MifStd_H_AuthSector()
1572 (NdefMap->StdMifareContainer.currentBlock != PH_FRINFC_MIFARESTD_MAD_BLK1) && in phFriNfc_MifStd_H_AuthSector()
1573 (NdefMap->StdMifareContainer.currentBlock != PH_FRINFC_MIFARESTD_MAD_BLK2) && in phFriNfc_MifStd_H_AuthSector()
1574 (NdefMap->StdMifareContainer.currentBlock != PH_FRINFC_MIFARESTD_MAD_BLK64) && in phFriNfc_MifStd_H_AuthSector()
1575 (NdefMap->StdMifareContainer.currentBlock != PH_FRINFC_MIFARESTD_MAD_BLK65) && in phFriNfc_MifStd_H_AuthSector()
1576 (NdefMap->StdMifareContainer.currentBlock != PH_FRINFC_MIFARESTD_MAD_BLK66)) || in phFriNfc_MifStd_H_AuthSector()
1600 if (NdefMap->StdMifareContainer.ReadOnlySectorIndex && in phFriNfc_MifStd_H_AuthSector()
1601 … NdefMap->StdMifareContainer.SectorTrailerBlockNo == NdefMap->StdMifareContainer.currentBlock) in phFriNfc_MifStd_H_AuthSector()
1603 …memcpy (&NdefMap->SendRecvBuf[1], &NdefMap->StdMifareContainer.UserScrtKeyB[0], PH_FRINFC_MIFAREST… in phFriNfc_MifStd_H_AuthSector()
1637 NdefMap->CompletionRoutine[NdefMap->StdMifareContainer.CRIndex]. in phFriNfc_MifStd_H_Complete()
1646 if(NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK2) in phFriNfc_MifStd4k_H_CheckNdef()
1648 NdefMap->StdMifareContainer.currentBlock = PH_FRINFC_MIFARESTD_MAD_BLK64; in phFriNfc_MifStd4k_H_CheckNdef()
1649 NdefMap->StdMifareContainer.AuthDone = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifStd4k_H_CheckNdef()
1651 else if(NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK64) in phFriNfc_MifStd4k_H_CheckNdef()
1653 NdefMap->StdMifareContainer.currentBlock = PH_FRINFC_MIFARESTD_MAD_BLK65; in phFriNfc_MifStd4k_H_CheckNdef()
1657 NdefMap->StdMifareContainer.currentBlock = PH_FRINFC_MIFARESTD_MAD_BLK66; in phFriNfc_MifStd4k_H_CheckNdef()
1670 if( (NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK1) || in phFriNfc_MifStd_H_fillAIDarray()
1671 (NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK64)) in phFriNfc_MifStd_H_fillAIDarray()
1676 NdefMap->StdMifareContainer.aid[NdefMap->StdMifareContainer.SectorIndex] = in phFriNfc_MifStd_H_fillAIDarray()
1678 NdefMap->StdMifareContainer.SectorIndex++; in phFriNfc_MifStd_H_fillAIDarray()
1689 NdefMap->StdMifareContainer.NFCforumSectFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifStd_H_fillAIDarray()
1690 NdefMap->StdMifareContainer.aid[NdefMap->StdMifareContainer.SectorIndex] = in phFriNfc_MifStd_H_fillAIDarray()
1692 NdefMap->StdMifareContainer.SectorIndex++; in phFriNfc_MifStd_H_fillAIDarray()
1696 NdefMap->StdMifareContainer.aid[NdefMap->StdMifareContainer.SectorIndex] = in phFriNfc_MifStd_H_fillAIDarray()
1698 NdefMap->StdMifareContainer.SectorIndex++; in phFriNfc_MifStd_H_fillAIDarray()
1702 NdefMap->StdMifareContainer.aidCompleteFlag = in phFriNfc_MifStd_H_fillAIDarray()
1703 ((NdefMap->StdMifareContainer.NFCforumSectFlag == in phFriNfc_MifStd_H_fillAIDarray()
1708 NdefMap->StdMifareContainer.NFCforumSectFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifStd_H_fillAIDarray()
1709 if(NdefMap->StdMifareContainer.aidCompleteFlag == PH_FRINFC_MIFARESTD_FLAG1) in phFriNfc_MifStd_H_fillAIDarray()
1719 if((NdefMap->StdMifareContainer.aidCompleteFlag == PH_FRINFC_MIFARESTD_FLAG1) && in phFriNfc_MifStd_H_fillAIDarray()
1724 for(byteindex = NdefMap->StdMifareContainer.SectorIndex; in phFriNfc_MifStd_H_fillAIDarray()
1728 NdefMap->StdMifareContainer.aid[byteindex] = in phFriNfc_MifStd_H_fillAIDarray()
1734 else if((NdefMap->StdMifareContainer.aidCompleteFlag == PH_FRINFC_MIFARESTD_FLAG1) && in phFriNfc_MifStd_H_fillAIDarray()
1737 for(byteindex = NdefMap->StdMifareContainer.SectorIndex; in phFriNfc_MifStd_H_fillAIDarray()
1741 NdefMap->StdMifareContainer.aid[byteindex] = in phFriNfc_MifStd_H_fillAIDarray()
1755 SectorID = phFriNfc_MifStd_H_GetSect(NdefMap->StdMifareContainer.currentBlock); in phFriNfc_MifStd_H_BlkChk()
1763 SectorID = phFriNfc_MifStd_H_GetSect(NdefMap->StdMifareContainer.currentBlock); in phFriNfc_MifStd_H_BlkChk()
1784 else if(NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK64) in phFriNfc_MifStd_H_BlkChk()
1786 NdefMap->StdMifareContainer.currentBlock += PH_FRINFC_MIFARESTD_BLK4; in phFriNfc_MifStd_H_BlkChk()
1792 if(NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK63) in phFriNfc_MifStd_H_BlkChk()
1794 NdefMap->StdMifareContainer.currentBlock += PH_FRINFC_MIFARESTD_BLK4; in phFriNfc_MifStd_H_BlkChk()
1804 if(((NdefMap->StdMifareContainer.currentBlock + 1) % in phFriNfc_MifStd_H_BlkChk()
1807 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_BlkChk()
1811 if(NdefMap->StdMifareContainer.aid[SectorID] == in phFriNfc_MifStd_H_BlkChk()
1820 if((NdefMap->StdMifareContainer.currentBlock == in phFriNfc_MifStd_H_BlkChk()
1823 (NdefMap->StdMifareContainer.internalLength == 0)) in phFriNfc_MifStd_H_BlkChk()
1825 NdefMap->StdMifareContainer.AuthDone = 0; in phFriNfc_MifStd_H_BlkChk()
1831 NdefMap->StdMifareContainer.currentBlock += 16; in phFriNfc_MifStd_H_BlkChk()
1867 if( NdefMap->StdMifareContainer.ReadOnlySectorIndex && in phFriNfc_MifStd_H_RdAcsBit()
1868 NdefMap->StdMifareContainer.currentBlock == NdefMap->StdMifareContainer.SectorTrailerBlockNo) in phFriNfc_MifStd_H_RdAcsBit()
1873 if(NdefMap->StdMifareContainer.ReadAcsBitFlag == PH_FRINFC_MIFARESTD_FLAG1) in phFriNfc_MifStd_H_RdAcsBit()
1876 ((NdefMap->StdMifareContainer.currentBlock > 127)? in phFriNfc_MifStd_H_RdAcsBit()
1884 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_RdAcsBit()
1898 if((NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK0) || in phFriNfc_MifStd_H_ChkAcsBit()
1899 (NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK1) || in phFriNfc_MifStd_H_ChkAcsBit()
1900 (NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK2) || in phFriNfc_MifStd_H_ChkAcsBit()
1901 (NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK3) || in phFriNfc_MifStd_H_ChkAcsBit()
1902 (NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK64) || in phFriNfc_MifStd_H_ChkAcsBit()
1903 (NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK65) || in phFriNfc_MifStd_H_ChkAcsBit()
1904 (NdefMap->StdMifareContainer.currentBlock == PH_FRINFC_MIFARESTD_MAD_BLK66) ) in phFriNfc_MifStd_H_ChkAcsBit()
1922 NdefMap->StdMifareContainer.WriteFlag = in phFriNfc_MifStd_H_ChkAcsBit()
1924 NdefMap->StdMifareContainer.ReadFlag = in phFriNfc_MifStd_H_ChkAcsBit()
1929 NdefMap->StdMifareContainer.WriteFlag = in phFriNfc_MifStd_H_ChkAcsBit()
1931 NdefMap->StdMifareContainer.ReadFlag = in phFriNfc_MifStd_H_ChkAcsBit()
1958 NdefMap->StdMifareContainer.WriteFlag = in phFriNfc_MifStd_H_ChkAcsBit()
1960 NdefMap->StdMifareContainer.ReadFlag = in phFriNfc_MifStd_H_ChkAcsBit()
1979 NdefMap->StdMifareContainer.WriteFlag = in phFriNfc_MifStd_H_ChkAcsBit()
1981 NdefMap->StdMifareContainer.ReadFlag = in phFriNfc_MifStd_H_ChkAcsBit()
1986 NdefMap->StdMifareContainer.WriteFlag = in phFriNfc_MifStd_H_ChkAcsBit()
1988 NdefMap->StdMifareContainer.ReadFlag = in phFriNfc_MifStd_H_ChkAcsBit()
2026 else if((NdefMap->StdMifareContainer.currentBlock > 3) && in phFriNfc_MifStd_H_ChkRdWr()
2027 (NdefMap->StdMifareContainer.ChkNdefCompleteFlag == in phFriNfc_MifStd_H_ChkRdWr()
2029 (NdefMap->StdMifareContainer.currentBlock != in phFriNfc_MifStd_H_ChkRdWr()
2031 (NdefMap->StdMifareContainer.currentBlock != in phFriNfc_MifStd_H_ChkRdWr()
2047 Result = ((NdefMap->StdMifareContainer.ReadAcsBitFlag == in phFriNfc_MifStd_H_ChkRdWr()
2066 else if(NdefMap->StdMifareContainer.ReadNdefFlag == in phFriNfc_MifStd_H_ChkRdWr()
2087 else if(NdefMap->StdMifareContainer.WrNdefFlag == in phFriNfc_MifStd_H_ChkRdWr()
2092 else if(NdefMap->StdMifareContainer.RdBeforeWrFlag == in phFriNfc_MifStd_H_ChkRdWr()
2099 else if(NdefMap->StdMifareContainer.RdAfterWrFlag == in phFriNfc_MifStd_H_ChkRdWr()
2107 NdefMap->StdMifareContainer.currentBlock) && in phFriNfc_MifStd_H_ChkRdWr()
2116 Result = ((NdefMap->StdMifareContainer.ReadFlag == in phFriNfc_MifStd_H_ChkRdWr()
2145 && (NdefMap->StdMifareContainer.aid[index] == in phFriNfc_MifStd_H_ChkNdefCmpltSects()
2149 NdefMap->StdMifareContainer.NoOfNdefCompBlocks -= in phFriNfc_MifStd_H_ChkNdefCmpltSects()
2156 if(NdefMap->StdMifareContainer.aid[index] == in phFriNfc_MifStd_H_ChkNdefCmpltSects()
2160 NdefMap->StdMifareContainer.NoOfNdefCompBlocks -= in phFriNfc_MifStd_H_ChkNdefCmpltSects()
2172 if(NdefMap->StdMifareContainer.aid[index] == in phFriNfc_MifStd_H_ChkNdefCmpltSects()
2178 NdefMap->StdMifareContainer.NoOfNdefCompBlocks -= in phFriNfc_MifStd_H_ChkNdefCmpltSects()
2194 TempLength = ((NdefMap->StdMifareContainer.internalLength > 0)?
2195 NdefMap->StdMifareContainer.internalLength :
2198 if(NdefMap->StdMifareContainer.internalLength > 0)
2201 NdefMap->StdMifareContainer.internalBuf,
2359 if(((( NdefMap->StdMifareContainer.NoOfNdefCompBlocks -
2360 NdefMap->StdMifareContainer.NdefBlocks) *
2368 RemainingBytes = ((( NdefMap->StdMifareContainer.NoOfNdefCompBlocks -
2369 NdefMap->StdMifareContainer.NdefBlocks) * 16) +
2370 NdefMap->StdMifareContainer.internalLength);
2397 NdefMap->StdMifareContainer.ReadWriteCompleteFlag =
2415 NdefMap->StdMifareContainer.currentBlock++;
2416 NdefMap->StdMifareContainer.NdefBlocks++;
2420 if(NdefMap->StdMifareContainer.AuthDone == PH_FRINFC_MIFARESTD_FLAG1)
2447 NdefMap->StdMifareContainer.ReadWriteCompleteFlag =
2463 NdefMap->StdMifareContainer.currentBlock++;
2464 NdefMap->StdMifareContainer.NdefBlocks++;
2468 if(NdefMap->StdMifareContainer.AuthDone == PH_FRINFC_MIFARESTD_FLAG1)
2505 (void)memcpy(NdefMap->StdMifareContainer.internalBuf,
2510 NdefMap->StdMifareContainer.internalLength =
2539 NdefMap->StdMifareContainer.currentBlock++;
2540 NdefMap->StdMifareContainer.NdefBlocks++;
2544 if(NdefMap->StdMifareContainer.AuthDone == PH_FRINFC_MIFARESTD_FLAG1)
2571 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = (uint8_t)
2572 (((NdefMap->StdMifareContainer.remainingSize == PH_FRINFC_MIFARESTD_VAL0) ||
2578 NdefMap->StdMifareContainer.currentBlock++;
2579 NdefMap->StdMifareContainer.NdefBlocks++;
2585 (void)memcpy(NdefMap->StdMifareContainer.internalBuf,
2591 NdefMap->StdMifareContainer.internalLength =
2619 NdefMap->StdMifareContainer.currentBlock++;
2620 NdefMap->StdMifareContainer.NdefBlocks++;
2624 Result = ((NdefMap->StdMifareContainer.AuthDone ==
2659 if(NdefMap->StdMifareContainer.remainingSize < in phFriNfc_MifStd_H_RemainTLV()
2665 RemainingBytes = NdefMap->StdMifareContainer.remainingSize; in phFriNfc_MifStd_H_RemainTLV()
2680 NdefMap->StdMifareContainer.remainingSize -= RemainingBytes; in phFriNfc_MifStd_H_RemainTLV()
2686 (void)memcpy( NdefMap->StdMifareContainer.internalBuf, in phFriNfc_MifStd_H_RemainTLV()
2696 NdefMap->StdMifareContainer.internalLength = in phFriNfc_MifStd_H_RemainTLV()
2704 if(NdefMap->StdMifareContainer.internalLength == PH_FRINFC_MIFARESTD_VAL0) in phFriNfc_MifStd_H_RemainTLV()
2706 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = (uint8_t) in phFriNfc_MifStd_H_RemainTLV()
2707 (((NdefMap->StdMifareContainer.remainingSize == PH_FRINFC_MIFARESTD_VAL0) || in phFriNfc_MifStd_H_RemainTLV()
2713 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_RemainTLV()
2714 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_RemainTLV()
2740 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_RemainTLV()
2757 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_RemainTLV()
2758 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_RemainTLV()
2762 if(NdefMap->StdMifareContainer.AuthDone == PH_FRINFC_MIFARESTD_FLAG1) in phFriNfc_MifStd_H_RemainTLV()
2792 NdefMap->StdMifareContainer.remainingSize -= RemainingBytes; in phFriNfc_MifStd_H_RemainTLV()
2811 (void)memcpy( NdefMap->StdMifareContainer.internalBuf, in phFriNfc_MifStd_H_RemainTLV()
2817 NdefMap->StdMifareContainer.internalLength = in phFriNfc_MifStd_H_RemainTLV()
2822 (void)memcpy( NdefMap->StdMifareContainer.internalBuf, in phFriNfc_MifStd_H_RemainTLV()
2828 NdefMap->StdMifareContainer.internalLength = in phFriNfc_MifStd_H_RemainTLV()
2834 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = (uint8_t) in phFriNfc_MifStd_H_RemainTLV()
2835 (((NdefMap->StdMifareContainer.remainingSize == PH_FRINFC_MIFARESTD_VAL0) || in phFriNfc_MifStd_H_RemainTLV()
2841 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_RemainTLV()
2842 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_RemainTLV()
2863 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_RemainTLV()
2872 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_RemainTLV()
2873 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_RemainTLV()
2877 Result = ((NdefMap->StdMifareContainer.AuthDone == in phFriNfc_MifStd_H_RemainTLV()
2888 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = (uint8_t) in phFriNfc_MifStd_H_RemainTLV()
2889 (((NdefMap->StdMifareContainer.remainingSize == PH_FRINFC_MIFARESTD_VAL0) || in phFriNfc_MifStd_H_RemainTLV()
2937 if(NdefMap->StdMifareContainer.remainingSize < in phFriNfc_MifStd_H_IntLenWioutNdef()
2943 RemainingBytes = NdefMap->StdMifareContainer.remainingSize; in phFriNfc_MifStd_H_IntLenWioutNdef()
2948 NdefMap->StdMifareContainer.internalLength) && in phFriNfc_MifStd_H_IntLenWioutNdef()
2953 &(NdefMap->StdMifareContainer.internalBuf[ in phFriNfc_MifStd_H_IntLenWioutNdef()
2957 NdefMap->StdMifareContainer.remainingSize -= RemainingBytes; in phFriNfc_MifStd_H_IntLenWioutNdef()
2962 (void)memcpy( NdefMap->StdMifareContainer.internalBuf, in phFriNfc_MifStd_H_IntLenWioutNdef()
2963 &(NdefMap->StdMifareContainer.internalBuf[RemainingBytes]), in phFriNfc_MifStd_H_IntLenWioutNdef()
2964 (NdefMap->StdMifareContainer.internalLength - RemainingBytes)); in phFriNfc_MifStd_H_IntLenWioutNdef()
2967 NdefMap->StdMifareContainer.internalLength -= RemainingBytes; in phFriNfc_MifStd_H_IntLenWioutNdef()
2970 if(NdefMap->StdMifareContainer.internalLength == PH_FRINFC_MIFARESTD_VAL0) in phFriNfc_MifStd_H_IntLenWioutNdef()
2972 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = (uint8_t) in phFriNfc_MifStd_H_IntLenWioutNdef()
2973 (((NdefMap->StdMifareContainer.remainingSize == PH_FRINFC_MIFARESTD_VAL0) || in phFriNfc_MifStd_H_IntLenWioutNdef()
2979 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_IntLenWioutNdef()
2980 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_IntLenWioutNdef()
2997 NdefMap->StdMifareContainer.internalLength) && in phFriNfc_MifStd_H_IntLenWioutNdef()
3001 &(NdefMap->StdMifareContainer.internalBuf[(*TempintBytes)]), in phFriNfc_MifStd_H_IntLenWioutNdef()
3005 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_IntLenWioutNdef()
3016 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = (uint8_t) in phFriNfc_MifStd_H_IntLenWioutNdef()
3017 (((NdefMap->StdMifareContainer.remainingSize == PH_FRINFC_MIFARESTD_VAL0) || in phFriNfc_MifStd_H_IntLenWioutNdef()
3024 NdefMap->StdMifareContainer.ReadWriteCompleteFlag) in phFriNfc_MifStd_H_IntLenWioutNdef()
3032 NdefMap->StdMifareContainer.internalLength) in phFriNfc_MifStd_H_IntLenWioutNdef()
3037 NdefMap->StdMifareContainer.internalLength = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifStd_H_IntLenWioutNdef()
3040 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_IntLenWioutNdef()
3041 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_IntLenWioutNdef()
3046 ((NdefMap->StdMifareContainer.AuthDone == PH_FRINFC_MIFARESTD_FLAG1)? in phFriNfc_MifStd_H_IntLenWioutNdef()
3060 NdefMap->StdMifareContainer.internalLength) && in phFriNfc_MifStd_H_IntLenWioutNdef()
3061 (RemainingBytes <= NdefMap->StdMifareContainer.internalLength)) in phFriNfc_MifStd_H_IntLenWioutNdef()
3064 &(NdefMap->StdMifareContainer.internalBuf[(*TempintBytes)]), in phFriNfc_MifStd_H_IntLenWioutNdef()
3068 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_IntLenWioutNdef()
3076 (void)memcpy( NdefMap->StdMifareContainer.internalBuf, in phFriNfc_MifStd_H_IntLenWioutNdef()
3077 &(NdefMap->StdMifareContainer.internalBuf[RemainingBytes]), in phFriNfc_MifStd_H_IntLenWioutNdef()
3078 (NdefMap->StdMifareContainer.internalLength - RemainingBytes)); in phFriNfc_MifStd_H_IntLenWioutNdef()
3081 NdefMap->StdMifareContainer.internalLength -= RemainingBytes; in phFriNfc_MifStd_H_IntLenWioutNdef()
3082 if(NdefMap->StdMifareContainer.internalLength == PH_FRINFC_MIFARESTD_VAL0) in phFriNfc_MifStd_H_IntLenWioutNdef()
3084 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = (uint8_t) in phFriNfc_MifStd_H_IntLenWioutNdef()
3085 (((NdefMap->StdMifareContainer.remainingSize == PH_FRINFC_MIFARESTD_VAL0) || in phFriNfc_MifStd_H_IntLenWioutNdef()
3091 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_IntLenWioutNdef()
3092 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_IntLenWioutNdef()
3102 NdefMap->StdMifareContainer.internalLength) && in phFriNfc_MifStd_H_IntLenWioutNdef()
3103 (RemainingBytes > NdefMap->StdMifareContainer.internalLength)) in phFriNfc_MifStd_H_IntLenWioutNdef()
3106 &(NdefMap->StdMifareContainer.internalBuf[(*TempintBytes)]), in phFriNfc_MifStd_H_IntLenWioutNdef()
3107 NdefMap->StdMifareContainer.internalLength); in phFriNfc_MifStd_H_IntLenWioutNdef()
3109 NdefMap->ApduBuffIndex += NdefMap->StdMifareContainer.internalLength; in phFriNfc_MifStd_H_IntLenWioutNdef()
3110 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_IntLenWioutNdef()
3111 NdefMap->StdMifareContainer.internalLength; in phFriNfc_MifStd_H_IntLenWioutNdef()
3112 NdefMap->TLVStruct.BytesRemainLinTLV -= NdefMap->StdMifareContainer.internalLength; in phFriNfc_MifStd_H_IntLenWioutNdef()
3119 NdefMap->StdMifareContainer.internalLength = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifStd_H_IntLenWioutNdef()
3121 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_IntLenWioutNdef()
3122 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_IntLenWioutNdef()
3126 Result = ((NdefMap->StdMifareContainer.AuthDone == in phFriNfc_MifStd_H_IntLenWioutNdef()
3136 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = (uint8_t) in phFriNfc_MifStd_H_IntLenWioutNdef()
3137 (((NdefMap->StdMifareContainer.remainingSize == PH_FRINFC_MIFARESTD_VAL0) || in phFriNfc_MifStd_H_IntLenWioutNdef()
3161 if(((( NdefMap->StdMifareContainer.NoOfNdefCompBlocks -
3162 NdefMap->StdMifareContainer.NdefBlocks) *
3164 (NdefMap->StdMifareContainer.internalLength -
3171 RemainingBytes = ((( NdefMap->StdMifareContainer.NoOfNdefCompBlocks -
3172 NdefMap->StdMifareContainer.NdefBlocks) * 16) +
3173 (NdefMap->StdMifareContainer.internalLength -
3192 CRFlag =(uint8_t) ((NdefMap->StdMifareContainer.internalBuf[(*TempintBytes)]!=
3199 NdefMap->StdMifareContainer.ReadWriteCompleteFlag =
3212 if(*TempintBytes == NdefMap->StdMifareContainer.internalLength)
3214 NdefMap->StdMifareContainer.internalLength = PH_FRINFC_MIFARESTD_VAL0;
3218 NdefMap->StdMifareContainer.currentBlock++;
3219 NdefMap->StdMifareContainer.NdefBlocks++;
3224 ((NdefMap->StdMifareContainer.AuthDone == PH_FRINFC_MIFARESTD_FLAG1)?
3234 CRFlag = (uint8_t)((NdefMap->StdMifareContainer.internalBuf[(*TempintBytes)]==
3241 NdefMap->StdMifareContainer.ReadWriteCompleteFlag =
3252 NdefMap->StdMifareContainer.ReadWriteCompleteFlag =
3263 if(*TempintBytes == NdefMap->StdMifareContainer.internalLength)
3265 NdefMap->StdMifareContainer.internalLength = PH_FRINFC_MIFARESTD_VAL0;
3269 NdefMap->StdMifareContainer.currentBlock++;
3270 NdefMap->StdMifareContainer.NdefBlocks++;
3274 Result = ((NdefMap->StdMifareContainer.AuthDone ==
3283 (NdefMap->StdMifareContainer.internalLength - *TempintBytes)) &&
3289 &(NdefMap->StdMifareContainer.internalBuf[
3301 (void)memcpy( NdefMap->StdMifareContainer.internalBuf,
3302 &(NdefMap->StdMifareContainer.internalBuf[
3305 NdefMap->StdMifareContainer.internalLength -= (*TempintBytes +
3312 (NdefMap->StdMifareContainer.internalLength - *TempintBytes)) &&
3318 &(NdefMap->StdMifareContainer.internalBuf[
3329 if(*TempintBytes == NdefMap->StdMifareContainer.internalLength)
3332 NdefMap->StdMifareContainer.currentBlock++;
3333 NdefMap->StdMifareContainer.NdefBlocks++;
3337 Result = ((NdefMap->StdMifareContainer.AuthDone ==
3346 (NdefMap->StdMifareContainer.internalLength - *TempintBytes)) &&
3347 (RemainingBytes <= (NdefMap->StdMifareContainer.internalLength -
3353 &(NdefMap->StdMifareContainer.internalBuf[
3362 (void)memcpy(NdefMap->StdMifareContainer.internalBuf,
3363 &(NdefMap->StdMifareContainer.internalBuf[(*TempintBytes)]),
3364 (NdefMap->StdMifareContainer.internalLength - *TempintBytes));
3367 NdefMap->StdMifareContainer.internalLength -= *TempintBytes;
3374 (NdefMap->StdMifareContainer.internalLength - *TempintBytes)) &&
3375 (RemainingBytes > (NdefMap->StdMifareContainer.internalLength -
3381 &(NdefMap->StdMifareContainer.internalBuf[
3383 (NdefMap->StdMifareContainer.internalLength -
3385 NdefMap->ApduBuffIndex += (NdefMap->StdMifareContainer.internalLength -
3388 (NdefMap->StdMifareContainer.internalLength - *TempintBytes);
3389 *TempintBytes += (uint8_t)(NdefMap->StdMifareContainer.internalLength -
3392 NdefMap->StdMifareContainer.internalLength -= *TempintBytes;
3395 NdefMap->StdMifareContainer.currentBlock++;
3396 NdefMap->StdMifareContainer.NdefBlocks++;
3400 Result = ((NdefMap->StdMifareContainer.AuthDone ==
3410 if(((( NdefMap->StdMifareContainer.NoOfNdefCompBlocks -
3411 NdefMap->StdMifareContainer.NdefBlocks) *
3413 NdefMap->StdMifareContainer.internalLength) ==
3416 NdefMap->StdMifareContainer.ReadWriteCompleteFlag =
3444 if(NdefMap->StdMifareContainer.currentBlock == in phFriNfc_MifStd_H_WriteNdefLen()
3471 (void)memcpy( NdefMap->StdMifareContainer.Buffer, in phFriNfc_MifStd_H_WriteNdefLen()
3506 if((NdefMap->StdMifareContainer.NoOfNdefCompBlocks !=
3508 (NdefMap->StdMifareContainer.NoOfNdefCompBlocks <=
3513 NdefMap->StdMifareContainer.currentBlock = 4;
3514 NdefMap->StdMifareContainer.AuthDone = PH_FRINFC_MIFARESTD_FLAG0;
3517 (NdefMap->StdMifareContainer.AuthDone ==
3520 NdefMap->StdMifareContainer.ReadAcsBitFlag = 0;
3534 NdefMap->StdMifareContainer.currentBlock = PH_FRINFC_MIFARESTD_BLK4; in phFriNfc_MifStd_H_RdWrReset()
3535 NdefMap->StdMifareContainer.NdefBlocks = PH_FRINFC_MIFARESTD_VAL1; in phFriNfc_MifStd_H_RdWrReset()
3544 NdefMap->StdMifareContainer.internalLength = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifStd_H_RdWrReset()
3545 NdefMap->StdMifareContainer.AuthDone = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifStd_H_RdWrReset()
3546 NdefMap->StdMifareContainer.NFCforumSectFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifStd_H_RdWrReset()
3547 NdefMap->StdMifareContainer.FirstReadFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifStd_H_RdWrReset()
3548 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifStd_H_RdWrReset()
3549 NdefMap->StdMifareContainer.remainingSize = (uint16_t) in phFriNfc_MifStd_H_RdWrReset()
3550 (NdefMap->StdMifareContainer.NoOfNdefCompBlocks * in phFriNfc_MifStd_H_RdWrReset()
3552 NdefMap->StdMifareContainer.WrLength = PH_FRINFC_MIFARESTD_VAL1; in phFriNfc_MifStd_H_RdWrReset()
3563 NdefMap->StdMifareContainer.AuthDone = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifStd_H_RdtoWrNdefLen()
3568 NdefMap->SendRecvBuf[0] = NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_RdtoWrNdefLen()
3596 == phFriNfc_MifStd_H_GetSect(NdefMap->StdMifareContainer.currentBlock))? in phFriNfc_MifStd_H_SetNdefBlkAuth()
3607 Result = ((NdefMap->StdMifareContainer.AuthDone == in phFriNfc_MifStd_H_GetActCardLen()
3611 NdefMap->StdMifareContainer.currentBlock)); in phFriNfc_MifStd_H_GetActCardLen()
3649 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_ChkTLVs()
3685 if((((( NdefMap->StdMifareContainer.NoOfNdefCompBlocks - in phFriNfc_MifStd_H_ChkTLVs()
3686 NdefMap->StdMifareContainer.NdefBlocks) * in phFriNfc_MifStd_H_ChkTLVs()
3703 if((((( NdefMap->StdMifareContainer.NoOfNdefCompBlocks - in phFriNfc_MifStd_H_ChkTLVs()
3704 NdefMap->StdMifareContainer.NdefBlocks) * in phFriNfc_MifStd_H_ChkTLVs()
3730 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ChkTLVs()
3733 NdefMap->StdMifareContainer.remSizeUpdFlag = in phFriNfc_MifStd_H_ChkTLVs()
3743 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ChkTLVs()
3834 if(((( NdefMap->StdMifareContainer.NoOfNdefCompBlocks - in phFriNfc_MifStd_H_ChkTLVs()
3835 NdefMap->StdMifareContainer.NdefBlocks) * in phFriNfc_MifStd_H_ChkTLVs()
3856 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ChkTLVs()
3862 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ChkTLVs()
3890 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = in phFriNfc_MifStd_H_ChkTLVs()
3900 NdefMap->StdMifareContainer.remainingSize -= PH_FRINFC_MIFARESTD_VAL1; in phFriNfc_MifStd_H_ChkTLVs()
3901 if(NdefMap->StdMifareContainer.remainingSize < in phFriNfc_MifStd_H_ChkTLVs()
3923 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ChkTLVs()
3930 NdefMap->StdMifareContainer.remainingSize) in phFriNfc_MifStd_H_ChkTLVs()
3937 if(NdefMap->StdMifareContainer.remainingSize == in phFriNfc_MifStd_H_ChkTLVs()
4022 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_GetNxtTLV()
4023 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_GetNxtTLV()
4033 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_GetNxtTLV()
4034 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_GetNxtTLV()
4047 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_Chk16Bytes()
4048 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_Chk16Bytes()
4052 ((NdefMap->StdMifareContainer.AuthDone == PH_FRINFC_MIFARESTD_FLAG1)? in phFriNfc_MifStd_H_Chk16Bytes()
4085 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ChkRemainTLVs()
4089 NdefMap->StdMifareContainer.remainingSize)? in phFriNfc_MifStd_H_ChkRemainTLVs()
4109 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ChkRemainTLVs()
4129 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ChkRemainTLVs()
4135 NdefMap->StdMifareContainer.remainingSize)? in phFriNfc_MifStd_H_ChkRemainTLVs()
4156 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ChkRemainTLVs()
4188 if(((( NdefMap->StdMifareContainer.NoOfNdefCompBlocks - in phFriNfc_MifStd_H_ChkRemainTLVs()
4189 NdefMap->StdMifareContainer.NdefBlocks) * in phFriNfc_MifStd_H_ChkRemainTLVs()
4202 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ChkRemainTLVs()
4209 NdefMap->StdMifareContainer.remainingSize) in phFriNfc_MifStd_H_ChkRemainTLVs()
4219 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ChkRemainTLVs()
4242 switch((NdefMap->StdMifareContainer.currentBlock % 4)) in phFriNfc_MifStd_H_Get1kStTrail()
4246 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get1kStTrail()
4252 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get1kStTrail()
4258 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get1kStTrail()
4264 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_Get1kStTrail()
4271 switch((NdefMap->StdMifareContainer.currentBlock % 16)) in phFriNfc_MifStd_H_Get4kStTrail()
4275 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4281 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4287 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4293 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4299 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4305 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4311 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4317 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4323 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4329 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4335 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4341 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4347 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4353 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4359 (NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_Get4kStTrail()
4365 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_Get4kStTrail()
4375 if(NdefMap->StdMifareContainer.currentBlock == in phFriNfc_MifStd_H_ProChkNdef()
4381 NdefMap->StdMifareContainer.currentBlock = PH_FRINFC_MIFARESTD_VAL2; in phFriNfc_MifStd_H_ProChkNdef()
4383 Result = ((NdefMap->StdMifareContainer.aidCompleteFlag == in phFriNfc_MifStd_H_ProChkNdef()
4389 (NdefMap->StdMifareContainer.currentBlock == in phFriNfc_MifStd_H_ProChkNdef()
4391 (NdefMap->StdMifareContainer.currentBlock == in phFriNfc_MifStd_H_ProChkNdef()
4399 NdefMap->StdMifareContainer.aidCompleteFlag = in phFriNfc_MifStd_H_ProChkNdef()
4402 else if((NdefMap->StdMifareContainer.currentBlock > in phFriNfc_MifStd_H_ProChkNdef()
4410 Result = ((NdefMap->StdMifareContainer.aidCompleteFlag == in phFriNfc_MifStd_H_ProChkNdef()
4425 if(NdefMap->StdMifareContainer.aidCompleteFlag == in phFriNfc_MifStd_H_ProChkNdef()
4428 NdefMap->StdMifareContainer.ChkNdefCompleteFlag = in phFriNfc_MifStd_H_ProChkNdef()
4436 if((NdefMap->StdMifareContainer.NoOfNdefCompBlocks == 0) || in phFriNfc_MifStd_H_ProChkNdef()
4437 (NdefMap->StdMifareContainer.NoOfNdefCompBlocks > 255)) in phFriNfc_MifStd_H_ProChkNdef()
4444 NdefMap->StdMifareContainer.aidCompleteFlag = in phFriNfc_MifStd_H_ProChkNdef()
4446 NdefMap->StdMifareContainer.NFCforumSectFlag = in phFriNfc_MifStd_H_ProChkNdef()
4448 NdefMap->StdMifareContainer.currentBlock = PH_FRINFC_MIFARESTD_BLK4; in phFriNfc_MifStd_H_ProChkNdef()
4466 NdefMap->StdMifareContainer.AuthDone = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifStd_H_ProAuth()
4471 NdefMap->StdMifareContainer.AuthDone = 1; in phFriNfc_MifStd_H_ProAuth()
4472 NdefMap->StdMifareContainer.ReadAcsBitFlag = 1; in phFriNfc_MifStd_H_ProAuth()
4511 if(NdefMap->StdMifareContainer.ReadAcsBitFlag == in phFriNfc_MifStd_H_ProAcsBits()
4517 if((NdefMap->StdMifareContainer.ChkNdefFlag == in phFriNfc_MifStd_H_ProAcsBits()
4524 NdefMap->StdMifareContainer.NoOfNdefCompBlocks = in phFriNfc_MifStd_H_ProAcsBits()
4525 ((NdefMap->StdMifareContainer.currentBlock >= in phFriNfc_MifStd_H_ProAcsBits()
4527 (NdefMap->StdMifareContainer.NoOfNdefCompBlocks - in phFriNfc_MifStd_H_ProAcsBits()
4529 (NdefMap->StdMifareContainer.NoOfNdefCompBlocks - in phFriNfc_MifStd_H_ProAcsBits()
4532 NdefMap->StdMifareContainer.ProprforumSectFlag = in phFriNfc_MifStd_H_ProAcsBits()
4533 ((NdefMap->StdMifareContainer.NFCforumSectFlag == in phFriNfc_MifStd_H_ProAcsBits()
4542 NdefMap->StdMifareContainer.NFCforumSectFlag = in phFriNfc_MifStd_H_ProAcsBits()
4543 (((NdefMap->StdMifareContainer.currentBlock == 64) && in phFriNfc_MifStd_H_ProAcsBits()
4545 NdefMap->StdMifareContainer.NFCforumSectFlag: in phFriNfc_MifStd_H_ProAcsBits()
4549 if(NdefMap->StdMifareContainer.ProprforumSectFlag != in phFriNfc_MifStd_H_ProAcsBits()
4552 NdefMap->StdMifareContainer.ReadAcsBitFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifStd_H_ProAcsBits()
4558 NdefMap->StdMifareContainer.ReadCompleteFlag = in phFriNfc_MifStd_H_ProAcsBits()
4559 (uint8_t)((((((NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_ProAcsBits()
4564 (NdefMap->StdMifareContainer.ReadCompleteFlag == in phFriNfc_MifStd_H_ProAcsBits()
4566 (NdefMap->StdMifareContainer.ReadCompleteFlag == in phFriNfc_MifStd_H_ProAcsBits()
4571 NdefMap->StdMifareContainer.ReadCompleteFlag = in phFriNfc_MifStd_H_ProAcsBits()
4572 (uint8_t)((((((uint16_t)(NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_ProAcsBits()
4577 (NdefMap->StdMifareContainer.ReadCompleteFlag == in phFriNfc_MifStd_H_ProAcsBits()
4579 (NdefMap->StdMifareContainer.ReadCompleteFlag == in phFriNfc_MifStd_H_ProAcsBits()
4584 NdefMap->StdMifareContainer.currentBlock = in phFriNfc_MifStd_H_ProAcsBits()
4585 ((NdefMap->StdMifareContainer.ReadCompleteFlag == in phFriNfc_MifStd_H_ProAcsBits()
4588 NdefMap->StdMifareContainer.currentBlock); in phFriNfc_MifStd_H_ProAcsBits()
4591 ((NdefMap->StdMifareContainer.ReadCompleteFlag == in phFriNfc_MifStd_H_ProAcsBits()
4604 NdefMap->StdMifareContainer.ChkNdefFlag = in phFriNfc_MifStd_H_ProAcsBits()
4646 NdefMap->CardState = (((NdefMap->StdMifareContainer.ChkNdefFlag == in phFriNfc_MifStd_H_GPBChk()
4648 (NdefMap->StdMifareContainer.ReadNdefFlag == in phFriNfc_MifStd_H_GPBChk()
4650 (NdefMap->StdMifareContainer.WrNdefFlag == in phFriNfc_MifStd_H_GPBChk()
4683 if(NdefMap->StdMifareContainer.NFCforumSectFlag == in phFriNfc_MifStd_H_ProStatNotValid()
4686 NdefMap->StdMifareContainer.ProprforumSectFlag = in phFriNfc_MifStd_H_ProStatNotValid()
4688 if(NdefMap->StdMifareContainer.currentBlock < in phFriNfc_MifStd_H_ProStatNotValid()
4698 if(((NdefMap->StdMifareContainer.currentBlock < in phFriNfc_MifStd_H_ProStatNotValid()
4701 ((NdefMap->StdMifareContainer.currentBlock <= in phFriNfc_MifStd_H_ProStatNotValid()
4708 else if((NdefMap->StdMifareContainer.currentBlock < in phFriNfc_MifStd_H_ProStatNotValid()
4713 NdefMap->StdMifareContainer.currentBlock = in phFriNfc_MifStd_H_ProStatNotValid()
4718 if(((NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_ProStatNotValid()
4728 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ProStatNotValid()
4730 NdefMap->StdMifareContainer.currentBlock += in phFriNfc_MifStd_H_ProStatNotValid()
4735 else if((NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_ProStatNotValid()
4744 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ProStatNotValid()
4746 NdefMap->StdMifareContainer.currentBlock += in phFriNfc_MifStd_H_ProStatNotValid()
4755 else if((NdefMap->StdMifareContainer.ProprforumSectFlag == in phFriNfc_MifStd_H_ProStatNotValid()
4757 (NdefMap->StdMifareContainer.NFCforumSectFlag == in phFriNfc_MifStd_H_ProStatNotValid()
4769 NdefMap->StdMifareContainer.ProprforumSectFlag = in phFriNfc_MifStd_H_ProStatNotValid()
4799 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = in phFriNfc_MifStd_H_ProStatNotValid()
4802 NdefMap->StdMifareContainer.TempBlockNo = in phFriNfc_MifStd_H_ProStatNotValid()
4803 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_ProStatNotValid()
4805 NdefMap->StdMifareContainer.currentBlock = in phFriNfc_MifStd_H_ProStatNotValid()
4821 NdefMap->StdMifareContainer.currentBlock); in phFriNfc_MifStd_H_RdBeforeWr()
4838 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_ProBytesToWr()
4840 TempLength = ((NdefMap->StdMifareContainer.currentBlock == in phFriNfc_MifStd_H_ProBytesToWr()
4845 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ProBytesToWr()
4846 ((NdefMap->StdMifareContainer.remSizeUpdFlag == in phFriNfc_MifStd_H_ProBytesToWr()
4851 NdefMap->StdMifareContainer.remSizeUpdFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifStd_H_ProBytesToWr()
4946 RemainingBytes = (uint16_t)((NdefMap->StdMifareContainer.remainingSize in phFriNfc_MifStd_H_fillSendBuf()
4949 NdefMap->StdMifareContainer.remainingSize: in phFriNfc_MifStd_H_fillSendBuf()
4954 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_fillSendBuf()
4959 NdefMap->StdMifareContainer.internalLength))? in phFriNfc_MifStd_H_fillSendBuf()
4962 NdefMap->StdMifareContainer.internalLength)); in phFriNfc_MifStd_H_fillSendBuf()
4964 if(NdefMap->StdMifareContainer.internalLength > in phFriNfc_MifStd_H_fillSendBuf()
4970 NdefMap->StdMifareContainer.internalBuf, in phFriNfc_MifStd_H_fillSendBuf()
4971 NdefMap->StdMifareContainer.internalLength); in phFriNfc_MifStd_H_fillSendBuf()
4977 NdefMap->StdMifareContainer.internalLength)]), in phFriNfc_MifStd_H_fillSendBuf()
4987 ((BytesToWrite + NdefMap->StdMifareContainer.internalLength in phFriNfc_MifStd_H_fillSendBuf()
4992 if((BytesToWrite + NdefMap->StdMifareContainer.internalLength + in phFriNfc_MifStd_H_fillSendBuf()
4996 NdefMap->StdMifareContainer.internalLength + in phFriNfc_MifStd_H_fillSendBuf()
5003 NdefMap->StdMifareContainer.internalLength))? in phFriNfc_MifStd_H_fillSendBuf()
5018 (void)memcpy(NdefMap->StdMifareContainer.Buffer, in phFriNfc_MifStd_H_fillSendBuf()
5078 (NdefMap->StdMifareContainer.currentBlock == in phFriNfc_MifStd_H_ProWrTLV()
5083 NdefMap->StdMifareContainer.RdBeforeWrFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifStd_H_ProWrTLV()
5084 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_ProWrTLV()
5085 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_ProWrTLV()
5089 Result = ((NdefMap->StdMifareContainer.AuthDone == in phFriNfc_MifStd_H_ProWrTLV()
5097 NdefMap->StdMifareContainer.RdBeforeWrFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifStd_H_ProWrTLV()
5104 NdefMap->StdMifareContainer.internalLength = in phFriNfc_MifStd_H_ProWrTLV()
5109 (void)memcpy( NdefMap->StdMifareContainer.internalBuf, in phFriNfc_MifStd_H_ProWrTLV()
5110 NdefMap->StdMifareContainer.Buffer, in phFriNfc_MifStd_H_ProWrTLV()
5111 NdefMap->StdMifareContainer.internalLength); in phFriNfc_MifStd_H_ProWrTLV()
5117 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ProWrTLV()
5121 if((NdefMap->StdMifareContainer.remainingSize == in phFriNfc_MifStd_H_ProWrTLV()
5125 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = in phFriNfc_MifStd_H_ProWrTLV()
5126 (uint8_t)((NdefMap->StdMifareContainer.remainingSize == 0)? in phFriNfc_MifStd_H_ProWrTLV()
5129 if(NdefMap->StdMifareContainer.internalLength == in phFriNfc_MifStd_H_ProWrTLV()
5132 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_ProWrTLV()
5136 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_ProWrTLV()
5140 (uint8_t)(((NdefMap->StdMifareContainer.remainingSize == in phFriNfc_MifStd_H_ProWrTLV()
5150 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_ProWrTLV()
5156 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_ProWrTLV()
5157 Result = ((NdefMap->StdMifareContainer.AuthDone == in phFriNfc_MifStd_H_ProWrTLV()
5169 (NdefMap->StdMifareContainer.remainingSize > in phFriNfc_MifStd_H_ProWrTLV()
5181 NdefMap->StdMifareContainer.TempBlockNo = in phFriNfc_MifStd_H_ProWrTLV()
5182 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_ProWrTLV()
5184 NdefMap->StdMifareContainer.currentBlock = in phFriNfc_MifStd_H_ProWrTLV()
5259 NdefMap->StdMifareContainer.RdAfterWrFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifStd_H_fillTLV1()
5281 NdefMap->StdMifareContainer.RdAfterWrFlag = in phFriNfc_MifStd_H_fillTLV1()
5306 NdefMap->StdMifareContainer.RdAfterWrFlag = in phFriNfc_MifStd_H_fillTLV1()
5319 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_fillTLV1()
5346 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_fillTLV1()
5366 NdefMap->StdMifareContainer.RdAfterWrFlag = in phFriNfc_MifStd_H_fillTLV1()
5382 NdefMap->StdMifareContainer.RdAfterWrFlag = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifStd_H_fillTLV2()
5406 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_fillTLV2()
5466 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_fillTLV2()
5475 NdefMap->StdMifareContainer.RdAfterWrFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifStd_H_fillTLV2()
5490 NdefMap->StdMifareContainer.currentBlock--; in phFriNfc_MifStd_H_CallWrNdefLen()
5498 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_CallWrNdefLen()
5510 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_CallWrNdefLen()
5531 SectorID = phFriNfc_MifStd_H_GetSect(NdefMap->StdMifareContainer.currentBlock); in phFriNfc_MifStd_H_BlkChk_1()
5535 if((NdefMap->StdMifareContainer.aid[SectorID] == in phFriNfc_MifStd_H_BlkChk_1()
5542 if(NdefMap->StdMifareContainer.currentBlock > 128) in phFriNfc_MifStd_H_BlkChk_1()
5545 ((((NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_BlkChk_1()
5552 NdefMap->StdMifareContainer.currentBlock -= in phFriNfc_MifStd_H_BlkChk_1()
5553 ((((NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_BlkChk_1()
5564 ((((NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_BlkChk_1()
5571 NdefMap->StdMifareContainer.currentBlock -= in phFriNfc_MifStd_H_BlkChk_1()
5572 ((((NdefMap->StdMifareContainer.currentBlock + in phFriNfc_MifStd_H_BlkChk_1()
5601 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_fillTLV1_1()
5616 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_fillTLV1_1()
5630 NdefMap->StdMifareContainer.RdAfterWrFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifStd_H_fillTLV1_1()
5662 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_fillTLV2_1()
5696 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_fillTLV2_1()
5707 NdefMap->StdMifareContainer.RdAfterWrFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifStd_H_fillTLV2_1()
5717 NdefMap->StdMifareContainer.currentBlock); in phFriNfc_MifStd_H_RdTLV()
5768 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_WrTermTLV()
5791 NdefMap->StdMifareContainer.WrLength = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifStd_H_ProWrABlock()
5796 if(NdefMap->StdMifareContainer.RemainingBufFlag == in phFriNfc_MifStd_H_ProWrABlock()
5800 NdefMap->StdMifareContainer.internalLength = in phFriNfc_MifStd_H_ProWrABlock()
5805 (void)memcpy( NdefMap->StdMifareContainer.internalBuf, in phFriNfc_MifStd_H_ProWrABlock()
5806 NdefMap->StdMifareContainer.Buffer, in phFriNfc_MifStd_H_ProWrABlock()
5807 NdefMap->StdMifareContainer.internalLength); in phFriNfc_MifStd_H_ProWrABlock()
5812 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ProWrABlock()
5815 NdefMap->StdMifareContainer.RemainingBufFlag = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifStd_H_ProWrABlock()
5817 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = in phFriNfc_MifStd_H_ProWrABlock()
5818 (uint8_t)((NdefMap->StdMifareContainer.remainingSize == in phFriNfc_MifStd_H_ProWrABlock()
5824 (uint8_t)(((NdefMap->StdMifareContainer.remainingSize == in phFriNfc_MifStd_H_ProWrABlock()
5832 else if(NdefMap->StdMifareContainer.internalBufFlag == in phFriNfc_MifStd_H_ProWrABlock()
5835 (void)memcpy(NdefMap->StdMifareContainer.internalBuf, in phFriNfc_MifStd_H_ProWrABlock()
5836 NdefMap->StdMifareContainer.Buffer, in phFriNfc_MifStd_H_ProWrABlock()
5839 NdefMap->StdMifareContainer.internalLength = in phFriNfc_MifStd_H_ProWrABlock()
5846 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ProWrABlock()
5849 NdefMap->StdMifareContainer.internalBufFlag = in phFriNfc_MifStd_H_ProWrABlock()
5852 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = in phFriNfc_MifStd_H_ProWrABlock()
5853 (uint8_t)(((NdefMap->StdMifareContainer.remainingSize == in phFriNfc_MifStd_H_ProWrABlock()
5855 (NdefMap->StdMifareContainer.internalLength == in phFriNfc_MifStd_H_ProWrABlock()
5861 (uint8_t)(((NdefMap->StdMifareContainer.remainingSize == in phFriNfc_MifStd_H_ProWrABlock()
5870 NdefMap->StdMifareContainer.internalLength = 0; in phFriNfc_MifStd_H_ProWrABlock()
5874 NdefMap->StdMifareContainer.remainingSize -= in phFriNfc_MifStd_H_ProWrABlock()
5878 if((NdefMap->StdMifareContainer.remainingSize == in phFriNfc_MifStd_H_ProWrABlock()
5882 NdefMap->StdMifareContainer.ReadWriteCompleteFlag = in phFriNfc_MifStd_H_ProWrABlock()
5883 (uint8_t)((NdefMap->StdMifareContainer.remainingSize == 0)? in phFriNfc_MifStd_H_ProWrABlock()
5886 if(NdefMap->StdMifareContainer.internalLength == in phFriNfc_MifStd_H_ProWrABlock()
5889 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_ProWrABlock()
5892 Result = ((NdefMap->StdMifareContainer.remainingSize == 0)? in phFriNfc_MifStd_H_ProWrABlock()
5895 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_ProWrABlock()
5898 (uint8_t)(((NdefMap->StdMifareContainer.remainingSize == in phFriNfc_MifStd_H_ProWrABlock()
5907 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd_H_ProWrABlock()
5908 NdefMap->StdMifareContainer.WrLength = in phFriNfc_MifStd_H_ProWrABlock()
5915 NdefMap->StdMifareContainer.NdefBlocks++; in phFriNfc_MifStd_H_ProWrABlock()
5916 Result = ((NdefMap->StdMifareContainer.AuthDone == in phFriNfc_MifStd_H_ProWrABlock()
5933 (NdefMap->StdMifareContainer.remainingSize > in phFriNfc_MifStd_H_ProWrABlock()
5945 NdefMap->StdMifareContainer.TempBlockNo = in phFriNfc_MifStd_H_ProWrABlock()
5946 NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_ProWrABlock()
5948 NdefMap->StdMifareContainer.currentBlock = in phFriNfc_MifStd_H_ProWrABlock()
5998 NdefMap->StdMifareContainer.DevInputParam); in phFriNfc_MifStd_H_CallPoll()
6013 NdefMap->StdMifareContainer.DevInputParam); in phFriNfc_MifStd_H_CallConnect()
6022 if(((NdefMap->StdMifareContainer.currentBlock + PH_FRINFC_MIFARESTD_INC_1) % in phFriNfc_MifStd1k_H_BlkChk()
6025 NdefMap->StdMifareContainer.currentBlock++; in phFriNfc_MifStd1k_H_BlkChk()
6029 if(NdefMap->StdMifareContainer.aid[SectorID] == in phFriNfc_MifStd1k_H_BlkChk()
6036 if((NdefMap->StdMifareContainer.currentBlock == in phFriNfc_MifStd1k_H_BlkChk()
6038 (NdefMap->StdMifareContainer.internalLength == 0)) in phFriNfc_MifStd1k_H_BlkChk()
6040 NdefMap->StdMifareContainer.AuthDone = 0; in phFriNfc_MifStd1k_H_BlkChk()
6046 NdefMap->StdMifareContainer.currentBlock += PH_FRINFC_MIFARESTD_BLK4; in phFriNfc_MifStd1k_H_BlkChk()
6092 memset (NdefMap->StdMifareContainer.UserScrtKeyB, PH_FRINFC_MFSTD_FMT_DEFAULT_KEY, in phFriNfc_MifareStdMap_ConvertToReadOnly()
6097 … memcpy (NdefMap->StdMifareContainer.UserScrtKeyB, ScrtKeyB, PH_FRINFC_MIFARESTD_KEY_LEN); in phFriNfc_MifareStdMap_ConvertToReadOnly()
6100 NdefMap->StdMifareContainer.TotalNoSectors = totalNoSectors; in phFriNfc_MifareStdMap_ConvertToReadOnly()
6108 NdefMap->StdMifareContainer.RdBeforeWrFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_ConvertToReadOnly()
6109 NdefMap->StdMifareContainer.WrNdefFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_ConvertToReadOnly()
6110 NdefMap->StdMifareContainer.internalLength = PH_FRINFC_MIFARESTD_VAL0; in phFriNfc_MifareStdMap_ConvertToReadOnly()
6111 NdefMap->StdMifareContainer.RdAfterWrFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_ConvertToReadOnly()
6112 NdefMap->StdMifareContainer.AuthDone = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_ConvertToReadOnly()
6113 NdefMap->StdMifareContainer.NFCforumSectFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_ConvertToReadOnly()
6114 NdefMap->StdMifareContainer.WriteAcsBitFlag = PH_FRINFC_MIFARESTD_FLAG0; in phFriNfc_MifareStdMap_ConvertToReadOnly()
6117 for(NdefMap->StdMifareContainer.ReadOnlySectorIndex = PH_FRINFC_MIFARESTD_FLAG1; in phFriNfc_MifareStdMap_ConvertToReadOnly()
6118 NdefMap->StdMifareContainer.ReadOnlySectorIndex < totalNoSectors; in phFriNfc_MifareStdMap_ConvertToReadOnly()
6119 NdefMap->StdMifareContainer.ReadOnlySectorIndex++) in phFriNfc_MifareStdMap_ConvertToReadOnly()
6122 … if( PH_FRINFC_MIFARESTD_SECTOR_NO16 == NdefMap->StdMifareContainer.ReadOnlySectorIndex ) in phFriNfc_MifareStdMap_ConvertToReadOnly()
6129 … NdefMap->StdMifareContainer.aid[NdefMap->StdMifareContainer.ReadOnlySectorIndex]) in phFriNfc_MifareStdMap_ConvertToReadOnly()
6135 … NdefMap->StdMifareContainer.aid[NdefMap->StdMifareContainer.ReadOnlySectorIndex]) in phFriNfc_MifareStdMap_ConvertToReadOnly()
6139 … phFriNfc_MifStd_H_GetSectorTrailerBlkNo(NdefMap->StdMifareContainer.ReadOnlySectorIndex); in phFriNfc_MifareStdMap_ConvertToReadOnly()
6140 NdefMap->StdMifareContainer.currentBlock = sectorTrailerBlockNo; in phFriNfc_MifareStdMap_ConvertToReadOnly()
6141 NdefMap->StdMifareContainer.SectorTrailerBlockNo = sectorTrailerBlockNo; in phFriNfc_MifareStdMap_ConvertToReadOnly()
6155 if(NdefMap->StdMifareContainer.ReadOnlySectorIndex == totalNoSectors && in phFriNfc_MifareStdMap_ConvertToReadOnly()
6192 if(NdefMap->StdMifareContainer.ReadAcsBitFlag == in phFriNfc_MifStd_H_ProSectorTrailorAcsBits()
6258 NdefMap->SendRecvBuf[11] = NdefMap->StdMifareContainer.UserScrtKeyB[0]; in phFriNfc_MifStd_H_WrSectorTrailorBlock()
6259 NdefMap->SendRecvBuf[12] = NdefMap->StdMifareContainer.UserScrtKeyB[1]; in phFriNfc_MifStd_H_WrSectorTrailorBlock()
6260 NdefMap->SendRecvBuf[13] = NdefMap->StdMifareContainer.UserScrtKeyB[2]; in phFriNfc_MifStd_H_WrSectorTrailorBlock()
6261 NdefMap->SendRecvBuf[14] = NdefMap->StdMifareContainer.UserScrtKeyB[3]; in phFriNfc_MifStd_H_WrSectorTrailorBlock()
6262 NdefMap->SendRecvBuf[15] = NdefMap->StdMifareContainer.UserScrtKeyB[4]; in phFriNfc_MifStd_H_WrSectorTrailorBlock()
6263 NdefMap->SendRecvBuf[16] = NdefMap->StdMifareContainer.UserScrtKeyB[5]; in phFriNfc_MifStd_H_WrSectorTrailorBlock()
6266 NdefMap->SendRecvBuf[PH_FRINFC_MIFARESTD_VAL0] = NdefMap->StdMifareContainer.currentBlock; in phFriNfc_MifStd_H_WrSectorTrailorBlock()
6269 (void)memcpy(NdefMap->StdMifareContainer.Buffer, in phFriNfc_MifStd_H_WrSectorTrailorBlock()
6314 NdefMap->StdMifareContainer.ReadOnlySectorIndex++; in phFriNfc_MifStd_H_ProWrSectorTrailor()
6317 if(PH_FRINFC_MIFARESTD_SECTOR_NO16 == NdefMap->StdMifareContainer.ReadOnlySectorIndex ) in phFriNfc_MifStd_H_ProWrSectorTrailor()
6319 NdefMap->StdMifareContainer.ReadOnlySectorIndex++; in phFriNfc_MifStd_H_ProWrSectorTrailor()
6325 …if (NdefMap->StdMifareContainer.ReadOnlySectorIndex >= NdefMap->StdMifareContainer.TotalNoSectors … in phFriNfc_MifStd_H_ProWrSectorTrailor()
6327 NdefMap->StdMifareContainer.aid[NdefMap->StdMifareContainer.ReadOnlySectorIndex]) in phFriNfc_MifStd_H_ProWrSectorTrailor()
6331 …else if(PH_FRINFC_MIFARESTD_NDEF_COMP == NdefMap->StdMifareContainer.aid[NdefMap->StdMifareContai… in phFriNfc_MifStd_H_ProWrSectorTrailor()
6334 …sectorTrailerBlockNo = phFriNfc_MifStd_H_GetSectorTrailerBlkNo(NdefMap->StdMifareContainer.ReadOnl… in phFriNfc_MifStd_H_ProWrSectorTrailor()
6335 NdefMap->StdMifareContainer.currentBlock = sectorTrailerBlockNo; in phFriNfc_MifStd_H_ProWrSectorTrailor()
6336 NdefMap->StdMifareContainer.SectorTrailerBlockNo = sectorTrailerBlockNo; in phFriNfc_MifStd_H_ProWrSectorTrailor()