Lines Matching refs:BufIndex
754 uint16_t BufIndex=0,i=0;
775 NdefMap->SendRecvBuf[BufIndex] = 0x00;
776 BufIndex ++;
778 NdefMap->SendRecvBuf[BufIndex] = 0x06;
779 BufIndex++;
783 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
787 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
792 BufIndex+=8;
795 NdefMap->SendRecvBuf[BufIndex] = 0x01;
796 BufIndex++;
799 NdefMap->SendRecvBuf[BufIndex] = 0x0B;
800 BufIndex++;
802 NdefMap->SendRecvBuf[BufIndex] = 0x00;
803 BufIndex++;
806 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)(TrxLen/16);
807 BufIndex++;
814 NdefMap->SendRecvBuf[BufIndex] = 0x80;
815 BufIndex++;
818 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)(i + 1);
819 BufIndex++;
827 NdefMap->SendRecvBuf[BufIndex] = 0x80;
828 BufIndex++;
831 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)(NdefMap->Felica.CurBlockNo + i);
832 BufIndex++;
837 NdefMap->SendRecvBuf[PH_NFCFRI_NDEFMAP_FELI_PKT_LEN_INDEX] = (uint8_t) BufIndex;
840 NdefMap->SendLength = BufIndex;
952 uint8_t BufIndex=0, ErrFlag = FALSE;
974 NdefMap->SendRecvBuf[BufIndex] = 0x00;
975 BufIndex++;
978 NdefMap->SendRecvBuf[BufIndex] = 0x08;
979 BufIndex++;
983 (void)memcpy( (&(NdefMap->SendRecvBuf[BufIndex])),
987 (void)memcpy( (&(NdefMap->SendRecvBuf[BufIndex])),
992 BufIndex+=8;
994 NdefMap->SendRecvBuf[BufIndex] = 0x01; /* Number of Services (n=1 ==> 0x80)*/
995 BufIndex++;
997 NdefMap->SendRecvBuf[BufIndex] = 0x09; /* Service Code List*/
998 BufIndex++;
1000 NdefMap->SendRecvBuf[BufIndex] = 0x00; /* Service Code List*/
1001 BufIndex++;
1003 NdefMap->SendRecvBuf[BufIndex] = 0x01; /* Number of Blocks to Write*/
1004 BufIndex++;
1006 NdefMap->SendRecvBuf[BufIndex] = 0x80; /* 1st Block Element : byte 1*/
1007 BufIndex++;
1009 NdefMap->SendRecvBuf[BufIndex] = 0x00; /* 1st Block Element : byte 2, block 1*/
1010 BufIndex++;
1013 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.Version;
1014 BufIndex++;
1016 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.Nbr;
1017 BufIndex++;
1019 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.Nbw;
1020 BufIndex++;
1022 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)((NdefMap->FelicaAttrInfo.Nmaxb) >> 8);
1023 BufIndex++;
1025 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)((NdefMap->FelicaAttrInfo.Nmaxb) & (0x00ff));
1026 BufIndex++;
1028 NdefMap->SendRecvBuf[BufIndex] = 0x00; /*RFU*/
1029 BufIndex++;
1031 NdefMap->SendRecvBuf[BufIndex] = 0x00; /*RFU*/
1032 BufIndex++;
1034 NdefMap->SendRecvBuf[BufIndex] = 0x00; /*RFU*/
1035 BufIndex++;
1037 NdefMap->SendRecvBuf[BufIndex] = 0x00; /*RFU*/
1038 BufIndex++;
1042 NdefMap->SendRecvBuf[BufIndex] = 0x0F; /* Write Flag Made On*/
1043 BufIndex++;
1045 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.RdWrFlag; /* Read write flag*/
1046 BufIndex++;
1049 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.LenBytes[0];
1050 BufIndex++;
1052 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.LenBytes[1];
1053 BufIndex++;
1055 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.LenBytes[2];
1056 BufIndex++;
1073 NdefMap->SendRecvBuf[BufIndex] = 0x00; /* Write Flag Made Off*/
1074 BufIndex++;
1076 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.RdWrFlag; /* Read write flag*/
1077 BufIndex++;
1090 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)(( TotNoWrittenBytes & 0x00ff0000) >> 16);
1091 BufIndex++;
1093 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)((TotNoWrittenBytes & 0x0000ff00) >> 8);
1094 BufIndex++;
1096 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)(TotNoWrittenBytes & 0x000000ff);
1097 BufIndex++;
1110 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)(ChkSum >> 8);
1111 BufIndex++;
1113 NdefMap->SendRecvBuf[BufIndex] = (uint8_t )(ChkSum & 0x00ff);
1114 BufIndex++;
1117 NdefMap->SendRecvBuf[PH_NFCFRI_NDEFMAP_FELI_PKT_LEN_INDEX] = BufIndex;
1122 NdefMap->SendLength = BufIndex;
1158 uint8_t BufIndex=0;
1172 NdefMap->SendRecvBuf[BufIndex] = 0x00;
1173 BufIndex++;
1176 NdefMap->SendRecvBuf[BufIndex] = 0x08;
1177 BufIndex++;
1181 (void)memcpy( (&(NdefMap->SendRecvBuf[BufIndex])),
1185 (void)memcpy( (&(NdefMap->SendRecvBuf[BufIndex])),
1191 BufIndex+=8;
1193 NdefMap->SendRecvBuf[BufIndex] = 0x01; /* Number of Services (n=1 ==> 0x80)*/
1194 BufIndex++;
1196 NdefMap->SendRecvBuf[BufIndex] = 0x09; /* Service Code List*/
1197 BufIndex++;
1199 NdefMap->SendRecvBuf[BufIndex] = 0x00; /* Service Code List*/
1200 BufIndex++;
1202 NdefMap->SendRecvBuf[BufIndex] = 0x01; /* Number of Blocks to Write*/
1203 BufIndex++;
1205 NdefMap->SendRecvBuf[BufIndex] = 0x80; /* 1st Block Element : byte 1*/
1206 BufIndex++;
1208 NdefMap->SendRecvBuf[BufIndex] = 0x00; /* 1st Block Element : byte 2, block 1*/
1209 BufIndex++;
1212 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.Version;
1213 BufIndex++;
1215 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.Nbr;
1216 BufIndex++;
1218 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.Nbw;
1219 BufIndex++;
1221 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)((NdefMap->FelicaAttrInfo.Nmaxb) >> 8);
1222 BufIndex++;
1224 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)((NdefMap->FelicaAttrInfo.Nmaxb) & (0x00ff));
1225 BufIndex++;
1227 NdefMap->SendRecvBuf[BufIndex] = 0x00; /*RFU*/
1228 BufIndex++;
1230 NdefMap->SendRecvBuf[BufIndex] = 0x00; /*RFU*/
1231 BufIndex++;
1233 NdefMap->SendRecvBuf[BufIndex] = 0x00; /*RFU*/
1234 BufIndex++;
1236 NdefMap->SendRecvBuf[BufIndex] = 0x00; /*RFU*/
1237 BufIndex++;
1239 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.WriteFlag;
1240 BufIndex++;
1242 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.RdWrFlag; /* Read write flag*/
1243 BufIndex++;
1246 NdefMap->SendRecvBuf[BufIndex] = 0x00;
1247 BufIndex++;
1249 NdefMap->SendRecvBuf[BufIndex] = 0x00;
1250 BufIndex++;
1252 NdefMap->SendRecvBuf[BufIndex] = 0x00;
1253 BufIndex++;
1262 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)(ChkSum >> 8);
1263 BufIndex++;
1265 NdefMap->SendRecvBuf[BufIndex] = (uint8_t )(ChkSum & 0x00ff);
1266 BufIndex++;
1269 NdefMap->SendRecvBuf[PH_NFCFRI_NDEFMAP_FELI_PKT_LEN_INDEX] = BufIndex;
1274 NdefMap->SendLength = BufIndex;
1433 uint8_t BufIndex=0,
1450 NdefMap->SendRecvBuf[BufIndex] = 0x00;
1451 BufIndex++;
1454 NdefMap->SendRecvBuf[BufIndex] = 0x08;
1455 BufIndex++;
1459 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
1463 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
1468 BufIndex+=8;
1470 NdefMap->SendRecvBuf[BufIndex] = 0x01; /* Number of Services (n=1 ==> 0x80)*/
1471 BufIndex++;
1473 NdefMap->SendRecvBuf[BufIndex] = 0x09; /* Service Code List*/
1474 BufIndex++;
1476 NdefMap->SendRecvBuf[BufIndex] = 0x00; /* Service Code List*/
1477 BufIndex++;
1511 NdefMap->SendRecvBuf[BufIndex] = 0;
1512 BufIndex++;
1515 NoOfBlks = BufIndex;
1669 NdefMap->SendRecvBuf[BufIndex] = 0x80;
1670 BufIndex++;
1674 NdefMap->SendRecvBuf[BufIndex] = NdefMap->Felica.CurBlockNo + i;
1675 BufIndex++;
1680 NdefMap->SendRecvBuf[BufIndex] = CurBlk + i;
1681 BufIndex++;
1689 (void)memcpy( (&(NdefMap->SendRecvBuf[BufIndex])),
1694 BufIndex += NdefMap->Felica.Wr_BytesRemained;
1698 (void)memcpy( (&(NdefMap->SendRecvBuf[BufIndex])),
1706 BufIndex += 16 - NdefMap->Felica.Wr_BytesRemained;
1716 (void)memcpy( (&(NdefMap->SendRecvBuf[BufIndex])),
1724 BufIndex += (uint8_t)(NdefMap->ApduBufferSize - (16 - NdefMap->Felica.Wr_BytesRemained));
1730 NdefMap->SendRecvBuf[BufIndex] =0x00;
1731 BufIndex++;
1752 (void)memcpy( (&(NdefMap->SendRecvBuf[BufIndex])),
1757 BufIndex += ((NdefMap->FelicaAttrInfo.Nbw - 1 )*16);
1770 (void)memcpy( (&(NdefMap->SendRecvBuf[BufIndex])),
1777 BufIndex += (uint8_t)( BytesRemained - (16 -NdefMap->Felica.Wr_BytesRemained));
1783 NdefMap->SendRecvBuf[BufIndex] =0x00;
1784 BufIndex++;
1805 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
1810 BufIndex += ((NdefMap->FelicaAttrInfo.Nbw - 1 )*16);
1829 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
1834 BufIndex+=NdefMap->Felica.Wr_BytesRemained;
1837 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
1842 BufIndex+= (uint8_t)NdefMap->ApduBufferSize;
1852 NdefMap->SendRecvBuf[BufIndex] =0x00;
1853 BufIndex++;
1869 NdefMap->SendRecvBuf[PH_NFCFRI_NDEFMAP_FELI_PKT_LEN_INDEX] = BufIndex;
1870 NdefMap->SendLength = BufIndex;
1884 NdefMap->SendRecvBuf[BufIndex] = NdefMap->FelicaAttrInfo.Nbw;
1885 BufIndex++;
1890 NdefMap->SendRecvBuf[BufIndex] = 0x80;
1891 BufIndex++;
1893 NdefMap->SendRecvBuf[BufIndex] = NdefMap->Felica.CurBlockNo + i;
1894 BufIndex++;
1898 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
1903 BufIndex += (NdefMap->FelicaAttrInfo.Nbw*16);
1906 NdefMap->SendRecvBuf[PH_NFCFRI_NDEFMAP_FELI_PKT_LEN_INDEX] = BufIndex;
1913 NdefMap->SendLength = BufIndex;
1922 NdefMap->SendRecvBuf[BufIndex] = (uint8_t)( NdefMap->FelicaAttrInfo.Nmaxb - NdefMap->Felica.CurBlockNo);
1923 BufIndex++;
1928 NdefMap->SendRecvBuf[BufIndex] = 0x80;
1929 BufIndex++;
1930 NdefMap->SendRecvBuf[BufIndex] = NdefMap->Felica.CurBlockNo + i;
1931 BufIndex++;
1935 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
1940 BufIndex += (uint8_t)((NdefMap->FelicaAttrInfo.Nmaxb - NdefMap->Felica.CurBlockNo )*16);
1943 NdefMap->SendRecvBuf[PH_NFCFRI_NDEFMAP_FELI_PKT_LEN_INDEX] = BufIndex;
1949 NdefMap->SendLength = BufIndex;
1985 NdefMap->SendRecvBuf[BufIndex] = BlkNo;
1986 BufIndex++;
1993 NdefMap->SendRecvBuf[BufIndex] = 0x80;
1994 BufIndex++;
1997 NdefMap->SendRecvBuf[BufIndex] = CurBlk + i;
1998 BufIndex++;
2004 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
2008 /* increment the bufindex and bytes written*/
2009 BufIndex += (uint8_t )BytesRemainedInCard ;
2015 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
2019 /* increment the bufindex and bytes written*/
2020 BufIndex += (uint8_t)(NdefMap->ApduBufferSize - NdefMap->ApduBuffIndex);
2027 NdefMap->SendRecvBuf[BufIndex] =0x00;
2028 BufIndex++;
2056 NdefMap->SendRecvBuf[PH_NFCFRI_NDEFMAP_FELI_PKT_LEN_INDEX] = BufIndex;
2057 NdefMap->SendLength = BufIndex;
2717 uint8_t BufIndex = 0;
2731 NdefMap->SendRecvBuf[BufIndex] = 0x00;
2732 BufIndex++;
2735 NdefMap->SendRecvBuf[BufIndex] = 0x06;
2736 BufIndex++;
2740 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
2744 (void)memcpy((&(NdefMap->SendRecvBuf[BufIndex])),
2750 BufIndex+=8;
2752 NdefMap->SendRecvBuf[BufIndex] = 0x01; /* Number of Services (n=1 ==> 0x80)*/
2753 BufIndex++;
2755 NdefMap->SendRecvBuf[BufIndex] = 0x0B; /* Service Code List*/
2756 BufIndex++;
2758 NdefMap->SendRecvBuf[BufIndex] = 0x00; /* Service Code List*/
2759 BufIndex++;
2761 NdefMap->SendRecvBuf[BufIndex] = 0x01; /* Number of Blocks to read)*/
2762 BufIndex++;
2764 NdefMap->SendRecvBuf[BufIndex] = 0x80; /* 1st Block Element : byte 1*/
2765 BufIndex++;
2767 NdefMap->SendRecvBuf[BufIndex] = 0x00; /* 1st Block Element : byte 2, block 1*/
2768 BufIndex++;
2770 NdefMap->SendRecvBuf[PH_NFCFRI_NDEFMAP_FELI_PKT_LEN_INDEX] = BufIndex;
2775 NdefMap->SendLength = BufIndex;
2833 BufIndex=0;
2835 for(BufIndex = StartIndex;BufIndex <=EndIndex;BufIndex++)
2837 CheckSum += TempBuffer[BufIndex];