Lines Matching refs:psNdefMap
229 phFriNfc_NdefMap_t *psNdefMap);
238 phFriNfc_NdefMap_t *psNdefMap);
248 phFriNfc_NdefMap_t *psNdefMap);
268 phFriNfc_NdefMap_t *psNdefMap);
277 phFriNfc_NdefMap_t *psNdefMap,
289 phFriNfc_NdefMap_t *psNdefMap);
299 phFriNfc_NdefMap_t *psNdefMap,
313 phFriNfc_NdefMap_t *psNdefMap,
327 phFriNfc_NdefMap_t *psNdefMap,
340 phFriNfc_NdefMap_t *psNdefMap,
350 phFriNfc_NdefMap_t *psNdefMap,
360 phFriNfc_NdefMap_t *psNdefMap);
369 phFriNfc_NdefMap_t *psNdefMap);
380 phFriNfc_NdefMap_t *psNdefMap);
389 phFriNfc_NdefMap_t *psNdefMap);
398 phFriNfc_NdefMap_t *psNdefMap);
407 phFriNfc_NdefMap_t *psNdefMap,
418 phFriNfc_NdefMap_t *psNdefMap,
430 phFriNfc_NdefMap_t *psNdefMap);
439 phFriNfc_NdefMap_t *psNdefMap);
448 phFriNfc_NdefMap_t *psNdefMap);
458 phFriNfc_NdefMap_t *psNdefMap);
468 phFriNfc_NdefMap_t *psNdefMap,
480 phFriNfc_NdefMap_t *psNdefMap,
492 phFriNfc_NdefMap_t *psNdefMap);
502 phFriNfc_NdefMap_t *psNdefMap);
511 phFriNfc_NdefMap_t *psNdefMap);
520 phFriNfc_NdefMap_t *psNdefMap);
530 phFriNfc_NdefMap_t *psNdefMap);
537 phFriNfc_NdefMap_t *psNdefMap);
542 phFriNfc_NdefMap_t *psNdefMap);
717 phFriNfc_NdefMap_t *psNdefMap)
722 psNdefMap->State = PH_FRINFC_TOPAZ_STATE_READ_ONLY;
724 psNdefMap->TopazContainer.read_only_seq = 0;
728 psNdefMap->TopazContainer.CurrentBlock = 0x01U;
729 psNdefMap->TopazContainer.ByteNumber = 0x03U;
732 *psNdefMap->SendRecvBuf = (uint8_t)PH_FRINFC_TOPAZ_CMD_WRITE_1E;
734 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write1E;
737 result = phFriNfc_Tpz_H_NxpWrite (psNdefMap, &cc_read_only_byte,
742 psNdefMap->TopazContainer.read_only_seq = (uint8_t)WR_READONLY_CC;
925 phFriNfc_NdefMap_t *psNdefMap)
936 ps_tpz_info = &(psNdefMap->TopazContainer);
937 ps_locktlv_info = &(psNdefMap->LockTlv);
939 (void)memcpy ((void *)lock_bytes_value, (void *)psNdefMap->SendRecvBuf,
1033 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_WRITE_E8;
1035 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write8E;
1038 result = phFriNfc_Tpz_H_NxpWrite (psNdefMap, lock_bytes_value,
1046 phFriNfc_NdefMap_t *psNdefMap)
1054 ps_tpz_info = &(psNdefMap->TopazContainer);
1055 ps_locktlv_info = &(psNdefMap->LockTlv);
1056 e_readonly_seq = (phFriNfc_Tpz_RO_Seq_t)psNdefMap->TopazContainer.read_only_seq;
1062 if (TOPAZ_WRITE_1_RESPONSE == *psNdefMap->SendRecvLength)
1064 psNdefMap->TopazContainer.CurrentBlock = (uint8_t)
1065 psNdefMap->LockTlv.BlkNum;
1070 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_READ8;
1076 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Read;
1078 psNdefMap->Cmd.JewelCmd = phHal_eJewelCmdListJewelRead;
1081 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Read8;
1085 result = phFriNfc_Tpz_H_NxpRead (psNdefMap);
1097 if (TOPAZ_READ_8_RESPONSE == *psNdefMap->SendRecvLength)
1099 result = phFriNfc_Tpz_H_UpdateAndWriteLockBits (psNdefMap);
1116 if (TOPAZ_WRITE_8_RESPONSE == *psNdefMap->SendRecvLength)
1125 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_READ8;
1131 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Read;
1133 psNdefMap->Cmd.JewelCmd = phHal_eJewelCmdListJewelRead;
1136 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Read8;
1140 result = phFriNfc_Tpz_H_NxpRead (psNdefMap);
1151 *psNdefMap->SendRecvBuf = (uint8_t)PH_FRINFC_TOPAZ_CMD_READ8;
1157 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Read;
1159 psNdefMap->Cmd.JewelCmd = phHal_eJewelCmdListJewelRead;
1162 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Read8;
1166 result = phFriNfc_Tpz_H_NxpRead (psNdefMap);
1181 if (TOPAZ_READ_8_RESPONSE == *psNdefMap->SendRecvLength)
1186 (void *)(psNdefMap->SendRecvBuf +
1195 *psNdefMap->SendRecvBuf = (uint8_t)PH_FRINFC_TOPAZ_CMD_WRITE_1E;
1197 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write1E;
1200 result = phFriNfc_Tpz_H_NxpWrite (psNdefMap, &lock_byte_value,
1218 if (TOPAZ_WRITE_1_RESPONSE == *psNdefMap->SendRecvLength)
1229 *psNdefMap->SendRecvBuf = (uint8_t)PH_FRINFC_TOPAZ_CMD_WRITE_1E;
1231 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write1E;
1234 result = phFriNfc_Tpz_H_NxpWrite (psNdefMap, &lock_byte_value,
1252 if (TOPAZ_WRITE_1_RESPONSE == *psNdefMap->SendRecvLength)
1272 psNdefMap->TopazContainer.read_only_seq = (uint8_t)e_readonly_seq;
1281 phFriNfc_NdefMap_t *psNdefMap)
1291 ps_tpz_info = &(psNdefMap->TopazContainer);
1293 write_len = (uint16_t)((psNdefMap->ApduBufferSize < ps_tpz_info->NDEFRWSize) ?
1294 psNdefMap->ApduBufferSize : ps_tpz_info->NDEFRWSize);
1301 if (TOPAZ_WRITE_8_RESPONSE == *psNdefMap->SendRecvLength)
1303 psNdefMap->State = (uint8_t)
1313 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_WRITE_1E;
1315 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write1E;
1317 result = phFriNfc_Tpz_H_NxpWrite (psNdefMap, write_buf,
1331 if (TOPAZ_WRITE_1_RESPONSE == *psNdefMap->SendRecvLength)
1338 result = phFriNfc_Tpz_H_RdForWrite (psNdefMap);
1351 if (TOPAZ_WRITE_8_RESPONSE != *psNdefMap->SendRecvLength)
1369 result = phFriNfc_Tpz_H_RdForWrite (psNdefMap);
1375 (psNdefMap, write_len);
1389 result = phFriNfc_Tpz_H_RdForWrite (psNdefMap);
1395 result = phFriNfc_Tpz_H_CopySendWrData (psNdefMap);
1406 if (TOPAZ_WRITE_8_RESPONSE != *psNdefMap->SendRecvLength)
1421 result = phFriNfc_Tpz_H_RdForWrite (psNdefMap);
1429 if (TOPAZ_WRITE_8_RESPONSE != *psNdefMap->SendRecvLength)
1437 (psNdefMap, write_len);
1450 result = phFriNfc_Tpz_H_RdForWrite (psNdefMap);
1456 result = phFriNfc_Tpz_H_CopySendWrData (psNdefMap);
1465 if (TOPAZ_WRITE_8_RESPONSE != *psNdefMap->SendRecvLength)
1470 else if (write_len == psNdefMap->ApduBuffIndex)
1473 *psNdefMap->WrNdefPacketLength = psNdefMap->ApduBuffIndex;
1478 result = phFriNfc_Tpz_H_RdForWrite (psNdefMap);
1488 result = phFriNfc_Tpz_H_CopySendWrData (psNdefMap);
1498 if (TOPAZ_WRITE_8_RESPONSE != *psNdefMap->SendRecvLength)
1513 result = phFriNfc_Tpz_H_RdForWrite (psNdefMap);
1521 if (TOPAZ_WRITE_8_RESPONSE != *psNdefMap->SendRecvLength)
1529 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_WRITE_1E;
1531 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write1E;
1534 psNdefMap->State = (uint8_t)PH_FRINFC_TOPAZ_STATE_WRITE;
1547 result = phFriNfc_Tpz_H_NxpWrite(psNdefMap, write_buf,
1556 if (TOPAZ_WRITE_8_RESPONSE != *psNdefMap->SendRecvLength)
1567 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_WRITE_1E;
1569 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write1E;
1571 psNdefMap->State = (uint8_t)PH_FRINFC_TOPAZ_STATE_WRITE;
1581 result = phFriNfc_Tpz_H_NxpWrite(psNdefMap, write_buf,
1594 result = phFriNfc_Tpz_H_RdForWrite (psNdefMap);
1602 if (TOPAZ_WRITE_1_RESPONSE == *psNdefMap->SendRecvLength)
1604 *psNdefMap->WrNdefPacketLength = (uint32_t)
1605 psNdefMap->ApduBuffIndex;
1607 psNdefMap->ApduBuffIndex;
1629 phFriNfc_NdefMap_t *psNdefMap)
1635 ps_tpz_info = &(psNdefMap->TopazContainer);
1638 psNdefMap->SendRecvBuf, TOPAZ_WRITE_8_DATA_LENGTH);
1643 psNdefMap->State = (uint8_t)PH_FRINFC_TOPAZ_STATE_WRITE;
1646 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_WRITE_E8;
1648 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write8E;
1650 result = phFriNfc_Tpz_H_NxpWrite(psNdefMap, write_buf,
1659 phFriNfc_NdefMap_t *psNdefMap)
1665 ps_tpz_info = &(psNdefMap->TopazContainer);
1667 psNdefMap->State = PH_FRINFC_TOPAZ_STATE_WRITE;
1669 if (TOPAZ_READ_8_RESPONSE == *psNdefMap->SendRecvLength)
1676 result = phFriNfc_Tpz_H_UpdateNdefTypeField (psNdefMap);
1686 result = phFriNfc_Tpz_H_UpdateLenFieldZeroAfterRead (psNdefMap);
1694 result = phFriNfc_Tpz_H_CopyReadDataAndWrite (psNdefMap);
1704 result = phFriNfc_Tpz_H_UpdateLenFieldValuesAfterRead (psNdefMap);
1730 phFriNfc_NdefMap_t *psNdefMap)
1737 if (PH_FRINFC_TOPAZ_VAL6 == *psNdefMap->SendRecvLength)
1739 if (((psNdefMap->SendRecvBuf[recv_index] &
1744 psNdefMap->psRemoteDevInfo->RemoteDevInfo.Jewel_Info.Uid,
1745 &psNdefMap->SendRecvBuf[PH_FRINFC_TOPAZ_VAL2],
1750 psNdefMap->State = PH_FRINFC_TOPAZ_STATE_READ;
1755 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_RSEG;
1760 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Read;
1762 psNdefMap->Cmd.JewelCmd = phHal_eJewelCmdListJewelRead;
1764 psNdefMap->Cmd.JewelCmd = phHal_eJewel_ReadSeg;
1768 result = phFriNfc_Tpz_H_NxpRead (psNdefMap);
1791 phFriNfc_NdefMap_t *psNdefMap)
1801 psNdefMap->psDepAdditionalInfo.DepFlags.MetaChaining = PH_FRINFC_TOPAZ_VAL0;
1802 psNdefMap->psDepAdditionalInfo.DepFlags.NADPresent = PH_FRINFC_TOPAZ_VAL0;
1803 psNdefMap->psDepAdditionalInfo.NAD = PH_FRINFC_TOPAZ_VAL0;
1805 psNdefMap->MapCompletionInfo.CompletionRoutine = phFriNfc_TopazDynamicMap_Process;
1806 psNdefMap->MapCompletionInfo.Context = psNdefMap;
1808 *psNdefMap->SendRecvLength = psNdefMap->TempReceiveLength;
1813 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Raw;
1818 switch (*psNdefMap->SendRecvBuf)
1820 switch(psNdefMap->Cmd.JewelCmd)
1827 (void)memcpy ((void *)(psNdefMap->SendRecvBuf + send_index),
1835 psNdefMap->SendRecvBuf[send_index] =
1836 psNdefMap->TopazContainer.CurrentBlock;
1843 psNdefMap->SendRecvBuf[send_index] = (uint8_t)
1844 (psNdefMap->TopazContainer.CurrentSeg
1861 psNdefMap->SendLength = PH_FRINFC_TOPAZ_VAL0;
1873 psNdefMap->SendLength = PH_FRINFC_TOPAZ_VAL3;
1879 psNdefMap->SendRecvBuf[send_index] = (uint8_t)
1880 (psNdefMap->TopazContainer.CurrentSeg
1883 psNdefMap->SendLength = send_index;
1889 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Read4;
1890 psNdefMap->SendRecvBuf[send_index] = psNdefMap->TopazContainer.CurrentBlock;
1892 psNdefMap->SendLength = send_index;
1909 if (PH_FRINFC_TOPAZ_CMD_READID != *psNdefMap->SendRecvBuf)
1911 (void)memcpy ((void *)(psNdefMap->SendRecvBuf + send_index),
1915 psNdefMap->SendRecvBuf + send_index),
1916 (void *)psNdefMap->psRemoteDevInfo->RemoteDevInfo.Jewel_Info.Uid,
1922 psNdefMap->SendLength = send_index;
1926 result = phFriNfc_OvrHal_Transceive( psNdefMap->LowerDevice,
1927 &psNdefMap->MapCompletionInfo,
1928 psNdefMap->psRemoteDevInfo,
1929 psNdefMap->Cmd,
1930 &psNdefMap->psDepAdditionalInfo,
1931 psNdefMap->SendRecvBuf,
1932 psNdefMap->SendLength,
1933 psNdefMap->SendRecvBuf,
1934 psNdefMap->SendRecvLength);
1943 phFriNfc_NdefMap_t *psNdefMap,
1951 ps_tpz_info = &(psNdefMap->TopazContainer);
1954 psNdefMap->psDepAdditionalInfo.DepFlags.MetaChaining = PH_FRINFC_TOPAZ_VAL0;
1955 psNdefMap->psDepAdditionalInfo.DepFlags.NADPresent = PH_FRINFC_TOPAZ_VAL0;
1956 psNdefMap->psDepAdditionalInfo.NAD = PH_FRINFC_TOPAZ_VAL0;
1958 psNdefMap->MapCompletionInfo.CompletionRoutine = phFriNfc_TopazDynamicMap_Process;
1959 psNdefMap->MapCompletionInfo.Context = psNdefMap;
1961 *psNdefMap->SendRecvLength = psNdefMap->TempReceiveLength;
1967 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Raw;
1969 switch (*psNdefMap->SendRecvBuf)
1973 switch (psNdefMap->Cmd.JewelCmd)
1981 psNdefMap->SendRecvBuf[send_index] = (uint8_t)((ps_tpz_info->CurrentBlock
1990 psNdefMap->SendRecvBuf[send_index] = ps_tpz_info->CurrentBlock;
1999 psNdefMap->SendRecvBuf[send_index] = (uint8_t)((ps_tpz_info->CurrentBlock
2010 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write4E;
2011 psNdefMap->SendRecvBuf[send_index] = ps_tpz_info->CurrentBlock;
2029 (void)memcpy ((void *)(psNdefMap->SendRecvBuf + send_index),
2036 (void)memcpy ((void *)(psNdefMap->SendRecvBuf + send_index),
2037 (void *)psNdefMap->psRemoteDevInfo->RemoteDevInfo.Jewel_Info.Uid,
2043 psNdefMap->SendLength = send_index;
2046 result = phFriNfc_OvrHal_Transceive( psNdefMap->LowerDevice,
2047 &psNdefMap->MapCompletionInfo,
2048 psNdefMap->psRemoteDevInfo,
2049 psNdefMap->Cmd,
2050 &psNdefMap->psDepAdditionalInfo,
2051 psNdefMap->SendRecvBuf,
2052 psNdefMap->SendLength,
2053 psNdefMap->SendRecvBuf,
2054 psNdefMap->SendRecvLength);
2062 phFriNfc_NdefMap_t *psNdefMap)
2068 ps_tpz_info = &(psNdefMap->TopazContainer);
2070 switch (psNdefMap->PrevOperation)
2075 *psNdefMap->SendRecvLength)
2079 result = phFriNfc_Tpz_H_CheckCCBytes (psNdefMap);
2084 result = phFriNfc_Tpz_H_ParseTLVs (psNdefMap);
2098 *psNdefMap->SendRecvLength)
2101 result = phFriNfc_Tpz_H_CopyReadData (psNdefMap);
2114 if(TOPAZ_READ_8_RESPONSE == *psNdefMap->SendRecvLength)
2117 (void *)(psNdefMap->SendRecvBuf),
2120 result = phFriNfc_Tpz_H_CheckCCBytesForWrite (psNdefMap);
2138 psNdefMap->State = (uint8_t)
2151 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_READ8;
2153 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Read8;
2156 result = phFriNfc_Tpz_H_NxpRead (psNdefMap);
2163 psNdefMap->State = (uint8_t)
2166 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_WRITE_1E;
2168 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write1E;
2172 result = phFriNfc_Tpz_H_NxpWrite (psNdefMap, write_buffer,
2213 phFriNfc_NdefMap_t *psNdefMap)
2217 uint8_t *p_recv_buf = psNdefMap->SendRecvBuf;
2219 psNdefMap->CardState = PH_NDEFMAP_CARD_STATE_INITIALIZED;
2224 psNdefMap->CardState = (uint8_t)
2247 if (PH_NDEFMAP_CARD_STATE_INITIALIZED == psNdefMap->CardState)
2249 switch ((psNdefMap->TopazContainer.CCByteBuf[3] & 0xFF))
2253 psNdefMap->CardState = PH_NDEFMAP_CARD_STATE_INITIALIZED;
2259 psNdefMap->CardState = PH_NDEFMAP_CARD_STATE_READ_ONLY;
2265 psNdefMap->CardState = PH_NDEFMAP_CARD_STATE_INVALID;
2279 phFriNfc_NdefMap_t *psNdefMap)
2282 phFriNfc_TopazCont_t *ps_tpz_info = &(psNdefMap->TopazContainer);
2283 uint8_t *p_recv_buf = psNdefMap->SendRecvBuf;
2306 result = phFriNfc_Tpz_H_ChkSpcVer (psNdefMap, p_recv_buf[parse_index]);
2323 psNdefMap->CardMemSize = (uint16_t)((p_recv_buf[parse_index] *
2326 ps_tpz_info->RemainingSize = (uint16_t)(psNdefMap->CardMemSize +
2329 result = phFriNfc_Tpz_H_ChkLockBits (psNdefMap);
2340 psNdefMap->CardState = PH_NDEFMAP_CARD_STATE_INVALID;
2349 phFriNfc_NdefMap_t *psNdefMap)
2358 ps_tpz_info = &(psNdefMap->TopazContainer);
2392 phFriNfc_NdefMap_t *psNdefMap)
2394 phFriNfc_TopazCont_t *ps_tpz_info = &(psNdefMap->TopazContainer);
2408 skip_size = phFriNfc_Tpz_H_GetSkipSize (psNdefMap, byte_addr);
2419 skip_size = phFriNfc_Tpz_H_GetSkipSize (psNdefMap, byte_addr);
2429 phFriNfc_NdefMap_t *psNdefMap,
2432 phFriNfc_TopazCont_t *ps_tpz_info = &(psNdefMap->TopazContainer);
2446 skip_size = phFriNfc_Tpz_H_GetSkipSize (psNdefMap, byte_addr);
2457 skip_size = phFriNfc_Tpz_H_GetSkipSize (psNdefMap, byte_addr);
2468 phFriNfc_NdefMap_t *psNdefMap)
2471 phFriNfc_TopazCont_t *ps_tpz_info = &(psNdefMap->TopazContainer);
2480 if ((psNdefMap->ApduBufferSize - psNdefMap->ApduBuffIndex) >=
2484 (void)memcpy ((void *)(psNdefMap->ApduBuffer + psNdefMap->ApduBuffIndex),
2489 read_copy_length = (uint16_t)(psNdefMap->ApduBufferSize -
2490 psNdefMap->ApduBuffIndex);
2496 (void)memcpy ((void *)(psNdefMap->ApduBuffer + psNdefMap->ApduBuffIndex),
2510 psNdefMap->ApduBuffIndex = (uint16_t)(psNdefMap->ApduBuffIndex +
2522 *psNdefMap->NumOfBytesRead = psNdefMap->ApduBuffIndex;
2526 else if (psNdefMap->ApduBuffIndex == psNdefMap->ApduBufferSize)
2529 *psNdefMap->NumOfBytesRead = psNdefMap->ApduBuffIndex;
2538 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_RSEG;
2542 psNdefMap->Cmd.JewelCmd = phHal_eJewel_ReadSeg;
2545 result = phFriNfc_Tpz_H_NxpRead (psNdefMap);
2554 phFriNfc_NdefMap_t *psNdefMap)
2557 phFriNfc_TopazCont_t *ps_tpz_info = &(psNdefMap->TopazContainer);
2570 recv_length = *(psNdefMap->SendRecvLength);
2573 if (PH_FRINFC_NDEFMAP_SEEK_CUR == psNdefMap->Offset)
2577 psNdefMap->ApduBuffIndex);
2580 exact_copy_length = (uint16_t)((psNdefMap->ApduBufferSize >
2582 psNdefMap->ApduBufferSize);
2588 recv_length = (*(psNdefMap->SendRecvLength) - TOPAZ_STATIC_LOCK_RES_BYTES);
2592 phFriNfc_Tpz_H_GetNDEFValueFieldAddrForRead (psNdefMap)) ==
2597 psNdefMap) % TOPAZ_SEGMENT_READ_LENGTH));
2613 ps_locktlv_info = &(psNdefMap->LockTlv) change this to
2614 ps_locktlv_info = &(psNdefMap->LockTlv[index])
2616 ps_locktlv_info = &(psNdefMap->LockTlv);
2631 skip_size = phFriNfc_Tpz_H_GetSkipSize (psNdefMap,
2637 ps_memtlv_info = &(psNdefMap->MemTlv) change this to
2638 ps_memtlv_info = &(psNdefMap->MemTlv[index])
2640 ps_memtlv_info = &(psNdefMap->MemTlv);
2661 skip_size = phFriNfc_Tpz_H_GetSkipSize (psNdefMap,
2680 (exact_copy_length - psNdefMap->ApduBuffIndex)) &&
2681 (exact_copy_length != psNdefMap->ApduBuffIndex))
2684 psNdefMap->ApduBuffIndex);
2687 if (exact_copy_length != psNdefMap->ApduBuffIndex)
2689 (void)memcpy ((void *)(psNdefMap->ApduBuffer +
2690 psNdefMap->ApduBuffIndex),
2691 (void *)(psNdefMap->SendRecvBuf + copy_index),
2697 (exact_copy_length - psNdefMap->ApduBuffIndex))
2702 (void *)(psNdefMap->SendRecvBuf + copy_index),
2722 psNdefMap->ApduBuffIndex = (uint16_t)(psNdefMap->ApduBuffIndex +
2735 if (actual_ndef_length > (psNdefMap->ApduBuffIndex +
2740 psNdefMap->ApduBuffIndex)) ?
2742 psNdefMap->ApduBuffIndex) :
2748 (void *)(psNdefMap->SendRecvBuf + copy_index),
2779 if (exact_copy_length != psNdefMap->ApduBuffIndex)
2785 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_RSEG;
2789 psNdefMap
2792 result = phFriNfc_Tpz_H_NxpRead (psNdefMap);
2796 *psNdefMap->NumOfBytesRead = psNdefMap->ApduBuffIndex;
2797 if (psNdefMap->ApduBuffIndex == actual_ndef_length)
2805 psNdefMap->ApduBuffIndex);
2815 phFriNfc_NdefMap_t *psNdefMap)
2818 phFriNfc_TopazCont_t *ps_tpz_info = &(psNdefMap->TopazContainer);
2847 p_recv_buf = psNdefMap->SendRecvBuf;
2848 recv_length = *psNdefMap->SendRecvLength;
2862 recv_length = (uint16_t)(*(psNdefMap->SendRecvLength) -
2875 skip_size = phFriNfc_Tpz_H_GetSkipSize (psNdefMap, byte_addr);
2901 result = phFriNfc_Tpz_H_ParseLockTLVType (psNdefMap, p_recv_buf,
2936 (void)memcpy ((void *)psNdefMap->LockTlv.LockTlvBuff,
2940 result = phFriNfc_Tpz_H_GetLockBytesInfo (psNdefMap, lock_mem_buf);
2951 result = phFriNfc_Tpz_H_ParseMemTLVType (psNdefMap, p_recv_buf,
2987 result = phFriNfc_Tpz_H_GetMemBytesInfo (psNdefMap, lock_mem_buf);
2999 result = phFriNfc_Tpz_H_ParseNdefTLVType (psNdefMap, p_recv_buf,
3096 result = phFriNfc_Tpz_H_ActualCardSize (psNdefMap);
3098 if ((PH_NDEFMAP_CARD_STATE_READ_ONLY != psNdefMap->CardState) &&
3104 psNdefMap->CardState = PH_NDEFMAP_CARD_STATE_READ_WRITE;
3121 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_RSEG;
3125 psNdefMap->Cmd.JewelCmd = phHal_eJewel_ReadSeg;
3128 result = phFriNfc_Tpz_H_NxpRead(psNdefMap);
3170 size_to_skip = phFriNfc_Tpz_H_GetSkipSize (psNdefMap,
3181 ps_tpz_info->RemainingSize = (uint16_t)(psNdefMap->CardMemSize +
3189 (void)phFriNfc_Tpz_H_ActualCardSize (psNdefMap);
3207 phFriNfc_NdefMap_t *psNdefMap)
3217 ps_tpz_info = &(psNdefMap->TopazContainer);
3219 write_len = (uint16_t)((psNdefMap->ApduBufferSize < ps_tpz_info->NDEFRWSize) ?
3220 psNdefMap->ApduBufferSize : ps_tpz_info->NDEFRWSize);
3222 (void)memcpy ((void *)write_buf, (void *)psNdefMap->SendRecvBuf,
3226 phFriNfc_Tpz_H_GetNDEFValueFieldAddrForWrite (psNdefMap, write_len)))
3247 (write_len != psNdefMap->ApduBuffIndex))
3252 skip_size = phFriNfc_Tpz_H_GetSkipSize (psNdefMap, byte_addr);
3257 psNdefMap->ApduBuffer[psNdefMap->ApduBuffIndex];
3260 psNdefMap->ApduBuffIndex = (uint16_t)
3261 (psNdefMap->ApduBuffIndex + 1);
3284 if (psNdefMap->ApduBuffIndex == write_len)
3302 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_WRITE_E8;
3304 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write8E;
3306 result = phFriNfc_Tpz_H_NxpWrite (psNdefMap, write_buf,
3316 phFriNfc_NdefMap_t *psNdefMap)
3334 ps_tpz_info = &(psNdefMap->TopazContainer);
3335 write_len = (uint16_t)((psNdefMap->ApduBufferSize < ps_tpz_info->NDEFRWSize) ?
3336 psNdefMap->ApduBufferSize : ps_tpz_info->NDEFRWSize);
3338 psNdefMap->State = PH_FRINFC_TOPAZ_STATE_WRITE;
3340 (void)memcpy ((void *)write_buf, (void *)psNdefMap->SendRecvBuf,
3377 skip_size = phFriNfc_Tpz_H_GetSkipSize (psNdefMap, byte_addr);
3390 psNdefMap->ApduBuffIndex;
3406 (psNdefMap->ApduBuffIndex >> BYTE_SIZE);
3414 (psNdefMap->ApduBuffIndex &
3472 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_WRITE_E8;
3474 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write8E;
3477 result = phFriNfc_Tpz_H_NxpWrite (psNdefMap, write_buf,
3487 phFriNfc_NdefMap_t *psNdefMap)
3505 ps_tpz_info = &(psNdefMap->TopazContainer);
3506 write_len = (uint16_t)((psNdefMap->ApduBufferSize < ps_tpz_info->NDEFRWSize) ?
3507 psNdefMap->ApduBufferSize : ps_tpz_info->NDEFRWSize);
3509 psNdefMap->State = PH_FRINFC_TOPAZ_STATE_WRITE;
3511 (void)memcpy ((void *)write_buf, (void *)psNdefMap->SendRecvBuf,
3514 prev_apdu_index = psNdefMap->ApduBuffIndex;
3542 (write_len != psNdefMap->ApduBuffIndex))
3547 skip_size = phFriNfc_Tpz_H_GetSkipSize (psNdefMap, byte_addr);
3592 psNdefMap->ApduBuffer[psNdefMap->ApduBuffIndex];
3595 psNdefMap->ApduBuffIndex = (uint16_t)
3596 (psNdefMap->ApduBuffIndex + 1);
3627 if (psNdefMap->ApduBuffIndex == write_len)
3634 psNdefMap->ApduBuffIndex))
3650 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_WRITE_E8;
3652 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write8E;
3655 result = phFriNfc_Tpz_H_NxpWrite (psNdefMap, write_buf,
3663 phFriNfc_NdefMap_t *psNdefMap)
3672 ps_tpz_info = &(psNdefMap->TopazContainer);
3677 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_READ8;
3681 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Read8;
3685 psNdefMap->State = PH_FRINFC_TOPAZ_STATE_RD_FOR_WR_NDEF;
3703 skip_size = phFriNfc_Tpz_H_GetSkipSize (psNdefMap,
3729 skip_size = phFriNfc_Tpz_H_GetSkipSize (psNdefMap,
3762 result = phFriNfc_Tpz_H_NxpRead (psNdefMap);
3770 phFriNfc_NdefMap_t *psNdefMap,
3777 ps_locktlv_info = &(psNdefMap->LockTlv);
3792 phFriNfc_NdefMap_t *psNdefMap,
3799 ps_memtlv_info = &(psNdefMap->MemTlv);
3815 phFriNfc_NdefMap_t *psNdefMap)
3824 ps_tpz_info = &(psNdefMap->TopazContainer);
3825 write_len = (uint16_t)((psNdefMap->ApduBufferSize < ps_tpz_info->NDEFRWSize) ?
3826 psNdefMap->ApduBufferSize : ps_tpz_info->NDEFRWSize);
3828 if (0 != phFriNfc_Tpz_H_CompareLockBlocks (psNdefMap,
3833 result = phFriNfc_Tpz_H_RdForWrite (psNdefMap);
3835 else if (0 != phFriNfc_Tpz_H_CompareMemBlocks (psNdefMap,
3840 result = phFriNfc_Tpz_H_RdForWrite (psNdefMap);
3845 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_WRITE_E8;
3847 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write8E;
3849 psNdefMap->State = (uint8_t)PH_FRINFC_TOPAZ_STATE_WRITE;
3851 if ((write_len - psNdefMap->ApduBuffIndex) >= (uint16_t)TOPAZ_WRITE_8_DATA_LENGTH)
3855 (void *)(psNdefMap->ApduBuffer + psNdefMap->ApduBuffIndex),
3858 psNdefMap->ApduBuffIndex = (uint16_t)(psNdefMap->ApduBuffIndex +
3863 copy_length = (uint8_t)(write_len - psNdefMap->ApduBuffIndex);
3866 (void *)(psNdefMap->ApduBuffer + psNdefMap->ApduBuffIndex),
3869 psNdefMap->ApduBuffIndex = (uint16_t)(psNdefMap->ApduBuffIndex +
3877 *psNdefMap->SendRecvBuf = PH_FRINFC_TOPAZ_CMD_WRITE_E8;
3879 psNdefMap->Cmd.JewelCmd = phHal_eJewel_Write8E;
3882 result = phFriNfc_Tpz_H_NxpWrite (psNdefMap, write_buf,
3894 phFriNfc_NdefMap_t *psNdefMap)
3903 ps_tpz_info = &(psNdefMap->TopazContainer);
3914 (psNdefMap);
3916 ps_locktlv_info = &(psNdefMap->LockTlv);
3923 ps_memtlv_info = &(psNdefMap->MemTlv);
3951 phFriNfc_NdefMap_t *psNdefMap,
3961 PHNFC_UNUSED_VARIABLE(psNdefMap);
3997 phFriNfc_NdefMap_t *psNdefMap,
4007 PHNFC_UNUSED_VARIABLE(psNdefMap);
4049 phFriNfc_NdefMap_t *psNdefMap,
4059 PHNFC_UNUSED_VARIABLE(psNdefMap);
4109 phFriNfc_NdefMap_t *psNdefMap,
4116 ps_locktlv_info = &(psNdefMap->LockTlv);
4117 ps_memtlv_info = &(psNdefMap->MemTlv);
4138 phFriNfc_NdefMap_t *psNdefMap,
4147 ps_locktlv_info = &(psNdefMap->LockTlv);
4175 (uint16_t)(psNdefMap->TopazContainer.CCByteBuf[2] *
4205 phFriNfc_NdefMap_t *psNdefMap,
4215 ps_memtlv_info = &(psNdefMap->MemTlv);
4216 ps_locktlv_info = &(psNdefMap->LockTlv);
4256 (uint16_t)(psNdefMap->TopazContainer.CCByteBuf[2] *