1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
|
/*
* Copyright (C) 2010 NXP Semiconductors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*!
*\file phLibNfc_1.1.h
*\brief Contains FRI1.1 API details.
*Project: NFC-FRI 1.1
* $Workfile:: phLibNfc_1.1.h $
* $Modtime:: $
* $Author: ing07385 $
* $Revision: 1.80 $
* $Aliases: NFC_FRI1.1_WK1014_SDK,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1019_SDK,NFC_FRI1.1_WK1024_SDK $
*\defgroup grp_lib_nfc LIBNFC Component
*/
/* \page LibNfc_release_label FRI1.1 API Release Label
* $Aliases: NFC_FRI1.1_WK1014_SDK,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1019_SDK,NFC_FRI1.1_WK1024_SDK $
*\note This is the TAG (label, alias) of the FRI1.1.
*If the string is empty, the current documentation
* has not been generated for official release.
*/
#ifndef PHLIBNFC_H
#define PHLIBNFC_H
#include <phNfcTypes.h>
#include <phLibNfcStatus.h>
#include <phFriNfc_NdefRecord.h>
#include <phNfcLlcpTypes.h>
#include <phNfcConfig.h>
#ifdef ANDROID
#include <string.h>
#endif
/*!
*\def PHLIBNFC_MAXNO_OF_SE
*Defines maximum no of secured elements supported by PN544.
*/
#define LIBNFC_READONLY_NDEF
#define PHLIBNFC_MAXNO_OF_SE (0x02)
typedef uint32_t phLibNfc_Handle;
extern const unsigned char *nxp_nfc_full_version;
/**
*\ingroup grp_lib_nfc
*
*\brief Defines Testmode Init configuration values
*/
typedef enum
{
phLibNfc_TstMode_Off = 0x00, /**< Test mode is off */
phLibNfc_TstMode_On /**< Testmode is on */
} phLibNfc_Cfg_Testmode_t;
/**
*\ingroup grp_lib_nfc
*
*\brief Defines Secure Element configurable states
*/
typedef enum
{
phLibNfc_SE_Active = 0x00, /**< state of the SE is active */
phLibNfc_SE_Inactive= 0x01 /**< state of the SE is In active*/
} phLibNfc_SE_State_t;
/**
*\ingroup grp_lib_nfc
*
*\brief Defines Secure Element types.
*/
typedef enum
{
phLibNfc_SE_Type_Invalid=0x00,/**< Indicates SE type is Invalid */
phLibNfc_SE_Type_SmartMX=0x01,/**< Indicates SE type is SmartMX */
phLibNfc_SE_Type_UICC =0x02,/**<Indicates SE type is UICC */
phLibNfc_SE_Type_Unknown=0x03/**< Indicates SE type is Unknown */
}phLibNfc_SE_Type_t;
/**
*\ingroup grp_lib_nfc
*
*\brief Defines Ndef Card Offset.
*/
typedef enum
{
phLibNfc_Ndef_EBegin = 0x01, /**< Start from Beginning position */
phLibNfc_Ndef_ECurrent /**< Start from Current position */
} phLibNfc_Ndef_EOffset_t;
/**
* \ingroup grp_lib_nfc
*
*\brief This function allows to activate specific Secure element.
*\b VirtualMode: Virtual mode is used to communicated with secure elements from external reader.
* This mode is also called as card emulation mode.when secure element mode is set
* to this mode,external reader can communicate with this SE.
*
*\b WiredMode: Wired mode is used to communicate with the Secure Element internally.
* No RF field is generated. In this mode, PN544 acts as reader and discovers
* SmartMX as MIFARE tag.External reader cannot access any of the SE's in this mode.
* This mode is applicable to only SmartMX secure element.
*
*/
typedef enum
{
phLibNfc_SE_ActModeWired=0x00, /**< Enables Wired Mode communication.This mode shall
be applied to */
phLibNfc_SE_ActModeDefault = 0x01, /**< Enables Virtual Mode communication.
This can be applied to UICC as well as SmartMX*/
phLibNfc_SE_ActModeVirtual=0x02, /**< Enables Virtual Mode communication.
This can be applied to UICC as well as SmartMX*/
phLibNfc_SE_ActModeOff =0x03, /**< Inactivate SE.This means,put SE in in-active state
This can be applied to UICC as well as SmartMX*/
phLibNfc_SE_ActModeVirtualVolatile = 0x04 /**< Enabled virtual mode communication for SE through an event
This can be applied to UICC as well as SmartMX*/
}phLibNfc_eSE_ActivationMode;
/**
* \ingroup grp_lib_nfc
*
*\brief Defines SE low power mode types.
*/
typedef enum
{
phLibNfc_SE_LowPowerMode_Off= 0x01, /**< Indicates no SE to be selected in low power mode */
phLibNfc_SE_LowPowerMode_On = 0x02 /**< Indicates requested SE to be selected in low power mode */
} phLibNfc_SE_LowPowerMode_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Defines Secure element event info .
*/
typedef union phLibNfc_uSeEvtInfo
{
phNfc_sUiccInfo_t UiccEvtInfo; /**< Indicates UICC event info for Evt_Transaction event */
}phLibNfc_uSeEvtInfo_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Defines card emulation event info .
*/
typedef union phLibNfc_uCeEvtInfo
{
phNfc_sUiccInfo_t UiccEvtInfo; /**< Indicates UICC event info for Evt_Transaction event */
}phLibNfc_uCeEvtInfo_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Types of SE transaction events sent to SE notification handler .
*/
typedef enum
{
phLibNfc_eSE_EvtStartTransaction=0x00, /**< Indicates transaction started on
secure element */
phLibNfc_eSE_EvtEndTransaction=0x01, /**<Indicates transaction ended on secure
element*/
phLibNfc_eSE_EvtTypeTransaction=0x02, /**<Indicates external reader trying to access secure element */
phLibNfc_eSE_EvtConnectivity, /**<This event notifies the terminal host that it shall
send a connectivity event from UICC as defined in
ETSI TS 102 622 V7.4.0 */
phLibNfc_eSE_EvtFieldOn, // consider using phLibNfc_eSE_EvtConnectivity
phLibNfc_eSE_EvtFieldOff,
phLibNfc_eSE_EvtApduReceived, /* PAYPASS MagStripe or MCHIP_4 transaction */
phLibNfc_eSE_EvtCardRemoval, /* Indicates the beginning of an EMV Card Removal sequence */
phLibNfc_eSE_EvtMifareAccess /* Indicates when the SMX Emulation MIFARE is accessed */
} phLibNfc_eSE_EvtType_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Types of CE transaction events sent to CE notification handler .
*/
typedef enum
{
phLibNfc_eCE_A_EvtActivated=0x00, /**< Indicates activation on
emulated card */
phLibNfc_eCE_A_EvtDeActivated=0x01, /**< Indicates de activation
emulated card */
phLibNfc_eCE_B_EvtActivated=0x02, /**< Indicates activation on
emulated card */
phLibNfc_eCE_B_EvtDeActivated=0x03, /**< Indicates de activation
emulated card */
phLibNfc_eCE_EvtFieldOn, // consider using phLibNfc_eSE_EvtConnectivity
phLibNfc_eCE_EvtFieldOff
} phLibNfc_eCE_EvtType_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Defines possible registration details for notifications.
*/
typedef phNfc_sSupProtocol_t phLibNfc_Registry_Info_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Generic Data buffer definition.
*/
typedef phNfc_sData_t phLibNfc_Data_t;
/**
* \ingroup grp_lib_nfc
*
* Application Identifier (phLibNfc_AID)
*
* The application identifier defines a specific application on a SE.
*
*/
typedef phNfc_sData_t phLibNfc_AID;
/**
* \ingroup grp_lib_nfc
*
*\brief Remote Device Info definition .
*/
typedef phNfc_sRemoteDevInformation_t phLibNfc_sRemoteDevInformation_t;
/**
* \ingroup grp_lib_nfc
*/
typedef phNfc_eDiscoveryConfigMode_t phLibNfc_eDiscoveryConfigMode_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Transceive info definition.
*/
typedef phNfc_sTransceiveInfo_t phLibNfc_sTransceiveInfo_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Automatic Device Discovery Definition.
*/
typedef phNfc_sADD_Cfg_t phLibNfc_sADD_Cfg_t;
/**
*\ingroup grp_lib_nfc
*
*\brief Release mode definition.
*/
typedef phNfc_eReleaseType_t phLibNfc_eReleaseType_t;
/**
*\ingroup grp_lib_nfc
*
*\brief device capabilities details.
*/
typedef phNfc_sDeviceCapabilities_t phLibNfc_sDeviceCapabilities_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Defines supported tag types for NDEF mapping and formatting feature.
*/
typedef struct SupportedTagInfo
{
unsigned MifareUL:1; /**<TRUE indicates specified feature (mapping or formatting)for MIFARE UL tag supported else not supported.*/
unsigned MifareStd:1; /**<TRUE indicates specified feature (mapping or formatting)for Mifare Std tag supported else not supported.*/
unsigned MifareULC:1; /**<TRUE indicates specified feature (mapping or formatting)for MIFARE UL2 tag supported else not supported.*/
unsigned ISO14443_4A:1; /**<TRUE indicates specified feature (mapping or formatting)for ISO14443_4A tag supported else not supported.*/
unsigned ISO14443_4B:1; /**<TRUE indicates specified feature (mapping or formatting)for ISO14443_4B tag supported else not supported.*/
unsigned ISO15693:1; /**<TRUE indicates specified feature (mapping or formatting)for ISO15693 tag supported else not supported.*/
unsigned FeliCa:1; /**<TRUE indicates specified feature (mapping or formatting)for FeliCa tag supported else not supported.*/
unsigned Jewel:1; /**<TRUE indicates specified feature (mapping or formatting)for JEWEL tag supported else not supported.*/
unsigned Desfire:1; /**<TRUE indicates specified feature (mapping or formatting)for desfire tag supported else not supported.*/
}phLibNfc_sSupportedTagInfo_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Defines supported tag types for NDEF mapping feature.
*/
typedef phLibNfc_sSupportedTagInfo_t phLibNfc_sNDEFMappingInfo_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Defines supported tag types for NDEF formatting feature.
*/
typedef phLibNfc_sSupportedTagInfo_t phLibNfc_sTagFormattingInfo_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Stack capabilities details contains device capabilities and supported tags for NDEF mapping and formatting feature.
*/
typedef struct StackCapabilities
{
phLibNfc_sDeviceCapabilities_t psDevCapabilities;
phLibNfc_sNDEFMappingInfo_t psMappingCapabilities;
phLibNfc_sTagFormattingInfo_t psFormatCapabilities;
}phLibNfc_StackCapabilities_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Defines Secure Element list type.
*/
typedef struct phLibNfc_SecureElementInfo
{
phLibNfc_Handle hSecureElement; /**< handle to Secure Element */
phLibNfc_SE_Type_t eSE_Type; /**< type of Secure Element(SE)*/
phLibNfc_SE_State_t eSE_CurrentState;/**< state of the secure element indicates activated or not*/
} phLibNfc_SE_List_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Defines target specific info obtained during device discovery.
*/
typedef struct phLibNfc_RemoteDev
{
phLibNfc_Handle hTargetDev; /**< discovered Target handle */
phLibNfc_sRemoteDevInformation_t* psRemoteDevInfo; /**< discovered Target details */
}phLibNfc_RemoteDevList_t;
typedef phNfc_sNfcIPCfg_t phLibNfc_sNfcIPCfg_t;
/**
*\ingroup grp_lib_nfc
*\brief NDEF registration structure definition.
*/
typedef struct phLibNfc_Ndef_SrchType
{
uint8_t Tnf; /**< Type Name Format of this NDEF record */
uint8_t *Type; /**< Type field of this NDEF record */
uint8_t TypeLength; /**< Length of the Type field of this NDEF record */
} phLibNfc_Ndef_SrchType_t;
/**
*\ingroup grp_lib_nfc
* \brief NDEF information structure definition. \n
*/
typedef struct phLibNfc_Ndef_Info
{
uint32_t NdefMessageLengthActual; /**< Actual length of the NDEF message */
uint32_t NdefMessageLengthMaximum; /**< Maximum length of the NDEF message */
uint8_t *pNdefMessage; /**< Pointer to raw NDEF Data buffer */
uint32_t NdefRecordCount; /**< Number of NDEF records pointed by pNdefRecord */
phFriNfc_NdefRecord_t *pNdefRecord; /**< Pointer to the NDEF Records contained within the NDEF message */
} phLibNfc_Ndef_Info_t;
/* As per NFC forum specification, the card can be in either of the below mentioned states
INVALID - means card is NOT NFC forum specified tag. NDEF FORMAT can only be performed for
the factory cards, other cards may or may not be formatted for NDEF FORMAT function.
INITIALISED - means card is NFC forum specified tag. But, in this state
the user has to first call NDEF WRITE, because in INITIALISED state, there
wont be any data i.e.,ACTUAL NDEF FILE SIZE is 0. After the first
NDEF WRITE, NDEF READ and WRITE functions can be called any number of times.
READ WRITE - means card is NFC forum specified tag. User can use both
NDEF READ and WRITE functions
READ ONLY - means card is NFC forum specified tag. User can only use
NDEF READ. NDEF WRITE function will not work.
*/
#define PHLIBNFC_NDEF_CARD_INVALID 0x00U
#define PHLIBNFC_NDEF_CARD_INITIALISED 0x01U
#define PHLIBNFC_NDEF_CARD_READ_WRITE 0x02U
#define PHLIBNFC_NDEF_CARD_READ_ONLY 0x03U
/**
* \ingroup grp_lib_nfc
*
*\brief Ndef Information Structure.
*/
typedef struct phLibNfc_ChkNdef_Info
{
uint8_t NdefCardState; /**< Card state information */
uint32_t ActualNdefMsgLength; /**< Indicates Actual length of NDEF Message in Tag */
uint32_t MaxNdefMsgLength; /**< Indicates Maximum Ndef Message length that Tag can hold*/
} phLibNfc_ChkNdef_Info_t;
/**
*\ingroup grp_lib_nfc
*
*\brief LLCP link status. Refer to \ref phFriNfc_LlcpMac_eLinkStatus_t
*
*/
typedef phFriNfc_LlcpMac_eLinkStatus_t phLibNfc_Llcp_eLinkStatus_t;
typedef phFriNfc_Llcp_sLinkParameters_t phLibNfc_Llcp_sLinkParameters_t;
typedef phFriNfc_LlcpTransport_eSocketType_t phLibNfc_Llcp_eSocketType_t;
typedef phFriNfc_LlcpTransport_sSocketOptions_t phLibNfc_Llcp_sSocketOptions_t;
/**
* \ingroup grp_lib_nfc
*
*\brief Response callback for connect request.
*
* Callback type used to indicate a Connect request Successful or Failure indication to
* LibNfc client.
*
* \param[in] pContext Context passed in the connect request before.
* \param[in] hRemoteDev Handle to remote device on which connect was requested.
* \param[in] psRemoteDevInfo contains updated remote device details.For few tags
* like ISO-14443A details like historical bytes gets updated
* only after connecting to target.Once connect is successful
* \b psRemoteDevInfo gets updated.
*
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Connect operation successful.
* \param NFCSTATUS_TARGET_LOST Connect operation failed because target is lost.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
*
*/
typedef void (*pphLibNfc_ConnectCallback_t) (void* pContext,
phLibNfc_Handle hRemoteDev,
phLibNfc_sRemoteDevInformation_t* psRemoteDevInfo,
NFCSTATUS Status
);
/**
* \ingroup grp_lib_nfc
*
*\brief Response callback for disconnect request.
*
* Callback type used to provide a disconnect Success or Failure indication to
* LibNfc client.
*
* \param[in] pContext Context passed in the disconnect request before.
* \param[in] hRemoteDev Handle to remote device on which disconnect is requested.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Disconnect operation successful.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
*
*/
typedef void (*pphLibNfc_DisconnectCallback_t)(void* pContext,
phLibNfc_Handle hRemoteDev,
NFCSTATUS Status
);
/**
* \ingroup grp_lib_nfc
*
*\brief Response callback for IOCTL request.
*
* Callback type to inform success or failure of the Ioctl request
* made by LibNfc client. It may optionally contain response data
* depending on the Ioctl command type issued.
*
* \param[in] pContext Context passed in the connect request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Ioctl operation successful.
* \param NFCSTATUS_TARGET_LOST Ioctl operation failed because target is lost.
* \param NFCSTATUS_SHUTDOWN Ioctl operation failed because Shutdown in progress.
*
*\param[in,out] pOutParam contains Ioctl command specific response buffer and size
* of the buffer.This buffer address will be same as
* pOutParam sent in \ref phLibNfc_Mgt_IoCtl.
*
*/
typedef void (*pphLibNfc_IoctlCallback_t) (void* pContext,
phNfc_sData_t* pOutParam,
NFCSTATUS Status
);
/**
* \ingroup grp_lib_nfc
*
*\brief Response callback for Transceive request.
*
* This callback type is used to provide received data and it's size to the
* LibNfc client in \ref phNfc_sData_t format ,when LibNfc client has performed
* a Transceive operation on a tag or when the device acts as an Initiator during a
* P2P transactions.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] hRemoteDev Handle to remote device on transceive is performed.
* \param[in] pResBuffer Response buffer of type \ref phNfc_sData_t.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Transceive operation successful.
* \param NFCSTATUS_TARGET_LOST Transceive operation failed because target is lost.
* \param NFCSTATUS_SHUTDOWN Transceive operation failed because Shutdown in progress.
* \param NFCSTATUS_ABORTED Aborted due to disconnect request in between.
*
*/
typedef void (*pphLibNfc_TransceiveCallback_t)( void* pContext,
phLibNfc_Handle hRemoteDev,
phNfc_sData_t* pResBuffer,
NFCSTATUS Status
);
/**
* \ingroup grp_lib_nfc
*
* \brief Generic Response Callback definition.
*
* Generic callback definition used as callback type in few APIs below.
*
* \note : Status and error codes for this type of callback are documented in respective APIs
* wherever it is used.
*
* \param[in] pContext LibNfc client context passed in the corresponding request
* before.
* \param[in] status Status of the response callback.
*/
typedef void(*pphLibNfc_RspCb_t) (void* pContext,NFCSTATUS Status);
/**
* \ingroup grp_lib_nfc
*
* \brief Check NDEF Callback definition.
*
* This call back is used by check ndef api.
*
* \note : Status and error codes for this type of callback are documented in API
*
* \param[in] pContext LibNfc client context passed in the corresponding request
* before.
* \param[in] Ndef_Info Ndef message length and the container size.
* \param[in] status Status of the response callback.
*/
typedef void(*pphLibNfc_ChkNdefRspCb_t)(void* pContext,
phLibNfc_ChkNdef_Info_t Ndef_Info,
NFCSTATUS Status);
/**
* \ingroup grp_lib_nfc
* \brief Notification handler callback definition.
*
*This callback type is used to provide information on discovered targets to LibNfcClient.
*Discovered targets will be notified in \ref phLibNfc_RemoteDevList_t format.
*In case multiple targets discovered ,remote device list contains these targets one after another.
*
*\note List will be exported as memory block,based on \b uNofRemoteDev
* parameter application has to access remote devices accordingly.
*
*\b Ex: Multiple targets discovered can be referred as phLibNfc_RemoteDevList_t[0]
*and phLibNfc_RemoteDevList_t[1].
*
*Subsequent operations on discovered target shall be performed using target specific handle
*\b hTargetDev.
*
* \param[in] pContext Client context passed in the corresponding
* request before.The context is handled by client
* only.
*
* \param[in] psRemoteDevList Remote Device list contains discovered target details.
* Refer to \ref phLibNfc_RemoteDevList_t .
* List size depends on no of remote devices discovered.
*
* \param[in] uNofRemoteDev Indicates no of remote devices discovered .
* In case more than one target discovered,\b psRemoteDevList contains
* multiple target details.
*
* \param[in] Status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Discovered single target successfully.
* \param NFCSTATUS_MULTIPLE_TARGETS multiple targets found.
* \param NFCSTATUS_MULTI_PROTOCOLS Target found supports multiple protocols.
* \param NFCSTATUS_SHUTDOWN Registration failed because shutdown in progress.
* \param NFCSTATUS_DESELECTED initiator issued disconnect or intiator
* physically removed from the RF field.
*
*\note: multiple tag detection is possible only within same technology but not across
* different technologies.
*/
typedef void (*phLibNfc_NtfRegister_RspCb_t)(
void* pContext,
phLibNfc_RemoteDevList_t* psRemoteDevList,
uint8_t uNofRemoteDev,
NFCSTATUS Status
);
/**
* \ingroup grp_lib_nfc
* \brief Response Callback for secure element mode settings.
*
* This callback type is used to provide information on requested secure element is
* activated or not to LibNfcClient.
*
* \param[in] pContext LibNfc client context passed in the activation request.
*
* \param[in] hSecureElement Handle to secure element.
*
* \param[in] Status Indicates API status.
* \param NFCSTATUS_SUCCESS Secure element activated successfully.
* \param NFCSTATUS_SHUTDOWN Activation failed because shutdown in progress.
* \param NFCSTATUS_FAILED Activation failed.
*
*/
typedef void(*pphLibNfc_SE_SetModeRspCb_t)(
void* pContext,
phLibNfc_Handle hSecureElement,
NFCSTATUS Status
);
/**
* \ingroup grp_lib_nfc
* \brief Notification callback for \ref phLibNfc_SE_NtfRegister().
*
* A function of this type is called when external reader tries to access SE.
*
*\param[in] pContext LibNfc client context passed in the SE notification register request.
* The context is Handled by client only.
* \param[in] EventType Event type of secure element transaction
* \param[in] hSecureElement handle to Secures Element.
*
*\param[in] pAppID Application identifier to be accessed on SE .
* Sent when available from SE otherwise empty.
*
*\param[in] Status Indicates API status.
* \param NFCSTATUS_SUCCESS Notification handler registered sucessfully.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
* \param NFCSTATUS_FAILED set mode operation failed.
*
*
*/
typedef void (*pphLibNfc_SE_NotificationCb_t) (void* pContext,
phLibNfc_eSE_EvtType_t EventType,
phLibNfc_Handle hSecureElement,
phLibNfc_uSeEvtInfo_t* pSeEvtInfo,
NFCSTATUS Status
);
/**
* \ingroup grp_lib_nfc
* \brief Notification callback for \ref phLibNfc_CE_NtfRegister().
*
* A function of this type is called when external reader tries to access SE.
*
*\param[in] pContext LibNfc client context passed in the SE notification register request.
* The context is Handled by client only.
* \param[in] EventType Event type of secure element transaction
*
* \param[in] handle to connected device if connected Event type of secure element transaction
*
*\param[in] pAppID Application identifier to be accessed on SE .
* Sent when available from SE otherwise empty.
*
*\param[in] Status Indicates API status.
* \param NFCSTATUS_SUCCESS Notification handler registered sucessfully.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
* \param NFCSTATUS_FAILED set mode operation failed.
*
*
*/
typedef void (*pphLibNfc_CE_NotificationCb_t) (void* pContext,
phLibNfc_eCE_EvtType_t EventType,
uint32_t handle,
NFCSTATUS Status
);
/**
*\ingroup grp_lib_nfc
*\brief Receive callback definition.
*
* This callback type is used to provide received data and it's size to the
* LibNfc client in \ref phNfc_sData_t format ,when LibNfc client has performed
* when the device acts as a Target during P2P communication
*
* \param[in] pContext LibNfc client context passed in the corresponding
* request before.
* \param[in] pRecvBufferInfo Response buffer of type \ref phNfc_sData_t.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Receive operation successful.
* \param NFCSTATUS_SHUTDOWN Receive operation failed because
* Shutdown in progress.
* \param NFCSTATUS_ABORTED Aborted due to initiator issued disconnect request.
* This status code reported,to indicate P2P session
* closed and send and receive requests not allowed any more
* unless new session is started.
*/
typedef void (*pphLibNfc_Receive_RspCb_t)(void* pContext,
phNfc_sData_t* pRecvBufferInfo,
NFCSTATUS status
);
/**
*\ingroup grp_lib_nfc
*
* \brief NDEF Response callback definition
*
* A function of this type is notified when registered NDEF type detected.
*
* \b Note :Once this type callback is notified,discovery wheel is stopped.
*In order to restart discovery process again it is important to disconnect
*from current tag.LibNfc client shall disconnect explicitly using
*\ref phLibNfc_RemoteDev_Disconnect() interface.
*
*\param[in] pContext Pointer to context previously provided by the user
*\param[in] psNdefInfo All Ndef specific details of the remote device discovered.
*\param[in] hRemoteDevice handle to remote device on which NDEF detection is done.
*
*\param[in] Status Indicates callback status.
*
* \param NFCSTATUS_SUCCESS Indicates registered tnf type detected. .
* \param NFCSTATUS_SHUTDOWN Indicates shutdown in progress.
* \param NFCSTATUS_FAILED status failed.
* \param NFCSTATUS_ABORTED Aborted due to disconnect operation in between.
*/
typedef void (*pphLibNfc_Ndef_Search_RspCb_t) ( void* pContext,
phLibNfc_Ndef_Info_t* psNdefInfo,
phLibNfc_Handle hRemoteDevice,
NFCSTATUS Status
);
/**
*\ingroup grp_lib_nfc
*
* \brief LLCP check response callback definition
*/
typedef void (*pphLibNfc_ChkLlcpRspCb_t) ( void* pContext,
NFCSTATUS status
);
/**
*\ingroup grp_lib_nfc
*
* \brief LLCP check response callback definition
*/
typedef void (*pphLibNfc_LlcpLinkStatusCb_t) ( void* pContext,
phLibNfc_Llcp_eLinkStatus_t eLinkStatus
);
/**
*\ingroup grp_lib_nfc
*
* \brief LLCP socket error notification callback definition
*/
typedef void (*pphLibNfc_LlcpSocketErrCb_t) ( void* pContext,
uint8_t nErrCode
);
/**
*\ingroup grp_lib_nfc
*
* \brief Incoming connection on a listening LLCP socket callback definition
*/
typedef void (*pphLibNfc_LlcpSocketListenCb_t) ( void* pContext,
phLibNfc_Handle hIncomingSocket
);
/**
*\ingroup grp_lib_nfc
*
* \brief LLCP socket connect callback definition
*/
typedef void (*pphLibNfc_LlcpSocketConnectCb_t) ( void* pContext,
uint8_t nErrCode,
NFCSTATUS status
);
/**
*\ingroup grp_lib_nfc
*
* \brief LLCP socket disconnect callback definition
*/
typedef void (*pphLibNfc_LlcpSocketDisconnectCb_t) ( void* pContext,
NFCSTATUS status
);
/**
*\ingroup grp_lib_nfc
*
* \brief LLCP socket Accept callback definition
*/
typedef void (*pphLibNfc_LlcpSocketAcceptCb_t) ( void* pContext,
NFCSTATUS status
);
/**
*\ingroup grp_lib_nfc
*
* \brief LLCP socket Reject callback definition
*/
typedef void (*pphLibNfc_LlcpSocketRejectCb_t) ( void* pContext,
NFCSTATUS status
);
/**
*\ingroup grp_lib_nfc
*
* \brief LLCP socket reception callback definition
*/
typedef void (*pphLibNfc_LlcpSocketRecvCb_t) ( void* pContext,
NFCSTATUS status
);
/**
*\ingroup grp_lib_nfc
*
* \brief LLCP socket reception with SSAP callback definition
*/
typedef void (*pphLibNfc_LlcpSocketRecvFromCb_t) ( void* pContext,
uint8_t ssap,
NFCSTATUS status
);
/**
*\ingroup grp_lib_nfc
*
* \brief LLCP socket emission callback definition
*/
typedef void (*pphLibNfc_LlcpSocketSendCb_t) ( void* pContext,
NFCSTATUS status
);
/* FUNCTION PROTOTYPES */
/**
* \ingroup grp_lib_nfc
*
* \brief Driver configuration function
* This synchronous function configures the given driver Interface and
* sends the HANDLE to the caller.
*
* \param[in] psConfig Driver configuration details as provided
* by the upper layer.
* \param[in,out] ppDriverHandle pointer to which valid Handle to driver
* interface is assigned.
*
* \retval NFCSTATUS_SUCCESS Configuration happened successfully.
* \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the function
* is invalid.
* \retval NFCSTATUS_FAILED Configuration failed(example.unable to
* open HW Interface).
* \retval NFCSTATUS_INVALID_DEVICE The device has not been opened or
* has been disconnected meanwhile
* \retval NFCSTATUS_BOARD_COMMUNICATION_ERROR A board communication error occurred
(e.g. configuration went wrong).
*\msc
*LibNfcClient,LibNfc;
*--- [label="Before initializing Nfc LIB,Configure Driver layer"];
*LibNfcClient=>LibNfc[label="phLibNfc_Mgt_ConfigureDriver()",URL="\ref phLibNfc_Mgt_ConfigureDriver"];
*LibNfcClient<<LibNfc[label="NFCSTATUS_SUCCESS"];
*\endmsc
*/
NFCSTATUS phLibNfc_Mgt_ConfigureDriver (pphLibNfc_sConfig_t psConfig,
void ** ppDriverHandle
);
/**
* \ingroup grp_lib_nfc
*
* \brief Release configuration for the given driver Interface.
*
* \copydoc page_reg Release all that has been
* initialised in \b phLibNfc_Mgt_ConfigureDriver function (Synchronous function).
*
* \param[in] pDriverHandle Link information of the hardware
*
* \retval NFCSTATUS_SUCCESS Driver Configuration Released successfully.
* \retval NFCSTATUS_FAILED Configuration release failed(example: Unable to close Com port).
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_ConfigureDriver()",URL="\ref phLibNfc_Mgt_ConfigureDriver"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pInitCb"];
*--- [label="Perform feature operations "];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_DeInitialize()",URL="\ref phLibNfc_Mgt_DeInitialize"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pDeInitCb"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_UnConfigureDriver()",URL="\ref phLibNfc_Mgt_UnConfigureDriver"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*\endmsc
*/
NFCSTATUS phLibNfc_Mgt_UnConfigureDriver (void * pDriverHandle
);
NFCSTATUS phLibNfc_HW_Reset ();
NFCSTATUS phLibNfc_Download_Mode ();
int phLibNfc_Load_Firmware_Image ();
// Function for delay the recovery in case wired mode is set
// to complete the possible pending transaction with SE
void phLibNfc_Mgt_Recovery ();
// timeout is 8 bits
// bits [0..3] => timeout value, (256*16/13.56*10^6) * 2^value
// [0] -> 0.0003s
// ..
// [14] -> 4.9s
// [15] -> not allowed
// bit [4] => timeout enable
// bit [5..7] => unused
NFCSTATUS phLibNfc_SetIsoXchgTimeout(uint8_t timeout);
int phLibNfc_GetIsoXchgTimeout();
NFCSTATUS phLibNfc_SetHciTimeout(uint32_t timeout_in_ms);
int phLibNfc_GetHciTimeout();
// Felica timeout
// [0] -> timeout disabled
// [1..255] -> timeout in ms
NFCSTATUS phLibNfc_SetFelicaTimeout(uint8_t timeout_in_ms);
int phLibNfc_GetFelicaTimeout();
// MIFARE RAW timeout (ISO14443-3A / NfcA timeout)
// timeout is 8 bits
// bits [0..3] => timeout value, (256*16/13.56*10^6) * 2^value
// [0] -> 0.0003s
// ..
// [14] -> 4.9s
// [15] -> not allowed
// bits [4..7] => 0
NFCSTATUS phLibNfc_SetMifareRawTimeout(uint8_t timeout);
int phLibNfc_GetMifareRawTimeout();
/**
* \ingroup grp_lib_nfc
*
* \brief Initializes the NFC library .
*
*
*\brief This function initializes NFC library and its underlying layers.
* As part of this interface underlying modules gets initialized.
* A session with NFC hardware will be established.
* Once initialization is successful ,NFC library ready for use.
*\note It is must to initialize prior usage of the stack .
*
* \param[in] pDriverHandle Driver Handle currently application is using.
* \param[in] pInitCb The init callback is called by the LibNfc when init is
* completed or there is an error in initialization.
*
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
* \retval NFCSTATUS_ALREADY_INITIALISED Stack is already initialized.
* \retval NFCSTATUS_PENDING Init sequence has been successfully
* started and result will be conveyed via
* callback notification.
* \retval NFCSTATUS_INVALID_PARAMETER The parameter could not be properly
* interpreted.
*\retval NFCSTATUS_INSUFFICIENT_RESOURCES Insufficient resource.(Ex: insufficient memory)
*
*\msc
*LibNfcClient,LibNfc;
*--- [label="Before initializing Nfc LIB,Configure Driver layer"];
*LibNfcClient=>LibNfc[label="phLibNfc_Mgt_ConfigureDriver()",URL="\ref phLibNfc_Mgt_ConfigureDriver"];
*LibNfcClient<<LibNfc[label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pInitCb"];
*\endmsc
*/
NFCSTATUS phLibNfc_Mgt_Initialize (void * pDriverHandle,
pphLibNfc_RspCb_t pInitCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
*
* \brief De-Initializes NFC library.
*
*
* This function de-initializes and closes the current session with PN544 NFC hardware.
* All configurations and setups done until now are invalidated to restart
* communication. Resources currently used by stack gets released during De-initialization.
*\ref phLibNfc_Mgt_Initialize needs to be called once stack is
* De-initialized before using the stack again.
*
* \param[in] pHwHandle Hardware context currently application is using.
*
* \param[in] pDeInitCb De-initialization callback is called by the LibNfc when init
* completed or there is an error in initialization.
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
* \retval NFCSTATUS_SUCCESS Device stack is already De-Initialized.
* \retval NFCSTATUS_PENDING De-Initialization sequence has been successfully
* started and result is conveyed via callback
* notification.
*
* \retval NFCSTATUS_INVALID_PARAMETER The parameter could not be properly
* interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
* \retval NFCSTATUS_FAILED Request failed.
*
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pInitCb"];
*--- [label="Perform feature operations "];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_DeInitialize()",URL="\ref phLibNfc_Mgt_DeInitialize"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pDeInitCb"];
*\endmsc
*/
NFCSTATUS phLibNfc_Mgt_DeInitialize(void * pDriverHandle,
pphLibNfc_RspCb_t pDeInitCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief Get list of available Secure Elements.
*
* This function retrieves list of secure elements locally connected.
* during LibNfc initialization these SEs enumerated from lower stack and maintained
* in LibNfc library.Once libNfc client queries using this interface,
* same details exposed to LibNfc client.
* LibNfc client shall pass empty list of size \ref PHLIBNFC_MAXNO_OF_SE .
* Once SE list is available, libNfc client can perform operation on specific SE
* using SE handle.
* The handle given in the \ref phLibNfc_SE_List_t structure stays valid until
* shutdown is called.
*
*\note In case no SE's found, API still returns \ref NFCSTATUS_SUCCESS with \b uSE_count
set to zero.Value zero indicates none of the SE's connected to PN544 hardware.
* \param[in,out] pSE_List contains list of SEs with SE details in \ref phLibNfc_SE_List_t format.
* \param[in,out] uSE_count contains no of SEs in the list.
*
*\note LibNfc client has to interpret no of secure elements in \b pSE_List based on this
*count.
*
*\retval NFCSTATUS_SUCCESS Indicates operation is sucessfull.
*\retval NFCSTATUS_SHUTDOWN Operation failed because shutdown in progress.
*\retval NFCSTATUS_NOT_INITIALISED Operation failed because stack is not yet initialized.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pInitCb"];
*--- [label="Now SE list can be retrieved"];
*\endmsc
*/
NFCSTATUS phLibNfc_SE_GetSecureElementList(phLibNfc_SE_List_t* pSE_List,
uint8_t* uSE_count
);
/**
* \ingroup grp_lib_nfc
*
*\brief Sets secure element mode.
*
* This function configures SE to specific mode based on activation mode type.
* Effect of different modes on SE is as below.
*
*\b a)If mode is \ref phLibNfc_SE_ActModeVirtual then external reader can communicate
* with this SE.
*\note This mode is applicable to both UICC and SmartMX.
*
\b b)If mode is \ref phLibNfc_SE_ActModeWired then internal reader can communicate with
* this SE.In this mode PN544 can act as reader and communicate with SE as normal Tag.
*In this mode mode external reader ca not communicate with any of the SEs since RF filed is off.
*
*\note 1.Wired Mode is applicable to only SmartMX not to UICC.
* 2.When SmartMX SE configured in Wired Mode ,LibNfc client shall restart discovery process.
* SmartMX gets detected as MIFARE tag.
* 3.To exit wired mode ,LibNfc client has to disconnect with release type as "NFC_SMARTMX_RELEASE".
*
*
*\b c)If mode is \ref phLibNfc_SE_ActModeOff
*This means SE is off mode .It can not be accessed any more in wired or virtual mode.
*internal reader any more.communicate with internal reader and only
*PN544 can communicate in reader mode and external reader can not
*communicate with it.This mode is applicable both SE types ( UICC and SmartMX)
*
* \param[in] hSE_Handle Secure Element Handle .
* \param[in] eActivation_mode Indicates SE mode to be configured.
*
*
*
* \param[in] pphLibNfc_SE_setModeRspCb_t pointer to response callback.
*
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
*
* \retval NFCSTATUS_PENDING Activation transaction started.
* \retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_INVALID_HANDLE Invalid Handle.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_REJECTED Invalid request.(Ex: If wired mode settings called using
* UICC SE handle ,this error code seen).
* \retval NFCSTATUS_FAILED Request failed.
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pInitCb"];
*--- [label="Now query for available SE's"];
*LibNfcClient=>LibNfc [label="phLibNfc_SE_GetSecureElementList()",URL="\ref phLibNfc_SE_GetSecureElementList"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*--- [label="Now configure specific SE"];
*LibNfcClient=>LibNfc [label="phLibNfc_SE_SetMode(hSE_Handle,)",URL="\ref phLibNfc_SE_SetMode"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pSE_SetMode_Rsp_cb"];
*\endmsc
*/
NFCSTATUS phLibNfc_SE_SetMode ( phLibNfc_Handle hSE_Handle,
phLibNfc_eSE_ActivationMode eActivation_mode,
pphLibNfc_SE_SetModeRspCb_t pSE_SetMode_Rsp_cb,
void * pContext
);
/**
* \ingroup grp_lib_nfc
* \brief Registers notification handler to handle secure element specific events.
*
* This function registers handler to report SE specific transaction events.
* Possible different types of events are as defined in \ref phLibNfc_eSE_EvtType_t.
* \param[in] pSE_NotificationCb pointer to notification callback.
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
*\retval NFCSTATUS_SUCCESS Registration Sucessful.
*\retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
*\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
*\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
*\retval NFCSTATUS_FAILED Request failed.
*
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pInitCb"];
*--- [label="Perform feature operations "];
*
*LibNfcClient=>LibNfc [label="phLibNfc_SE_NtfRegister()",URL="\ref phLibNfc_SE_NtfRegister"];
LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*--- [label="Registration sucessfull"];
*
*--- [label="In case external reader performs transactions,callback is notified as shown below"];
*LibNfcClient<-LibNfc [label="pSE_NotificationCb"];
*\endmsc
*/
NFCSTATUS phLibNfc_SE_NtfRegister (pphLibNfc_SE_NotificationCb_t pSE_NotificationCb,
void * pContext
);
/**
* \ingroup grp_lib_nfc
* \brief Registers notification handler to handle secure element specific events.
*
* This function registers handler to report SE specific transaction events.
* Possible different types of events are as defined in \ref phLibNfc_eSE_EvtType_t.
* \param[in] pSE_NotificationCb pointer to notification callback.
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
*\retval NFCSTATUS_SUCCESS Registration Sucessful.
*\retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
*\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
*\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
*\retval NFCSTATUS_FAILED Request failed.
*
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pInitCb"];
*--- [label="Perform feature operations "];
*
*LibNfcClient=>LibNfc [label="phLibNfc_SE_NtfRegister()",URL="\ref phLibNfc_SE_NtfRegister"];
LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*--- [label="Registration sucessfull"];
*
*--- [label="In case external reader performs transactions,callback is notified as shown below"];
*LibNfcClient<-LibNfc [label="pSE_NotificationCb"];
*\endmsc
*/
NFCSTATUS phLibNfc_CE_NtfRegister (pphLibNfc_CE_NotificationCb_t pCE_NotificationCb,
void * pContext
);
/**
* \ingroup grp_lib_nfc
*\brief This function unregister the registered listener for SE event.
* This function unregisters the listener which has been registered with \ref
* phLibNfc_SE_NtfRegister.
*
*\retval NFCSTATUS_SUCCESS Unregistration successful.
*\retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
*\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
*\retval NFCSTATUS_FAILED Request failed.
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pInitCb"];
*--- [label="Perform feature operations "];
*LibNfcClient=>LibNfc [label="phLibNfc_SE_NtfRegister()",URL="\ref phLibNfc_SE_NtfRegister"];
LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*--- [label="Registration sucessfull"];
*
*--- [label="In case external reader performs transactions,callback is notified as shown below"];
*
*LibNfcClient<-LibNfc [label="pSE_NotificationCb"];
*--- [label="Unregister SE notification handler in case required "];
*LibNfcClient=>LibNfc [label="phLibNfc_SE_NtfUnregister()",URL="\ref phLibNfc_SE_NtfUnregister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*\endmsc
*/
NFCSTATUS phLibNfc_SE_NtfUnregister(void);
/**
* \ingroup grp_lib_nfc
*\brief This function unregister the registered listener for CE event.
* This function unregisters the listener which has been registered with \ref
* phLibNfc_SE_NtfRegister.
*
*\retval NFCSTATUS_SUCCESS Unregistration successful.
*\retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
*\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
*\retval NFCSTATUS_FAILED Request failed.
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pInitCb"];
*--- [label="Perform feature operations "];
*LibNfcClient=>LibNfc [label="phLibNfc_SE_NtfRegister()",URL="\ref phLibNfc_CE_NtfRegister"];
LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*--- [label="Registration sucessfull"];
*
*--- [label="In case external reader performs transactions,callback is notified as shown below"];
*
*LibNfcClient<-LibNfc [label="pCE_NotificationCb"];
*--- [label="Unregister CE notification handler in case required "];
*LibNfcClient=>LibNfc [label="phLibNfc_SE_NtfUnregister()",URL="\ref phLibNfc_CE_NtfUnregister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*\endmsc
*/
NFCSTATUS phLibNfc_CE_NtfUnregister(void);
/**
*\ingroup grp_lib_nfc
* \brief IOCTL interface.
*
* The I/O Control function allows the caller to configure specific
* functionality provided by the lower layer.Each feature is accessible via a
* specific IOCTL Code.
*
* \param[in] pDriverHandle Interface handle.This parameter is valid only for firmware download feature.
* for other IOCTL features this parameter is not relevent.
*
* \param[in] IoctlCode Control code for the operation.
* This value identifies the specific
* operation to be performed.For more details on supported
* IOCTL codes refer to \ref grp_lib_ioctl.
*\param[in,out] pInParam Pointer to any input data structure
* containing data which is interpreted
* based on IoCtl code and the length of
* the data.
*
*\param[in,out] pOutParam Pointer to output buffer details to hold
* Ioctl specific response buffer and size of
* the buffer.This buffer will be updated and
* sent back as part of of callback details.
*
*\param[in] pIoCtl_Rsp_cb Response callback registered by the caller.
*
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
*
*\retval NFCSTATUS_PENDING Update in pending state. RspCB will be
* called later.
*\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
*
\retval NFCSTATUS_BUFFER_TOO_SMALL The buffer supplied by the caller is to
*\retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
*\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
*\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
*
*\msc
*LibNfcClient,LibNfc;
*--- [label="Firmware download Scenario"];
*--- [label="Intialise Driver"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_IoCtl(pDriverHandle,)",URL="\ref phLibNfc_Mgt_IoCtl"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pIoCtl_Rsp_cb()",URL="\ref pphLibNfc_IoctlCallback_t"];
**--- [label="requested IoCtl processed sucessfully "];
*
*\endmsc
*/
NFCSTATUS phLibNfc_Mgt_IoCtl (void* pDriverHandle,
uint16_t IoctlCode,
phNfc_sData_t* pInParam,
phNfc_sData_t* pOutParam,
pphLibNfc_IoctlCallback_t pIoCtl_Rsp_cb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief This interface registers notification handler for target discovery.
*
* This function allows libNfc client to register for notifications based technology
* type it is interested to discover. In case application is interested in multiples technology
* discovery,it can enable respective bits in \b pRegistryInfo . when Registered type target
* is discovered in RF field ,LibNfc notifies registered notification callback.
*
* \note In case this API is called multiple times ,most recent request registry details will be used
*for registration.
*
*\param[in] pRegistryInfo structure contains bitwise registry information.
* Specific technology type discovery can be registered if
* corresponding bit is enabled.In case bit is disabled
* it indicates specific technology type unregistered.
*
*\param[in] pNotificationHandler Notification callback.This callback will
* be notified once registered target is discovered.
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
* \retval NFCSTATUS_SUCCESS Indicates registration successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could
* not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
*
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*--- [label="Register for technology type.Ex: MIFARE UL"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*
*\endmsc
*/
NFCSTATUS phLibNfc_RemoteDev_NtfRegister(
phLibNfc_Registry_Info_t* pRegistryInfo,
phLibNfc_NtfRegister_RspCb_t pNotificationHandler,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief Configure Discovery Modes.
*
*This function is used to configure ,start and stop the discovery wheel.
*Configuration includes
*<br><br>a)Enabling/disabling of Reader phases for A,B and F technologies.
*<br>b)Configuring NFC-IP1 Initiator Speed and duration of the Emulation phase .
*
*Discovery wheel configuration based on discovery mode selected is as below.
*<br><br>1.If discovery Mode is set as \ref NFC_DISCOVERY_CONFIG then previous configurations
* over written by new configurations passed in \ref phLibNfc_sADD_Cfg_t and Discovery wheel
*restarts with new configurations.
*<br><br>2.If discovery Mode is set as \ref NFC_DISCOVERY_START or \ref NFC_DISCOVERY_STOP then
* discovery parameters passed in \ref phLibNfc_sADD_Cfg_t will not be considered and previous
*configurations still holds good.
*<br><br>3.If discovery Mode is set as \ref NFC_DISCOVERY_RESUME discovery mode starts the discovery
*wheel from where it is stopped previously.
*
*\b Note: Config types \b NFC_DISCOVERY_START, \b NFC_DISCOVERY_STOP and \b NFC_DISCOVERY_RESUME
* are not supported currently. It is for future use.
*
* \param[in] DiscoveryMode Discovery Mode allows to choose between:
* discovery configuration and start, stop
* discovery and start discovery (with last
* set configuration).For mode details refer to
\ref phNfc_eDiscoveryConfigMode_t.
* \param[in] sADDSetup Includes Enable/Disable discovery for
* each protocol A,B and F.
* Details refer to \ref phNfc_sADD_Cfg_t.
* \param[in] pConfigDiscovery_RspCb is called once the discovery wheel
* configuration is complete.
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
*
*\retval NFCSTATUS_PENDING Discovery request is in progress and result
* will be notified via callback later.
*\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
*\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not initialized.
*\retval NFCSTATUS_INSUFFICIENT_RESOURCES Insufficient resource.(Ex: insufficient memory)
*\retval NFCSTATUS_BUSY already discovery in progress
* or it is already discovered Target and
* connected.
*\retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
*\retval NFCSTATUS_FAILED Request failed.
*
* \note : During Reader/Initiator mode it is mandatory
* to call \ref phLibNfc_RemoteDev_Connect before any transaction can be performed
* with the discovered target. Even if the LibNfc client is not
* interested in using any of the discovered targets \ref phLibNfc_RemoteDev_Connect
* and \ref phLibNfc_RemoteDev_Disconnect should be called to restart the Discovery
* wheel.
* \sa \ref phLibNfc_RemoteDev_Connect, phLibNfc_RemoteDev_Disconnect.
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref
phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Now discovery wheel configured as requested"];
*
*\endmsc
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Discovery Configuration successful.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
* \param NFCSTATUS_FAILED Request failed.
*/
NFCSTATUS phLibNfc_Mgt_ConfigureDiscovery (phLibNfc_eDiscoveryConfigMode_t DiscoveryMode,
phLibNfc_sADD_Cfg_t sADDSetup,
pphLibNfc_RspCb_t pConfigDiscovery_RspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief This function is used to to connect to a single Remote Device.
*
* This function is called to connect to discovered target.
* Once notification handler notified sucessfully discovered targets will be available in
* \ref phLibNfc_RemoteDevList_t .Remote device list contains valid handles for discovered
* targets .Using this interface LibNfc client can connect to one out of 'n' discovered targets.
* A new session is started after connect operation is successful.The session ends with a
* successful disconnect operation.Connect operation on an already connected tag Reactivates
* the Tag.This Feature is not Valid for Jewel/Topaz Tags ,and hence a second connect if issued
* without disconnecting a Jewel/Topaz tag always Fails.
*
* \note :In case multiple targets discovered LibNfc client can connect to only one target.
*
* \param[in] hRemoteDevice Handle of the target device obtained during discovery process.
*
* \param[in] pNotifyConnect_RspCb Client response callback to be to be
* notified to indicate status of the request.
*
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
*\retval NFCSTATUS_PENDING Request initiated, result will be informed via
* callback.
*\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
*\retval NFCSTATUS_TARGET_LOST Indicates target is lost.
*\retval NFSCSTATUS_SHUTDOWN shutdown in progress.
*\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
*\retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
*
*\retval NFCSTATUS_FAILED Request failed.
*
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Now Present Tag to be discovered"];
*LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
*
*\endmsc
*/
NFCSTATUS phLibNfc_RemoteDev_Connect(phLibNfc_Handle hRemoteDevice,
pphLibNfc_ConnectCallback_t pNotifyConnect_RspCb,
void* pContext
);
#ifdef RECONNECT_SUPPORT
/**
* \ingroup grp_lib_nfc
* \brief This function is used to to connect to NEXT Remote Device.
*
* This function is called only if there are more than one remote device is detected.
* Once notification handler notified sucessfully discovered targets will be available in
* \ref phLibNfc_RemoteDevList_t .Remote device list contains valid handles for discovered
* targets .Using this interface LibNfc client can connect to one out of 'n' discovered targets.
* A new session is started after connect operation is successful.
* Similarly, if the user wants to connect to another handle. Libnfc client can select the handle and
* the previously connected device is replaced by present handle. The session ends with a
* successful disconnect operation.
* Re-Connect operation on an already connected tag Reactivates the Tag. This Feature is not
* Valid for Jewel/Topaz Tags ,and hence a second re-connect if issued
* without disconnecting a Jewel/Topaz tag always Fails.
*
* \note :In case multiple targets discovered LibNfc client can re-connect to only one target.
*
* \param[in] hRemoteDevice Handle of the target device obtained during discovery process.
*
* \param[in] pNotifyReConnect_RspCb Client response callback to be to be
* notified to indicate status of the request.
*
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
*\retval NFCSTATUS_PENDING Request initiated, result will be informed via
* callback.
*\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
*\retval NFCSTATUS_TARGET_LOST Indicates target is lost.
*\retval NFSCSTATUS_SHUTDOWN shutdown in progress.
*\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
*\retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
*
*\retval NFCSTATUS_FAILED Request failed.
*
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Now Present multiple protocol Tag to be discovered"];
*LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*--- [label="TWO remote device information is received, So connect with one handle"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
*--- [label="Connect is successful, so transact using this handle. Now if user wants to switch to another handle then call Reconnect "];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_ReConnect()",URL="\ref phLibNfc_RemoteDev_ReConnect"];
*LibNfcClient<-LibNfc [label="pNotifyReConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
*
*\endmsc
*/
NFCSTATUS
phLibNfc_RemoteDev_ReConnect (
phLibNfc_Handle hRemoteDevice,
pphLibNfc_ConnectCallback_t pNotifyReConnect_RspCb,
void *pContext);
#endif /* #ifdef RECONNECT_SUPPORT */
/**
* \ingroup grp_lib_nfc
* \brief This interface allows to perform Read/write operation on remote device.
*
* This function allows to send data to and receive data
* from the target selected by libNfc client.It is also used by the
* NFCIP1 Initiator while performing a transaction with the NFCIP1 target.
* The LibNfc client has to provide the handle of the target and the
* command in order to communicate with the selected remote device.
*
*
*\param[in] hRemoteDevice handle of the remote device.This handle to be
* same as as handle obtained for specific remote device
* during device discovery.
* \param[in] psTransceiveInfo Information required by transceive is concealed in
* this structure.It contains send,receive buffers
* and command specific details.
*
*
* \param[in] pTransceive_RspCb Callback function for returning the received response
* or error.
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
* \retval NFCSTATUS_PENDING Request initiated, result will be informed through
* the callback.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could
* not be properly interpreted or invalid.
* \retval NFCSTATUS_COMMAND_NOT_SUPPORTED The command is not supported.
* \retval NFSCSTATUS_SHUTDOWN shutdown in progress.
* \retval NFCSTATUS_TARGET_LOST Indicates target is lost.
* \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
* \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_REJECTED Indicates invalid request.
* \retval NFCSTATUS_FAILED Request failed.
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Now Present Tag to be discovered"];
*LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
*--- [label="Now perform transceive operation"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Transceive()",URL="\ref phLibNfc_RemoteDev_Transceive "];
*LibNfcClient<-LibNfc [label="pTransceive_RspCb",URL="\ref pphLibNfc_TransceiveCallback_t"];
*
*\endmsc
*/
NFCSTATUS phLibNfc_RemoteDev_Transceive(phLibNfc_Handle hRemoteDevice,
phLibNfc_sTransceiveInfo_t* psTransceiveInfo,
pphLibNfc_TransceiveCallback_t pTransceive_RspCb,
void* pContext
);
/**
*\ingroup grp_lib_nfc
*\brief Allows to disconnect from already connected target.
*
* The function allows to disconnect from from already connected target. This
* function closes the session opened during connect operation.The status of discovery
* wheel after disconnection is determined by the \ref phLibNfc_eReleaseType_t parameter.
* it is also used to switch from wired to virtual mode in case the discovered
* device is SmartMX in wired mode.
*
*\param[in] hRemoteDevice handle of the target device.This handle to be
* same as as handle obtained for specific remote device
* during device discovery.
* \param[in] ReleaseType Release mode to be used while
* disconnecting from target.Refer \ref phLibNfc_eReleaseType_t
* for possible release types.
*\param[in] pDscntCallback Client response callback to be to be notified
to indicate status of the request.
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*\retval NFCSTATUS_PENDING Request initiated, result will be informed through
the callback.
*\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could not be
* properly interpreted.
*\retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
*\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
*\retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
*\retval NFCSTATUS_REJECTED Indicates previous disconnect in progress.
* \retval NFCSTATUS_BUSY Indicates can not disconnect due to outstanding transaction in progress.
* \retval NFCSTATUS_FAILED Request failed.
*
*
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Now Present Tag to be discovered"];
*LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Transceive()",URL="\ref phLibNfc_RemoteDev_Transceive"];
*LibNfcClient<-LibNfc [label="pTransceive_RspCb",URL="\ref pphLibNfc_TransceiveCallback_t"];
*--- [label="Once transceive is completed Now disconnect"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Disconnect()",URL="\ref phLibNfc_RemoteDev_Disconnect"];
*LibNfcClient<-LibNfc [label="pDscntCallback",URL="\ref pphLibNfc_RspCb_t"];
*
*\endmsc
*/
NFCSTATUS phLibNfc_RemoteDev_Disconnect( phLibNfc_Handle hRemoteDevice,
phLibNfc_eReleaseType_t ReleaseType,
pphLibNfc_DisconnectCallback_t pDscntCallback,
void* pContext
);
/**
* \ingroup grp_lib_nfc
*\brief This interface unregisters notification handler for target discovery.
*
* This function unregisters the listener which has been registered with
* phLibNfc_RemoteDev_NtfUnregister() before. After this call the callback
* function won't be called anymore. If nothing is registered the
* function still succeeds
* \retval NFCSTATUS_SUCCESS callback unregistered.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
*\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*--- [label="Perform operations"];
*--- [label="In case required unregister now"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfUnregister()",URL="\ref phLibNfc_RemoteDev_NtfUnregister"];
*
*\endmsc
*/
NFCSTATUS phLibNfc_RemoteDev_NtfUnregister(void);
/**
* \ingroup grp_lib_nfc
* \brief Check for target presence.
* This function checks ,given target is present in RF filed or not.
* Client can make use of this API to check periodically discovered
* tag is present in RF field or not.
*
*
*\param[in] hRemoteDevice handle of the target device.This handle to be
* same as as handle obtained for specific remote device
* during device discovery.
* \param[in] pPresenceChk_RspCb callback function called on completion of the
* presence check or in case an error has occurred.
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
* \retval NFCSTATUS_PENDING presence check started. Status will be notified
* via callback.
*
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not initialized.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could
* not be properly interpreted.
* \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
* \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Request failed.
*
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Now Present Tag to be discovered"];
*LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_CheckPresence()",URL="\ref phLibNfc_RemoteDev_CheckPresence"];
*LibNfcClient<-LibNfc [label="pPresenceChk_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*
*\endmsc
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Successful,indicates tag is present in RF field.
* \param NFCSTATUS_TARGET_LOST Indicates target is lost.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
* \param NFCSTATUS_FAILED Request failed.
*
*/
NFCSTATUS phLibNfc_RemoteDev_CheckPresence( phLibNfc_Handle hRemoteDevice,
pphLibNfc_RspCb_t pPresenceChk_RspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
*\brief Allows to check connected tag is NDEF compliant or not.
* This function allows to validate connected tag is NDEF compliant or not.
*
*\param[in] hRemoteDevice handle of the remote device.This handle to be
* same as as handle obtained for specific remote device
* during device discovery.
*\param[in] pCheckNdef_RspCb Response callback defined by the caller.
*\param[in] pContext Client context which will be included in
* callback when the request is completed.
*
* \retval NFCSTATUS_PENDING The action has been successfully triggered.
* \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the function
* is invalid.
* \retval NFCSTATUS_TARGET_LOST Indicates target is lost
* \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
* \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Request failed.
*
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Now Present NDEF complaint Tag Type"];
*LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
*LibNfcClient<-LibNfc [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*
*\endmsc
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Successful and tag is NDEF compliant .
* \param NFCSTATUS_TARGET_LOST NDEF check operation is failed because of target is ** lost.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
* \param NFCSTATUS_ABORTED Aborted due to disconnect operation in between.
* \param NFCSTATUS_FAILED Request failed.
*/
NFCSTATUS phLibNfc_Ndef_CheckNdef(phLibNfc_Handle hRemoteDevice,
pphLibNfc_ChkNdefRspCb_t pCheckNdef_RspCb,
void* pContext);
/**
* \ingroup grp_lib_nfc
* \brief Read NDEF message from a Tag.
* This function reads an NDEF message from already connected tag.
* the NDEF message is read starting after the position of the last read operation
* of the same tag during current session.
* If it's FALSE the NDEF message is read from starting of the NDEF message.
* If the call returns with NFCSTATUS_PENDING , a response callback pNdefRead_RspCb is
* called ,when the read operation is complete.
*
*\note Before issuing NDEF read operation LibNfc client should perform NDEF check operation
* using \ref phLibNfc_Ndef_CheckNdef interface.
* If the call back error code is NFCSTATUS_FAILED then the LIBNFC client has to do the
* phLibNfc_RemoteDev_CheckPresence to find , its communication error or target lost.
*
*\param[in] hRemoteDevice handle of the remote device.This handle to be
* same as as handle obtained for specific remote device
* during device discovery.
* \param[in] psRd Pointer to the read buffer info.
* \param[in] Offset Reading Offset : phLibNfc_Ndef_EBegin means from the
* beginning, phLibNfc_Ndef_ECurrent means from the
* current offset.
* \param[in] pNdefRead_RspCb Response callback defined by the caller.
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
* \retval NFCSTATUS_SUCCESS NDEF read operation successful.
* \retval NFCSTATUS_PENDING Request accepted and started
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress
* \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could not
* be properly interpreted.
* \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
* \retval NFCSTATUS_FAILED Read operation failed since tag does not contain NDEF data.
* \retval NFCSTATUS_NON_NDEF_COMPLIANT Tag is not Ndef Compliant.
* \param NFCSTATUS_REJECTED Rejected due to NDEF read issued on non
* ,or Ndef check has not been performed
* before the readNDEF tag.
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Now Present NDEF complaint Tag Type"];
*LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
*LibNfcClient<-LibNfc [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_Ndef_Read()",URL="\ref phLibNfc_Ndef_Read "];
*LibNfcClient<-LibNfc [label="pNdefRead_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*
*\endmsc
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS NDEF read operation successful.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
* \param NFCSTATUS_ABORTED Aborted due to disconnect operation in between.
* \param NFCSTATUS_FAILED Request failed.
*/
NFCSTATUS phLibNfc_Ndef_Read(phLibNfc_Handle hRemoteDevice,
phNfc_sData_t* psRd,
phLibNfc_Ndef_EOffset_t Offset,
pphLibNfc_RspCb_t pNdefRead_RspCb,
void* pContext
);
/**
** \ingroup grp_lib_nfc
*
* \brief Write NDEF data to NFC tag.
*
* This function allows the client to write a NDEF data to already connected NFC tag.
* Function writes a complete NDEF message to a tag. If a NDEF message already
* exists in the tag, it will be overwritten. When the transaction is complete,
* a notification callback is notified.
*
*\note Before issuing NDEF write operation LibNfc client should perform NDEF check operation
* using \ref phLibNfc_Ndef_CheckNdef interface.
*
*\param[in] hRemoteDevice handle of the remote device.This handle to be
* same as as handle obtained for specific remote device
* during device discovery.
*\param[in] psWr Ndef Buffer to write. If NdefMessageLen is set to 0
* and pNdefMessage = NULL, the NFC library will erase
* tag internally.
*\param[in] pNdefWrite_RspCb Response callback defined by the caller.
*\param[in] pContext Client context which will be included in
* callback when the request is completed.
*
*\note If \ref phNfc_sData_t.NdefMessageLen is 0 bytes, this function will erase all
*current NDEF data present in the tag. Any non-zero length buffer size
*will attempt to write NEDF data onto the tag.
* If the call back error code is NFCSTATUS_FAILED then the LIBNFC client has to do the
* phLibNfc_RemoteDev_CheckPresence to find , its communication error or target lost.
*
*
* \retval NFCSTATUS_PENDING Request accepted and started.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could not
* be properly interpreted.
* \retval NFCSTATUS_NON_NDEF_COMPLIANT Tag is not Ndef Compliant.
* \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
* \retval NFCSTATUS_REJECTED Rejected due to NDEF write issued without
* performing a CheckNdef().
* \retval NFCSTATUS_FAILED operation failed.
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Now Present NDEF Tag "];
*LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
*LibNfcClient<-LibNfc [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_Ndef_Write()",URL="\ref phLibNfc_Ndef_Write "];
*LibNfcClient<-LibNfc [label="pNdefWrite_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*
*\endmsc
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS NDEF write operation is successful.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
* \param NFCSTATUS_ABORTED, Aborted due to disconnect operation in between.
* \param NFCSTATUS_NOT_ENOUGH_MEMORY Requested no of bytes to be writen exceeds size of the memory available on the tag.
* \param NFCSTATUS_FAILED Request failed.
*/
NFCSTATUS phLibNfc_Ndef_Write (phLibNfc_Handle hRemoteDevice,
phNfc_sData_t* psWr,
pphLibNfc_RspCb_t pNdefWrite_RspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
*
* \brief Format target.
*
* This function allows the LibNfc client to perform NDEF formating operation on discovered target.
This function formats given target
*
*\note
* <br>1. Prior to formating it is recommended to perform NDEF check using \ref phLibNfc_Ndef_CheckNdef interface.
* <br>2. formatting feature supported only for MIFARE Std,MIFARE UL and Desfire tag types.
* If the call back error code is NFCSTATUS_FAILED then the LIBNFC client has to do the
* phLibNfc_RemoteDev_CheckPresence to find , its communication error or target lost.
*
*\param[in] hRemoteDevice handle of the remote device.This handle to be
* same as as handle obtained for specific remote device
* during device discovery.
*\param[in] pScrtKey info containing the secret key data
* and Secret key buffer length.
*
*\param[in] pNdefformat_RspCb Response callback defined by the caller.
*\param[in] pContext Client context which will be included in
* callback when the request is completed.
*
*
* \retval NFCSTATUS_PENDING Request accepted and started.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could not
* be properly interpreted.
* \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
* \retval NFCSTATUS_FAILED operation failed.
* \retval NFCSTATUS_REJECTED Tag is already formatted one.
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Now Present non NDEF Tag "];
*LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
*LibNfcClient<-LibNfc [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Tag found to be non NDEF compliant ,now format it"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_FormatNdef()",URL="\ref phLibNfc_RemoteDev_FormatNdef "];
*LibNfcClient<-LibNfc [label="pNdefformat_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*
*\endmsc
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS NDEF formatting operation is successful.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
* \param NFCSTATUS_ABORTED, Aborted due to disconnect operation in between.
* \param NFCSTATUS_FAILED Request failed.
*/
NFCSTATUS phLibNfc_RemoteDev_FormatNdef(phLibNfc_Handle hRemoteDevice,
phNfc_sData_t* pScrtKey,
pphLibNfc_RspCb_t pNdefformat_RspCb,
void* pContext
);
#ifdef LIBNFC_READONLY_NDEF
/**
* \ingroup grp_lib_nfc
*
* \brief To convert a already formatted NDEF READ WRITE tag to READ ONLY.
*
* This function allows the LibNfc client to convert a already formatted NDEF READ WRITE
* tag to READ ONLY on discovered target.
*
*\note
* <br>1. Prior to formating it is recommended to perform NDEF check using \ref phLibNfc_Ndef_CheckNdef interface.
* <br>2. READ ONLY feature supported only for MIFARE UL and Desfire tag types.
* If the call back error code is NFCSTATUS_FAILED then the LIBNFC client has to do the
* phLibNfc_RemoteDev_CheckPresence to find, its communication error or target lost.
*
*\param[in] hRemoteDevice handle of the remote device.This handle to be
* same as as handle obtained for specific remote device
* during device discovery.
*\param[in] pScrtKey Key to be used for making Mifare read only. This parameter is
* unused in case of readonly for other cards.
*\param[in] pNdefReadOnly_RspCb Response callback defined by the caller.
*\param[in] pContext Client context which will be included in
* callback when the request is completed.
*
*
* \retval NFCSTATUS_PENDING Request accepted and started.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could not
* be properly interpreted.
* \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
* \retval NFCSTATUS_FAILED operation failed.
* \retval NFCSTATUS_REJECTED Tag is already formatted one.
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Now Present NDEF Tag "];
*LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
*LibNfcClient<-LibNfc [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Tag found to be NDEF compliant ,now convert the tag to read only"];
*LibNfcClient=>LibNfc [label="phLibNfc_ConvertToReadOnlyNdef()",URL="\ref phLibNfc_ConvertToReadOnlyNdef "];
*LibNfcClient<-LibNfc [label="pNdefReadOnly_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*
*\endmsc
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Converting the tag to READ ONLY NDEF is successful.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
* \param NFCSTATUS_ABORTED, Aborted due to disconnect operation in between.
* \param NFCSTATUS_FAILED Request failed.
*/
NFCSTATUS phLibNfc_ConvertToReadOnlyNdef (phLibNfc_Handle hRemoteDevice,
phNfc_sData_t* pScrtKey,
pphLibNfc_RspCb_t pNdefReadOnly_RspCb,
void* pContext
);
#endif /* #ifdef LIBNFC_READONLY_NDEF */
/**
* \ingroup grp_lib_nfc
* \brief <b>Search for NDEF Record type</b>.
*
* This function allows LibNfc client to search NDEF content based on TNF value and type \n
*
*This API allows to find NDEF records based on RTD (Record Type Descriptor) info.
*LibNfc internally parses NDEF content based registration type registered.
*In case there is match LibNfc notifies LibNfc client with NDEF information details.
*LibNfc client can search a new NDEF registration type once the previous call is handled.
*
*\param[in] hRemoteDevice Handle of the remote device.This handle to be
* same as as handle obtained for specific remote device
* during device discovery.
*\param[in] psSrchTypeList List of NDEF records to be looked in based on TNF value and type.
* For NDEF search type refer to \ref phLibNfc_Ndef_SrchType.
* If this set to NULL then it means that libNfc client interested in
* all possible NDEF records.
*
*\param[in] uNoSrchRecords Indicates no of NDEF records in requested list as mentioned
* in psSrchTypeList.
*\param[in] pNdefNtfRspCb Response callback defined by the caller.
*\param[in] pContext Client context which will be included in
* callback when callback is notified.
*
*
* \retval NFCSTATUS_SUCCESS Indicates NDEF notification registration successful.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could not
* be properly interpreted.
* \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
* \retval NFCSTATUS_FAILED operation failed.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
*
* \retval NFCSTATUS_ABORTED Aborted due to disconnect request in between.
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Now Present NDEF Tag "];
*LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
*LibNfcClient<-LibNfc [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*LibNfcClient=>LibNfc [label="phLibNfc_Ndef_SearchNdefContent()",URL="\ref phLibNfc_Ndef_SearchNdefContent"];
*LibNfcClient<-LibNfc [label="pNdefNtfRspCb",URL="\ref pphLibNfc_Ndef_Search_RspCb_t()"];
*\endmsc
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
*/
NFCSTATUS phLibNfc_Ndef_SearchNdefContent(
phLibNfc_Handle hRemoteDevice,
phLibNfc_Ndef_SrchType_t* psSrchTypeList,
uint8_t uNoSrchRecords,
pphLibNfc_Ndef_Search_RspCb_t pNdefNtfRspCb,
void * pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b> Interface used to receive data from initiator at target side during P2P communication</b>.
*
*This function Allows the NFC-IP1 target to retrieve data/commands coming from the
*Initiator.Once this function is called by LibNfc client on target side it waits for
*receiving data from initiator.It is used by libNfc client which acts as target during P2P
*communication.
*
*\note : Once this API is called,its mandatory to wait for receive
*\ref pphLibNfc_Receive_RspCb_t callback notification,before calling any other
*API.Only function allowed is \ref phLibNfc_Mgt_DeInitialize.
*
* \param[in] hRemoteDevice Peer handle obtained during device discovery process.
*
* \param[in] pReceiveRspCb Callback function called after receiving
* the data or in case an error has
* has occurred.
*
* \param[in] pContext Upper layer context to be returned
* in the callback.
*
* \retval NFCSTATUS_PENDING Receive operation is in progress.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_INVALID_DEVICE The device has been disconnected meanwhile.
* \retval NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*
*\retval NFCSTATUS_REJECTED Indicates invalid request.
*\retval NFCSTATUS_FAILED Request failed.
*
*\msc
*P2PInitiatorClient,InitiatorLibNfc,P2PTargetLibNfc,P2PTargetClient;
*--- [label="stack is intialised and P2P notification handler registered alredy"];
*P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref phLibNfc_Mgt_SetP2P_ConfigParams"];
*P2PTargetClient<<P2PTargetLibNfc [label="NFCSTATUS_PENDING"];
*P2PTargetClient<-P2PTargetLibNfc [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
*P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref phLibNfc_Mgt_SetP2P_ConfigParams"];
*P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
*P2PInitiatorClient<-InitiatorLibNfc [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
*P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*P2PTargetClient<<P2PTargetLibNfc [label="NFCSTATUS_PENDING"];
*P2PTargetClient<-P2PTargetLibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
*P2PInitiatorClient<-InitiatorLibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Place Initiator and target closely"];
*P2PInitiatorClient<-InitiatorLibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
*P2PInitiatorClient<-InitiatorLibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
*P2PTargetClient<-P2PTargetLibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*--- [label="On connect target must be immediately ready to receive data from initiator"];
*P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_RemoteDev_Receive()",URL="\ref phLibNfc_RemoteDev_Receive"];
*--- [label="Now target waits to receive data from intiator"];
*--- [label="Send data from initiator now"];
*P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_RemoteDev_Transceive()",URL="\ref phLibNfc_RemoteDev_Transceive "];
*P2PInitiatorClient<-InitiatorLibNfc [label="pTransceive_RspCb",URL="\ref pphLibNfc_TransceiveCallback_t"];
*--- [label="Now data arrived at target side"];
*P2PTargetClient<-P2PTargetLibNfc [label="pReceiveRspCb",URL="\ref pphLibNfc_Receive_RspCb_t"];
\endmsc
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Receive operation successful.
* \param NFCSTATUS_SHUTDOWN Receive operation failed because Shutdown in progress.
* \param NFCSTATUS_ABORTED Aborted due to initiator issued disconnect request.
* or intiator removed physically from the RF field.
* This status code reported,to indicate P2P session
* closed and send and receive requests not allowed
* any more unless new session is started.
* \param NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*/
extern
NFCSTATUS
phLibNfc_RemoteDev_Receive( phLibNfc_Handle hRemoteDevice,
pphLibNfc_Receive_RspCb_t pReceiveRspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b> Interface used to receive data from reader at target side during communication</b>.
*
*This function Allows the target to retrieve data/commands coming from the
*Reader.Once this function is called by LibNfc client on target side it waits for
*receiving data from initiator.It is used by libNfc client which acts as target during P2P
*communication.
*
*\note : Once this API is called,its mandatory to wait for receive
*\ref pphLibNfc_Receive_RspCb_t callback notification,before calling any other
*API.Only function allowed is \ref phLibNfc_Mgt_DeInitialize.
*
* \param[in] pReceiveRspCb Callback function called after receiving
* the data or in case an error has
* has occurred.
*
* \param[in] pContext Upper layer context to be returned
* in the callback.
*
* \retval NFCSTATUS_PENDING Receive operation is in progress.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_INVALID_DEVICE The device has been disconnected meanwhile.
* \retval NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*
*\retval NFCSTATUS_REJECTED Indicates invalid request.
*\retval NFCSTATUS_FAILED Request failed.
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Receive operation successful.
* \param NFCSTATUS_SHUTDOWN Receive operation failed because Shutdown in progress.
* \param NFCSTATUS_ABORTED Aborted due to initiator issued disconnect request.
* or intiator removed physically from the RF field.
* This status code reported,to indicate P2P session
* closed and send and receive requests not allowed
* any more unless new session is started.
* \param NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*/
extern
NFCSTATUS
phLibNfc_RemoteDev_CE_A_Receive(
pphLibNfc_TransceiveCallback_t pReceiveRspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b> Interface used to receive data from reader at target side during communication</b>.
*
*This function Allows the target to retrieve data/commands coming from the
*Reader.Once this function is called by LibNfc client on target side it waits for
*receiving data from initiator.It is used by libNfc client which acts as target during P2P
*communication.
*
*\note : Once this API is called,its mandatory to wait for receive
*\ref pphLibNfc_Receive_RspCb_t callback notification,before calling any other
*API.Only function allowed is \ref phLibNfc_Mgt_DeInitialize.
*
* \param[in] pReceiveRspCb Callback function called after receiving
* the data or in case an error has
* has occurred.
*
* \param[in] pContext Upper layer context to be returned
* in the callback.
*
* \retval NFCSTATUS_PENDING Receive operation is in progress.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_INVALID_DEVICE The device has been disconnected meanwhile.
* \retval NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*
*\retval NFCSTATUS_REJECTED Indicates invalid request.
*\retval NFCSTATUS_FAILED Request failed.
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Receive operation successful.
* \param NFCSTATUS_SHUTDOWN Receive operation failed because Shutdown in progress.
* \param NFCSTATUS_ABORTED Aborted due to initiator issued disconnect request.
* or intiator removed physically from the RF field.
* This status code reported,to indicate P2P session
* closed and send and receive requests not allowed
* any more unless new session is started.
* \param NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*/
extern
NFCSTATUS
phLibNfc_RemoteDev_CE_B_Receive(
pphLibNfc_TransceiveCallback_t pReceiveRspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Interface used to send data from target to initiator during P2P communication</b>.
*
*This function Allows the NFC-IP1 target to send data to Initiator,in response to packet received
*from initiator during P2P communication.It is must prior to send request target has received
*data from initiator using \ref phLibNfc_RemoteDev_Receive interface.
*
*
* \param[in] hRemoteDevice Peer handle obtained during device discovery process.
*
* \param[in] pTransferData Data and the length of the data to be
* transferred.
* \param[in] pSendRspCb Callback function called on completion
* of the NfcIP sequence or in case an
* error has occurred.
*
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
** \retval NFCSTATUS_PENDING Send operation is in progress.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_INVALID_DEVICE The device has been disconnected meanwhile.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
* \retval NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*\retval NFCSTATUS_REJECTED Indicates invalid request.
*\retval NFCSTATUS_FAILED Request failed.
*
*\msc
*P2PInitiatorClient,InitiatorLibNfc,P2PTargetLibNfc,P2PTargetClient;
*--- [label="stack is intialised and P2P notification handler registered alredy"];
*P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref phLibNfc_Mgt_SetP2P_ConfigParams"];
*P2PTargetClient<<P2PTargetLibNfc [label="NFCSTATUS_PENDING"];
*P2PTargetClient<-P2PTargetLibNfc [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
*P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref phLibNfc_Mgt_SetP2P_ConfigParams"];
*P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
*P2PInitiatorClient<-InitiatorLibNfc [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
*P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*P2PTargetClient<<P2PTargetLibNfc [label="NFCSTATUS_PENDING"];
*P2PTargetClient<-P2PTargetLibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
*P2PInitiatorClient<-InitiatorLibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Place Initiator and target closely"];
*P2PInitiatorClient<-InitiatorLibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
*P2PInitiatorClient<-InitiatorLibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
*P2PTargetClient<-P2PTargetLibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*--- [label="On connect target must be immediately ready to receive data from initiator"];
*P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_RemoteDev_Receive()",URL="\ref phLibNfc_RemoteDev_Receive"];
*--- [label="Now target waits to receive data from intiator"];
*--- [label="Send data from initiator now"];
*P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_RemoteDev_Transceive()",URL="\ref phLibNfc_RemoteDev_Transceive "];
*--- [label="Now data arrived at target side"];
*P2PTargetClient<-P2PTargetLibNfc [label="pReceiveRspCb",URL="\ref pphLibNfc_Receive_RspCb_t"];
*--- [label="Now send data from target"];
*P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_RemoteDev_Send()",URL="\ref phLibNfc_RemoteDev_Send"];
*P2PInitiatorClient<-InitiatorLibNfc [label="pTransceive_RspCb",URL="\ref pphLibNfc_TransceiveCallback_t"];
*P2PTargetClient<-P2PTargetLibNfc [label="pSendRspCb",URL="\ref pphLibNfc_RspCb_t"];
*\endmsc
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Send operation successful.
* \param NFCSTATUS_SHUTDOWN Send operation failed because Shutdown in progress.
* \param NFCSTATUS_ABORTED Aborted due to initiator issued disconnect request.
* or intiator removed physically from the RF field.
* This status code reported,to indicate P2P session
* closed and send and receive requests not allowed
* any more unless new session is started.
* \param NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*
*
*/
extern
NFCSTATUS
phLibNfc_RemoteDev_Send(phLibNfc_Handle hRemoteDevice,
phNfc_sData_t* pTransferData,
pphLibNfc_RspCb_t pSendRspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Interface used to send data from A target to reader during communication</b>.
*
*This function Allows the A type target to send data to Initiator,in response to packet received
*from reader during CE communication.It is must prior to send request target has received
*data from initiator using \ref phLibNfc_RemoteDev_Receive interface.
*
*
* \param[in] pTransferData Data and the length of the data to be
* transferred.
* \param[in] pSendRspCb Callback function called on completion
* of the NfcIP sequence or in case an
* error has occurred.
*
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
** \retval NFCSTATUS_PENDING Send operation is in progress.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_INVALID_DEVICE The device has been disconnected meanwhile.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
* \retval NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*\retval NFCSTATUS_REJECTED Indicates invalid request.
*\retval NFCSTATUS_FAILED Request failed.
*
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Send operation successful.
* \param NFCSTATUS_SHUTDOWN Send operation failed because Shutdown in progress.
* \param NFCSTATUS_ABORTED Aborted due to initiator issued disconnect request.
* or intiator removed physically from the RF field.
* This status code reported,to indicate P2P session
* closed and send and receive requests not allowed
* any more unless new session is started.
* \param NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*
*
*/
extern
NFCSTATUS
phLibNfc_RemoteDev_CE_A_Send(
phNfc_sData_t* pTransferData,
pphLibNfc_RspCb_t pSendRspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Interface used to send data from A target to reader during communication</b>.
*
*This function Allows the B type target to send data to Initiator,in response to packet received
*from reader during CE communication.It is must prior to send request target has received
*data from initiator using \ref phLibNfc_RemoteDev_Receive interface.
*
*
* \param[in] pTransferData Data and the length of the data to be
* transferred.
* \param[in] pSendRspCb Callback function called on completion
* of the NfcIP sequence or in case an
* error has occurred.
*
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
** \retval NFCSTATUS_PENDING Send operation is in progress.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_INVALID_DEVICE The device has been disconnected meanwhile.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
* \retval NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*\retval NFCSTATUS_REJECTED Indicates invalid request.
*\retval NFCSTATUS_FAILED Request failed.
*
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Send operation successful.
* \param NFCSTATUS_SHUTDOWN Send operation failed because Shutdown in progress.
* \param NFCSTATUS_ABORTED Aborted due to initiator issued disconnect request.
* or intiator removed physically from the RF field.
* This status code reported,to indicate P2P session
* closed and send and receive requests not allowed
* any more unless new session is started.
* \param NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*
*
*/
extern
NFCSTATUS
phLibNfc_RemoteDev_CE_B_Send(
phNfc_sData_t* pTransferData,
pphLibNfc_RspCb_t pSendRspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Interface used to transceive data from A target to reader during communication</b>.
*
*This function Allows the A type target to send data to Initiator,in response to packet received
*from reader during CE communication.It is must prior to send request target has received
*data from initiator using \ref phLibNfc_RemoteDev_Receive interface.
*
*
* \param[in] pTransferData Data and the length of the data to be
* transferred.
* \param[in] pRecvRspCb Callback function called on completion
* of the NfcIP sequence or in case an
* error has occurred.
*
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
** \retval NFCSTATUS_PENDING Send operation is in progress.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_INVALID_DEVICE The device has been disconnected meanwhile.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
* \retval NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*\retval NFCSTATUS_REJECTED Indicates invalid request.
*\retval NFCSTATUS_FAILED Request failed.
*
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Send operation successful.
* \param NFCSTATUS_SHUTDOWN Send operation failed because Shutdown in progress.
* \param NFCSTATUS_ABORTED Aborted due to initiator issued disconnect request.
* or intiator removed physically from the RF field.
* This status code reported,to indicate P2P session
* closed and send and receive requests not allowed
* any more unless new session is started.
* \param NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*
*
*/
extern
NFCSTATUS
phLibNfc_RemoteDev_CE_A_Transceive(
phNfc_sData_t * pTransferData,
pphLibNfc_TransceiveCallback_t pTransceive_RspCb,
void *pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Interface used to transceive data from B target to reader during communication</b>.
*
*This function Allows the B type target to send data to Initiator,in response to packet received
*from reader during CE communication.It is must prior to send request target has received
*data from initiator using \ref phLibNfc_RemoteDev_Receive interface.
*
*
* \param[in] pTransferData Data and the length of the data to be
* transferred.
* \param[in] pRecvRspCb Callback function called on completion
* of the NfcIP sequence or in case an
* error has occurred.
*
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
** \retval NFCSTATUS_PENDING Send operation is in progress.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_INVALID_DEVICE The device has been disconnected meanwhile.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
* \retval NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*\retval NFCSTATUS_REJECTED Indicates invalid request.
*\retval NFCSTATUS_FAILED Request failed.
*
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS Send operation successful.
* \param NFCSTATUS_SHUTDOWN Send operation failed because Shutdown in progress.
* \param NFCSTATUS_ABORTED Aborted due to initiator issued disconnect request.
* or intiator removed physically from the RF field.
* This status code reported,to indicate P2P session
* closed and send and receive requests not allowed
* any more unless new session is started.
* \param NFCSTATUS_DESELECTED Receive operation is not possible due to
* initiator issued disconnect or intiator
* physically removed from the RF field.
*
*
*/
extern
NFCSTATUS
phLibNfc_RemoteDev_CE_B_Transceive(
phNfc_sData_t * pTransferData,
pphLibNfc_TransceiveCallback_t pTransceive_RspCb,
void *pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Interface to configure P2P and intiator mode configurations</b>.
* The setting will be typically take effect for the next cycle of the relevant
* phase of discovery. For optional configuration internal defaults will be
* used in case the configuration is not set.
*
*\note Currently general bytes configuration supported.
*
* \param[in] pConfigInfo Union containing P2P configuration details as
* in \ref phLibNfc_sNfcIPCfg_t.
*
* \param[in] pConfigRspCb This callback has to be called once LibNfc
* completes the Configuration.
*
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
*
* \retval NFCSTATUS_PENDING Config operation is in progress.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
*
*\msc
*P2PInitiatorClient,InitiatorLibNfc,P2PTargetLibNfc,P2PTargetClient;
*--- [label="stack is intialised and P2P notification handler registered alredy"];
*P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref phLibNfc_Mgt_SetP2P_ConfigParams"];
*P2PTargetClient<<P2PTargetLibNfc [label="NFCSTATUS_PENDING"];
*P2PTargetClient<-P2PTargetLibNfc [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
*P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref phLibNfc_Mgt_SetP2P_ConfigParams"];
*P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
*P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*P2PTargetClient<<P2PTargetLibNfc [label="NFCSTATUS_PENDING"];
*P2PTargetClient<-P2PTargetLibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
*P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
*P2PInitiatorClient<-InitiatorLibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
*--- [label="Place Initiator and target closely"];
*P2PInitiatorClient<-InitiatorLibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
*P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
*P2PInitiatorClient<-InitiatorLibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
*P2PTargetClient<-P2PTargetLibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
*--- [label="Now configured params ( Ex : general bytes can been seen in remote device info"];
*\endmsc
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS configuration operation is successful.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
* \param NFCSTATUS_FAILED Request failed.
*
*/
extern NFCSTATUS phLibNfc_Mgt_SetP2P_ConfigParams( phLibNfc_sNfcIPCfg_t* pConfigInfo,
pphLibNfc_RspCb_t pConfigRspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Interface to break any existing pending callbacks for card emulation</b>.
* \retval NFCSTATUS_SUCCESS Config operation succeeded.
* \retval NFCSTATUS_NOT_INITIALISED There was no callback in progress.
*
*/
extern NFCSTATUS phLibNfc_Mgt_Unblock_Cb_CE_A_14443_4( );
/**
* \ingroup grp_lib_nfc
* \brief <b>Interface to break any existing pending callbacks for card emulation</b>.
* \retval NFCSTATUS_SUCCESS Config operation succeeded.
* \retval NFCSTATUS_NOT_INITIALISED There was no callback in progress.
*
*/
extern NFCSTATUS phLibNfc_Mgt_Unblock_Cb_CE_B_14443_4( );
/**
* \ingroup grp_lib_nfc
* \brief <b>Interface to configure Card Emulation mode configurations</b>.
* The setting will be typically take effect for the next cycle of the relevant
* phase of discovery. For optional configuration internal defaults will be
* used in case the configuration is not set.
*
*\note Currently general bytes configuration supported.
*
* \param[in] bool turn on or off (TRUE/FALSE)
*
* \param[in] pConfigRspCb This callback has to be called once LibNfc
* completes the Configuration.
*
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
*
* \retval NFCSTATUS_PENDING Config operation is in progress.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS configuration operation is successful.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
* \param NFCSTATUS_FAILED Request failed.
*
*/
extern NFCSTATUS phLibNfc_Mgt_SetCE_A_14443_4_ConfigParams(
uint8_t emulate,
pphLibNfc_RspCb_t pConfigRspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Interface to configure Card Emulation mode configurations</b>.
* The setting will be typically take effect for the next cycle of the relevant
* phase of discovery. For optional configuration internal defaults will be
* used in case the configuration is not set.
*
*\note Currently general bytes configuration supported.
*
* \param[in] bool turn on or off (TRUE/FALSE)
*
* \param[in] pConfigRspCb This callback has to be called once LibNfc
* completes the Configuration.
*
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
*
* \retval NFCSTATUS_PENDING Config operation is in progress.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
*
*\note Response callback parameters details for this interface are as listed below.
*
* \param[in] pContext LibNfc client context passed in the corresponding request before.
* \param[in] status Status of the response callback.
*
* \param NFCSTATUS_SUCCESS configuration operation is successful.
* \param NFCSTATUS_SHUTDOWN Shutdown in progress.
* \param NFCSTATUS_FAILED Request failed.
*
*/
extern NFCSTATUS phLibNfc_Mgt_SetCE_B_14443_4_ConfigParams(
uint8_t emulate,
pphLibNfc_RspCb_t pConfigRspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Interface to stack capabilities</b>.
*
* LibNfc client can query to retrieve stack capabilities.Stack capabilities contains
* <br><br>a).Device capabilities which contains details like protocols supported,
* Hardware,Firmware and model-id version details .For details refer to \ref phNfc_sDeviceCapabilities_t.
* <br><br>b).NDEF mapping related info. This info helps in identifying supported tags for NDEF mapping feature.
* <br><br>c).NDEF formatting related info. This info helps in identifying supported tags for NDEF formatting feature.
*
* \param[in] phLibNfc_StackCapabilities Contains device capabilities and NDEF mapping and formatting feature
support for different tag types.
*
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
*
* \retval NFCSTATUS_SUCCESS Indicates Get stack Capabilities operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED operation failed.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
*
*
*\msc
*LibNfcClient,LibNfc;
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
*LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
*LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_GetstackCapabilities()",URL="\ref phLibNfc_Mgt_GetstackCapabilities"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*--- [label="Now stack capabilities available "];
*
*\endmsc*/
extern NFCSTATUS phLibNfc_Mgt_GetstackCapabilities(phLibNfc_StackCapabilities_t* phLibNfc_StackCapabilities,
void* pContext
);
/**
* \ingroup grp_lib_nfcHW_
* \brief <b>Interface to configure local LLCP peer</b>.
*
* This function configures the parameters of the local LLCP peer. This function must be called
* before any other LLCP-related function from this API.
*
* \param[in] pConfigInfo Contains local LLCP link parameters to be applied
* \param[in] pConfigRspCb This callback has to be called once LibNfc
* completes the Configuration.
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_PENDING Configuration operation is in progress,
pConfigRspCb will be called upon completion.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
*/
extern NFCSTATUS phLibNfc_Mgt_SetLlcp_ConfigParams( phLibNfc_Llcp_sLinkParameters_t* pConfigInfo,
pphLibNfc_RspCb_t pConfigRspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Checks if a remote peer is LLCP compliant</b>.
*
* This functions allows to check if a previously detected tag is compliant with the
* LLCP protocol. This step is needed before calling any other LLCP-related function on
* this remote peer, except local LLCP peer configurationn, which is more general. Once
* this checking is done, the caller will be able to receive link status notifications
* until the peer is disconnected.
*
* \param[in] hRemoteDevice Peer handle obtained during device discovery process.
* \param[in] pCheckLlcp_RspCb The callback to be called once LibNfc
* completes the LLCP compliancy check.
* \param[in] pLink_Cb The callback to be called each time the
* LLCP link status changes.
* \param[in] pContext Upper layer context to be returned in
* the callbacks.
*
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_PENDING Check operation is in progress, pCheckLlcp_RspCb will
* be called upon completion.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
*/
extern NFCSTATUS phLibNfc_Llcp_CheckLlcp( phLibNfc_Handle hRemoteDevice,
pphLibNfc_ChkLlcpRspCb_t pCheckLlcp_RspCb,
pphLibNfc_LlcpLinkStatusCb_t pLink_Cb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Activates a LLCP link with a remote device </b>.
*
* This function launches the link activation process on a remote LLCP-compliant peer. The link status
* notification will be sent by the corresponding callback given in the phLibNfc_Llcp_CheckLlcp function.
* If the activation fails, the deactivated status will be notified, even if the link is already in a
* deactivated state.
*
* \param[in] hRemoteDevice Peer handle obtained during device discovery process.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_PENDING Activation operation is in progress,
pLink_Cb will be called upon completion.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
*/
extern NFCSTATUS phLibNfc_Llcp_Activate( phLibNfc_Handle hRemoteDevice );
/**
* \ingroup grp_lib_nfc
* \brief <b>Deactivate a previously activated LLCP link with a remote device</b>.
*
* This function launches the link deactivation process on a remote LLCP-compliant peer. The link status
* notification will be sent by the corresponding callback given in the phLibNfc_Llcp_CheckLlcp function.
*
* \param[in] hRemoteDevice Peer handle obtained during device discovery process.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_PENDING Deactivation operation is in progress,
pLink_Cb will be called upon completion.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
*/
extern NFCSTATUS phLibNfc_Llcp_Deactivate( phLibNfc_Handle hRemoteDevice );
/**
* \ingroup grp_lib_nfc
* \brief <b>Get information on the local LLCP peer</b>.
*
* This function returns the LLCP link parameters of the local peer that were used
* during the link activation.
*
* \param[in] hRemoteDevice Peer handle obtained during device discovery process.
* \param[out] pConfigInfo Pointer on the variable to be filled with the configuration
parameters used during activation.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
*/
extern NFCSTATUS phLibNfc_Llcp_GetLocalInfo( phLibNfc_Handle hRemoteDevice,
phLibNfc_Llcp_sLinkParameters_t* pConfigInfo
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Get information on the remote LLCP peer</b>.
*
* This function returns the LLCP link parameters of the remote peer that were received
* during the link activation.
*
* \param[in] hRemoteDevice Peer handle obtained during device discovery process.
* \param[out] pConfigInfo Pointer on the variable to be filled with the configuration
parameters used during activation.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
*/
extern NFCSTATUS phLibNfc_Llcp_GetRemoteInfo( phLibNfc_Handle hRemoteDevice,
phLibNfc_Llcp_sLinkParameters_t* pConfigInfo
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Create a socket on a LLCP-connected device</b>.
*
* This function creates a socket for a given LLCP link. Sockets can be of two types :
* connection-oriented and connectionless. If the socket is connection-oriented, the caller
* must provide a working buffer to the socket in order to handle incoming data. This buffer
* must be large enough to fit the receive window (RW * MIU), the remaining space being
* used as a linear buffer to store incoming data as a stream. Data will be readable later
* using the phLibNfc_Llcp_Recv function. If the socket is connectionless, the caller may
* provide a working buffer to the socket in order to bufferize as many packets as the buffer
* can contain (each packet needs MIU + 1 bytes).
* The options and working buffer are not required if the socket is used as a listening socket,
* since it cannot be directly used for communication.
*
* \param[in] eType The socket type.
* \param[in] psOptions The options to be used with the socket.
* \param[in] psWorkingBuffer A working buffer to be used by the library.
* \param[out] phSocket A pointer on the variable to be filled with the handle
* on the created socket.
* \param[in] pErr_Cb The callback to be called each time the socket
* is in error.
* \param[in] pContext Upper layer context to be returned in the callback.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_BUFFER_TOO_SMALL The working buffer is too small for the MIU and RW
* declared in the options.
* \retval NFCSTATUS_INSUFFICIENT_RESOURCES No more socket handle available.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_Socket( phLibNfc_Llcp_eSocketType_t eType,
phLibNfc_Llcp_sSocketOptions_t* psOptions,
phNfc_sData_t* psWorkingBuffer,
phLibNfc_Handle* phSocket,
pphLibNfc_LlcpSocketErrCb_t pErr_Cb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Get SAP of remote services using their names</b>.
*
* This function sends SDP queries to the remote peer to get the SAP to address for a given
* service name. The queries are aggregated as much as possible for efficiency, but if all
* the queries cannot fit in a single packet, they will be splitted in multiple packets.
* The callback will be called only when all of the requested services names SAP will be
* gathered. As mentionned in LLCP specification, a SAP of 0 means that the service name
* as not been found.
*
* This feature is available only since LLCP v1.1, both devices must be at least v1.1 in
* order to be able to use this function.
*
* \param[in] hRemoteDevice Peer handle obtained during device discovery process.
* \param[in] psServiceNameList The list of the service names to discover.
* \param[out] pnSapList The list of the corresponding SAP numbers, in the same
* order than the service names list.
* \param[in] nListSize The size of both service names and SAP list.
* \param[in] pDiscover_Cb The callback to be called once LibNfc matched SAP for
* all of the provided service names.
* \param[in] pContext Upper layer context to be returned in the callback.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
* \retval NFCSTATUS_FEATURE_NOT_SUPPORTED Remote peer does not support this feature (e.g.: is v1.0).
* \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
*/
extern NFCSTATUS phLibNfc_Llcp_DiscoverServices( phLibNfc_Handle hRemoteDevice,
phNfc_sData_t *psServiceNameList,
uint8_t *pnSapList,
uint8_t nListSize,
pphLibNfc_RspCb_t pDiscover_Cb,
void *pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Close a socket on a LLCP-connected device</b>.
*
* This function closes a LLCP socket previously created using phLibNfc_Llcp_Socket.
* If the socket was connected, it is first disconnected, and then closed.
*
* \param[in] hSocket Socket handle obtained during socket creation.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_Close( phLibNfc_Handle hSocket );
/**
* \ingroup grp_lib_nfc
* \brief <b>Get the local options of a socket</b>.
*
* This function returns the local options (maximum packet size and receive window size) used
* for a given connection-oriented socket. This function shall not be used with connectionless
* sockets.
*
* \param[in] hSocket Socket handle obtained during socket creation.
* \param[in] psLocalOptions A pointer to be filled with the local options of the socket.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
* a valid type to perform the requsted operation.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_SocketGetLocalOptions( phLibNfc_Handle hSocket,
phLibNfc_Llcp_sSocketOptions_t* psLocalOptions
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Get the local options of a socket</b>.
*
* This function returns the remote options (maximum packet size and receive window size) used
* for a given connection-oriented socket. This function shall not be used with connectionless
* sockets.
*
* \param[in] hSocket Socket handle obtained during socket creation.
* \param[in] psRemoteOptions A pointer to be filled with the remote options of the socket.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
* a valid type to perform the requsted operation.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_SocketGetRemoteOptions( phLibNfc_Handle hRemoteDevice,
phLibNfc_Handle hSocket,
phLibNfc_Llcp_sSocketOptions_t* psRemoteOptions
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Bind a socket to a local SAP</b>.
*
* This function binds the socket to a local Service Access Point.
*
* \param[in] hSocket Peer handle obtained during device discovery process.
* \param TODO (nSap + sn)
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
* a valid type to perform the requsted operation.
* \retval NFCSTATUS_ALREADY_REGISTERED The selected SAP is already bound to another
socket.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_Bind( phLibNfc_Handle hSocket,
uint8_t nSap,
phNfc_sData_t * psServiceName
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Listen for incoming connection requests on a socket</b>.
*
* This function switches a socket into a listening state and registers a callback on
* incoming connection requests. In this state, the socket is not able to communicate
* directly. The listening state is only available for connection-oriented sockets
* which are still not connected. The socket keeps listening until it is closed, and
* thus can trigger several times the pListen_Cb callback. The caller can adverise the
* service through SDP by providing a service name.
*
*
* \param[in] hSocket Socket handle obtained during socket creation.
* \param[in] pListen_Cb The callback to be called each time the
* socket receive a connection request.
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state to switch
* to listening state.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_Listen( phLibNfc_Handle hSocket,
pphLibNfc_LlcpSocketListenCb_t pListen_Cb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Accept an incoming connection request for a socket</b>.
*
* This functions allows the client to accept an incoming connection request.
* It must be used with the socket provided within the listen callback. The socket
* is implicitly switched to the connected state when the function is called.
*
* \param[in] hSocket Socket handle obtained in the listening callback.
* \param[in] psOptions The options to be used with the socket.
* \param[in] psWorkingBuffer A working buffer to be used by the library.
* \param[in] pErr_Cb The callback to be called each time the accepted socket
* is in error.
* \param[in] pAccept_RspCb The callback to be called when the Accept operation
* is completed.
* \param[in] pContext Upper layer context to be returned in the callback.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_BUFFER_TOO_SMALL The working buffer is too small for the MIU and RW
* declared in the options.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_Accept( phLibNfc_Handle hSocket,
phLibNfc_Llcp_sSocketOptions_t* psOptions,
phNfc_sData_t* psWorkingBuffer,
pphLibNfc_LlcpSocketErrCb_t pErr_Cb,
pphLibNfc_LlcpSocketAcceptCb_t pAccept_RspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Reject an incoming connection request for a socket</b>.
*
* This functions allows the client to reject an incoming connection request.
* It must be used with the socket provided within the listen callback. The socket
* is implicitly closed when the function is called.
*
* \param[in] hSocket Socket handle obtained in the listening callback.
* \param[in] pReject_RspCb The callback to be called when the Reject operation
* is completed.
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_Reject( phLibNfc_Handle hRemoteDevice,
phLibNfc_Handle hSocket,
pphLibNfc_LlcpSocketAcceptCb_t pReject_RspCb,
void* pContext);
/**
* \ingroup grp_lib_nfc
* \brief <b>Try to establish connection with a socket on a remote SAP</b>.
*
* This function tries to connect to a given SAP on the remote peer. If the
* socket is not bound to a local SAP, it is implicitly bound to a free SAP.
*
* \param[in] hSocket Socket handle obtained during socket creation.
* \param[in] nSap The destination SAP to connect to.
* \param[in] pConnect_RspCb The callback to be called when the connection
* operation is completed.
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_PENDING Connection operation is in progress,
* pConnect_RspCb will be called upon completion.
* \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
* a valid type to perform the requsted operation.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_Connect( phLibNfc_Handle hRemoteDevice,
phLibNfc_Handle hSocket,
uint8_t nSap,
pphLibNfc_LlcpSocketConnectCb_t pConnect_RspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Try to establish connection with a socket on a remote service, given its URI</b>.
*
* This function tries to connect to a SAP designated by an URI. If the
* socket is not bound to a local SAP, it is implicitly bound to a free SAP.
*
* \param[in] hSocket Socket handle obtained during socket creation.
* \param[in] psUri The URI corresponding to the destination SAP to connect to.
* \param[in] pConnect_RspCb The callback to be called when the connection
* operation is completed.
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_PENDING Connection operation is in progress,
* pConnect_RspCb will be called upon completion.
* \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
* a valid type to perform the requsted operation.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_ConnectByUri( phLibNfc_Handle hRemoteDevice,
phLibNfc_Handle hSocket,
phNfc_sData_t* psUri,
pphLibNfc_LlcpSocketConnectCb_t pConnect_RspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Disconnect a currently connected socket</b>.
*
* This function initiates the disconnection of a previously connected socket.
*
* \param[in] hSocket Socket handle obtained during socket creation.
* \param[in] pDisconnect_RspCb The callback to be called when the
* operation is completed.
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_PENDING Disconnection operation is in progress,
* pDisconnect_RspCb will be called upon completion.
* \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
* a valid type to perform the requsted operation.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_Disconnect( phLibNfc_Handle hRemoteDevice,
phLibNfc_Handle hSocket,
pphLibNfc_LlcpSocketDisconnectCb_t pDisconnect_RspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Read data on a socket</b>.
*
* This function is used to read data from a socket. It reads at most the
* size of the reception buffer, but can also return less bytes if less bytes
* are available. If no data is available, the function will be pending until
* more data comes, and the response will be sent by the callback. This function
* can only be called on a connection-oriented socket.
*
*
* \param[in] hSocket Socket handle obtained during socket creation.
* \param[in] psBuffer The buffer receiving the data.
* \param[in] pRecv_RspCb The callback to be called when the
* operation is completed.
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_PENDING Reception operation is in progress,
* pRecv_RspCb will be called upon completion.
* \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
* a valid type to perform the requsted operation.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_Recv( phLibNfc_Handle hRemoteDevice,
phLibNfc_Handle hSocket,
phNfc_sData_t* psBuffer,
pphLibNfc_LlcpSocketRecvCb_t pRecv_RspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Read data on a socket and get the source SAP</b>.
*
* This function is the same as phLibNfc_Llcp_Recv, except that the callback includes
* the source SAP. This functions can only be called on a connectionless socket.
*
*
* \param[in] hSocket Socket handle obtained during socket creation.
* \param[in] psBuffer The buffer receiving the data.
* \param[in] pRecv_RspCb The callback to be called when the
* operation is completed.
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_PENDING Reception operation is in progress,
* pRecv_RspCb will be called upon completion.
* \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
* a valid type to perform the requsted operation.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_RecvFrom( phLibNfc_Handle hRemoteDevice,
phLibNfc_Handle hSocket,
phNfc_sData_t* psBuffer,
pphLibNfc_LlcpSocketRecvFromCb_t pRecv_Cb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Send data on a socket</b>.
*
* This function is used to write data on a socket. This function
* can only be called on a connection-oriented socket which is already
* in a connected state.
*
*
* \param[in] hSocket Socket handle obtained during socket creation.
* \param[in] psBuffer The buffer containing the data to send.
* \param[in] pSend_RspCb The callback to be called when the
* operation is completed.
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_PENDING Reception operation is in progress,
* pSend_RspCb will be called upon completion.
* \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
* a valid type to perform the requsted operation.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_Send( phLibNfc_Handle hRemoteDevice,
phLibNfc_Handle hSocket,
phNfc_sData_t* psBuffer,
pphLibNfc_LlcpSocketSendCb_t pSend_RspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Send data on a socket to a given destination SAP</b>.
*
* This function is used to write data on a socket to a given destination SAP.
* This function can only be called on a connectionless socket.
*
*
* \param[in] hSocket Socket handle obtained during socket creation.
* \param[in] nSap The destination SAP.
* \param[in] psBuffer The buffer containing the data to send.
* \param[in] pSend_RspCb The callback to be called when the
* operation is completed.
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
* \retval NFCSTATUS_SUCCESS Operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_PENDING Reception operation is in progress,
* pSend_RspCb will be called upon completion.
* \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
* a valid type to perform the requsted operation.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
* \retval NFCSTATUS_FAILED Operation failed.
*/
extern NFCSTATUS phLibNfc_Llcp_SendTo( phLibNfc_Handle hRemoteDevice,
phLibNfc_Handle hSocket,
uint8_t nSap,
phNfc_sData_t* psBuffer,
pphLibNfc_LlcpSocketSendCb_t pSend_RspCb,
void* pContext
);
/**
* \ingroup grp_lib_nfc
*
* \brief Initializes \ DeInitialize the NFC library for testmode.
*
*
*\brief This function initializes / DeInitialize NFC library and its underlying layers
* in test mode. As part of this interface underlying layers gets configured.
* Once phLibNfc_TstMode_On is successful ,NFC library ready in testmode using IOCTL.
* After using test IOCTLs ,Test mode should be DeInit using phLibNfc_TstMode_Off.
*\note This API should be used only for test IOCTL codes.
*
* \param[in] pDriverHandle Driver Handle currently application is using.
* \param[in] pTestModeCb The init callback is called by the LibNfc when
* Configure test mode completed or there is an error
* in initialization.
*
* \param[in] pContext Client context which will be included in
* callback when the request is completed.
*
* \retval NFCSTATUS_ALREADY_INITIALISED Stack is already initialized.
* \retval NFCSTATUS_PENDING Init sequence has been successfully
* started and result will be conveyed via
* callback notification.
* \retval NFCSTATUS_INVALID_PARAMETER The parameter could not be properly
* interpreted.
*\retval NFCSTATUS_INSUFFICIENT_RESOURCES Insufficient resource.(Ex: insufficient memory)
*
*\msc
*LibNfcClient,LibNfc;
*--- [label="Before initializing Nfc LIB,Setup Driver layer"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_ConfigureDriver()",URL="\ref phLibNfc_Mgt_ConfigureDriver"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
*LibNfcClient=>LibNfc [label="phLibNfc_Mgt_ConfigureTestMode()",URL="\ref phLibNfc_Mgt_ConfigureTestMode"];
*LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
*LibNfcClient<-LibNfc [label="pTestModeCb"];
*\endmsc
*/
NFCSTATUS phLibNfc_Mgt_ConfigureTestMode(void *pDriverHandle,
pphLibNfc_RspCb_t pTestModeCb,
phLibNfc_Cfg_Testmode_t eTstmode,
void *pContext
);
/**
* \ingroup grp_lib_nfc
* \brief <b>Interface to LibNfc Reset</b>.
*
* LibNfc client can reset the stack.
*
* \param[in] pContext Upper layer context to be returned in
* the callback.
*
*
* \retval NFCSTATUS_SUCCESS Indicates Get stack Capabilities operation successful.
* \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
* could not be properly interpreted.
* \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
* \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
*/
NFCSTATUS phLibNfc_Mgt_Reset(void *pContext);
#endif /* PHLIBNFC_H */
|