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
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418
23419
23420
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
23821
23822
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476
24477
24478
24479
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
26030
26031
26032
26033
26034
26035
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068
26069
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
26164
26165
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206
28207
28208
28209
28210
28211
28212
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232
28233
28234
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248
28249
28250
28251
28252
28253
28254
28255
28256
28257
28258
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286
28287
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437
28438
28439
28440
28441
28442
28443
28444
28445
28446
28447
28448
28449
28450
28451
28452
28453
28454
28455
28456
28457
28458
28459
28460
28461
28462
28463
28464
28465
28466
28467
28468
28469
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508
28509
28510
28511
28512
28513
28514
28515
28516
28517
28518
28519
28520
28521
28522
28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543
28544
28545
28546
28547
28548
28549
28550
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585
28586
28587
28588
28589
28590
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
30051
30052
30053
30054
30055
30056
30057
30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278
30279
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608
30609
30610
30611
30612
30613
30614
30615
30616
30617
30618
30619
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667
30668
30669
30670
30671
30672
30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764
30765
30766
30767
30768
30769
30770
30771
30772
30773
30774
30775
30776
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846
30847
30848
30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885
30886
30887
30888
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005
31006
31007
31008
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025
31026
31027
31028
31029
31030
31031
31032
31033
31034
31035
31036
31037
31038
31039
31040
31041
31042
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052
31053
31054
31055
31056
31057
31058
31059
31060
31061
31062
31063
31064
31065
31066
31067
31068
31069
31070
31071
31072
31073
31074
31075
31076
31077
31078
31079
31080
31081
31082
31083
31084
31085
31086
31087
31088
31089
31090
31091
31092
31093
31094
31095
31096
31097
31098
31099
31100
31101
31102
31103
31104
31105
31106
31107
31108
31109
31110
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120
31121
31122
31123
31124
31125
31126
31127
31128
31129
31130
31131
31132
31133
31134
31135
31136
31137
31138
31139
31140
31141
31142
31143
31144
31145
31146
31147
31148
31149
31150
31151
31152
31153
31154
31155
31156
31157
31158
31159
31160
31161
31162
31163
31164
31165
31166
31167
31168
31169
31170
31171
31172
31173
31174
31175
31176
31177
31178
31179
31180
31181
31182
31183
31184
31185
31186
31187
31188
31189
31190
31191
31192
31193
31194
31195
31196
31197
31198
31199
31200
31201
31202
31203
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220
31221
31222
31223
31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239
31240
31241
31242
31243
31244
31245
31246
31247
31248
31249
31250
31251
31252
31253
31254
31255
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273
31274
31275
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285
31286
31287
31288
31289
31290
31291
31292
31293
31294
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306
31307
31308
31309
31310
31311
31312
31313
31314
31315
31316
31317
31318
31319
31320
31321
31322
31323
31324
31325
31326
31327
31328
31329
31330
31331
31332
31333
31334
31335
31336
31337
31338
31339
31340
31341
31342
31343
31344
31345
31346
31347
31348
31349
31350
31351
31352
31353
31354
31355
31356
31357
31358
31359
31360
31361
31362
31363
31364
31365
31366
31367
31368
31369
31370
31371
31372
31373
31374
31375
31376
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392
31393
31394
31395
31396
31397
31398
31399
31400
31401
31402
31403
31404
31405
31406
31407
31408
31409
31410
31411
31412
31413
31414
31415
31416
31417
31418
31419
31420
31421
31422
31423
31424
31425
31426
31427
31428
31429
31430
31431
31432
31433
31434
31435
31436
31437
31438
31439
31440
31441
31442
31443
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460
31461
31462
31463
31464
31465
31466
31467
31468
31469
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479
31480
31481
31482
31483
31484
31485
31486
31487
31488
31489
31490
31491
31492
31493
31494
31495
31496
31497
31498
31499
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
31518
31519
31520
31521
31522
31523
31524
31525
31526
31527
31528
31529
31530
31531
31532
31533
31534
31535
31536
31537
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548
31549
31550
31551
31552
31553
31554
31555
31556
31557
31558
31559
31560
31561
31562
31563
31564
31565
31566
31567
31568
31569
31570
31571
31572
31573
31574
31575
31576
31577
31578
31579
31580
31581
31582
31583
31584
31585
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597
31598
31599
31600
31601
31602
31603
31604
31605
31606
31607
31608
31609
31610
31611
31612
31613
31614
31615
31616
31617
31618
31619
31620
31621
31622
31623
31624
31625
31626
31627
31628
31629
31630
31631
31632
31633
31634
31635
31636
31637
31638
31639
31640
31641
31642
31643
31644
31645
31646
31647
31648
31649
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659
31660
31661
31662
31663
31664
31665
31666
31667
31668
31669
31670
31671
31672
31673
31674
31675
31676
31677
31678
31679
31680
31681
31682
31683
31684
31685
31686
31687
31688
31689
31690
31691
31692
31693
31694
31695
31696
31697
31698
31699
31700
31701
31702
31703
31704
31705
31706
31707
31708
31709
31710
31711
31712
31713
31714
31715
31716
31717
31718
31719
31720
31721
31722
31723
31724
31725
31726
31727
31728
31729
31730
31731
31732
31733
31734
31735
31736
31737
31738
31739
31740
31741
31742
31743
31744
31745
31746
31747
31748
31749
31750
31751
31752
31753
31754
31755
31756
31757
31758
31759
31760
31761
31762
31763
31764
31765
31766
31767
31768
31769
31770
31771
31772
31773
31774
31775
31776
31777
31778
31779
31780
31781
31782
31783
31784
31785
31786
31787
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797
31798
31799
31800
31801
31802
31803
31804
31805
31806
31807
31808
31809
31810
31811
31812
31813
31814
31815
31816
31817
31818
31819
31820
31821
31822
31823
31824
31825
31826
31827
31828
31829
31830
31831
31832
31833
31834
31835
31836
31837
31838
31839
31840
31841
31842
31843
31844
31845
31846
31847
31848
31849
31850
31851
31852
31853
31854
31855
31856
31857
31858
31859
31860
31861
31862
31863
31864
31865
31866
31867
31868
31869
31870
31871
31872
31873
31874
31875
31876
31877
31878
31879
31880
31881
31882
31883
31884
31885
31886
31887
31888
31889
31890
31891
31892
31893
31894
31895
31896
31897
31898
31899
31900
31901
31902
31903
31904
31905
31906
31907
31908
31909
31910
31911
31912
31913
31914
31915
31916
31917
31918
31919
31920
31921
31922
31923
31924
31925
31926
31927
31928
31929
31930
31931
31932
31933
31934
31935
31936
31937
31938
31939
31940
31941
31942
31943
31944
31945
31946
31947
31948
31949
31950
31951
31952
31953
31954
31955
31956
31957
31958
31959
31960
31961
31962
31963
31964
31965
31966
31967
31968
31969
31970
31971
31972
31973
31974
31975
31976
31977
31978
31979
31980
31981
31982
31983
31984
31985
31986
31987
31988
31989
31990
31991
31992
31993
31994
31995
31996
31997
31998
31999
32000
32001
32002
32003
32004
32005
32006
32007
32008
32009
32010
32011
32012
32013
32014
32015
32016
32017
32018
32019
32020
32021
32022
32023
32024
32025
32026
32027
32028
32029
32030
32031
32032
32033
32034
32035
32036
32037
32038
32039
32040
32041
32042
32043
32044
32045
32046
32047
32048
32049
32050
32051
32052
32053
32054
32055
32056
32057
32058
32059
32060
32061
32062
32063
32064
32065
32066
32067
32068
32069
32070
32071
32072
32073
32074
32075
32076
32077
32078
32079
32080
32081
32082
32083
/* automatically generated by rust-bindgen 0.69.4 */

#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
    storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
    #[inline]
    pub const fn new(storage: Storage) -> Self {
        Self { storage }
    }
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
    Storage: AsRef<[u8]> + AsMut<[u8]>,
{
    #[inline]
    pub fn get_bit(&self, index: usize) -> bool {
        debug_assert!(index / 8 < self.storage.as_ref().len());
        let byte_index = index / 8;
        let byte = self.storage.as_ref()[byte_index];
        let bit_index = if cfg!(target_endian = "big") {
            7 - (index % 8)
        } else {
            index % 8
        };
        let mask = 1 << bit_index;
        byte & mask == mask
    }
    #[inline]
    pub fn set_bit(&mut self, index: usize, val: bool) {
        debug_assert!(index / 8 < self.storage.as_ref().len());
        let byte_index = index / 8;
        let byte = &mut self.storage.as_mut()[byte_index];
        let bit_index = if cfg!(target_endian = "big") {
            7 - (index % 8)
        } else {
            index % 8
        };
        let mask = 1 << bit_index;
        if val {
            *byte |= mask;
        } else {
            *byte &= !mask;
        }
    }
    #[inline]
    pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
        let mut val = 0;
        for i in 0..(bit_width as usize) {
            if self.get_bit(i + bit_offset) {
                let index = if cfg!(target_endian = "big") {
                    bit_width as usize - 1 - i
                } else {
                    i
                };
                val |= 1 << index;
            }
        }
        val
    }
    #[inline]
    pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
        for i in 0..(bit_width as usize) {
            let mask = 1 << i;
            let val_bit_is_set = val & mask == mask;
            let index = if cfg!(target_endian = "big") {
                bit_width as usize - 1 - i
            } else {
                i
            };
            self.set_bit(index + bit_offset, val_bit_is_set);
        }
    }
}
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
    #[inline]
    pub const fn new() -> Self {
        __IncompleteArrayField(::core::marker::PhantomData, [])
    }
    #[inline]
    pub fn as_ptr(&self) -> *const T {
        self as *const _ as *const T
    }
    #[inline]
    pub fn as_mut_ptr(&mut self) -> *mut T {
        self as *mut _ as *mut T
    }
    #[inline]
    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
        ::core::slice::from_raw_parts(self.as_ptr(), len)
    }
    #[inline]
    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
        ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
    }
}
impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
    fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
        fmt.write_str("__IncompleteArrayField")
    }
}
pub const API_VERSION: u32 = 4784128;
pub type wint_t = core::ffi::c_int;
pub type __uint_least8_t = core::ffi::c_uchar;
pub type __uint_least16_t = core::ffi::c_ushort;
pub type _off_t = core::ffi::c_long;
pub type _fpos_t = core::ffi::c_long;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _mbstate_t {
    pub __count: core::ffi::c_int,
    pub __value: _mbstate_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union _mbstate_t__bindgen_ty_1 {
    pub __wch: wint_t,
    pub __wchb: [core::ffi::c_uchar; 4usize],
}
#[test]
fn bindgen_test_layout__mbstate_t__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<_mbstate_t__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<_mbstate_t__bindgen_ty_1>(),
        4usize,
        concat!("Size of: ", stringify!(_mbstate_t__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<_mbstate_t__bindgen_ty_1>(),
        4usize,
        concat!("Alignment of ", stringify!(_mbstate_t__bindgen_ty_1))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__wch) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_mbstate_t__bindgen_ty_1),
            "::",
            stringify!(__wch)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__wchb) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_mbstate_t__bindgen_ty_1),
            "::",
            stringify!(__wchb)
        )
    );
}
#[test]
fn bindgen_test_layout__mbstate_t() {
    const UNINIT: ::core::mem::MaybeUninit<_mbstate_t> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<_mbstate_t>(),
        8usize,
        concat!("Size of: ", stringify!(_mbstate_t))
    );
    assert_eq!(
        ::core::mem::align_of::<_mbstate_t>(),
        4usize,
        concat!("Alignment of ", stringify!(_mbstate_t))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__count) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_mbstate_t),
            "::",
            stringify!(__count)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__value) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(_mbstate_t),
            "::",
            stringify!(__value)
        )
    );
}
pub type __ULong = core::ffi::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __lock {
    _unused: [u8; 0],
}
pub type _LOCK_T = *mut __lock;
extern "C" {
    pub fn __retarget_lock_init_recursive(lock: *mut _LOCK_T);
}
extern "C" {
    pub fn __retarget_lock_close_recursive(lock: _LOCK_T);
}
extern "C" {
    pub fn __retarget_lock_acquire(lock: _LOCK_T);
}
extern "C" {
    pub fn __retarget_lock_acquire_recursive(lock: _LOCK_T);
}
extern "C" {
    pub fn __retarget_lock_release(lock: _LOCK_T);
}
extern "C" {
    pub fn __retarget_lock_release_recursive(lock: _LOCK_T);
}
pub type _flock_t = _LOCK_T;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_t {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Bigint {
    pub _next: *mut _Bigint,
    pub _k: core::ffi::c_int,
    pub _maxwds: core::ffi::c_int,
    pub _sign: core::ffi::c_int,
    pub _wds: core::ffi::c_int,
    pub _x: [__ULong; 1usize],
}
#[test]
fn bindgen_test_layout__Bigint() {
    const UNINIT: ::core::mem::MaybeUninit<_Bigint> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<_Bigint>(),
        24usize,
        concat!("Size of: ", stringify!(_Bigint))
    );
    assert_eq!(
        ::core::mem::align_of::<_Bigint>(),
        4usize,
        concat!("Alignment of ", stringify!(_Bigint))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._next) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_Bigint),
            "::",
            stringify!(_next)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._k) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(_Bigint),
            "::",
            stringify!(_k)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._maxwds) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_Bigint),
            "::",
            stringify!(_maxwds)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._sign) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(_Bigint),
            "::",
            stringify!(_sign)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._wds) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(_Bigint),
            "::",
            stringify!(_wds)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._x) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(_Bigint),
            "::",
            stringify!(_x)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __tm {
    pub __tm_sec: core::ffi::c_int,
    pub __tm_min: core::ffi::c_int,
    pub __tm_hour: core::ffi::c_int,
    pub __tm_mday: core::ffi::c_int,
    pub __tm_mon: core::ffi::c_int,
    pub __tm_year: core::ffi::c_int,
    pub __tm_wday: core::ffi::c_int,
    pub __tm_yday: core::ffi::c_int,
    pub __tm_isdst: core::ffi::c_int,
}
#[test]
fn bindgen_test_layout___tm() {
    const UNINIT: ::core::mem::MaybeUninit<__tm> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<__tm>(),
        36usize,
        concat!("Size of: ", stringify!(__tm))
    );
    assert_eq!(
        ::core::mem::align_of::<__tm>(),
        4usize,
        concat!("Alignment of ", stringify!(__tm))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__tm_sec) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__tm),
            "::",
            stringify!(__tm_sec)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__tm_min) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(__tm),
            "::",
            stringify!(__tm_min)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__tm_hour) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(__tm),
            "::",
            stringify!(__tm_hour)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__tm_mday) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(__tm),
            "::",
            stringify!(__tm_mday)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__tm_mon) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(__tm),
            "::",
            stringify!(__tm_mon)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__tm_year) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(__tm),
            "::",
            stringify!(__tm_year)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__tm_wday) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(__tm),
            "::",
            stringify!(__tm_wday)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__tm_yday) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(__tm),
            "::",
            stringify!(__tm_yday)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__tm_isdst) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(__tm),
            "::",
            stringify!(__tm_isdst)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sbuf {
    pub _base: *mut core::ffi::c_uchar,
    pub _size: core::ffi::c_int,
}
#[test]
fn bindgen_test_layout___sbuf() {
    const UNINIT: ::core::mem::MaybeUninit<__sbuf> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<__sbuf>(),
        8usize,
        concat!("Size of: ", stringify!(__sbuf))
    );
    assert_eq!(
        ::core::mem::align_of::<__sbuf>(),
        4usize,
        concat!("Alignment of ", stringify!(__sbuf))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._base) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__sbuf),
            "::",
            stringify!(_base)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._size) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(__sbuf),
            "::",
            stringify!(_size)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __sFILE {
    pub _p: *mut core::ffi::c_uchar,
    pub _r: core::ffi::c_int,
    pub _w: core::ffi::c_int,
    pub _flags: core::ffi::c_short,
    pub _file: core::ffi::c_short,
    pub _bf: __sbuf,
    pub _lbfsize: core::ffi::c_int,
    pub _cookie: *mut core::ffi::c_void,
    pub _read: ::core::option::Option<
        unsafe extern "C" fn(
            arg1: *mut _reent,
            arg2: *mut core::ffi::c_void,
            arg3: *mut core::ffi::c_char,
            arg4: core::ffi::c_int,
        ) -> core::ffi::c_int,
    >,
    pub _write: ::core::option::Option<
        unsafe extern "C" fn(
            arg1: *mut _reent,
            arg2: *mut core::ffi::c_void,
            arg3: *const core::ffi::c_char,
            arg4: core::ffi::c_int,
        ) -> core::ffi::c_int,
    >,
    pub _seek: ::core::option::Option<
        unsafe extern "C" fn(
            arg1: *mut _reent,
            arg2: *mut core::ffi::c_void,
            arg3: _fpos_t,
            arg4: core::ffi::c_int,
        ) -> _fpos_t,
    >,
    pub _close: ::core::option::Option<
        unsafe extern "C" fn(arg1: *mut _reent, arg2: *mut core::ffi::c_void) -> core::ffi::c_int,
    >,
    pub _ub: __sbuf,
    pub _up: *mut core::ffi::c_uchar,
    pub _ur: core::ffi::c_int,
    pub _ubuf: [core::ffi::c_uchar; 3usize],
    pub _nbuf: [core::ffi::c_uchar; 1usize],
    pub _lb: __sbuf,
    pub _blksize: core::ffi::c_int,
    pub _offset: _off_t,
    pub _data: *mut _reent,
    pub _lock: _flock_t,
    pub _mbstate: _mbstate_t,
    pub _flags2: core::ffi::c_int,
}
#[test]
fn bindgen_test_layout___sFILE() {
    const UNINIT: ::core::mem::MaybeUninit<__sFILE> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<__sFILE>(),
        104usize,
        concat!("Size of: ", stringify!(__sFILE))
    );
    assert_eq!(
        ::core::mem::align_of::<__sFILE>(),
        4usize,
        concat!("Alignment of ", stringify!(__sFILE))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._p) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_p)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._r) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_r)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._w) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_w)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_flags)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._file) as usize - ptr as usize },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_file)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._bf) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_bf)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._lbfsize) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_lbfsize)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._cookie) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_cookie)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._read) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_read)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._write) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_write)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._seek) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_seek)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._close) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_close)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._ub) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_ub)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._up) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_up)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._ur) as usize - ptr as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_ur)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._ubuf) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_ubuf)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._nbuf) as usize - ptr as usize },
        67usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_nbuf)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._lb) as usize - ptr as usize },
        68usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_lb)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._blksize) as usize - ptr as usize },
        76usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_blksize)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_offset)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._data) as usize - ptr as usize },
        84usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_lock)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._mbstate) as usize - ptr as usize },
        92usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_mbstate)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize },
        100usize,
        concat!(
            "Offset of field: ",
            stringify!(__sFILE),
            "::",
            stringify!(_flags2)
        )
    );
}
pub type __FILE = __sFILE;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rand48 {
    pub _seed: [core::ffi::c_ushort; 3usize],
    pub _mult: [core::ffi::c_ushort; 3usize],
    pub _add: core::ffi::c_ushort,
}
#[test]
fn bindgen_test_layout__rand48() {
    const UNINIT: ::core::mem::MaybeUninit<_rand48> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<_rand48>(),
        14usize,
        concat!("Size of: ", stringify!(_rand48))
    );
    assert_eq!(
        ::core::mem::align_of::<_rand48>(),
        2usize,
        concat!("Alignment of ", stringify!(_rand48))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._seed) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_rand48),
            "::",
            stringify!(_seed)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._mult) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(_rand48),
            "::",
            stringify!(_mult)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._add) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(_rand48),
            "::",
            stringify!(_add)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _reent {
    pub _errno: core::ffi::c_int,
    pub _stdin: *mut __FILE,
    pub _stdout: *mut __FILE,
    pub _stderr: *mut __FILE,
    pub _inc: core::ffi::c_int,
    pub _emergency: [core::ffi::c_char; 25usize],
    pub _locale: *mut __locale_t,
    pub __cleanup: ::core::option::Option<unsafe extern "C" fn(arg1: *mut _reent)>,
    pub _result: *mut _Bigint,
    pub _result_k: core::ffi::c_int,
    pub _p5s: *mut _Bigint,
    pub _freelist: *mut *mut _Bigint,
    pub _cvtlen: core::ffi::c_int,
    pub _cvtbuf: *mut core::ffi::c_char,
    pub _new: _reent__bindgen_ty_1,
    pub _sig_func: *mut ::core::option::Option<unsafe extern "C" fn(arg1: core::ffi::c_int)>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union _reent__bindgen_ty_1 {
    pub _reent: _reent__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _reent__bindgen_ty_1__bindgen_ty_1 {
    pub _strtok_last: *mut core::ffi::c_char,
    pub _asctime_buf: [core::ffi::c_char; 26usize],
    pub _localtime_buf: __tm,
    pub _gamma_signgam: core::ffi::c_int,
    pub _rand_next: core::ffi::c_ulonglong,
    pub _r48: _rand48,
    pub _mblen_state: _mbstate_t,
    pub _mbtowc_state: _mbstate_t,
    pub _wctomb_state: _mbstate_t,
    pub _l64a_buf: [core::ffi::c_char; 8usize],
    pub _signal_buf: [core::ffi::c_char; 24usize],
    pub _getdate_err: core::ffi::c_int,
    pub _mbrlen_state: _mbstate_t,
    pub _mbrtowc_state: _mbstate_t,
    pub _mbsrtowcs_state: _mbstate_t,
    pub _wcrtomb_state: _mbstate_t,
    pub _wcsrtombs_state: _mbstate_t,
    pub _h_errno: core::ffi::c_int,
}
#[test]
fn bindgen_test_layout__reent__bindgen_ty_1__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<_reent__bindgen_ty_1__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<_reent__bindgen_ty_1__bindgen_ty_1>(),
        200usize,
        concat!("Size of: ", stringify!(_reent__bindgen_ty_1__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<_reent__bindgen_ty_1__bindgen_ty_1>(),
        8usize,
        concat!(
            "Alignment of ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._strtok_last) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_strtok_last)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._asctime_buf) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_asctime_buf)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._localtime_buf) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_localtime_buf)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._gamma_signgam) as usize - ptr as usize },
        68usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_gamma_signgam)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._rand_next) as usize - ptr as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_rand_next)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._r48) as usize - ptr as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_r48)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._mblen_state) as usize - ptr as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_mblen_state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._mbtowc_state) as usize - ptr as usize },
        104usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_mbtowc_state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._wctomb_state) as usize - ptr as usize },
        112usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_wctomb_state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._l64a_buf) as usize - ptr as usize },
        120usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_l64a_buf)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._signal_buf) as usize - ptr as usize },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_signal_buf)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._getdate_err) as usize - ptr as usize },
        152usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_getdate_err)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._mbrlen_state) as usize - ptr as usize },
        156usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_mbrlen_state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._mbrtowc_state) as usize - ptr as usize },
        164usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_mbrtowc_state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._mbsrtowcs_state) as usize - ptr as usize },
        172usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_mbsrtowcs_state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._wcrtomb_state) as usize - ptr as usize },
        180usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_wcrtomb_state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._wcsrtombs_state) as usize - ptr as usize },
        188usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_wcsrtombs_state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._h_errno) as usize - ptr as usize },
        196usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(_h_errno)
        )
    );
}
#[test]
fn bindgen_test_layout__reent__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<_reent__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<_reent__bindgen_ty_1>(),
        200usize,
        concat!("Size of: ", stringify!(_reent__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<_reent__bindgen_ty_1>(),
        8usize,
        concat!("Alignment of ", stringify!(_reent__bindgen_ty_1))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._reent) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent__bindgen_ty_1),
            "::",
            stringify!(_reent)
        )
    );
}
#[test]
fn bindgen_test_layout__reent() {
    const UNINIT: ::core::mem::MaybeUninit<_reent> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<_reent>(),
        288usize,
        concat!("Size of: ", stringify!(_reent))
    );
    assert_eq!(
        ::core::mem::align_of::<_reent>(),
        8usize,
        concat!("Alignment of ", stringify!(_reent))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._errno) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_errno)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._stdin) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_stdin)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._stdout) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_stdout)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._stderr) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_stderr)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._inc) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_inc)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._emergency) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_emergency)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._locale) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_locale)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).__cleanup) as usize - ptr as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(__cleanup)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._result) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_result)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._result_k) as usize - ptr as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_result_k)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._p5s) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_p5s)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._freelist) as usize - ptr as usize },
        68usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_freelist)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._cvtlen) as usize - ptr as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_cvtlen)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._cvtbuf) as usize - ptr as usize },
        76usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_cvtbuf)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._new) as usize - ptr as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_new)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr)._sig_func) as usize - ptr as usize },
        280usize,
        concat!(
            "Offset of field: ",
            stringify!(_reent),
            "::",
            stringify!(_sig_func)
        )
    );
}
extern "C" {
    pub static mut _impure_ptr: *mut _reent;
}
extern "C" {
    pub static mut _impure_data: _reent;
}
extern "C" {
    pub fn abort() -> !;
}
extern "C" {
    pub fn atoi(__nptr: *const core::ffi::c_char) -> core::ffi::c_int;
}
extern "C" {
    pub fn calloc(arg1: core::ffi::c_uint, arg2: core::ffi::c_uint) -> *mut core::ffi::c_void;
}
extern "C" {
    pub fn free(arg1: *mut core::ffi::c_void);
}
extern "C" {
    pub fn malloc(arg1: core::ffi::c_uint) -> *mut core::ffi::c_void;
}
extern "C" {
    pub fn rand() -> core::ffi::c_int;
}
extern "C" {
    pub fn realloc(arg1: *mut core::ffi::c_void, arg2: core::ffi::c_uint)
        -> *mut core::ffi::c_void;
}
extern "C" {
    pub fn srand(__seed: core::ffi::c_uint);
}
extern "C" {
    pub fn strtod(__n: *const core::ffi::c_char, __end_PTR: *mut *mut core::ffi::c_char) -> f64;
}
extern "C" {
    pub fn strtof(__n: *const core::ffi::c_char, __end_PTR: *mut *mut core::ffi::c_char) -> f32;
}
extern "C" {
    pub fn strtol(
        __n: *const core::ffi::c_char,
        __end_PTR: *mut *mut core::ffi::c_char,
        __base: core::ffi::c_int,
    ) -> core::ffi::c_long;
}
extern "C" {
    pub fn strtoul(
        __n: *const core::ffi::c_char,
        __end_PTR: *mut *mut core::ffi::c_char,
        __base: core::ffi::c_int,
    ) -> core::ffi::c_ulong;
}
extern "C" {
    pub fn itoa(
        arg1: core::ffi::c_int,
        arg2: *mut core::ffi::c_char,
        arg3: core::ffi::c_int,
    ) -> *mut core::ffi::c_char;
}
extern "C" {
    pub fn random() -> core::ffi::c_long;
}
extern "C" {
    pub fn strtoull(
        __n: *const core::ffi::c_char,
        __end_PTR: *mut *mut core::ffi::c_char,
        __base: core::ffi::c_int,
    ) -> core::ffi::c_ulonglong;
}
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __FuriCriticalInfo {
    pub isrm: u32,
    pub from_isr: bool,
    pub kernel_running: bool,
}
#[test]
fn bindgen_test_layout___FuriCriticalInfo() {
    const UNINIT: ::core::mem::MaybeUninit<__FuriCriticalInfo> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<__FuriCriticalInfo>(),
        8usize,
        concat!("Size of: ", stringify!(__FuriCriticalInfo))
    );
    assert_eq!(
        ::core::mem::align_of::<__FuriCriticalInfo>(),
        4usize,
        concat!("Alignment of ", stringify!(__FuriCriticalInfo))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).isrm) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__FuriCriticalInfo),
            "::",
            stringify!(isrm)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).from_isr) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(__FuriCriticalInfo),
            "::",
            stringify!(from_isr)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).kernel_running) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(__FuriCriticalInfo),
            "::",
            stringify!(kernel_running)
        )
    );
}
extern "C" {
    pub fn __furi_critical_enter() -> __FuriCriticalInfo;
}
extern "C" {
    pub fn __furi_critical_exit(info: __FuriCriticalInfo);
}
extern "C" {
    pub fn strcasecmp(
        arg1: *const core::ffi::c_char,
        arg2: *const core::ffi::c_char,
    ) -> core::ffi::c_int;
}
extern "C" {
    pub fn strncasecmp(
        arg1: *const core::ffi::c_char,
        arg2: *const core::ffi::c_char,
        arg3: core::ffi::c_uint,
    ) -> core::ffi::c_int;
}
extern "C" {
    pub fn memchr(
        arg1: *const core::ffi::c_void,
        arg2: core::ffi::c_int,
        arg3: core::ffi::c_uint,
    ) -> *mut core::ffi::c_void;
}
extern "C" {
    pub fn memcmp(
        arg1: *const core::ffi::c_void,
        arg2: *const core::ffi::c_void,
        arg3: core::ffi::c_uint,
    ) -> core::ffi::c_int;
}
extern "C" {
    pub fn memcpy(
        arg1: *mut core::ffi::c_void,
        arg2: *const core::ffi::c_void,
        arg3: core::ffi::c_uint,
    ) -> *mut core::ffi::c_void;
}
extern "C" {
    pub fn memmove(
        arg1: *mut core::ffi::c_void,
        arg2: *const core::ffi::c_void,
        arg3: core::ffi::c_uint,
    ) -> *mut core::ffi::c_void;
}
extern "C" {
    pub fn memset(
        arg1: *mut core::ffi::c_void,
        arg2: core::ffi::c_int,
        arg3: core::ffi::c_uint,
    ) -> *mut core::ffi::c_void;
}
extern "C" {
    pub fn strchr(arg1: *const core::ffi::c_char, arg2: core::ffi::c_int)
        -> *mut core::ffi::c_char;
}
extern "C" {
    pub fn strcmp(
        arg1: *const core::ffi::c_char,
        arg2: *const core::ffi::c_char,
    ) -> core::ffi::c_int;
}
extern "C" {
    pub fn strcpy(
        arg1: *mut core::ffi::c_char,
        arg2: *const core::ffi::c_char,
    ) -> *mut core::ffi::c_char;
}
extern "C" {
    pub fn strcspn(
        arg1: *const core::ffi::c_char,
        arg2: *const core::ffi::c_char,
    ) -> core::ffi::c_uint;
}
extern "C" {
    pub fn strlen(arg1: *const core::ffi::c_char) -> core::ffi::c_uint;
}
extern "C" {
    pub fn strncmp(
        arg1: *const core::ffi::c_char,
        arg2: *const core::ffi::c_char,
        arg3: core::ffi::c_uint,
    ) -> core::ffi::c_int;
}
extern "C" {
    pub fn strncpy(
        arg1: *mut core::ffi::c_char,
        arg2: *const core::ffi::c_char,
        arg3: core::ffi::c_uint,
    ) -> *mut core::ffi::c_char;
}
extern "C" {
    pub fn strrchr(
        arg1: *const core::ffi::c_char,
        arg2: core::ffi::c_int,
    ) -> *mut core::ffi::c_char;
}
extern "C" {
    pub fn strspn(
        arg1: *const core::ffi::c_char,
        arg2: *const core::ffi::c_char,
    ) -> core::ffi::c_uint;
}
extern "C" {
    pub fn strstr(
        arg1: *const core::ffi::c_char,
        arg2: *const core::ffi::c_char,
    ) -> *mut core::ffi::c_char;
}
extern "C" {
    pub fn strcasestr(
        arg1: *const core::ffi::c_char,
        arg2: *const core::ffi::c_char,
    ) -> *mut core::ffi::c_char;
}
extern "C" {
    pub fn strdup(arg1: *const core::ffi::c_char) -> *mut core::ffi::c_char;
}
extern "C" {
    pub fn strlcat(
        arg1: *mut core::ffi::c_char,
        arg2: *const core::ffi::c_char,
        arg3: core::ffi::c_uint,
    ) -> core::ffi::c_uint;
}
extern "C" {
    pub fn strlcpy(
        arg1: *mut core::ffi::c_char,
        arg2: *const core::ffi::c_char,
        arg3: core::ffi::c_uint,
    ) -> core::ffi::c_uint;
}
extern "C" {
    pub static _ctype_: [core::ffi::c_char; 0usize];
}
extern "C" {
    pub fn __assert_func(
        arg1: *const core::ffi::c_char,
        arg2: core::ffi::c_int,
        arg3: *const core::ffi::c_char,
        arg4: *const core::ffi::c_char,
    ) -> !;
}
pub type __gnuc_va_list = u32;
pub type va_list = __gnuc_va_list;
pub type FILE = __FILE;
extern "C" {
    pub fn sscanf(
        arg1: *const core::ffi::c_char,
        arg2: *const core::ffi::c_char,
        ...
    ) -> core::ffi::c_int;
}
extern "C" {
    pub fn snprintf(
        arg1: *mut core::ffi::c_char,
        arg2: core::ffi::c_uint,
        arg3: *const core::ffi::c_char,
        ...
    ) -> core::ffi::c_int;
}
extern "C" {
    #[doc = "Crash system"]
    pub fn __furi_crash_implementation();
}
extern "C" {
    #[doc = "Halt system"]
    pub fn __furi_halt_implementation();
}
#[doc = "< Operation completed successfully."]
pub const FuriStatus_FuriStatusOk: FuriStatus = 0;
pub const FuriStatus_FuriStatusError: FuriStatus = -1;
#[doc = "< Operation not completed within the timeout period."]
pub const FuriStatus_FuriStatusErrorTimeout: FuriStatus = -2;
#[doc = "< Resource not available."]
pub const FuriStatus_FuriStatusErrorResource: FuriStatus = -3;
#[doc = "< Parameter error."]
pub const FuriStatus_FuriStatusErrorParameter: FuriStatus = -4;
pub const FuriStatus_FuriStatusErrorNoMemory: FuriStatus = -5;
pub const FuriStatus_FuriStatusErrorISR: FuriStatus = -6;
#[doc = "< Prevents enum down-size compiler optimization."]
pub const FuriStatus_FuriStatusReserved: FuriStatus = 2147483647;
pub type FuriStatus = core::ffi::c_int;
#[doc = "Subscribe to In events.\n\n In events occur on the following conditions:\n - One or more items were inserted into a FuriMessageQueue,\n - Enough data has been written to a FuriStreamBuffer,\n - A FuriSemaphore has been released at least once,\n - A FuriMutex has been released."]
pub const FuriEventLoopEvent_FuriEventLoopEventIn: FuriEventLoopEvent = 1;
#[doc = "Subscribe to Out events.\n\n Out events occur on the following conditions:\n - One or more items were removed from a FuriMessageQueue,\n - Any amount of data has been read out of a FuriStreamBuffer,\n - A FuriSemaphore has been acquired at least once,\n - A FuriMutex has been acquired."]
pub const FuriEventLoopEvent_FuriEventLoopEventOut: FuriEventLoopEvent = 2;
#[doc = "Special value containing the event direction bits, used internally."]
pub const FuriEventLoopEvent_FuriEventLoopEventMask: FuriEventLoopEvent = 3;
#[doc = "Use edge triggered events.\n\n By default, level triggered events are used. A level above zero\n is reported based on the following conditions:\n\n In events:\n - a FuriMessageQueue contains one or more items,\n - a FuriStreamBuffer contains one or more bytes,\n - a FuriSemaphore can be acquired at least once,\n - a FuriMutex can be acquired.\n\n Out events:\n - a FuriMessageQueue has at least one item of free space,\n - a FuriStreamBuffer has at least one byte of free space,\n - a FuriSemaphore has been acquired at least once,\n - a FuriMutex has been acquired.\n\n If this flag is NOT set, the event will be generated repeatedly until\n the level becomes zero (e.g. all items have been removed from\n a FuriMessageQueue in case of the \"In\" event, etc.)\n\n If this flag IS set, then the above check is skipped and the event\n is generated ONLY when a change occurs, with the event direction\n (In or Out) taken into account."]
pub const FuriEventLoopEvent_FuriEventLoopEventFlagEdge: FuriEventLoopEvent = 4;
#[doc = "Automatically unsubscribe from events after one time.\n\n By default, events will be generated each time the specified conditions\n have been met. If this flag IS set, the event subscription will be cancelled\n upon the first occurred event and no further events will be generated."]
pub const FuriEventLoopEvent_FuriEventLoopEventFlagOnce: FuriEventLoopEvent = 8;
#[doc = "Special value containing the event flag bits, used internally."]
pub const FuriEventLoopEvent_FuriEventLoopEventFlagMask: FuriEventLoopEvent = 4294967292;
#[doc = "Special value to force the enum to 32-bit values."]
pub const FuriEventLoopEvent_FuriEventLoopEventReserved: FuriEventLoopEvent = 4294967295;
#[doc = "Enumeration of event types, flags and masks.\n\n Only one event direction (In or Out) can be used per subscription.\n An object can have no more than one subscription for each direction.\n\n Additional flags that modify the behaviour can be\n set using the bitwise OR operation (see flag description)."]
pub type FuriEventLoopEvent = core::ffi::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriEventLoop {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate Event Loop instance\n\n Couple things to keep in mind:\n - You can have 1 event_loop per 1 thread\n - You can not use event_loop instance in the other thread\n - Do not use blocking API to query object delegated to Event Loop\n\n # Returns\n\nThe Event Loop instance"]
    pub fn furi_event_loop_alloc() -> *mut FuriEventLoop;
}
extern "C" {
    #[doc = "Free Event Loop instance\n\n # Arguments\n\n* `instance` - The Event Loop instance"]
    pub fn furi_event_loop_free(instance: *mut FuriEventLoop);
}
extern "C" {
    #[doc = "Continuously poll for events\n\n Can be stopped with `furi_event_loop_stop`\n\n # Arguments\n\n* `instance` - The Event Loop instance"]
    pub fn furi_event_loop_run(instance: *mut FuriEventLoop);
}
extern "C" {
    #[doc = "Stop Event Loop instance\n\n # Arguments\n\n* `instance` - The Event Loop instance"]
    pub fn furi_event_loop_stop(instance: *mut FuriEventLoop);
}
#[doc = "Tick callback type\n\n # Arguments\n\n* `context` - The context for callback"]
pub type FuriEventLoopTickCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Set Event Loop tick callback\n\n Tick callback is called periodically after specified inactivity time.\n It acts like a low-priority timer: it will only fire if there is time\n left after processing the synchronization primitives and the regular timers.\n Therefore, it is not monotonic: ticks will be skipped if the event loop is busy.\n\n # Arguments\n\n* `instance` - The Event Loop instance\n * `interval` (direction in) - The tick interval\n * `callback` (direction in) - The callback to call\n * `context` - The context for callback"]
    pub fn furi_event_loop_tick_set(
        instance: *mut FuriEventLoop,
        interval: u32,
        callback: FuriEventLoopTickCallback,
        context: *mut core::ffi::c_void,
    );
}
#[doc = "Timer callback type for functions to be called in a deferred manner.\n\n # Arguments\n\n* `context` (direction in, out) - pointer to a user-specific object that was provided during\n furi_event_loop_pend_callback() call"]
pub type FuriEventLoopPendingCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Call a function when all preceding timer commands are processed\n\n This function may be useful to call another function when the event loop has been started.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the current FuriEventLoop instance\n * `callback` (direction in) - pointer to the callback to be executed when previous commands have been processed\n * `context` (direction in, out) - pointer to a user-specific object (will be passed to the callback)"]
    pub fn furi_event_loop_pend_callback(
        instance: *mut FuriEventLoop,
        callback: FuriEventLoopPendingCallback,
        context: *mut core::ffi::c_void,
    );
}
pub type FuriEventLoopObject = core::ffi::c_void;
#[doc = "Callback type for event loop events\n\n # Arguments\n\n* `object` - The object that triggered the event\n * `context` - The context that was provided upon subscription\n\n # Returns\n\ntrue if event was processed, false if we need to delay processing"]
pub type FuriEventLoopEventCallback = ::core::option::Option<
    unsafe extern "C" fn(object: *mut FuriEventLoopObject, context: *mut core::ffi::c_void) -> bool,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriMessageQueue {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Subscribe to message queue events\n\n you can only have one subscription for one event type.\n\n # Arguments\n\n* `instance` - The Event Loop instance\n * `message_queue` - The message queue to add\n * `event` (direction in) - The Event Loop event to trigger on\n * `callback` (direction in) - The callback to call on event\n * `context` - The context for callback"]
    pub fn furi_event_loop_subscribe_message_queue(
        instance: *mut FuriEventLoop,
        message_queue: *mut FuriMessageQueue,
        event: FuriEventLoopEvent,
        callback: FuriEventLoopEventCallback,
        context: *mut core::ffi::c_void,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriStreamBuffer {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Subscribe to stream buffer events\n\n you can only have one subscription for one event type.\n\n # Arguments\n\n* `instance` - The Event Loop instance\n * `stream_buffer` - The stream buffer to add\n * `event` (direction in) - The Event Loop event to trigger on\n * `callback` (direction in) - The callback to call on event\n * `context` - The context for callback"]
    pub fn furi_event_loop_subscribe_stream_buffer(
        instance: *mut FuriEventLoop,
        stream_buffer: *mut FuriStreamBuffer,
        event: FuriEventLoopEvent,
        callback: FuriEventLoopEventCallback,
        context: *mut core::ffi::c_void,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriSemaphore {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Subscribe to semaphore events\n\n you can only have one subscription for one event type.\n\n # Arguments\n\n* `instance` - The Event Loop instance\n * `semaphore` - The semaphore to add\n * `event` (direction in) - The Event Loop event to trigger on\n * `callback` (direction in) - The callback to call on event\n * `context` - The context for callback"]
    pub fn furi_event_loop_subscribe_semaphore(
        instance: *mut FuriEventLoop,
        semaphore: *mut FuriSemaphore,
        event: FuriEventLoopEvent,
        callback: FuriEventLoopEventCallback,
        context: *mut core::ffi::c_void,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriMutex {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Subscribe to mutex events\n\n you can only have one subscription for one event type.\n\n # Arguments\n\n* `instance` - The Event Loop instance\n * `mutex` - The mutex to add\n * `event` (direction in) - The Event Loop event to trigger on\n * `callback` (direction in) - The callback to call on event\n * `context` - The context for callback"]
    pub fn furi_event_loop_subscribe_mutex(
        instance: *mut FuriEventLoop,
        mutex: *mut FuriMutex,
        event: FuriEventLoopEvent,
        callback: FuriEventLoopEventCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Unsubscribe from events (common)\n\n # Arguments\n\n* `instance` - The Event Loop instance\n * `object` - The object to unsubscribe from"]
    pub fn furi_event_loop_unsubscribe(
        instance: *mut FuriEventLoop,
        object: *mut FuriEventLoopObject,
    );
}
#[doc = "< One-shot timer."]
pub const FuriEventLoopTimerType_FuriEventLoopTimerTypeOnce: FuriEventLoopTimerType = 0;
#[doc = "< Repeating timer."]
pub const FuriEventLoopTimerType_FuriEventLoopTimerTypePeriodic: FuriEventLoopTimerType = 1;
#[doc = "Enumeration of possible timer types."]
pub type FuriEventLoopTimerType = core::ffi::c_uchar;
#[doc = "Timer callback type for functions to be called when a timer expires.\n\n In the timer callback, it is ALLOWED:\n - To start, stop, or restart an existing timer,\n - To create new timers using furi_event_loop_timer_alloc(),\n - To delete timers using furi_event_loop_timer_free().\n\n # Arguments\n\n* `context` (direction in, out) - pointer to a user-specific object that was provided during timer creation"]
pub type FuriEventLoopTimerCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriEventLoopTimer {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Create a new event loop timer instance.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the current FuriEventLoop instance\n * `callback` (direction in) - pointer to the callback function to be executed upon timer timeout\n * `type` (direction in) - timer type value to determine its behavior (single-shot or periodic)\n * `context` (direction in, out) - pointer to a user-specific object (will be passed to the callback)\n # Returns\n\npointer to the created timer instance"]
    pub fn furi_event_loop_timer_alloc(
        instance: *mut FuriEventLoop,
        callback: FuriEventLoopTimerCallback,
        type_: FuriEventLoopTimerType,
        context: *mut core::ffi::c_void,
    ) -> *mut FuriEventLoopTimer;
}
extern "C" {
    #[doc = "Delete an event loop timer instance.\n\n The user code MUST call furi_event_loop_timer_free() on ALL instances\n associated with the current event loop BEFORE calling furi_event_loop_free().\n The event loop may EITHER be running OR stopped when the timers are being deleted.\n\n # Arguments\n\n* `timer` (direction in, out) - pointer to the timer instance to be deleted"]
    pub fn furi_event_loop_timer_free(timer: *mut FuriEventLoopTimer);
}
extern "C" {
    #[doc = "Start a timer or restart it with a new interval.\n\n # Arguments\n\n* `timer` (direction in, out) - pointer to the timer instance to be (re)started\n * `interval` (direction in) - timer interval in ticks"]
    pub fn furi_event_loop_timer_start(timer: *mut FuriEventLoopTimer, interval: u32);
}
extern "C" {
    #[doc = "Restart a timer with the previously set interval.\n\n # Arguments\n\n* `timer` (direction in, out) - pointer to the timer instance to be restarted"]
    pub fn furi_event_loop_timer_restart(timer: *mut FuriEventLoopTimer);
}
extern "C" {
    #[doc = "Stop a timer without firing its callback.\n\n It is safe to call this function on an already stopped timer (it will do nothing).\n\n # Arguments\n\n* `timer` (direction in, out) - pointer to the timer instance to be stopped"]
    pub fn furi_event_loop_timer_stop(timer: *mut FuriEventLoopTimer);
}
extern "C" {
    #[doc = "Get the time remaining before the timer becomes expires.\n\n For stopped or expired timers, this function returns 0.\n\n # Arguments\n\n* `timer` (direction in) - pointer to the timer to be queried\n # Returns\n\nremaining time in ticks"]
    pub fn furi_event_loop_timer_get_remaining_time(timer: *const FuriEventLoopTimer) -> u32;
}
extern "C" {
    #[doc = "Get the timer interval.\n\n # Arguments\n\n* `timer` (direction in) - pointer to the timer to be queried\n # Returns\n\ntimer interval in ticks"]
    pub fn furi_event_loop_timer_get_interval(timer: *const FuriEventLoopTimer) -> u32;
}
extern "C" {
    #[doc = "Check if the timer is currently running.\n\n A timer is considered running if it has not expired yet.\n # Arguments\n\n* `timer` (direction in) - pointer to the timer to be queried\n # Returns\n\ntrue if the timer is running, false otherwise"]
    pub fn furi_event_loop_timer_is_running(timer: *const FuriEventLoopTimer) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriEventFlag {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate FuriEventFlag\n\n # Returns\n\npointer to FuriEventFlag"]
    pub fn furi_event_flag_alloc() -> *mut FuriEventFlag;
}
extern "C" {
    #[doc = "Deallocate FuriEventFlag\n\n # Arguments\n\n* `instance` - pointer to FuriEventFlag"]
    pub fn furi_event_flag_free(instance: *mut FuriEventFlag);
}
extern "C" {
    #[doc = "Set flags\n\n result of this function can be flags that you've just asked to\n set or not if someone was waiting for them and asked to clear it.\n It is highly recommended to read this function and\n xEventGroupSetBits source code.\n\n # Arguments\n\n* `instance` - pointer to FuriEventFlag\n * `flags` (direction in) - The flags to set\n\n # Returns\n\nResulting flags(see warning) or error (FuriStatus)"]
    pub fn furi_event_flag_set(instance: *mut FuriEventFlag, flags: u32) -> u32;
}
extern "C" {
    #[doc = "Clear flags\n\n # Arguments\n\n* `instance` - pointer to FuriEventFlag\n * `flags` (direction in) - The flags\n\n # Returns\n\nResulting flags or error (FuriStatus)"]
    pub fn furi_event_flag_clear(instance: *mut FuriEventFlag, flags: u32) -> u32;
}
extern "C" {
    #[doc = "Get flags\n\n # Arguments\n\n* `instance` - pointer to FuriEventFlag\n\n # Returns\n\nResulting flags"]
    pub fn furi_event_flag_get(instance: *mut FuriEventFlag) -> u32;
}
extern "C" {
    #[doc = "Wait flags\n\n # Arguments\n\n* `instance` - pointer to FuriEventFlag\n * `flags` (direction in) - The flags\n * `options` (direction in) - The option flags\n * `timeout` (direction in) - The timeout\n\n # Returns\n\nResulting flags or error (FuriStatus)"]
    pub fn furi_event_flag_wait(
        instance: *mut FuriEventFlag,
        flags: u32,
        options: u32,
        timeout: u32,
    ) -> u32;
}
extern "C" {
    #[doc = "Check if CPU is in IRQ or kernel running and IRQ is masked\n\n Originally this primitive was born as a workaround for FreeRTOS kernel primitives shenanigans with PRIMASK.\n\n Meaningful use cases are:\n\n - When kernel is started and you want to ensure that you are not in IRQ or IRQ is not masked(like in critical section)\n - When kernel is not started and you want to make sure that you are not in IRQ mode, ignoring PRIMASK.\n\n As you can see there will be edge case when kernel is not started and PRIMASK is not 0 that may cause some funky behavior.\n Most likely it will happen after kernel primitives being used, but control not yet passed to kernel.\n It's up to you to figure out if it is safe for your code or not.\n\n # Returns\n\ntrue if CPU is in IRQ or kernel running and IRQ is masked"]
    pub fn furi_kernel_is_irq_or_masked() -> bool;
}
extern "C" {
    #[doc = "Check if kernel is running\n\n # Returns\n\ntrue if running, false otherwise"]
    pub fn furi_kernel_is_running() -> bool;
}
extern "C" {
    #[doc = "Lock kernel, pause process scheduling\n\n This should never be called in interrupt request context.\n\n # Returns\n\nprevious lock state(0 - unlocked, 1 - locked)"]
    pub fn furi_kernel_lock() -> i32;
}
extern "C" {
    #[doc = "Unlock kernel, resume process scheduling\n\n This should never be called in interrupt request context.\n\n # Returns\n\nprevious lock state(0 - unlocked, 1 - locked)"]
    pub fn furi_kernel_unlock() -> i32;
}
extern "C" {
    #[doc = "Restore kernel lock state\n\n This should never be called in interrupt request context.\n\n # Arguments\n\n* `lock` (direction in) - The lock state\n\n # Returns\n\nnew lock state or error"]
    pub fn furi_kernel_restore_lock(lock: i32) -> i32;
}
extern "C" {
    #[doc = "Get kernel systick frequency\n\n # Returns\n\nsystick counts per second"]
    pub fn furi_kernel_get_tick_frequency() -> u32;
}
extern "C" {
    #[doc = "Delay execution\n\n This should never be called in interrupt request context.\n\n Also keep in mind delay is aliased to scheduler timer intervals.\n\n # Arguments\n\n* `ticks` (direction in) - The ticks count to pause"]
    pub fn furi_delay_tick(ticks: u32);
}
extern "C" {
    #[doc = "Delay until tick\n\n This should never be called in interrupt request context.\n\n # Arguments\n\n* `tick` (direction in) - The tick until which kerel should delay task execution\n\n # Returns\n\nThe furi status."]
    pub fn furi_delay_until_tick(tick: u32) -> FuriStatus;
}
extern "C" {
    #[doc = "Get current tick counter\n\n System uptime, may overflow.\n\n # Returns\n\nCurrent ticks in milliseconds"]
    pub fn furi_get_tick() -> u32;
}
extern "C" {
    #[doc = "Convert milliseconds to ticks\n\n # Arguments\n\n* `milliseconds` (direction in) - time in milliseconds\n # Returns\n\ntime in ticks"]
    pub fn furi_ms_to_ticks(milliseconds: u32) -> u32;
}
extern "C" {
    #[doc = "Delay in milliseconds\n\n This method uses kernel ticks on the inside, which causes delay to be aliased to scheduler timer intervals.\n Real wait time will be between X+ milliseconds.\n Special value: 0, will cause task yield.\n Also if used when kernel is not running will fall back to `furi_delay_us`.\n\n Cannot be used from ISR\n\n # Arguments\n\n* `milliseconds` (direction in) - milliseconds to wait"]
    pub fn furi_delay_ms(milliseconds: u32);
}
extern "C" {
    #[doc = "Delay in microseconds\n\n Implemented using Cortex DWT counter. Blocking and non aliased.\n\n # Arguments\n\n* `microseconds` (direction in) - microseconds to wait"]
    pub fn furi_delay_us(microseconds: u32);
}
pub const FuriLogLevel_FuriLogLevelDefault: FuriLogLevel = 0;
pub const FuriLogLevel_FuriLogLevelNone: FuriLogLevel = 1;
pub const FuriLogLevel_FuriLogLevelError: FuriLogLevel = 2;
pub const FuriLogLevel_FuriLogLevelWarn: FuriLogLevel = 3;
pub const FuriLogLevel_FuriLogLevelInfo: FuriLogLevel = 4;
pub const FuriLogLevel_FuriLogLevelDebug: FuriLogLevel = 5;
pub const FuriLogLevel_FuriLogLevelTrace: FuriLogLevel = 6;
pub type FuriLogLevel = core::ffi::c_uchar;
pub type FuriLogHandlerCallback = ::core::option::Option<
    unsafe extern "C" fn(data: *const u8, size: usize, context: *mut core::ffi::c_void),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriLogHandler {
    pub callback: FuriLogHandlerCallback,
    pub context: *mut core::ffi::c_void,
}
#[test]
fn bindgen_test_layout_FuriLogHandler() {
    const UNINIT: ::core::mem::MaybeUninit<FuriLogHandler> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriLogHandler>(),
        8usize,
        concat!("Size of: ", stringify!(FuriLogHandler))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriLogHandler>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriLogHandler))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriLogHandler),
            "::",
            stringify!(callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriLogHandler),
            "::",
            stringify!(context)
        )
    );
}
extern "C" {
    #[doc = "Add log TX callback\n\n # Arguments\n\n* `handler` (direction in) - The callback and its context\n\n # Returns\n\ntrue on success, false otherwise"]
    pub fn furi_log_add_handler(handler: FuriLogHandler) -> bool;
}
extern "C" {
    #[doc = "Remove log TX callback\n\n # Arguments\n\n* `handler` (direction in) - The callback and its context\n\n # Returns\n\ntrue on success, false otherwise"]
    pub fn furi_log_remove_handler(handler: FuriLogHandler) -> bool;
}
extern "C" {
    #[doc = "Transmit data through log IO callbacks\n\n # Arguments\n\n* `data` (direction in) - The data\n * `size` (direction in) - The size"]
    pub fn furi_log_tx(data: *const u8, size: usize);
}
extern "C" {
    #[doc = "Transmit data through log IO callbacks\n\n # Arguments\n\n* `data` (direction in) - The data, null-terminated C-string"]
    pub fn furi_log_puts(data: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Print log record\n\n # Arguments\n\n* `level` -\n * `tag` -\n * `format` -\n * `...` -"]
    pub fn furi_log_print_format(
        level: FuriLogLevel,
        tag: *const core::ffi::c_char,
        format: *const core::ffi::c_char,
        ...
    );
}
extern "C" {
    #[doc = "Print log record\n\n # Arguments\n\n* `level` -\n * `format` -\n * `...` -"]
    pub fn furi_log_print_raw_format(level: FuriLogLevel, format: *const core::ffi::c_char, ...);
}
extern "C" {
    #[doc = "Set log level\n\n # Arguments\n\n* `level` (direction in) - The level"]
    pub fn furi_log_set_level(level: FuriLogLevel);
}
extern "C" {
    #[doc = "Get log level\n\n # Returns\n\nThe furi log level."]
    pub fn furi_log_get_level() -> FuriLogLevel;
}
extern "C" {
    #[doc = "Log level to string\n\n # Arguments\n\n* `level` (direction in) - The level\n * `str` (direction out) - String representation of the level\n\n # Returns\n\nTrue if success, False otherwise"]
    pub fn furi_log_level_to_string(
        level: FuriLogLevel,
        str_: *mut *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Log level from string\n\n # Arguments\n\n* `str` (direction in) - The string\n * `level` (direction out) - The level\n\n # Returns\n\nTrue if success, False otherwise"]
    pub fn furi_log_level_from_string(
        str_: *const core::ffi::c_char,
        level: *mut FuriLogLevel,
    ) -> bool;
}
extern "C" {
    #[doc = "Get free heap size\n\n # Returns\n\nfree heap size in bytes"]
    pub fn memmgr_get_free_heap() -> usize;
}
extern "C" {
    #[doc = "Get total heap size\n\n # Returns\n\ntotal heap size in bytes"]
    pub fn memmgr_get_total_heap() -> usize;
}
extern "C" {
    #[doc = "Get heap watermark\n\n # Returns\n\nminimum heap in bytes"]
    pub fn memmgr_get_minimum_free_heap() -> usize;
}
extern "C" {
    #[doc = "An aligned version of malloc, used when you need to get the aligned space on the heap\n Freeing the received address is performed ONLY through the aligned_free function\n # Arguments\n\n* `size` -\n * `alignment` -\n # Returns\n\nvoid*"]
    pub fn aligned_malloc(size: usize, alignment: usize) -> *mut core::ffi::c_void;
}
extern "C" {
    #[doc = "Freed space obtained through the aligned_malloc function\n # Arguments\n\n* `p` - pointer to result of aligned_malloc"]
    pub fn aligned_free(p: *mut core::ffi::c_void);
}
#[doc = "< Thread is stopped"]
pub const FuriThreadState_FuriThreadStateStopped: FuriThreadState = 0;
#[doc = "< Thread is starting"]
pub const FuriThreadState_FuriThreadStateStarting: FuriThreadState = 1;
#[doc = "< Thread is running"]
pub const FuriThreadState_FuriThreadStateRunning: FuriThreadState = 2;
#[doc = "Enumeration of possible FuriThread states.\n\n Many of the FuriThread functions MUST ONLY be called when the thread is STOPPED."]
pub type FuriThreadState = core::ffi::c_uchar;
#[doc = "< Uninitialized, choose system default"]
pub const FuriThreadPriority_FuriThreadPriorityNone: FuriThreadPriority = 0;
#[doc = "< Idle priority"]
pub const FuriThreadPriority_FuriThreadPriorityIdle: FuriThreadPriority = 1;
#[doc = "< Lowest"]
pub const FuriThreadPriority_FuriThreadPriorityLowest: FuriThreadPriority = 14;
#[doc = "< Low"]
pub const FuriThreadPriority_FuriThreadPriorityLow: FuriThreadPriority = 15;
#[doc = "< Normal"]
pub const FuriThreadPriority_FuriThreadPriorityNormal: FuriThreadPriority = 16;
#[doc = "< High"]
pub const FuriThreadPriority_FuriThreadPriorityHigh: FuriThreadPriority = 17;
#[doc = "< Highest"]
pub const FuriThreadPriority_FuriThreadPriorityHighest: FuriThreadPriority = 18;
pub const FuriThreadPriority_FuriThreadPriorityIsr: FuriThreadPriority = 31;
#[doc = "Enumeration of possible FuriThread priorities."]
pub type FuriThreadPriority = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriThread {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriThreadList {
    _unused: [u8; 0],
}
#[doc = "Unique thread identifier type (used by the OS kernel)."]
pub type FuriThreadId = *mut core::ffi::c_void;
#[doc = "Thread callback function pointer type.\n\n The function to be used as a thread callback MUST follow this signature.\n\n # Arguments\n\n* `context` (direction in, out) - pointer to a user-specified object\n # Returns\n\nvalue to be used as the thread return code"]
pub type FuriThreadCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void) -> i32>;
#[doc = "Standard output callback function pointer type.\n\n The function to be used as a standard output callback MUST follow this signature.\n\n The handler MUST process ALL of the provided data before returning.\n\n # Arguments\n\n* `data` (direction in) - pointer to the data to be written to the standard out\n * `size` (direction in) - size of the data in bytes"]
pub type FuriThreadStdoutWriteCallback =
    ::core::option::Option<unsafe extern "C" fn(data: *const core::ffi::c_char, size: usize)>;
#[doc = "State change callback function pointer type.\n\n The function to be used as a state callback MUST follow this signature.\n\n # Arguments\n\n* `state` (direction in) - identifier of the state the thread has transitioned to\n * `context` (direction in, out) - pointer to a user-specified object"]
pub type FuriThreadStateCallback = ::core::option::Option<
    unsafe extern "C" fn(state: FuriThreadState, context: *mut core::ffi::c_void),
>;
#[doc = "Signal handler callback function pointer type.\n\n The function to be used as a signal handler callback MUS follow this signature.\n\n # Arguments\n\n* `signal` (direction in) - value of the signal to be handled by the recipient\n * `arg` (direction in, out) - optional argument (can be of any value, including NULL)\n * `context` (direction in, out) - pointer to a user-specified object\n # Returns\n\ntrue if the signal was handled, false otherwise"]
pub type FuriThreadSignalCallback = ::core::option::Option<
    unsafe extern "C" fn(
        signal: u32,
        arg: *mut core::ffi::c_void,
        context: *mut core::ffi::c_void,
    ) -> bool,
>;
extern "C" {
    #[doc = "Create a FuriThread instance.\n\n # Returns\n\npointer to the created FuriThread instance"]
    pub fn furi_thread_alloc() -> *mut FuriThread;
}
extern "C" {
    #[doc = "Create a FuriThread instance w/ extra parameters.\n\n # Arguments\n\n* `name` (direction in) - human-readable thread name (can be NULL)\n * `stack_size` (direction in) - stack size in bytes (can be changed later)\n * `callback` (direction in) - pointer to a function to be executed in this thread\n * `context` (direction in) - pointer to a user-specified object (will be passed to the callback)\n # Returns\n\npointer to the created FuriThread instance"]
    pub fn furi_thread_alloc_ex(
        name: *const core::ffi::c_char,
        stack_size: u32,
        callback: FuriThreadCallback,
        context: *mut core::ffi::c_void,
    ) -> *mut FuriThread;
}
extern "C" {
    #[doc = "Delete a FuriThread instance.\n\n The thread MUST be stopped when calling this function.\n\n see furi_thread_join for caveats on stopping a thread.\n\n # Arguments\n\n* `thread` (direction in, out) - pointer to the FuriThread instance to be deleted"]
    pub fn furi_thread_free(thread: *mut FuriThread);
}
extern "C" {
    #[doc = "Set the name of a FuriThread instance.\n\n The thread MUST be stopped when calling this function.\n\n # Arguments\n\n* `thread` (direction in, out) - pointer to the FuriThread instance to be modified\n * `name` (direction in) - human-readable thread name (can be NULL)"]
    pub fn furi_thread_set_name(thread: *mut FuriThread, name: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Set the application ID of a FuriThread instance.\n\n The thread MUST be stopped when calling this function.\n\n Technically, it is like a \"process id\", but it is not a system-wide unique identifier.\n All threads spawned by the same app will have the same appid.\n\n # Arguments\n\n* `thread` (direction in, out) - pointer to the FuriThread instance to be modified\n * `appid` (direction in) - thread application ID (can be NULL)"]
    pub fn furi_thread_set_appid(thread: *mut FuriThread, appid: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Set the stack size of a FuriThread instance.\n\n The thread MUST be stopped when calling this function. Additionally, it is NOT possible\n to change the stack size of a service thread under any circumstances.\n\n # Arguments\n\n* `thread` (direction in, out) - pointer to the FuriThread instance to be modified\n * `stack_size` (direction in) - stack size in bytes"]
    pub fn furi_thread_set_stack_size(thread: *mut FuriThread, stack_size: usize);
}
extern "C" {
    #[doc = "Set the user callback function to be executed in a FuriThread.\n\n The thread MUST be stopped when calling this function.\n\n # Arguments\n\n* `thread` (direction in, out) - pointer to the FuriThread instance to be modified\n * `callback` (direction in) - pointer to a user-specified function to be executed in this thread"]
    pub fn furi_thread_set_callback(thread: *mut FuriThread, callback: FuriThreadCallback);
}
extern "C" {
    #[doc = "Set the callback function context.\n\n The thread MUST be stopped when calling this function.\n\n # Arguments\n\n* `thread` (direction in, out) - pointer to the FuriThread instance to be modified\n * `context` (direction in) - pointer to a user-specified object (will be passed to the callback, can be NULL)"]
    pub fn furi_thread_set_context(thread: *mut FuriThread, context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Set the priority of a FuriThread.\n\n The thread MUST be stopped when calling this function.\n\n # Arguments\n\n* `thread` (direction in, out) - pointer to the FuriThread instance to be modified\n * `priority` (direction in) - priority level value"]
    pub fn furi_thread_set_priority(thread: *mut FuriThread, priority: FuriThreadPriority);
}
extern "C" {
    #[doc = "Get the priority of a FuriThread.\n\n # Arguments\n\n* `thread` (direction in) - pointer to the FuriThread instance to be queried\n # Returns\n\npriority level value"]
    pub fn furi_thread_get_priority(thread: *mut FuriThread) -> FuriThreadPriority;
}
extern "C" {
    #[doc = "Set the priority of the current FuriThread.\n\n # Arguments\n\n* `priority` - priority level value"]
    pub fn furi_thread_set_current_priority(priority: FuriThreadPriority);
}
extern "C" {
    #[doc = "Get the priority of the current FuriThread.\n\n # Returns\n\npriority level value"]
    pub fn furi_thread_get_current_priority() -> FuriThreadPriority;
}
extern "C" {
    #[doc = "Set the callback function to be executed upon a state thransition of a FuriThread.\n\n The thread MUST be stopped when calling this function.\n\n # Arguments\n\n* `thread` (direction in, out) - pointer to the FuriThread instance to be modified\n * `callback` (direction in) - pointer to a user-specified callback function"]
    pub fn furi_thread_set_state_callback(
        thread: *mut FuriThread,
        callback: FuriThreadStateCallback,
    );
}
extern "C" {
    #[doc = "Set the state change callback context.\n\n The thread MUST be stopped when calling this function.\n\n # Arguments\n\n* `thread` (direction in, out) - pointer to the FuriThread instance to be modified\n * `context` (direction in) - pointer to a user-specified object (will be passed to the callback, can be NULL)"]
    pub fn furi_thread_set_state_context(thread: *mut FuriThread, context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Get the state of a FuriThread isntance.\n\n # Arguments\n\n* `thread` (direction in) - pointer to the FuriThread instance to be queried\n # Returns\n\nthread state value"]
    pub fn furi_thread_get_state(thread: *mut FuriThread) -> FuriThreadState;
}
extern "C" {
    #[doc = "Set a signal handler callback for a FuriThread instance.\n\n The thread MUST be stopped when calling this function if calling it from another thread.\n\n # Arguments\n\n* `thread` (direction in, out) - pointer to the FuriThread instance to be modified\n * `callback` (direction in) - pointer to a user-specified callback function\n * `context` (direction in) - pointer to a user-specified object (will be passed to the callback, can be NULL)"]
    pub fn furi_thread_set_signal_callback(
        thread: *mut FuriThread,
        callback: FuriThreadSignalCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Get a signal callback for a FuriThread instance.\n\n # Arguments\n\n* `thread` (direction in) - pointer to the FuriThread instance to be queried\n # Returns\n\npointer to the callback function or NULL if none has been set"]
    pub fn furi_thread_get_signal_callback(thread: *const FuriThread) -> FuriThreadSignalCallback;
}
extern "C" {
    #[doc = "Send a signal to a FuriThread instance.\n\n # Arguments\n\n* `thread` (direction in) - pointer to the FuriThread instance to be signaled\n * `signal` (direction in) - signal value to be sent\n * `arg` (direction in, out) - optional argument (can be of any value, including NULL)"]
    pub fn furi_thread_signal(
        thread: *const FuriThread,
        signal: u32,
        arg: *mut core::ffi::c_void,
    ) -> bool;
}
extern "C" {
    #[doc = "Start a FuriThread instance.\n\n The thread MUST be stopped when calling this function.\n\n # Arguments\n\n* `thread` (direction in, out) - pointer to the FuriThread instance to be started"]
    pub fn furi_thread_start(thread: *mut FuriThread);
}
extern "C" {
    #[doc = "Wait for a FuriThread to exit.\n\n The thread callback function must return in order for the FuriThread instance to become joinable.\n\n Use this method only when the CPU is not busy (i.e. when the\n Idle task receives control), otherwise it will wait forever.\n\n # Arguments\n\n* `thread` (direction in) - pointer to the FuriThread instance to be joined\n # Returns\n\nalways true"]
    pub fn furi_thread_join(thread: *mut FuriThread) -> bool;
}
extern "C" {
    #[doc = "Get the unique identifier of a FuriThread instance.\n\n # Arguments\n\n* `thread` (direction in) - pointer to the FuriThread instance to be queried\n # Returns\n\nunique identifier value or NULL if thread is not running"]
    pub fn furi_thread_get_id(thread: *mut FuriThread) -> FuriThreadId;
}
extern "C" {
    #[doc = "Enable heap usage tracing for a FuriThread.\n\n The thread MUST be stopped when calling this function.\n\n # Arguments\n\n* `thread` (direction in, out) - pointer to the FuriThread instance to be modified"]
    pub fn furi_thread_enable_heap_trace(thread: *mut FuriThread);
}
extern "C" {
    #[doc = "Get heap usage by a FuriThread instance.\n\n The heap trace MUST be enabled before callgin this function.\n\n # Arguments\n\n* `thread` (direction in) - pointer to the FuriThread instance to be queried\n # Returns\n\nheap usage in bytes"]
    pub fn furi_thread_get_heap_size(thread: *mut FuriThread) -> usize;
}
extern "C" {
    #[doc = "Get the return code of a FuriThread instance.\n\n This value is equal to the return value of the thread callback function.\n\n The thread MUST be stopped when calling this function.\n\n # Arguments\n\n* `thread` (direction in) - pointer to the FuriThread instance to be queried\n # Returns\n\nreturn code value"]
    pub fn furi_thread_get_return_code(thread: *mut FuriThread) -> i32;
}
extern "C" {
    #[doc = "Get the unique identifier of the current FuriThread.\n\n # Returns\n\nunique identifier value"]
    pub fn furi_thread_get_current_id() -> FuriThreadId;
}
extern "C" {
    #[doc = "Get the FuriThread instance associated with the current thread.\n\n # Returns\n\npointer to a FuriThread instance or NULL if this thread does not belong to Furi"]
    pub fn furi_thread_get_current() -> *mut FuriThread;
}
extern "C" {
    #[doc = "Return control to the scheduler."]
    pub fn furi_thread_yield();
}
extern "C" {
    #[doc = "Set the thread flags of a FuriThread.\n\n Can be used as a simple inter-thread communication mechanism.\n\n # Arguments\n\n* `thread_id` (direction in) - unique identifier of the thread to be notified\n * `flags` (direction in) - bitmask of thread flags to set\n # Returns\n\nbitmask combination of previous and newly set flags"]
    pub fn furi_thread_flags_set(thread_id: FuriThreadId, flags: u32) -> u32;
}
extern "C" {
    #[doc = "Clear the thread flags of the current FuriThread.\n\n # Arguments\n\n* `flags` (direction in) - bitmask of thread flags to clear\n # Returns\n\nbitmask of thread flags before clearing"]
    pub fn furi_thread_flags_clear(flags: u32) -> u32;
}
extern "C" {
    #[doc = "Get the thread flags of the current FuriThread.\n # Returns\n\ncurrent bitmask of thread flags"]
    pub fn furi_thread_flags_get() -> u32;
}
extern "C" {
    #[doc = "Wait for some thread flags to be set.\n\n [`FuriFlag`] for option and error flags.\n\n # Arguments\n\n* `flags` (direction in) - bitmask of thread flags to wait for\n * `options` (direction in) - combination of option flags determining the behavior of the function\n * `timeout` (direction in) - maximum time to wait in milliseconds (use FuriWaitForever to wait forever)\n # Returns\n\nbitmask combination of received thread and error flags"]
    pub fn furi_thread_flags_wait(flags: u32, options: u32, timeout: u32) -> u32;
}
extern "C" {
    #[doc = "Enumerate all threads.\n\n # Arguments\n\n* `thread_list` (direction out) - pointer to the FuriThreadList container\n\n # Returns\n\ntrue on success, false otherwise"]
    pub fn furi_thread_enumerate(thread_list: *mut FuriThreadList) -> bool;
}
extern "C" {
    #[doc = "Get the name of a thread based on its unique identifier.\n\n # Arguments\n\n* `thread_id` (direction in) - unique identifier of the thread to be queried\n # Returns\n\npointer to a zero-terminated string or NULL"]
    pub fn furi_thread_get_name(thread_id: FuriThreadId) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get the application id of a thread based on its unique identifier.\n\n # Arguments\n\n* `thread_id` (direction in) - unique identifier of the thread to be queried\n # Returns\n\npointer to a zero-terminated string"]
    pub fn furi_thread_get_appid(thread_id: FuriThreadId) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get thread stack watermark.\n\n # Arguments\n\n* `thread_id` (direction in) - unique identifier of the thread to be queried\n # Returns\n\nstack watermark value"]
    pub fn furi_thread_get_stack_space(thread_id: FuriThreadId) -> u32;
}
extern "C" {
    #[doc = "Get the standard output callback for the current thead.\n\n # Returns\n\npointer to the standard out callback function"]
    pub fn furi_thread_get_stdout_callback() -> FuriThreadStdoutWriteCallback;
}
extern "C" {
    #[doc = "Set standard output callback for the current thread.\n\n # Arguments\n\n* `callback` (direction in) - pointer to the callback function or NULL to clear"]
    pub fn furi_thread_set_stdout_callback(callback: FuriThreadStdoutWriteCallback);
}
extern "C" {
    #[doc = "Write data to buffered standard output.\n\n # Arguments\n\n* `data` (direction in) - pointer to the data to be written\n * `size` (direction in) - data size in bytes\n # Returns\n\nnumber of bytes that was actually written"]
    pub fn furi_thread_stdout_write(data: *const core::ffi::c_char, size: usize) -> usize;
}
extern "C" {
    #[doc = "Flush buffered data to standard output.\n\n # Returns\n\nerror code value"]
    pub fn furi_thread_stdout_flush() -> i32;
}
extern "C" {
    #[doc = "Suspend a thread.\n\n Suspended threads are no more receiving any of the processor time.\n\n # Arguments\n\n* `thread_id` (direction in) - unique identifier of the thread to be suspended"]
    pub fn furi_thread_suspend(thread_id: FuriThreadId);
}
extern "C" {
    #[doc = "Resume a thread.\n\n # Arguments\n\n* `thread_id` (direction in) - unique identifier of the thread to be resumed"]
    pub fn furi_thread_resume(thread_id: FuriThreadId);
}
extern "C" {
    #[doc = "Test if a thread is suspended.\n\n # Arguments\n\n* `thread_id` (direction in) - unique identifier of the thread to be queried\n # Returns\n\ntrue if thread is suspended, false otherwise"]
    pub fn furi_thread_is_suspended(thread_id: FuriThreadId) -> bool;
}
extern "C" {
    #[doc = "Memmgr heap enable thread allocation tracking\n\n # Arguments\n\n* `thread_id` - - thread id to track"]
    pub fn memmgr_heap_enable_thread_trace(thread_id: FuriThreadId);
}
extern "C" {
    #[doc = "Memmgr heap disable thread allocation tracking\n\n # Arguments\n\n* `thread_id` - - thread id to track"]
    pub fn memmgr_heap_disable_thread_trace(thread_id: FuriThreadId);
}
extern "C" {
    #[doc = "Memmgr heap get allocatred thread memory\n\n # Arguments\n\n* `thread_id` - - thread id to track\n\n # Returns\n\nbytes allocated right now"]
    pub fn memmgr_heap_get_thread_memory(thread_id: FuriThreadId) -> usize;
}
extern "C" {
    #[doc = "Memmgr heap get the max contiguous block size on the heap\n\n # Returns\n\nsize_t max contiguous block size"]
    pub fn memmgr_heap_get_max_free_block() -> usize;
}
extern "C" {
    #[doc = "Print the address and size of all free blocks to stdout"]
    pub fn memmgr_heap_printf_free_blocks();
}
extern "C" {
    #[doc = "Allocate furi message queue\n\n # Arguments\n\n* `msg_count` (direction in) - The message count\n * `msg_size` (direction in) - The message size\n\n # Returns\n\npointer to FuriMessageQueue instance"]
    pub fn furi_message_queue_alloc(msg_count: u32, msg_size: u32) -> *mut FuriMessageQueue;
}
extern "C" {
    #[doc = "Free queue\n\n # Arguments\n\n* `instance` - pointer to FuriMessageQueue instance"]
    pub fn furi_message_queue_free(instance: *mut FuriMessageQueue);
}
extern "C" {
    #[doc = "Put message into queue\n\n # Arguments\n\n* `instance` - pointer to FuriMessageQueue instance\n * `msg_ptr` (direction in) - The message pointer\n * `timeout` (direction in) - The timeout\n\n # Returns\n\nThe furi status."]
    pub fn furi_message_queue_put(
        instance: *mut FuriMessageQueue,
        msg_ptr: *const core::ffi::c_void,
        timeout: u32,
    ) -> FuriStatus;
}
extern "C" {
    #[doc = "Get message from queue\n\n # Arguments\n\n* `instance` - pointer to FuriMessageQueue instance\n * `msg_ptr` - The message pointer\n * `timeout` (direction in) - The timeout\n\n # Returns\n\nThe furi status."]
    pub fn furi_message_queue_get(
        instance: *mut FuriMessageQueue,
        msg_ptr: *mut core::ffi::c_void,
        timeout: u32,
    ) -> FuriStatus;
}
extern "C" {
    #[doc = "Get queue capacity\n\n # Arguments\n\n* `instance` - pointer to FuriMessageQueue instance\n\n # Returns\n\ncapacity in object count"]
    pub fn furi_message_queue_get_capacity(instance: *mut FuriMessageQueue) -> u32;
}
extern "C" {
    #[doc = "Get message size\n\n # Arguments\n\n* `instance` - pointer to FuriMessageQueue instance\n\n # Returns\n\nMessage size in bytes"]
    pub fn furi_message_queue_get_message_size(instance: *mut FuriMessageQueue) -> u32;
}
extern "C" {
    #[doc = "Get message count in queue\n\n # Arguments\n\n* `instance` - pointer to FuriMessageQueue instance\n\n # Returns\n\nMessage count"]
    pub fn furi_message_queue_get_count(instance: *mut FuriMessageQueue) -> u32;
}
extern "C" {
    #[doc = "Get queue available space\n\n # Arguments\n\n* `instance` - pointer to FuriMessageQueue instance\n\n # Returns\n\nMessage count"]
    pub fn furi_message_queue_get_space(instance: *mut FuriMessageQueue) -> u32;
}
extern "C" {
    #[doc = "Reset queue\n\n # Arguments\n\n* `instance` - pointer to FuriMessageQueue instance\n\n # Returns\n\nThe furi status."]
    pub fn furi_message_queue_reset(instance: *mut FuriMessageQueue) -> FuriStatus;
}
pub const FuriMutexType_FuriMutexTypeNormal: FuriMutexType = 0;
pub const FuriMutexType_FuriMutexTypeRecursive: FuriMutexType = 1;
pub type FuriMutexType = core::ffi::c_uchar;
extern "C" {
    #[doc = "Allocate FuriMutex\n\n # Arguments\n\n* `type` (direction in) - The mutex type\n\n # Returns\n\npointer to FuriMutex instance"]
    pub fn furi_mutex_alloc(type_: FuriMutexType) -> *mut FuriMutex;
}
extern "C" {
    #[doc = "Free FuriMutex\n\n # Arguments\n\n* `instance` - The pointer to FuriMutex instance"]
    pub fn furi_mutex_free(instance: *mut FuriMutex);
}
extern "C" {
    #[doc = "Acquire mutex\n\n # Arguments\n\n* `instance` - The pointer to FuriMutex instance\n * `timeout` (direction in) - The timeout\n\n # Returns\n\nThe furi status."]
    pub fn furi_mutex_acquire(instance: *mut FuriMutex, timeout: u32) -> FuriStatus;
}
extern "C" {
    #[doc = "Release mutex\n\n # Arguments\n\n* `instance` - The pointer to FuriMutex instance\n\n # Returns\n\nThe furi status."]
    pub fn furi_mutex_release(instance: *mut FuriMutex) -> FuriStatus;
}
extern "C" {
    #[doc = "Get mutex owner thread id\n\n # Arguments\n\n* `instance` - The pointer to FuriMutex instance\n\n # Returns\n\nThe furi thread identifier."]
    pub fn furi_mutex_get_owner(instance: *mut FuriMutex) -> FuriThreadId;
}
#[doc = "FuriPubSub Callback type"]
pub type FuriPubSubCallback = ::core::option::Option<
    unsafe extern "C" fn(message: *const core::ffi::c_void, context: *mut core::ffi::c_void),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriPubSub {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriPubSubSubscription {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate FuriPubSub\n\n Reentrable, Not threadsafe, one owner\n\n # Returns\n\npointer to FuriPubSub instance"]
    pub fn furi_pubsub_alloc() -> *mut FuriPubSub;
}
extern "C" {
    #[doc = "Free FuriPubSub\n\n # Arguments\n\n* `pubsub` - FuriPubSub instance"]
    pub fn furi_pubsub_free(pubsub: *mut FuriPubSub);
}
extern "C" {
    #[doc = "Subscribe to FuriPubSub\n\n Threadsafe, Reentrable\n\n # Arguments\n\n* `pubsub` - pointer to FuriPubSub instance\n * `callback` (direction in) - The callback\n * `callback_context` - The callback context\n\n # Returns\n\npointer to FuriPubSubSubscription instance"]
    pub fn furi_pubsub_subscribe(
        pubsub: *mut FuriPubSub,
        callback: FuriPubSubCallback,
        callback_context: *mut core::ffi::c_void,
    ) -> *mut FuriPubSubSubscription;
}
extern "C" {
    #[doc = "Unsubscribe from FuriPubSub\n\n No use of `pubsub_subscription` allowed after call of this method\n Threadsafe, Reentrable.\n\n # Arguments\n\n* `pubsub` - pointer to FuriPubSub instance\n * `pubsub_subscription` - pointer to FuriPubSubSubscription instance"]
    pub fn furi_pubsub_unsubscribe(
        pubsub: *mut FuriPubSub,
        pubsub_subscription: *mut FuriPubSubSubscription,
    );
}
extern "C" {
    #[doc = "Publish message to FuriPubSub\n\n Threadsafe, Reentrable.\n\n # Arguments\n\n* `pubsub` - pointer to FuriPubSub instance\n * `message` - message pointer to publish"]
    pub fn furi_pubsub_publish(pubsub: *mut FuriPubSub, message: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Check if record exists\n\n # Arguments\n\n* `name` - record name\n > **Note:** Thread safe. Create and destroy must be executed from the same\n thread."]
    pub fn furi_record_exists(name: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Create record\n\n # Arguments\n\n* `name` - record name\n * `data` - data pointer\n > **Note:** Thread safe. Create and destroy must be executed from the same\n thread."]
    pub fn furi_record_create(name: *const core::ffi::c_char, data: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Destroy record\n\n # Arguments\n\n* `name` - record name\n\n # Returns\n\ntrue if successful, false if still have holders or thread is not\n owner.\n > **Note:** Thread safe. Create and destroy must be executed from the same\n thread."]
    pub fn furi_record_destroy(name: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Open record\n\n # Arguments\n\n* `name` - record name\n\n # Returns\n\npointer to the record\n > **Note:** Thread safe. Open and close must be executed from the same\n thread. Suspends caller thread till record is available"]
    pub fn furi_record_open(name: *const core::ffi::c_char) -> *mut core::ffi::c_void;
}
extern "C" {
    #[doc = "Close record\n\n # Arguments\n\n* `name` - record name\n > **Note:** Thread safe. Open and close must be executed from the same\n thread."]
    pub fn furi_record_close(name: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Allocate semaphore\n\n # Arguments\n\n* `max_count` (direction in) - The maximum count\n * `initial_count` (direction in) - The initial count\n\n # Returns\n\npointer to FuriSemaphore instance"]
    pub fn furi_semaphore_alloc(max_count: u32, initial_count: u32) -> *mut FuriSemaphore;
}
extern "C" {
    #[doc = "Free semaphore\n\n # Arguments\n\n* `instance` - The pointer to FuriSemaphore instance"]
    pub fn furi_semaphore_free(instance: *mut FuriSemaphore);
}
extern "C" {
    #[doc = "Acquire semaphore\n\n # Arguments\n\n* `instance` - The pointer to FuriSemaphore instance\n * `timeout` (direction in) - The timeout\n\n # Returns\n\nThe furi status."]
    pub fn furi_semaphore_acquire(instance: *mut FuriSemaphore, timeout: u32) -> FuriStatus;
}
extern "C" {
    #[doc = "Release semaphore\n\n # Arguments\n\n* `instance` - The pointer to FuriSemaphore instance\n\n # Returns\n\nThe furi status."]
    pub fn furi_semaphore_release(instance: *mut FuriSemaphore) -> FuriStatus;
}
extern "C" {
    #[doc = "Get semaphore count\n\n # Arguments\n\n* `instance` - The pointer to FuriSemaphore instance\n\n # Returns\n\nSemaphore count"]
    pub fn furi_semaphore_get_count(instance: *mut FuriSemaphore) -> u32;
}
extern "C" {
    #[doc = "Get available space\n\n # Arguments\n\n* `instance` - The pointer to FuriSemaphore instance\n\n # Returns\n\nSemaphore available space"]
    pub fn furi_semaphore_get_space(instance: *mut FuriSemaphore) -> u32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriThreadListItem {
    #[doc = "< Pointer to FuriThread, valid while it is running"]
    pub thread: *mut FuriThread,
    #[doc = "< Thread application id, valid while it is running"]
    pub app_id: *const core::ffi::c_char,
    #[doc = "< Thread name, valid while it is running"]
    pub name: *const core::ffi::c_char,
    #[doc = "< Thread priority"]
    pub priority: FuriThreadPriority,
    #[doc = "< Thread stack address"]
    pub stack_address: u32,
    #[doc = "< Thread heap size if tracking enabled, 0 - otherwise"]
    pub heap: usize,
    #[doc = "< Thread stack size"]
    pub stack_size: u32,
    #[doc = "< Thread minimum of the stack size ever reached"]
    pub stack_min_free: u32,
    #[doc = "< Thread state, can be: \"Running\", \"Ready\", \"Blocked\", \"Suspended\", \"Deleted\", \"Invalid\""]
    pub state: *const core::ffi::c_char,
    #[doc = "< Thread CPU usage time in percents (including interrupts happened while running)"]
    pub cpu: f32,
    #[doc = "< Thread previous runtime counter"]
    pub counter_previous: u32,
    #[doc = "< Thread current runtime counter"]
    pub counter_current: u32,
    #[doc = "< Thread last seen tick"]
    pub tick: u32,
}
#[test]
fn bindgen_test_layout_FuriThreadListItem() {
    const UNINIT: ::core::mem::MaybeUninit<FuriThreadListItem> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriThreadListItem>(),
        52usize,
        concat!("Size of: ", stringify!(FuriThreadListItem))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriThreadListItem>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriThreadListItem))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).thread) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(thread)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).app_id) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(app_id)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).priority) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(priority)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).stack_address) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(stack_address)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).heap) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(heap)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).stack_size) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(stack_size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).stack_min_free) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(stack_min_free)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).cpu) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(cpu)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).counter_previous) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(counter_previous)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).counter_current) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(counter_current)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).tick) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriThreadListItem),
            "::",
            stringify!(tick)
        )
    );
}
extern "C" {
    #[doc = "Allocate FuriThreadList instance\n\n # Returns\n\nFuriThreadList instance"]
    pub fn furi_thread_list_alloc() -> *mut FuriThreadList;
}
extern "C" {
    #[doc = "Free FuriThreadList instance\n\n # Arguments\n\n* `instance` - The FuriThreadList instance to free"]
    pub fn furi_thread_list_free(instance: *mut FuriThreadList);
}
extern "C" {
    #[doc = "Get FuriThreadList instance size\n\n # Arguments\n\n* `instance` - The instance\n\n # Returns\n\nItem count"]
    pub fn furi_thread_list_size(instance: *mut FuriThreadList) -> usize;
}
extern "C" {
    #[doc = "Get item at position\n\n # Arguments\n\n* `instance` - The FuriThreadList instance\n * `position` (direction in) - The position of the item\n\n # Returns\n\nThe FuriThreadListItem instance"]
    pub fn furi_thread_list_get_at(
        instance: *mut FuriThreadList,
        position: usize,
    ) -> *mut FuriThreadListItem;
}
extern "C" {
    #[doc = "Get item by thread FuriThread pointer\n\n # Arguments\n\n* `instance` - The FuriThreadList instance\n * `thread` - The FuriThread pointer\n\n # Returns\n\nThe FuriThreadListItem instance"]
    pub fn furi_thread_list_get_or_insert(
        instance: *mut FuriThreadList,
        thread: *mut FuriThread,
    ) -> *mut FuriThreadListItem;
}
extern "C" {
    #[doc = "Process items in the FuriThreadList instance\n\n # Arguments\n\n* `instance` - The instance\n * `runtime` (direction in) - The runtime of the system since start\n * `tick` (direction in) - The tick when processing happened"]
    pub fn furi_thread_list_process(instance: *mut FuriThreadList, runtime: u32, tick: u32);
}
extern "C" {
    #[doc = "Get percent of time spent in ISR\n\n # Arguments\n\n* `instance` - The instance\n\n # Returns\n\npercent of time spent in ISR"]
    pub fn furi_thread_list_get_isr_time(instance: *mut FuriThreadList) -> f32;
}
pub type FuriTimerCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[doc = "< One-shot timer."]
pub const FuriTimerType_FuriTimerTypeOnce: FuriTimerType = 0;
#[doc = "< Repeating timer."]
pub const FuriTimerType_FuriTimerTypePeriodic: FuriTimerType = 1;
pub type FuriTimerType = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriTimer {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate timer\n\n # Arguments\n\n* `func` (direction in) - The callback function\n * `type` (direction in) - The timer type\n * `context` - The callback context\n\n # Returns\n\nThe pointer to FuriTimer instance"]
    pub fn furi_timer_alloc(
        func: FuriTimerCallback,
        type_: FuriTimerType,
        context: *mut core::ffi::c_void,
    ) -> *mut FuriTimer;
}
extern "C" {
    #[doc = "Free timer\n\n # Arguments\n\n* `instance` - The pointer to FuriTimer instance"]
    pub fn furi_timer_free(instance: *mut FuriTimer);
}
extern "C" {
    #[doc = "Start timer\n\n This is asynchronous call, real operation will happen as soon as\n timer service process this request.\n\n # Arguments\n\n* `instance` - The pointer to FuriTimer instance\n * `ticks` (direction in) - The interval in ticks\n\n # Returns\n\nThe furi status."]
    pub fn furi_timer_start(instance: *mut FuriTimer, ticks: u32) -> FuriStatus;
}
extern "C" {
    #[doc = "Restart timer with previous timeout value\n\n This is asynchronous call, real operation will happen as soon as\n timer service process this request.\n\n # Arguments\n\n* `instance` - The pointer to FuriTimer instance\n * `ticks` (direction in) - The interval in ticks\n\n # Returns\n\nThe furi status."]
    pub fn furi_timer_restart(instance: *mut FuriTimer, ticks: u32) -> FuriStatus;
}
extern "C" {
    #[doc = "Stop timer\n\n This is asynchronous call, real operation will happen as soon as\n timer service process this request.\n\n # Arguments\n\n* `instance` - The pointer to FuriTimer instance\n\n # Returns\n\nThe furi status."]
    pub fn furi_timer_stop(instance: *mut FuriTimer) -> FuriStatus;
}
extern "C" {
    #[doc = "Is timer running\n\n This cal may and will return obsolete timer state if timer\n commands are still in the queue. Please read FreeRTOS timer\n documentation first.\n\n # Arguments\n\n* `instance` - The pointer to FuriTimer instance\n\n # Returns\n\n0: not running, 1: running"]
    pub fn furi_timer_is_running(instance: *mut FuriTimer) -> u32;
}
extern "C" {
    #[doc = "Get timer expire time\n\n # Arguments\n\n* `instance` - The Timer instance\n\n # Returns\n\nexpire tick"]
    pub fn furi_timer_get_expire_time(instance: *mut FuriTimer) -> u32;
}
pub type FuriTimerPendigCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void, arg: u32)>;
extern "C" {
    pub fn furi_timer_pending_callback(
        callback: FuriTimerPendigCallback,
        context: *mut core::ffi::c_void,
        arg: u32,
    );
}
#[doc = "< Lower then other threads"]
pub const FuriTimerThreadPriority_FuriTimerThreadPriorityNormal: FuriTimerThreadPriority = 0;
#[doc = "< Same as other threads"]
pub const FuriTimerThreadPriority_FuriTimerThreadPriorityElevated: FuriTimerThreadPriority = 1;
pub type FuriTimerThreadPriority = core::ffi::c_uchar;
extern "C" {
    #[doc = "Set Timer thread priority\n\n # Arguments\n\n* `priority` (direction in) - The priority"]
    pub fn furi_timer_set_thread_priority(priority: FuriTimerThreadPriority);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriString {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate new FuriString.\n\n # Returns\n\npointer to the instance of FuriString"]
    pub fn furi_string_alloc() -> *mut FuriString;
}
extern "C" {
    #[doc = "Allocate new FuriString and set it to string.\n\n Allocate & Set the string a to the string.\n\n # Arguments\n\n* `source` - The source FuriString instance\n\n # Returns\n\npointer to the new instance of FuriString"]
    pub fn furi_string_alloc_set(source: *const FuriString) -> *mut FuriString;
}
extern "C" {
    #[doc = "Allocate new FuriString and set it to C string.\n\n Allocate & Set the string a to the C string.\n\n # Arguments\n\n* `cstr_source` - The C-string instance\n\n # Returns\n\npointer to the new instance of FuriString"]
    pub fn furi_string_alloc_set_str(cstr_source: *const core::ffi::c_char) -> *mut FuriString;
}
extern "C" {
    #[doc = "Allocate new FuriString and printf to it.\n\n Initialize and set a string to the given formatted value.\n\n # Arguments\n\n* `format` - The printf format\n * `...` (direction in) - args to format\n\n # Returns\n\npointer to the new instance of FuriString"]
    pub fn furi_string_alloc_printf(format: *const core::ffi::c_char, ...) -> *mut FuriString;
}
extern "C" {
    #[doc = "Allocate new FuriString and printf to it.\n\n Initialize and set a string to the given formatted value.\n\n # Arguments\n\n* `format` - The printf format\n * `args` - The format arguments\n\n # Returns\n\npointer to the new instance of FuriString"]
    pub fn furi_string_alloc_vprintf(
        format: *const core::ffi::c_char,
        args: va_list,
    ) -> *mut FuriString;
}
extern "C" {
    #[doc = "Allocate new FuriString and move source string content to it.\n\n Allocate the string, set it to the other one, and destroy the other one.\n\n # Arguments\n\n* `source` - The source FuriString instance\n\n # Returns\n\npointer to the new instance of FuriString"]
    pub fn furi_string_alloc_move(source: *mut FuriString) -> *mut FuriString;
}
extern "C" {
    #[doc = "Free FuriString.\n\n # Arguments\n\n* `string` - The FuriString instance to free"]
    pub fn furi_string_free(string: *mut FuriString);
}
extern "C" {
    #[doc = "Reserve memory for string.\n\n Modify the string capacity to be able to handle at least 'alloc' characters\n (including final null char).\n\n # Arguments\n\n* `string` - The FuriString instance\n * `size` - The size to reserve"]
    pub fn furi_string_reserve(string: *mut FuriString, size: usize);
}
extern "C" {
    #[doc = "Reset string.\n\n Make the string empty.\n\n # Arguments\n\n* `string` - The FuriString instance"]
    pub fn furi_string_reset(string: *mut FuriString);
}
extern "C" {
    #[doc = "Swap two strings.\n\n Swap the two strings string_1 and string_2.\n\n # Arguments\n\n* `string_1` - The FuriString instance 1\n * `string_2` - The FuriString instance 2"]
    pub fn furi_string_swap(string_1: *mut FuriString, string_2: *mut FuriString);
}
extern "C" {
    #[doc = "Move string_2 content to string_1.\n\n Set the string to the other one, and destroy the other one.\n\n # Arguments\n\n* `string_1` - The FuriString instance 1\n * `string_2` - The FuriString instance 2"]
    pub fn furi_string_move(string_1: *mut FuriString, string_2: *mut FuriString);
}
extern "C" {
    #[doc = "Compute a hash for the string.\n\n # Arguments\n\n* `string` - The FuriString instance\n\n # Returns\n\nhash value"]
    pub fn furi_string_hash(string: *const FuriString) -> usize;
}
extern "C" {
    #[doc = "Get string size (usually length, but not for UTF-8)\n\n # Arguments\n\n* `string` - The FuriString instance\n\n # Returns\n\nsize of the string"]
    pub fn furi_string_size(string: *const FuriString) -> usize;
}
extern "C" {
    #[doc = "Check that string is empty or not\n\n # Arguments\n\n* `string` - The FuriString instance\n\n # Returns\n\ntrue if empty otherwise false"]
    pub fn furi_string_empty(string: *const FuriString) -> bool;
}
extern "C" {
    #[doc = "Get the character at the given index.\n\n Return the selected character of the string.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `index` - The index\n\n # Returns\n\ncharacter at index"]
    pub fn furi_string_get_char(string: *const FuriString, index: usize) -> core::ffi::c_char;
}
extern "C" {
    #[doc = "Return the string view a classic C string.\n\n # Arguments\n\n* `string` - The FuriString instance\n\n # Returns\n\nconst C-string, usable till first container change"]
    pub fn furi_string_get_cstr(string: *const FuriString) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Set the string to the other string.\n\n Set the string to the source string.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `source` - The source"]
    pub fn furi_string_set(string: *mut FuriString, source: *mut FuriString);
}
extern "C" {
    #[doc = "Set the string to the other C string.\n\n Set the string to the source C string.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `source` - The source"]
    pub fn furi_string_set_str(string: *mut FuriString, source: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Set the string to the n first characters of the C string.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `source` - The source\n * `length` - The length"]
    pub fn furi_string_set_strn(
        string: *mut FuriString,
        source: *const core::ffi::c_char,
        length: usize,
    );
}
extern "C" {
    #[doc = "Set the character at the given index.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `index` - The index\n * `c` - The character"]
    pub fn furi_string_set_char(string: *mut FuriString, index: usize, c: core::ffi::c_char);
}
extern "C" {
    #[doc = "Set the string to the n first characters of other one.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `source` - The source\n * `offset` - The offset\n * `length` - The length"]
    pub fn furi_string_set_n(
        string: *mut FuriString,
        source: *const FuriString,
        offset: usize,
        length: usize,
    );
}
extern "C" {
    #[doc = "Format in the string the given printf format\n\n # Arguments\n\n* `string` - The string\n * `format` - The format\n * `...` (direction in) - The args\n\n # Returns\n\nnumber of characters printed or negative value on error"]
    pub fn furi_string_printf(
        string: *mut FuriString,
        format: *const core::ffi::c_char,
        ...
    ) -> core::ffi::c_int;
}
extern "C" {
    #[doc = "Format in the string the given printf format\n\n # Arguments\n\n* `string` - The FuriString instance\n * `format` - The format\n * `args` - The arguments\n\n # Returns\n\nnumber of characters printed or negative value on error"]
    pub fn furi_string_vprintf(
        string: *mut FuriString,
        format: *const core::ffi::c_char,
        args: va_list,
    ) -> core::ffi::c_int;
}
extern "C" {
    #[doc = "Append a character to the string.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `c` - The character"]
    pub fn furi_string_push_back(string: *mut FuriString, c: core::ffi::c_char);
}
extern "C" {
    #[doc = "Append a string to the string.\n\n Concatenate the string with the other string.\n\n # Arguments\n\n* `string_1` - The string 1\n * `string_2` - The string 2"]
    pub fn furi_string_cat(string_1: *mut FuriString, string_2: *const FuriString);
}
extern "C" {
    #[doc = "Append a C string to the string.\n\n Concatenate the string with the C string.\n\n # Arguments\n\n* `string_1` - The string 1\n * `cstring_2` - The cstring 2"]
    pub fn furi_string_cat_str(string_1: *mut FuriString, cstring_2: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Append to the string the formatted string of the given printf format.\n\n # Arguments\n\n* `string` - The string\n * `format` - The format\n * `...` (direction in) - The args\n\n # Returns\n\nnumber of characters printed or negative value on error"]
    pub fn furi_string_cat_printf(
        string: *mut FuriString,
        format: *const core::ffi::c_char,
        ...
    ) -> core::ffi::c_int;
}
extern "C" {
    #[doc = "Append to the string the formatted string of the given printf format.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `format` - The format\n * `args` - The arguments\n\n # Returns\n\nnumber of characters printed or negative value on error"]
    pub fn furi_string_cat_vprintf(
        string: *mut FuriString,
        format: *const core::ffi::c_char,
        args: va_list,
    ) -> core::ffi::c_int;
}
extern "C" {
    #[doc = "Compare two strings and return the sort order.\n\n # Arguments\n\n* `string_1` - The string 1\n * `string_2` - The string 2\n\n # Returns\n\nzero if equal"]
    pub fn furi_string_cmp(
        string_1: *const FuriString,
        string_2: *const FuriString,
    ) -> core::ffi::c_int;
}
extern "C" {
    #[doc = "Compare string with C string and return the sort order.\n\n # Arguments\n\n* `string_1` - The string 1\n * `cstring_2` - The cstring 2\n\n # Returns\n\nzero if equal"]
    pub fn furi_string_cmp_str(
        string_1: *const FuriString,
        cstring_2: *const core::ffi::c_char,
    ) -> core::ffi::c_int;
}
extern "C" {
    #[doc = "Compare two strings (case insensitive according to the current locale) and\n return the sort order.\n\n Note: doesn't work with UTF-8 strings.\n\n # Arguments\n\n* `string_1` - The string 1\n * `string_2` - The string 2\n\n # Returns\n\nzero if equal"]
    pub fn furi_string_cmpi(
        string_1: *const FuriString,
        string_2: *const FuriString,
    ) -> core::ffi::c_int;
}
extern "C" {
    #[doc = "Compare string with C string (case insensitive according to the current\n locale) and return the sort order.\n\n Note: doesn't work with UTF-8 strings.\n\n # Arguments\n\n* `string_1` - The string 1\n * `cstring_2` - The cstring 2\n\n # Returns\n\nzero if equal"]
    pub fn furi_string_cmpi_str(
        string_1: *const FuriString,
        cstring_2: *const core::ffi::c_char,
    ) -> core::ffi::c_int;
}
extern "C" {
    #[doc = "Search the first occurrence of the needle in the string from the position\n start.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `needle` - The needle\n * `start` - The start (By default, start is zero)\n\n # Returns\n\nposition or FURI_STRING_FAILURE if not found"]
    pub fn furi_string_search(
        string: *const FuriString,
        needle: *const FuriString,
        start: usize,
    ) -> usize;
}
extern "C" {
    #[doc = "Search the first occurrence of the needle in the string from the position\n start.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `needle` - The needle\n * `start` - The start (By default, start is zero)\n\n # Returns\n\nposition or FURI_STRING_FAILURE if not found"]
    pub fn furi_string_search_str(
        string: *const FuriString,
        needle: *const core::ffi::c_char,
        start: usize,
    ) -> usize;
}
extern "C" {
    #[doc = "Search for the position of the character c from the position start (include)\n in the string.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `c` - The character\n * `start` - The start (By default, start is zero)\n\n # Returns\n\nposition or FURI_STRING_FAILURE if not found"]
    pub fn furi_string_search_char(
        string: *const FuriString,
        c: core::ffi::c_char,
        start: usize,
    ) -> usize;
}
extern "C" {
    #[doc = "Reverse search for the position of the character c from the position start\n (include) in the string.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `c` - The character\n * `start` - The start (By default, start is zero)\n\n # Returns\n\nposition or FURI_STRING_FAILURE if not found"]
    pub fn furi_string_search_rchar(
        string: *const FuriString,
        c: core::ffi::c_char,
        start: usize,
    ) -> usize;
}
extern "C" {
    #[doc = "Test if two strings are equal.\n\n # Arguments\n\n* `string_1` - The string 1\n * `string_2` - The string 2\n\n # Returns\n\ntrue if equal false otherwise"]
    pub fn furi_string_equal(string_1: *const FuriString, string_2: *const FuriString) -> bool;
}
extern "C" {
    #[doc = "Test if the string is equal to the C string.\n\n # Arguments\n\n* `string_1` - The string 1\n * `cstring_2` - The cstring 2\n\n # Returns\n\ntrue if equal false otherwise"]
    pub fn furi_string_equal_str(
        string_1: *const FuriString,
        cstring_2: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Replace in the string the sub-string at position 'pos' for 'len' bytes into\n the C string 'replace'.\n\n # Arguments\n\n* `string` - The string\n * `pos` - The position\n * `len` - The length\n * `replace` - The replace"]
    pub fn furi_string_replace_at(
        string: *mut FuriString,
        pos: usize,
        len: usize,
        replace: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Replace a string 'needle' to string 'replace' in a string from 'start'\n position.\n\n # Arguments\n\n* `string` - The string\n * `needle` - The needle\n * `replace` - The replace\n * `start` - The start (By default, start is zero)\n\n # Returns\n\nReturn FURI_STRING_FAILURE if 'needle' not found or replace position."]
    pub fn furi_string_replace(
        string: *mut FuriString,
        needle: *mut FuriString,
        replace: *mut FuriString,
        start: usize,
    ) -> usize;
}
extern "C" {
    #[doc = "Replace a C string 'needle' to C string 'replace' in a string from 'start'\n position.\n\n # Arguments\n\n* `string` - The string\n * `needle` - The needle\n * `replace` - The replace\n * `start` - The start (By default, start is zero)\n\n # Returns\n\nReturn FURI_STRING_FAILURE if 'needle' not found or replace position."]
    pub fn furi_string_replace_str(
        string: *mut FuriString,
        needle: *const core::ffi::c_char,
        replace: *const core::ffi::c_char,
        start: usize,
    ) -> usize;
}
extern "C" {
    #[doc = "Replace all occurrences of 'needle' string into 'replace' string.\n\n # Arguments\n\n* `string` - The string\n * `needle` - The needle\n * `replace` - The replace"]
    pub fn furi_string_replace_all(
        string: *mut FuriString,
        needle: *const FuriString,
        replace: *const FuriString,
    );
}
extern "C" {
    #[doc = "Replace all occurrences of 'needle' C string into 'replace' C string.\n\n # Arguments\n\n* `string` - The string\n * `needle` - The needle\n * `replace` - The replace"]
    pub fn furi_string_replace_all_str(
        string: *mut FuriString,
        needle: *const core::ffi::c_char,
        replace: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Test if the string starts with the given string.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `start` - The FuriString instance\n\n # Returns\n\ntrue if string starts with"]
    pub fn furi_string_start_with(string: *const FuriString, start: *const FuriString) -> bool;
}
extern "C" {
    #[doc = "Test if the string starts with the given C string.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `start` - The start\n\n # Returns\n\ntrue if string starts with"]
    pub fn furi_string_start_with_str(
        string: *const FuriString,
        start: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Test if the string ends with the given string.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `end` - The end\n\n # Returns\n\ntrue if string ends with"]
    pub fn furi_string_end_with(string: *const FuriString, end: *const FuriString) -> bool;
}
extern "C" {
    #[doc = "Test if the string ends with the given string (case insensitive according to the current locale).\n\n # Arguments\n\n* `string` - The FuriString instance\n * `end` - The end\n\n # Returns\n\ntrue if string ends with"]
    pub fn furi_string_end_withi(string: *const FuriString, end: *const FuriString) -> bool;
}
extern "C" {
    #[doc = "Test if the string ends with the given C string.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `end` - The end\n\n # Returns\n\ntrue if string ends with"]
    pub fn furi_string_end_with_str(
        string: *const FuriString,
        end: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Test if the string ends with the given C string (case insensitive according to the current locale).\n\n # Arguments\n\n* `string` - The FuriString instance\n * `end` - The end\n\n # Returns\n\ntrue if string ends with"]
    pub fn furi_string_end_withi_str(
        string: *const FuriString,
        end: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Trim the string left to the first 'index' bytes.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `index` - The index"]
    pub fn furi_string_left(string: *mut FuriString, index: usize);
}
extern "C" {
    #[doc = "Trim the string right from the 'index' position to the last position.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `index` - The index"]
    pub fn furi_string_right(string: *mut FuriString, index: usize);
}
extern "C" {
    #[doc = "Trim the string from position index to size bytes.\n\n See also furi_string_set_n.\n\n # Arguments\n\n* `string` - The FuriString instance\n * `index` - The index\n * `size` - The size"]
    pub fn furi_string_mid(string: *mut FuriString, index: usize, size: usize);
}
extern "C" {
    #[doc = "Trim a string from the given set of characters (default is \" # Arguments\n\n* `string` - The FuriString instance\n * `chars` - The characters"]
    pub fn furi_string_trim(string: *mut FuriString, chars: *const core::ffi::c_char);
}
#[doc = "An unicode value"]
pub type FuriStringUnicodeValue = core::ffi::c_uint;
extern "C" {
    #[doc = "Compute the length in UTF8 characters in the string.\n\n # Arguments\n\n* `string` - The FuriString instance\n\n # Returns\n\nstrings size"]
    pub fn furi_string_utf8_length(string: *mut FuriString) -> usize;
}
extern "C" {
    #[doc = "Push unicode into string, encoding it in UTF8.\n\n # Arguments\n\n* `string` - The string\n * `unicode` - The unicode"]
    pub fn furi_string_utf8_push(string: *mut FuriString, unicode: FuriStringUnicodeValue);
}
pub const FuriStringUTF8State_FuriStringUTF8StateStarting: FuriStringUTF8State = 0;
pub const FuriStringUTF8State_FuriStringUTF8StateDecoding1: FuriStringUTF8State = 1;
pub const FuriStringUTF8State_FuriStringUTF8StateDecoding2: FuriStringUTF8State = 2;
pub const FuriStringUTF8State_FuriStringUTF8StateDecoding3: FuriStringUTF8State = 3;
pub const FuriStringUTF8State_FuriStringUTF8StateError: FuriStringUTF8State = 4;
#[doc = "State of the UTF8 decoding machine state"]
pub type FuriStringUTF8State = core::ffi::c_uchar;
extern "C" {
    #[doc = "Main generic UTF8 decoder\n\n It takes a character, and the previous state and the previous value of the\n unicode value. It updates the state and the decoded unicode value. A decoded\n unicode encoded value is valid only when the state is\n FuriStringUTF8StateStarting.\n\n # Arguments\n\n* `c` - The character\n * `state` - The state\n * `unicode` - The unicode"]
    pub fn furi_string_utf8_decode(
        c: core::ffi::c_char,
        state: *mut FuriStringUTF8State,
        unicode: *mut FuriStringUnicodeValue,
    );
}
extern "C" {
    #[doc = "Allocate stream buffer instance.\n Stream buffer implementation assumes there is only one task or\n interrupt that will write to the buffer (the writer), and only one task or\n interrupt that will read from the buffer (the reader).\n\n # Arguments\n\n* `size` - The total number of bytes the stream buffer will be able to hold at any one time.\n * `trigger_level` - The number of bytes that must be in the stream buffer\n before a task that is blocked on the stream buffer to wait for data is moved out of the blocked state.\n # Returns\n\nThe stream buffer instance."]
    pub fn furi_stream_buffer_alloc(size: usize, trigger_level: usize) -> *mut FuriStreamBuffer;
}
extern "C" {
    #[doc = "Free stream buffer instance\n\n # Arguments\n\n* `stream_buffer` - The stream buffer instance."]
    pub fn furi_stream_buffer_free(stream_buffer: *mut FuriStreamBuffer);
}
extern "C" {
    #[doc = "Set trigger level for stream buffer.\n A stream buffer's trigger level is the number of bytes that must be in the\n stream buffer before a task that is blocked on the stream buffer to\n wait for data is moved out of the blocked state.\n\n # Arguments\n\n* `stream_buffer` - The stream buffer instance\n * `trigger_level` - The new trigger level for the stream buffer.\n # Returns\n\ntrue if trigger level can be be updated (new trigger level was less than or equal to the stream buffer's length).\n false if trigger level can't be be updated (new trigger level was greater than the stream buffer's length)."]
    pub fn furi_stream_set_trigger_level(
        stream_buffer: *mut FuriStreamBuffer,
        trigger_level: usize,
    ) -> bool;
}
extern "C" {
    #[doc = "Sends bytes to a stream buffer. The bytes are copied into the stream buffer.\n Wakes up task waiting for data to become available if called from ISR.\n\n # Arguments\n\n* `stream_buffer` - The stream buffer instance.\n * `data` - A pointer to the data that is to be copied into the stream buffer.\n * `length` - The maximum number of bytes to copy from data into the stream buffer.\n * `timeout` - The maximum amount of time the task should remain in the\n Blocked state to wait for space to become available if the stream buffer is full.\n Will return immediately if timeout is zero.\n Setting timeout to FuriWaitForever will cause the task to wait indefinitely.\n Ignored if called from ISR.\n # Returns\n\nThe number of bytes actually written to the stream buffer."]
    pub fn furi_stream_buffer_send(
        stream_buffer: *mut FuriStreamBuffer,
        data: *const core::ffi::c_void,
        length: usize,
        timeout: u32,
    ) -> usize;
}
extern "C" {
    #[doc = "Receives bytes from a stream buffer.\n Wakes up task waiting for space to become available if called from ISR.\n\n # Arguments\n\n* `stream_buffer` - The stream buffer instance.\n * `data` - A pointer to the buffer into which the received bytes will be\n copied.\n * `length` - The length of the buffer pointed to by the data parameter.\n * `timeout` - The maximum amount of time the task should remain in the\n Blocked state to wait for data to become available if the stream buffer is empty.\n Will return immediately if timeout is zero.\n Setting timeout to FuriWaitForever will cause the task to wait indefinitely.\n Ignored if called from ISR.\n # Returns\n\nThe number of bytes read from the stream buffer, if any."]
    pub fn furi_stream_buffer_receive(
        stream_buffer: *mut FuriStreamBuffer,
        data: *mut core::ffi::c_void,
        length: usize,
        timeout: u32,
    ) -> usize;
}
extern "C" {
    #[doc = "Queries a stream buffer to see how much data it contains, which is equal to\n the number of bytes that can be read from the stream buffer before the stream\n buffer would be empty.\n\n # Arguments\n\n* `stream_buffer` - The stream buffer instance.\n # Returns\n\nThe number of bytes that can be read from the stream buffer before\n the stream buffer would be empty."]
    pub fn furi_stream_buffer_bytes_available(stream_buffer: *mut FuriStreamBuffer) -> usize;
}
extern "C" {
    #[doc = "Queries a stream buffer to see how much free space it contains, which is\n equal to the amount of data that can be sent to the stream buffer before it\n is full.\n\n # Arguments\n\n* `stream_buffer` - The stream buffer instance.\n # Returns\n\nThe number of bytes that can be written to the stream buffer before\n the stream buffer would be full."]
    pub fn furi_stream_buffer_spaces_available(stream_buffer: *mut FuriStreamBuffer) -> usize;
}
extern "C" {
    #[doc = "Queries a stream buffer to see if it is full.\n\n # Arguments\n\n* `stream_buffer` - stream buffer instance.\n # Returns\n\ntrue if the stream buffer is full.\n false if the stream buffer is not full."]
    pub fn furi_stream_buffer_is_full(stream_buffer: *mut FuriStreamBuffer) -> bool;
}
extern "C" {
    #[doc = "Queries a stream buffer to see if it is empty.\n\n # Arguments\n\n* `stream_buffer` - The stream buffer instance.\n # Returns\n\ntrue if the stream buffer is empty.\n false if the stream buffer is not empty."]
    pub fn furi_stream_buffer_is_empty(stream_buffer: *mut FuriStreamBuffer) -> bool;
}
extern "C" {
    #[doc = "Resets a stream buffer to its initial, empty, state. Any data that was\n in the stream buffer is discarded. A stream buffer can only be reset if there\n are no tasks blocked waiting to either send to or receive from the stream buffer.\n\n # Arguments\n\n* `stream_buffer` - The stream buffer instance.\n # Returns\n\nFuriStatusOk if the stream buffer is reset.\n FuriStatusError if there was a task blocked waiting to send to or read\n from the stream buffer then the stream buffer is not reset."]
    pub fn furi_stream_buffer_reset(stream_buffer: *mut FuriStreamBuffer) -> FuriStatus;
}
extern "C" {
    #[doc = "< System Clock Frequency"]
    pub static mut SystemCoreClock: u32;
}
#[doc = "Comparator"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct COMP_TypeDef {
    #[doc = "< COMP control and status register, Address offset: 0x00"]
    pub CSR: u32,
}
#[test]
fn bindgen_test_layout_COMP_TypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<COMP_TypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<COMP_TypeDef>(),
        4usize,
        concat!("Size of: ", stringify!(COMP_TypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<COMP_TypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(COMP_TypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CSR) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(COMP_TypeDef),
            "::",
            stringify!(CSR)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DMA_TypeDef {
    #[doc = "< DMA interrupt status register, Address offset: 0x00"]
    pub ISR: u32,
    #[doc = "< DMA interrupt flag clear register, Address offset: 0x04"]
    pub IFCR: u32,
}
#[test]
fn bindgen_test_layout_DMA_TypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<DMA_TypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<DMA_TypeDef>(),
        8usize,
        concat!("Size of: ", stringify!(DMA_TypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<DMA_TypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(DMA_TypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ISR) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(DMA_TypeDef),
            "::",
            stringify!(ISR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).IFCR) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(DMA_TypeDef),
            "::",
            stringify!(IFCR)
        )
    );
}
#[doc = "General Purpose I/O"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct GPIO_TypeDef {
    #[doc = "< GPIO port mode register, Address offset: 0x00"]
    pub MODER: u32,
    #[doc = "< GPIO port output type register, Address offset: 0x04"]
    pub OTYPER: u32,
    #[doc = "< GPIO port output speed register, Address offset: 0x08"]
    pub OSPEEDR: u32,
    #[doc = "< GPIO port pull-up/pull-down register, Address offset: 0x0C"]
    pub PUPDR: u32,
    #[doc = "< GPIO port input data register, Address offset: 0x10"]
    pub IDR: u32,
    #[doc = "< GPIO port output data register, Address offset: 0x14"]
    pub ODR: u32,
    #[doc = "< GPIO port bit set/reset register, Address offset: 0x18"]
    pub BSRR: u32,
    #[doc = "< GPIO port configuration lock register, Address offset: 0x1C"]
    pub LCKR: u32,
    #[doc = "< GPIO alternate function registers, Address offset: 0x20-0x24"]
    pub AFR: [u32; 2usize],
    #[doc = "< GPIO Bit Reset register, Address offset: 0x28"]
    pub BRR: u32,
}
#[test]
fn bindgen_test_layout_GPIO_TypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<GPIO_TypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<GPIO_TypeDef>(),
        44usize,
        concat!("Size of: ", stringify!(GPIO_TypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<GPIO_TypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(GPIO_TypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).MODER) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(GPIO_TypeDef),
            "::",
            stringify!(MODER)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OTYPER) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(GPIO_TypeDef),
            "::",
            stringify!(OTYPER)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OSPEEDR) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(GPIO_TypeDef),
            "::",
            stringify!(OSPEEDR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PUPDR) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(GPIO_TypeDef),
            "::",
            stringify!(PUPDR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).IDR) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(GPIO_TypeDef),
            "::",
            stringify!(IDR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ODR) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(GPIO_TypeDef),
            "::",
            stringify!(ODR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BSRR) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(GPIO_TypeDef),
            "::",
            stringify!(BSRR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).LCKR) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(GPIO_TypeDef),
            "::",
            stringify!(LCKR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).AFR) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(GPIO_TypeDef),
            "::",
            stringify!(AFR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BRR) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(GPIO_TypeDef),
            "::",
            stringify!(BRR)
        )
    );
}
#[doc = "Inter-integrated Circuit Interface"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct I2C_TypeDef {
    #[doc = "< I2C Control register 1, Address offset: 0x00"]
    pub CR1: u32,
    #[doc = "< I2C Control register 2, Address offset: 0x04"]
    pub CR2: u32,
    #[doc = "< I2C Own address 1 register, Address offset: 0x08"]
    pub OAR1: u32,
    #[doc = "< I2C Own address 2 register, Address offset: 0x0C"]
    pub OAR2: u32,
    #[doc = "< I2C Timing register, Address offset: 0x10"]
    pub TIMINGR: u32,
    #[doc = "< I2C Timeout register, Address offset: 0x14"]
    pub TIMEOUTR: u32,
    #[doc = "< I2C Interrupt and status register, Address offset: 0x18"]
    pub ISR: u32,
    #[doc = "< I2C Interrupt clear register, Address offset: 0x1C"]
    pub ICR: u32,
    #[doc = "< I2C PEC register, Address offset: 0x20"]
    pub PECR: u32,
    #[doc = "< I2C Receive data register, Address offset: 0x24"]
    pub RXDR: u32,
    #[doc = "< I2C Transmit data register, Address offset: 0x28"]
    pub TXDR: u32,
}
#[test]
fn bindgen_test_layout_I2C_TypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<I2C_TypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<I2C_TypeDef>(),
        44usize,
        concat!("Size of: ", stringify!(I2C_TypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<I2C_TypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(I2C_TypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CR1) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(I2C_TypeDef),
            "::",
            stringify!(CR1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CR2) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(I2C_TypeDef),
            "::",
            stringify!(CR2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OAR1) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(I2C_TypeDef),
            "::",
            stringify!(OAR1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OAR2) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(I2C_TypeDef),
            "::",
            stringify!(OAR2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TIMINGR) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(I2C_TypeDef),
            "::",
            stringify!(TIMINGR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TIMEOUTR) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(I2C_TypeDef),
            "::",
            stringify!(TIMEOUTR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ISR) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(I2C_TypeDef),
            "::",
            stringify!(ISR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ICR) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(I2C_TypeDef),
            "::",
            stringify!(ICR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PECR) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(I2C_TypeDef),
            "::",
            stringify!(PECR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).RXDR) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(I2C_TypeDef),
            "::",
            stringify!(RXDR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TXDR) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(I2C_TypeDef),
            "::",
            stringify!(TXDR)
        )
    );
}
#[doc = "LPTIMER"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LPTIM_TypeDef {
    #[doc = "< LPTIM Interrupt and Status register, Address offset: 0x00"]
    pub ISR: u32,
    #[doc = "< LPTIM Interrupt Clear register, Address offset: 0x04"]
    pub ICR: u32,
    #[doc = "< LPTIM Interrupt Enable register, Address offset: 0x08"]
    pub IER: u32,
    #[doc = "< LPTIM Configuration register, Address offset: 0x0C"]
    pub CFGR: u32,
    #[doc = "< LPTIM Control register, Address offset: 0x10"]
    pub CR: u32,
    #[doc = "< LPTIM Compare register, Address offset: 0x14"]
    pub CMP: u32,
    #[doc = "< LPTIM Autoreload register, Address offset: 0x18"]
    pub ARR: u32,
    #[doc = "< LPTIM Counter register, Address offset: 0x1C"]
    pub CNT: u32,
    #[doc = "< LPTIM Option register, Address offset: 0x20"]
    pub OR: u32,
}
#[test]
fn bindgen_test_layout_LPTIM_TypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<LPTIM_TypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LPTIM_TypeDef>(),
        36usize,
        concat!("Size of: ", stringify!(LPTIM_TypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<LPTIM_TypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(LPTIM_TypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ISR) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LPTIM_TypeDef),
            "::",
            stringify!(ISR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ICR) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(LPTIM_TypeDef),
            "::",
            stringify!(ICR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).IER) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(LPTIM_TypeDef),
            "::",
            stringify!(IER)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CFGR) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(LPTIM_TypeDef),
            "::",
            stringify!(CFGR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CR) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(LPTIM_TypeDef),
            "::",
            stringify!(CR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CMP) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(LPTIM_TypeDef),
            "::",
            stringify!(CMP)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ARR) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(LPTIM_TypeDef),
            "::",
            stringify!(ARR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CNT) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(LPTIM_TypeDef),
            "::",
            stringify!(CNT)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OR) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(LPTIM_TypeDef),
            "::",
            stringify!(OR)
        )
    );
}
#[doc = "Real-Time Clock"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RTC_TypeDef {
    #[doc = "< RTC time register, Address offset: 0x00"]
    pub TR: u32,
    #[doc = "< RTC date register, Address offset: 0x04"]
    pub DR: u32,
    #[doc = "< RTC control register, Address offset: 0x08"]
    pub CR: u32,
    #[doc = "< RTC initialization and status register, Address offset: 0x0C"]
    pub ISR: u32,
    #[doc = "< RTC prescaler register, Address offset: 0x10"]
    pub PRER: u32,
    #[doc = "< RTC wakeup timer register, Address offset: 0x14"]
    pub WUTR: u32,
    #[doc = "< Reserved, Address offset: 0x18"]
    pub RESERVED: u32,
    #[doc = "< RTC alarm A register, Address offset: 0x1C"]
    pub ALRMAR: u32,
    #[doc = "< RTC alarm B register, Address offset: 0x20"]
    pub ALRMBR: u32,
    #[doc = "< RTC write protection register, Address offset: 0x24"]
    pub WPR: u32,
    #[doc = "< RTC sub second register, Address offset: 0x28"]
    pub SSR: u32,
    #[doc = "< RTC shift control register, Address offset: 0x2C"]
    pub SHIFTR: u32,
    #[doc = "< RTC time stamp time register, Address offset: 0x30"]
    pub TSTR: u32,
    #[doc = "< RTC time stamp date register, Address offset: 0x34"]
    pub TSDR: u32,
    #[doc = "< RTC time-stamp sub second register, Address offset: 0x38"]
    pub TSSSR: u32,
    #[doc = "< RTC calibration register, Address offset: 0x3C"]
    pub CALR: u32,
    #[doc = "< RTC tamper configuration register, Address offset: 0x40"]
    pub TAMPCR: u32,
    #[doc = "< RTC alarm A sub second register, Address offset: 0x44"]
    pub ALRMASSR: u32,
    #[doc = "< RTC alarm B sub second register, Address offset: 0x48"]
    pub ALRMBSSR: u32,
    #[doc = "< RTC option register, Address offset 0x4C"]
    pub OR: u32,
    #[doc = "< RTC backup register 0, Address offset: 0x50"]
    pub BKP0R: u32,
    #[doc = "< RTC backup register 1, Address offset: 0x54"]
    pub BKP1R: u32,
    #[doc = "< RTC backup register 2, Address offset: 0x58"]
    pub BKP2R: u32,
    #[doc = "< RTC backup register 3, Address offset: 0x5C"]
    pub BKP3R: u32,
    #[doc = "< RTC backup register 4, Address offset: 0x60"]
    pub BKP4R: u32,
    #[doc = "< RTC backup register 5, Address offset: 0x64"]
    pub BKP5R: u32,
    #[doc = "< RTC backup register 6, Address offset: 0x68"]
    pub BKP6R: u32,
    #[doc = "< RTC backup register 7, Address offset: 0x6C"]
    pub BKP7R: u32,
    #[doc = "< RTC backup register 8, Address offset: 0x70"]
    pub BKP8R: u32,
    #[doc = "< RTC backup register 9, Address offset: 0x74"]
    pub BKP9R: u32,
    #[doc = "< RTC backup register 10, Address offset: 0x78"]
    pub BKP10R: u32,
    #[doc = "< RTC backup register 11, Address offset: 0x7C"]
    pub BKP11R: u32,
    #[doc = "< RTC backup register 12, Address offset: 0x80"]
    pub BKP12R: u32,
    #[doc = "< RTC backup register 13, Address offset: 0x84"]
    pub BKP13R: u32,
    #[doc = "< RTC backup register 14, Address offset: 0x88"]
    pub BKP14R: u32,
    #[doc = "< RTC backup register 15, Address offset: 0x8C"]
    pub BKP15R: u32,
    #[doc = "< RTC backup register 16, Address offset: 0x90"]
    pub BKP16R: u32,
    #[doc = "< RTC backup register 17, Address offset: 0x94"]
    pub BKP17R: u32,
    #[doc = "< RTC backup register 18, Address offset: 0x98"]
    pub BKP18R: u32,
    #[doc = "< RTC backup register 19, Address offset: 0x9C"]
    pub BKP19R: u32,
}
#[test]
fn bindgen_test_layout_RTC_TypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<RTC_TypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<RTC_TypeDef>(),
        160usize,
        concat!("Size of: ", stringify!(RTC_TypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<RTC_TypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(RTC_TypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TR) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(TR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).DR) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(DR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CR) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(CR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ISR) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(ISR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PRER) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(PRER)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).WUTR) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(WUTR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).RESERVED) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(RESERVED)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ALRMAR) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(ALRMAR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ALRMBR) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(ALRMBR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).WPR) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(WPR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).SSR) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(SSR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).SHIFTR) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(SHIFTR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TSTR) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(TSTR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TSDR) as usize - ptr as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(TSDR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TSSSR) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(TSSSR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CALR) as usize - ptr as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(CALR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TAMPCR) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(TAMPCR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ALRMASSR) as usize - ptr as usize },
        68usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(ALRMASSR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ALRMBSSR) as usize - ptr as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(ALRMBSSR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OR) as usize - ptr as usize },
        76usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(OR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP0R) as usize - ptr as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP0R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP1R) as usize - ptr as usize },
        84usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP1R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP2R) as usize - ptr as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP2R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP3R) as usize - ptr as usize },
        92usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP3R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP4R) as usize - ptr as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP4R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP5R) as usize - ptr as usize },
        100usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP5R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP6R) as usize - ptr as usize },
        104usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP6R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP7R) as usize - ptr as usize },
        108usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP7R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP8R) as usize - ptr as usize },
        112usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP8R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP9R) as usize - ptr as usize },
        116usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP9R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP10R) as usize - ptr as usize },
        120usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP10R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP11R) as usize - ptr as usize },
        124usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP11R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP12R) as usize - ptr as usize },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP12R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP13R) as usize - ptr as usize },
        132usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP13R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP14R) as usize - ptr as usize },
        136usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP14R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP15R) as usize - ptr as usize },
        140usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP15R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP16R) as usize - ptr as usize },
        144usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP16R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP17R) as usize - ptr as usize },
        148usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP17R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP18R) as usize - ptr as usize },
        152usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP18R)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BKP19R) as usize - ptr as usize },
        156usize,
        concat!(
            "Offset of field: ",
            stringify!(RTC_TypeDef),
            "::",
            stringify!(BKP19R)
        )
    );
}
#[doc = "Serial Peripheral Interface"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SPI_TypeDef {
    #[doc = "< SPI Control register 1, Address offset: 0x00"]
    pub CR1: u32,
    #[doc = "< SPI Control register 2, Address offset: 0x04"]
    pub CR2: u32,
    #[doc = "< SPI Status register, Address offset: 0x08"]
    pub SR: u32,
    #[doc = "< SPI data register, Address offset: 0x0C"]
    pub DR: u32,
    #[doc = "< SPI CRC polynomial register, Address offset: 0x10"]
    pub CRCPR: u32,
    #[doc = "< SPI Rx CRC register, Address offset: 0x14"]
    pub RXCRCR: u32,
    #[doc = "< SPI Tx CRC register, Address offset: 0x18"]
    pub TXCRCR: u32,
}
#[test]
fn bindgen_test_layout_SPI_TypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<SPI_TypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SPI_TypeDef>(),
        28usize,
        concat!("Size of: ", stringify!(SPI_TypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<SPI_TypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(SPI_TypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CR1) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SPI_TypeDef),
            "::",
            stringify!(CR1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CR2) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SPI_TypeDef),
            "::",
            stringify!(CR2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).SR) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SPI_TypeDef),
            "::",
            stringify!(SR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).DR) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(SPI_TypeDef),
            "::",
            stringify!(DR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CRCPR) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(SPI_TypeDef),
            "::",
            stringify!(CRCPR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).RXCRCR) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(SPI_TypeDef),
            "::",
            stringify!(RXCRCR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TXCRCR) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(SPI_TypeDef),
            "::",
            stringify!(TXCRCR)
        )
    );
}
#[doc = "TIM"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TIM_TypeDef {
    #[doc = "< TIM control register 1, Address offset: 0x00"]
    pub CR1: u32,
    #[doc = "< TIM control register 2, Address offset: 0x04"]
    pub CR2: u32,
    #[doc = "< TIM slave mode control register, Address offset: 0x08"]
    pub SMCR: u32,
    #[doc = "< TIM DMA/interrupt enable register, Address offset: 0x0C"]
    pub DIER: u32,
    #[doc = "< TIM status register, Address offset: 0x10"]
    pub SR: u32,
    #[doc = "< TIM event generation register, Address offset: 0x14"]
    pub EGR: u32,
    #[doc = "< TIM capture/compare mode register 1, Address offset: 0x18"]
    pub CCMR1: u32,
    #[doc = "< TIM capture/compare mode register 2, Address offset: 0x1C"]
    pub CCMR2: u32,
    #[doc = "< TIM capture/compare enable register, Address offset: 0x20"]
    pub CCER: u32,
    #[doc = "< TIM counter register, Address offset: 0x24"]
    pub CNT: u32,
    #[doc = "< TIM prescaler register, Address offset: 0x28"]
    pub PSC: u32,
    #[doc = "< TIM auto-reload register, Address offset: 0x2C"]
    pub ARR: u32,
    #[doc = "< TIM repetition counter register, Address offset: 0x30"]
    pub RCR: u32,
    #[doc = "< TIM capture/compare register 1, Address offset: 0x34"]
    pub CCR1: u32,
    #[doc = "< TIM capture/compare register 2, Address offset: 0x38"]
    pub CCR2: u32,
    #[doc = "< TIM capture/compare register 3, Address offset: 0x3C"]
    pub CCR3: u32,
    #[doc = "< TIM capture/compare register 4, Address offset: 0x40"]
    pub CCR4: u32,
    #[doc = "< TIM break and dead-time register, Address offset: 0x44"]
    pub BDTR: u32,
    #[doc = "< TIM DMA control register, Address offset: 0x48"]
    pub DCR: u32,
    #[doc = "< TIM DMA address for full transfer, Address offset: 0x4C"]
    pub DMAR: u32,
    #[doc = "< TIM option register Address offset: 0x50"]
    pub OR: u32,
    #[doc = "< TIM capture/compare mode register 3, Address offset: 0x54"]
    pub CCMR3: u32,
    #[doc = "< TIM capture/compare register5, Address offset: 0x58"]
    pub CCR5: u32,
    #[doc = "< TIM capture/compare register6, Address offset: 0x5C"]
    pub CCR6: u32,
    #[doc = "< TIM Alternate function option register 1, Address offset: 0x60"]
    pub AF1: u32,
    #[doc = "< TIM Alternate function option register 2, Address offset: 0x64"]
    pub AF2: u32,
}
#[test]
fn bindgen_test_layout_TIM_TypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<TIM_TypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<TIM_TypeDef>(),
        104usize,
        concat!("Size of: ", stringify!(TIM_TypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<TIM_TypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(TIM_TypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CR1) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CR1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CR2) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CR2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).SMCR) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(SMCR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).DIER) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(DIER)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).SR) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(SR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).EGR) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(EGR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CCMR1) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CCMR1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CCMR2) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CCMR2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CCER) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CCER)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CNT) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CNT)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PSC) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(PSC)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ARR) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(ARR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).RCR) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(RCR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CCR1) as usize - ptr as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CCR1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CCR2) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CCR2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CCR3) as usize - ptr as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CCR3)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CCR4) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CCR4)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BDTR) as usize - ptr as usize },
        68usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(BDTR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).DCR) as usize - ptr as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(DCR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).DMAR) as usize - ptr as usize },
        76usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(DMAR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OR) as usize - ptr as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(OR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CCMR3) as usize - ptr as usize },
        84usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CCMR3)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CCR5) as usize - ptr as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CCR5)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CCR6) as usize - ptr as usize },
        92usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(CCR6)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).AF1) as usize - ptr as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(AF1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).AF2) as usize - ptr as usize },
        100usize,
        concat!(
            "Offset of field: ",
            stringify!(TIM_TypeDef),
            "::",
            stringify!(AF2)
        )
    );
}
#[doc = "Universal Synchronous Asynchronous Receiver Transmitter"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct USART_TypeDef {
    #[doc = "< USART Control register 1, Address offset: 0x00"]
    pub CR1: u32,
    #[doc = "< USART Control register 2, Address offset: 0x04"]
    pub CR2: u32,
    #[doc = "< USART Control register 3, Address offset: 0x08"]
    pub CR3: u32,
    #[doc = "< USART Baud rate register, Address offset: 0x0C"]
    pub BRR: u32,
    #[doc = "< USART Guard time and prescaler register, Address offset: 0x10"]
    pub GTPR: u32,
    #[doc = "< USART Receiver Time Out register, Address offset: 0x14"]
    pub RTOR: u32,
    #[doc = "< USART Request register, Address offset: 0x18"]
    pub RQR: u32,
    #[doc = "< USART Interrupt and status register, Address offset: 0x1C"]
    pub ISR: u32,
    #[doc = "< USART Interrupt flag Clear register, Address offset: 0x20"]
    pub ICR: u32,
    #[doc = "< USART Receive Data register, Address offset: 0x24"]
    pub RDR: u32,
    #[doc = "< USART Transmit Data register, Address offset: 0x28"]
    pub TDR: u32,
    #[doc = "< USART Prescaler register, Address offset: 0x2C"]
    pub PRESC: u32,
}
#[test]
fn bindgen_test_layout_USART_TypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<USART_TypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<USART_TypeDef>(),
        48usize,
        concat!("Size of: ", stringify!(USART_TypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<USART_TypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(USART_TypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CR1) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(USART_TypeDef),
            "::",
            stringify!(CR1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CR2) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(USART_TypeDef),
            "::",
            stringify!(CR2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CR3) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(USART_TypeDef),
            "::",
            stringify!(CR3)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BRR) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(USART_TypeDef),
            "::",
            stringify!(BRR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).GTPR) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(USART_TypeDef),
            "::",
            stringify!(GTPR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).RTOR) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(USART_TypeDef),
            "::",
            stringify!(RTOR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).RQR) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(USART_TypeDef),
            "::",
            stringify!(RQR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ISR) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(USART_TypeDef),
            "::",
            stringify!(ISR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ICR) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(USART_TypeDef),
            "::",
            stringify!(ICR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).RDR) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(USART_TypeDef),
            "::",
            stringify!(RDR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TDR) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(USART_TypeDef),
            "::",
            stringify!(TDR)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PRESC) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(USART_TypeDef),
            "::",
            stringify!(PRESC)
        )
    );
}
pub const ErrorStatus_SUCCESS: ErrorStatus = 0;
pub const ErrorStatus_ERROR: ErrorStatus = 1;
pub type ErrorStatus = core::ffi::c_uchar;
#[doc = "LL GPIO Init Structure definition"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LL_GPIO_InitTypeDef {
    #[doc = "< Specifies the GPIO pins to be configured.\nThis parameter can be any value of GPIO_LL_EC_PIN"]
    pub Pin: u32,
    #[doc = "< Specifies the operating mode for the selected pins.\nThis parameter can be a value of GPIO_LL_EC_MODE.\n\nGPIO HW configuration can be modified afterwards using unitary function LL_GPIO_SetPinMode()."]
    pub Mode: u32,
    #[doc = "< Specifies the speed for the selected pins.\nThis parameter can be a value of GPIO_LL_EC_SPEED.\n\nGPIO HW configuration can be modified afterwards using unitary function LL_GPIO_SetPinSpeed()."]
    pub Speed: u32,
    #[doc = "< Specifies the operating output type for the selected pins.\nThis parameter can be a value of GPIO_LL_EC_OUTPUT.\n\nGPIO HW configuration can be modified afterwards using unitary function LL_GPIO_SetPinOutputType()."]
    pub OutputType: u32,
    #[doc = "< Specifies the operating Pull-up/Pull down for the selected pins.\nThis parameter can be a value of GPIO_LL_EC_PULL.\n\nGPIO HW configuration can be modified afterwards using unitary function LL_GPIO_SetPinPull()."]
    pub Pull: u32,
    #[doc = "< Specifies the Peripheral to be connected to the selected pins.\nThis parameter can be a value of GPIO_LL_EC_AF.\n\nGPIO HW configuration can be modified afterwards using unitary function LL_GPIO_SetAFPin_0_7() and LL_GPIO_SetAFPin_8_15()."]
    pub Alternate: u32,
}
#[test]
fn bindgen_test_layout_LL_GPIO_InitTypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<LL_GPIO_InitTypeDef> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LL_GPIO_InitTypeDef>(),
        24usize,
        concat!("Size of: ", stringify!(LL_GPIO_InitTypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<LL_GPIO_InitTypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(LL_GPIO_InitTypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Pin) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_GPIO_InitTypeDef),
            "::",
            stringify!(Pin)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Mode) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_GPIO_InitTypeDef),
            "::",
            stringify!(Mode)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Speed) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_GPIO_InitTypeDef),
            "::",
            stringify!(Speed)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OutputType) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_GPIO_InitTypeDef),
            "::",
            stringify!(OutputType)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Pull) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_GPIO_InitTypeDef),
            "::",
            stringify!(Pull)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Alternate) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_GPIO_InitTypeDef),
            "::",
            stringify!(Alternate)
        )
    );
}
extern "C" {
    pub fn LL_GPIO_Init(
        GPIOx: *mut GPIO_TypeDef,
        GPIO_InitStruct: *mut LL_GPIO_InitTypeDef,
    ) -> ErrorStatus;
}
#[doc = "Interrupt callback prototype"]
pub type GpioExtiCallback =
    ::core::option::Option<unsafe extern "C" fn(ctx: *mut core::ffi::c_void)>;
pub const GpioMode_GpioModeInput: GpioMode = 0;
pub const GpioMode_GpioModeOutputPushPull: GpioMode = 1;
pub const GpioMode_GpioModeOutputOpenDrain: GpioMode = 2;
pub const GpioMode_GpioModeAltFunctionPushPull: GpioMode = 3;
pub const GpioMode_GpioModeAltFunctionOpenDrain: GpioMode = 4;
pub const GpioMode_GpioModeAnalog: GpioMode = 5;
pub const GpioMode_GpioModeInterruptRise: GpioMode = 6;
pub const GpioMode_GpioModeInterruptFall: GpioMode = 7;
pub const GpioMode_GpioModeInterruptRiseFall: GpioMode = 8;
pub const GpioMode_GpioModeEventRise: GpioMode = 9;
pub const GpioMode_GpioModeEventFall: GpioMode = 10;
pub const GpioMode_GpioModeEventRiseFall: GpioMode = 11;
#[doc = "Gpio modes"]
pub type GpioMode = core::ffi::c_uchar;
pub const GpioPull_GpioPullNo: GpioPull = 0;
pub const GpioPull_GpioPullUp: GpioPull = 1;
pub const GpioPull_GpioPullDown: GpioPull = 2;
#[doc = "Gpio pull modes"]
pub type GpioPull = core::ffi::c_uchar;
pub const GpioSpeed_GpioSpeedLow: GpioSpeed = 0;
pub const GpioSpeed_GpioSpeedMedium: GpioSpeed = 1;
pub const GpioSpeed_GpioSpeedHigh: GpioSpeed = 2;
pub const GpioSpeed_GpioSpeedVeryHigh: GpioSpeed = 3;
#[doc = "Gpio speed modes"]
pub type GpioSpeed = core::ffi::c_uchar;
#[doc = "< MCO Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0MCO: GpioAltFn = 0;
#[doc = "< LSCO Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0LSCO: GpioAltFn = 0;
#[doc = "< JTMS-SWDIO Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0JTMS_SWDIO: GpioAltFn = 0;
#[doc = "< JTCK-SWCLK Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0JTCK_SWCLK: GpioAltFn = 0;
#[doc = "< JTDI Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0JTDI: GpioAltFn = 0;
#[doc = "< RCT_OUT Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0RTC_OUT: GpioAltFn = 0;
#[doc = "< JTDO-TRACESWO Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0JTD_TRACE: GpioAltFn = 0;
#[doc = "< NJTRST Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0NJTRST: GpioAltFn = 0;
#[doc = "< RTC_REFIN Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0RTC_REFIN: GpioAltFn = 0;
#[doc = "< TRACED0 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0TRACED0: GpioAltFn = 0;
#[doc = "< TRACED1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0TRACED1: GpioAltFn = 0;
#[doc = "< TRACED2 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0TRACED2: GpioAltFn = 0;
#[doc = "< TRACED3 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0TRACED3: GpioAltFn = 0;
#[doc = "< TRIG_INOUT Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0TRIG_INOUT: GpioAltFn = 0;
#[doc = "< TRACECK Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn0TRACECK: GpioAltFn = 0;
#[doc = "< System Function mapping"]
pub const GpioAltFn_GpioAltFn0SYS: GpioAltFn = 0;
#[doc = "< TIM1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn1TIM1: GpioAltFn = 1;
#[doc = "< TIM2 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn1TIM2: GpioAltFn = 1;
#[doc = "< LPTIM1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn1LPTIM1: GpioAltFn = 1;
#[doc = "< TIM2 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn2TIM2: GpioAltFn = 2;
#[doc = "< TIM1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn2TIM1: GpioAltFn = 2;
#[doc = "< SAI1_CK1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn3SAI1: GpioAltFn = 3;
#[doc = "< SPI2 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn3SPI2: GpioAltFn = 3;
#[doc = "< TIM1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn3TIM1: GpioAltFn = 3;
#[doc = "< I2C1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn4I2C1: GpioAltFn = 4;
#[doc = "< I2C3 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn4I2C3: GpioAltFn = 4;
#[doc = "< SPI1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn5SPI1: GpioAltFn = 5;
#[doc = "< SPI2 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn5SPI2: GpioAltFn = 5;
#[doc = "< MCO Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6MCO: GpioAltFn = 6;
#[doc = "< LSCO Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6LSCO: GpioAltFn = 6;
#[doc = "< RF_DTB0 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB0: GpioAltFn = 6;
#[doc = "< RF_DTB1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB1: GpioAltFn = 6;
#[doc = "< RF_DTB2 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB2: GpioAltFn = 6;
#[doc = "< RF_DTB3 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB3: GpioAltFn = 6;
#[doc = "< RF_DTB4 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB4: GpioAltFn = 6;
#[doc = "< RF_DTB5 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB5: GpioAltFn = 6;
#[doc = "< RF_DTB6 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB6: GpioAltFn = 6;
#[doc = "< RF_DTB7 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB7: GpioAltFn = 6;
#[doc = "< RF_DTB8 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB8: GpioAltFn = 6;
#[doc = "< RF_DTB9 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB9: GpioAltFn = 6;
#[doc = "< RF_DTB10 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB10: GpioAltFn = 6;
#[doc = "< RF_DTB11 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB11: GpioAltFn = 6;
#[doc = "< RF_DTB12 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB12: GpioAltFn = 6;
#[doc = "< RF_DTB13 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB13: GpioAltFn = 6;
#[doc = "< RF_DTB14 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB14: GpioAltFn = 6;
#[doc = "< RF_DTB15 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB15: GpioAltFn = 6;
#[doc = "< RF_DTB16 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB16: GpioAltFn = 6;
#[doc = "< RF_DTB17 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB17: GpioAltFn = 6;
#[doc = "< RF_DTB18 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_DTB18: GpioAltFn = 6;
#[doc = "< RF_MISO Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_MISO: GpioAltFn = 6;
#[doc = "< RF_MOSI Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_MOSI: GpioAltFn = 6;
#[doc = "< RF_SCK Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_SCK: GpioAltFn = 6;
#[doc = "< RF_NSS Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn6RF_NSS: GpioAltFn = 6;
#[doc = "< USART1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn7USART1: GpioAltFn = 7;
#[doc = "< LPUART1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn8LPUART1: GpioAltFn = 8;
#[doc = "< IR Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn8IR: GpioAltFn = 8;
#[doc = "< TSC Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn9TSC: GpioAltFn = 9;
#[doc = "< QUADSPI Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn10QUADSPI: GpioAltFn = 10;
#[doc = "< USB Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn10USB: GpioAltFn = 10;
#[doc = "< LCD Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn11LCD: GpioAltFn = 11;
#[doc = "< COMP1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn12COMP1: GpioAltFn = 12;
#[doc = "< COMP2 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn12COMP2: GpioAltFn = 12;
#[doc = "< TIM1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn12TIM1: GpioAltFn = 12;
#[doc = "< SAI1 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn13SAI1: GpioAltFn = 13;
#[doc = "< TIM2 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn14TIM2: GpioAltFn = 14;
#[doc = "< TIM16 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn14TIM16: GpioAltFn = 14;
#[doc = "< TIM17 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn14TIM17: GpioAltFn = 14;
#[doc = "< LPTIM2 Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn14LPTIM2: GpioAltFn = 14;
#[doc = "< EVENTOUT Alternate Function mapping"]
pub const GpioAltFn_GpioAltFn15EVENTOUT: GpioAltFn = 15;
#[doc = "< just dummy value"]
pub const GpioAltFn_GpioAltFnUnused: GpioAltFn = 16;
#[doc = "Gpio alternate functions"]
pub type GpioAltFn = core::ffi::c_uchar;
#[doc = "Gpio structure"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct GpioPin {
    pub port: *mut GPIO_TypeDef,
    pub pin: u16,
}
#[test]
fn bindgen_test_layout_GpioPin() {
    const UNINIT: ::core::mem::MaybeUninit<GpioPin> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<GpioPin>(),
        8usize,
        concat!("Size of: ", stringify!(GpioPin))
    );
    assert_eq!(
        ::core::mem::align_of::<GpioPin>(),
        4usize,
        concat!("Alignment of ", stringify!(GpioPin))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).port) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(GpioPin),
            "::",
            stringify!(port)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pin) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(GpioPin),
            "::",
            stringify!(pin)
        )
    );
}
extern "C" {
    #[doc = "GPIO initialization function, simple version\n # Arguments\n\n* `gpio` - GpioPin\n * `mode` - GpioMode"]
    pub fn furi_hal_gpio_init_simple(gpio: *const GpioPin, mode: GpioMode);
}
extern "C" {
    #[doc = "GPIO initialization function, normal version\n # Arguments\n\n* `gpio` - GpioPin\n * `mode` - GpioMode\n * `pull` - GpioPull\n * `speed` - GpioSpeed"]
    pub fn furi_hal_gpio_init(
        gpio: *const GpioPin,
        mode: GpioMode,
        pull: GpioPull,
        speed: GpioSpeed,
    );
}
extern "C" {
    #[doc = "GPIO initialization function, extended version\n # Arguments\n\n* `gpio` - GpioPin\n * `mode` - GpioMode\n * `pull` - GpioPull\n * `speed` - GpioSpeed\n * `alt_fn` - GpioAltFn"]
    pub fn furi_hal_gpio_init_ex(
        gpio: *const GpioPin,
        mode: GpioMode,
        pull: GpioPull,
        speed: GpioSpeed,
        alt_fn: GpioAltFn,
    );
}
extern "C" {
    #[doc = "Add and enable interrupt\n # Arguments\n\n* `gpio` - GpioPin\n * `cb` - GpioExtiCallback\n * `ctx` - context for callback"]
    pub fn furi_hal_gpio_add_int_callback(
        gpio: *const GpioPin,
        cb: GpioExtiCallback,
        ctx: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Enable interrupt\n # Arguments\n\n* `gpio` - GpioPin"]
    pub fn furi_hal_gpio_enable_int_callback(gpio: *const GpioPin);
}
extern "C" {
    #[doc = "Disable interrupt\n # Arguments\n\n* `gpio` - GpioPin"]
    pub fn furi_hal_gpio_disable_int_callback(gpio: *const GpioPin);
}
extern "C" {
    #[doc = "Remove interrupt\n # Arguments\n\n* `gpio` - GpioPin"]
    pub fn furi_hal_gpio_remove_int_callback(gpio: *const GpioPin);
}
extern "C" {
    pub fn powf(arg1: f32, arg2: f32) -> f32;
}
extern "C" {
    pub fn roundf(arg1: f32) -> f32;
}
extern "C" {
    pub fn scalbnf(arg1: f32, arg2: core::ffi::c_int) -> f32;
}
extern "C" {
    pub fn furi_run();
}
#[doc = "Cortex timer provides high precision low level expiring timer"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalCortexTimer {
    pub start: u32,
    pub value: u32,
}
#[test]
fn bindgen_test_layout_FuriHalCortexTimer() {
    const UNINIT: ::core::mem::MaybeUninit<FuriHalCortexTimer> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriHalCortexTimer>(),
        8usize,
        concat!("Size of: ", stringify!(FuriHalCortexTimer))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriHalCortexTimer>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriHalCortexTimer))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalCortexTimer),
            "::",
            stringify!(start)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalCortexTimer),
            "::",
            stringify!(value)
        )
    );
}
extern "C" {
    #[doc = "Microseconds delay\n\n # Arguments\n\n* `microseconds` (direction in) - The microseconds to wait"]
    pub fn furi_hal_cortex_delay_us(microseconds: u32);
}
extern "C" {
    #[doc = "Get instructions per microsecond count\n\n # Returns\n\ninstructions per microsecond count"]
    pub fn furi_hal_cortex_instructions_per_microsecond() -> u32;
}
extern "C" {
    #[doc = "Get Timer\n\n # Arguments\n\n* `timeout_us` (direction in) - The expire timeout in us\n\n # Returns\n\nThe FuriHalCortexTimer"]
    pub fn furi_hal_cortex_timer_get(timeout_us: u32) -> FuriHalCortexTimer;
}
extern "C" {
    #[doc = "Check if timer expired\n\n # Arguments\n\n* `cortex_timer` (direction in) - The FuriHalCortexTimer\n\n # Returns\n\ntrue if expired"]
    pub fn furi_hal_cortex_timer_is_expired(cortex_timer: FuriHalCortexTimer) -> bool;
}
extern "C" {
    #[doc = "Wait for timer expire\n\n # Arguments\n\n* `cortex_timer` (direction in) - The FuriHalCortexTimer"]
    pub fn furi_hal_cortex_timer_wait(cortex_timer: FuriHalCortexTimer);
}
pub const FuriHalCortexComp_FuriHalCortexComp0: FuriHalCortexComp = 0;
pub const FuriHalCortexComp_FuriHalCortexComp1: FuriHalCortexComp = 1;
pub const FuriHalCortexComp_FuriHalCortexComp2: FuriHalCortexComp = 2;
pub const FuriHalCortexComp_FuriHalCortexComp3: FuriHalCortexComp = 3;
pub type FuriHalCortexComp = core::ffi::c_uchar;
pub const FuriHalCortexCompSize_FuriHalCortexCompSizeWord: FuriHalCortexCompSize = 2;
pub const FuriHalCortexCompSize_FuriHalCortexCompSizeHalfWord: FuriHalCortexCompSize = 1;
pub const FuriHalCortexCompSize_FuriHalCortexCompSizeByte: FuriHalCortexCompSize = 0;
pub type FuriHalCortexCompSize = core::ffi::c_uchar;
pub const FuriHalCortexCompFunction_FuriHalCortexCompFunctionPC: FuriHalCortexCompFunction = 4;
pub const FuriHalCortexCompFunction_FuriHalCortexCompFunctionRead: FuriHalCortexCompFunction = 5;
pub const FuriHalCortexCompFunction_FuriHalCortexCompFunctionWrite: FuriHalCortexCompFunction = 6;
pub const FuriHalCortexCompFunction_FuriHalCortexCompFunctionReadWrite: FuriHalCortexCompFunction =
    6;
pub type FuriHalCortexCompFunction = core::ffi::c_uchar;
extern "C" {
    #[doc = "Enable DWT comparator\n\n Allows to programmatically set instruction/data breakpoints.\n\n More details on how it works can be found in armv7m official documentation:\n https://developer.arm.com/documentation/ddi0403/d/Debug-Architecture/ARMv7-M-Debug/The-Data-Watchpoint-and-Trace-unit/The-DWT-comparators\n https://developer.arm.com/documentation/ddi0403/d/Debug-Architecture/ARMv7-M-Debug/The-Data-Watchpoint-and-Trace-unit/Comparator-Function-registers--DWT-FUNCTIONn\n\n # Arguments\n\n* `comp` (direction in) - The Comparator\n * `function` (direction in) - The Comparator Function to use\n * `value` (direction in) - The value\n * `mask` (direction in) - The mask\n * `size` (direction in) - The size"]
    pub fn furi_hal_cortex_comp_enable(
        comp: FuriHalCortexComp,
        function: FuriHalCortexCompFunction,
        value: u32,
        mask: u32,
        size: FuriHalCortexCompSize,
    );
}
extern "C" {
    #[doc = "Reset DWT comparator\n\n # Arguments\n\n* `comp` (direction in) - The Comparator"]
    pub fn furi_hal_cortex_comp_reset(comp: FuriHalCortexComp);
}
extern "C" {
    pub fn LL_RCC_GetUSARTClockFreq(USARTxSource: u32) -> u32;
}
extern "C" {
    pub fn LL_RCC_GetLPUARTClockFreq(LPUARTxSource: u32) -> u32;
}
pub const FuriHalClockMcoSourceId_FuriHalClockMcoLse: FuriHalClockMcoSourceId = 0;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoSysclk: FuriHalClockMcoSourceId = 1;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoMsi100k: FuriHalClockMcoSourceId = 2;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoMsi200k: FuriHalClockMcoSourceId = 3;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoMsi400k: FuriHalClockMcoSourceId = 4;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoMsi800k: FuriHalClockMcoSourceId = 5;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoMsi1m: FuriHalClockMcoSourceId = 6;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoMsi2m: FuriHalClockMcoSourceId = 7;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoMsi4m: FuriHalClockMcoSourceId = 8;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoMsi8m: FuriHalClockMcoSourceId = 9;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoMsi16m: FuriHalClockMcoSourceId = 10;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoMsi24m: FuriHalClockMcoSourceId = 11;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoMsi32m: FuriHalClockMcoSourceId = 12;
pub const FuriHalClockMcoSourceId_FuriHalClockMcoMsi48m: FuriHalClockMcoSourceId = 13;
pub type FuriHalClockMcoSourceId = core::ffi::c_uchar;
pub const FuriHalClockMcoDivisorId_FuriHalClockMcoDiv1: FuriHalClockMcoDivisorId = 0;
pub const FuriHalClockMcoDivisorId_FuriHalClockMcoDiv2: FuriHalClockMcoDivisorId = 268435456;
pub const FuriHalClockMcoDivisorId_FuriHalClockMcoDiv4: FuriHalClockMcoDivisorId = 536870912;
pub const FuriHalClockMcoDivisorId_FuriHalClockMcoDiv8: FuriHalClockMcoDivisorId = 805306368;
pub const FuriHalClockMcoDivisorId_FuriHalClockMcoDiv16: FuriHalClockMcoDivisorId = 1073741824;
pub type FuriHalClockMcoDivisorId = core::ffi::c_uint;
extern "C" {
    #[doc = "Enable clock output on MCO pin\n\n # Arguments\n\n* `source` - MCO clock source\n * `div` - MCO clock division"]
    pub fn furi_hal_clock_mco_enable(
        source: FuriHalClockMcoSourceId,
        div: FuriHalClockMcoDivisorId,
    );
}
extern "C" {
    #[doc = "Disable clock output on MCO pin"]
    pub fn furi_hal_clock_mco_disable();
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalAdcHandle {
    _unused: [u8; 0],
}
#[doc = "< 2.048V scale"]
pub const FuriHalAdcScale_FuriHalAdcScale2048: FuriHalAdcScale = 0;
#[doc = "< 2.5V scale"]
pub const FuriHalAdcScale_FuriHalAdcScale2500: FuriHalAdcScale = 1;
pub type FuriHalAdcScale = core::ffi::c_uchar;
#[doc = "< 16MHZ, synchronous"]
pub const FuriHalAdcClock_FuriHalAdcClockSync16: FuriHalAdcClock = 0;
#[doc = "< 32MHZ, synchronous"]
pub const FuriHalAdcClock_FuriHalAdcClockSync32: FuriHalAdcClock = 1;
#[doc = "< 64MHz, synchronous"]
pub const FuriHalAdcClock_FuriHalAdcClockSync64: FuriHalAdcClock = 2;
pub type FuriHalAdcClock = core::ffi::c_uchar;
#[doc = "< ADC will take 2 samples per each value"]
pub const FuriHalAdcOversample_FuriHalAdcOversample2: FuriHalAdcOversample = 0;
#[doc = "< ADC will take 4 samples per each value"]
pub const FuriHalAdcOversample_FuriHalAdcOversample4: FuriHalAdcOversample = 1;
#[doc = "< ADC will take 8 samples per each value"]
pub const FuriHalAdcOversample_FuriHalAdcOversample8: FuriHalAdcOversample = 2;
#[doc = "< ADC will take 16 samples per each value"]
pub const FuriHalAdcOversample_FuriHalAdcOversample16: FuriHalAdcOversample = 3;
#[doc = "< ADC will take 32 samples per each value"]
pub const FuriHalAdcOversample_FuriHalAdcOversample32: FuriHalAdcOversample = 4;
#[doc = "< ADC will take 64 samples per each value"]
pub const FuriHalAdcOversample_FuriHalAdcOversample64: FuriHalAdcOversample = 5;
#[doc = "< ADC will take 128 samples per each value"]
pub const FuriHalAdcOversample_FuriHalAdcOversample128: FuriHalAdcOversample = 6;
#[doc = "< ADC will take 256 samples per each value"]
pub const FuriHalAdcOversample_FuriHalAdcOversample256: FuriHalAdcOversample = 7;
#[doc = "< disable oversampling"]
pub const FuriHalAdcOversample_FuriHalAdcOversampleNone: FuriHalAdcOversample = 8;
pub type FuriHalAdcOversample = core::ffi::c_uchar;
#[doc = "< Sampling time 2.5 ADC clock"]
pub const FuriHalAdcSamplingTime_FuriHalAdcSamplingtime2_5: FuriHalAdcSamplingTime = 0;
#[doc = "< Sampling time 6.5 ADC clock"]
pub const FuriHalAdcSamplingTime_FuriHalAdcSamplingtime6_5: FuriHalAdcSamplingTime = 1;
#[doc = "< Sampling time 12.5 ADC clock"]
pub const FuriHalAdcSamplingTime_FuriHalAdcSamplingtime12_5: FuriHalAdcSamplingTime = 2;
#[doc = "< Sampling time 24.5 ADC clock"]
pub const FuriHalAdcSamplingTime_FuriHalAdcSamplingtime24_5: FuriHalAdcSamplingTime = 3;
#[doc = "< Sampling time 47.5 ADC clock"]
pub const FuriHalAdcSamplingTime_FuriHalAdcSamplingtime47_5: FuriHalAdcSamplingTime = 4;
#[doc = "< Sampling time 92.5 ADC clock"]
pub const FuriHalAdcSamplingTime_FuriHalAdcSamplingtime92_5: FuriHalAdcSamplingTime = 5;
#[doc = "< Sampling time 247.5 ADC clock"]
pub const FuriHalAdcSamplingTime_FuriHalAdcSamplingtime247_5: FuriHalAdcSamplingTime = 6;
#[doc = "< Sampling time 640.5 ADC clock"]
pub const FuriHalAdcSamplingTime_FuriHalAdcSamplingtime640_5: FuriHalAdcSamplingTime = 7;
pub type FuriHalAdcSamplingTime = core::ffi::c_uchar;
#[doc = "< Internal channel, see `FuriHalAdcChannelVREFINT`."]
pub const FuriHalAdcChannel_FuriHalAdcChannel0: FuriHalAdcChannel = 0;
#[doc = "< Channel 1p"]
pub const FuriHalAdcChannel_FuriHalAdcChannel1: FuriHalAdcChannel = 1;
#[doc = "< Channel 2p or 1n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel2: FuriHalAdcChannel = 2;
#[doc = "< Channel 3p or 2n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel3: FuriHalAdcChannel = 3;
#[doc = "< Channel 4p or 3n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel4: FuriHalAdcChannel = 4;
#[doc = "< Channel 5p or 4n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel5: FuriHalAdcChannel = 5;
#[doc = "< Channel 6p or 5n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel6: FuriHalAdcChannel = 6;
#[doc = "< Channel 7p or 6n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel7: FuriHalAdcChannel = 7;
#[doc = "< Channel 8p or 7n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel8: FuriHalAdcChannel = 8;
#[doc = "< Channel 9p or 8n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel9: FuriHalAdcChannel = 9;
#[doc = "< Channel 10p or 9n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel10: FuriHalAdcChannel = 10;
#[doc = "< Channel 11p or 10n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel11: FuriHalAdcChannel = 11;
#[doc = "< Channel 12p or 11n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel12: FuriHalAdcChannel = 12;
#[doc = "< Channel 13p or 12n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel13: FuriHalAdcChannel = 13;
#[doc = "< Channel 14p or 13n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel14: FuriHalAdcChannel = 14;
#[doc = "< Channel 15p or 14n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel15: FuriHalAdcChannel = 15;
#[doc = "< Channel 16p or 15n"]
pub const FuriHalAdcChannel_FuriHalAdcChannel16: FuriHalAdcChannel = 16;
#[doc = "< Internal channel, see `FuriHalAdcChannelTEMPSENSOR`."]
pub const FuriHalAdcChannel_FuriHalAdcChannel17: FuriHalAdcChannel = 17;
#[doc = "< Internal channel, see `FuriHalAdcChannelVBAT`."]
pub const FuriHalAdcChannel_FuriHalAdcChannel18: FuriHalAdcChannel = 18;
#[doc = "< Special channel for VREFINT, used for calibration and self test"]
pub const FuriHalAdcChannel_FuriHalAdcChannelVREFINT: FuriHalAdcChannel = 19;
#[doc = "< Special channel for on-die temperature sensor, requires at least 5us of sampling time"]
pub const FuriHalAdcChannel_FuriHalAdcChannelTEMPSENSOR: FuriHalAdcChannel = 20;
#[doc = "< Special channel for VBAT/3 voltage, requires at least 12us of sampling time"]
pub const FuriHalAdcChannel_FuriHalAdcChannelVBAT: FuriHalAdcChannel = 21;
#[doc = "< No channel"]
pub const FuriHalAdcChannel_FuriHalAdcChannelNone: FuriHalAdcChannel = 22;
pub type FuriHalAdcChannel = core::ffi::c_uchar;
extern "C" {
    #[doc = "Initialize ADC subsystem"]
    pub fn furi_hal_adc_init();
}
extern "C" {
    #[doc = "Acquire ADC handle\n\n Enables appropriate power and clocking domains\n\n # Returns\n\nFuriHalAdcHandle pointer"]
    pub fn furi_hal_adc_acquire() -> *mut FuriHalAdcHandle;
}
extern "C" {
    #[doc = "Release ADC handle\n\n # Arguments\n\n* `handle` - The ADC handle"]
    pub fn furi_hal_adc_release(handle: *mut FuriHalAdcHandle);
}
extern "C" {
    #[doc = "Configure with default parameters and enable ADC\n\n Parameters used:\n - FuriHalAdcScale2048 - 2.048V VREF Scale. Your signal should be in 0 -\n 2.048V range.\n - FuriHalAdcClockSync64 - Clocked from sysclk bus at 64MHz in synchronous\n mode. Fast, no delay on data bus access.\n - FuriHalAdcOversample64 - Going to acquire and average 64 samples. For\n circuits with slowly or not changing signal. Total time per one read:\n (1/64)*(12.5+247.5)*64 = 260us. The best results you'll get if your signal\n will stay on the same level all this time.\n - FuriHalAdcSamplingtime247_5 - Sampling(transfer from source to internal\n sampling capacitor) time is 247.5 ADC clocks: (1/64)*247.5 = 3.8671875us.\n For relatively high impedance circuits.\n\n Also keep your measurement circuit impedance under 10KOhm or oversampling\n results will be compromised. Verify your signal with oscilloscope(you may\n need fast oscilloscope: 200MHz bandwidth, 125MS/s), ensure that signal is not\n distorted by sampling.\n\n Those parameters were optimized for 0 - 2.048 voltage measurement with ~0.1%\n precision. You can get more, but it will require some magic.\n\n # Arguments\n\n* `handle` - The ADC handle"]
    pub fn furi_hal_adc_configure(handle: *mut FuriHalAdcHandle);
}
extern "C" {
    #[doc = "Configure with extended parameters and enable ADC\n\n General advice is to start with default parameters, figure out what exactly\n is not working for you and then tune it. Also in some cases changing\n circuit(adding caps, lowering impedance, adding opamp) may be better than changing\n parameters.\n\n In general ADC is a world of magic: make sure that you understand\n how your circuit and ADC works. Then carefully read STM32WB\n series reference manual. Setting incorrect parameters leads to\n very poor results. Also internal channels require special\n settings.\n\n # Arguments\n\n* `handle` - The ADC handle\n * `scale` (direction in) - The ADC voltage scale\n * `clock` (direction in) - The ADC clock\n * `oversample` (direction in) - The ADC oversample mode\n * `sampling_time` (direction in) - The ADC sampling time"]
    pub fn furi_hal_adc_configure_ex(
        handle: *mut FuriHalAdcHandle,
        scale: FuriHalAdcScale,
        clock: FuriHalAdcClock,
        oversample: FuriHalAdcOversample,
        sampling_time: FuriHalAdcSamplingTime,
    );
}
extern "C" {
    #[doc = "Read single ADC value\n\n # Arguments\n\n* `handle` - The ADC handle\n * `channel` (direction in) - The channel to sample\n\n # Returns\n\nvalue, 12 bits"]
    pub fn furi_hal_adc_read(handle: *mut FuriHalAdcHandle, channel: FuriHalAdcChannel) -> u16;
}
extern "C" {
    #[doc = "Convert sampled value to voltage\n\n # Arguments\n\n* `handle` - The ADC handle\n * `value` (direction in) - The value acquired with `furi_hal_adc_read`\n\n # Returns\n\nVoltage in mV"]
    pub fn furi_hal_adc_convert_to_voltage(handle: *mut FuriHalAdcHandle, value: u16) -> f32;
}
extern "C" {
    #[doc = "Convert sampled VREFINT value to voltage\n\n # Arguments\n\n* `handle` - The ADC handle\n * `value` (direction in) - The value acquired with `furi_hal_adc_read` for\n `FuriHalAdcChannelVREFINT` channel\n\n # Returns\n\nVoltage in mV"]
    pub fn furi_hal_adc_convert_vref(handle: *mut FuriHalAdcHandle, value: u16) -> f32;
}
extern "C" {
    #[doc = "Convert sampled TEMPSENSOR value to temperature\n\n # Arguments\n\n* `handle` - The ADC handle\n * `value` (direction in) - The value acquired with `furi_hal_adc_read` for\n `FuriHalAdcChannelTEMPSENSOR` channel\n\n # Returns\n\ntemperature in degree C"]
    pub fn furi_hal_adc_convert_temp(handle: *mut FuriHalAdcHandle, value: u16) -> f32;
}
extern "C" {
    #[doc = "Convert sampled VBAT value to voltage\n\n # Arguments\n\n* `handle` - The ADC handle\n * `value` (direction in) - The value acquired with `furi_hal_adc_read` for\n `FuriHalAdcChannelVBAT` channel\n\n # Returns\n\nVoltage in mV"]
    pub fn furi_hal_adc_convert_vbat(handle: *mut FuriHalAdcHandle, value: u16) -> f32;
}
pub const FuriHalBus_FuriHalBusAHB1_GRP1: FuriHalBus = 0;
pub const FuriHalBus_FuriHalBusDMA1: FuriHalBus = 1;
pub const FuriHalBus_FuriHalBusDMA2: FuriHalBus = 2;
pub const FuriHalBus_FuriHalBusDMAMUX1: FuriHalBus = 3;
pub const FuriHalBus_FuriHalBusCRC: FuriHalBus = 4;
pub const FuriHalBus_FuriHalBusTSC: FuriHalBus = 5;
pub const FuriHalBus_FuriHalBusAHB2_GRP1: FuriHalBus = 6;
pub const FuriHalBus_FuriHalBusGPIOA: FuriHalBus = 7;
pub const FuriHalBus_FuriHalBusGPIOB: FuriHalBus = 8;
pub const FuriHalBus_FuriHalBusGPIOC: FuriHalBus = 9;
pub const FuriHalBus_FuriHalBusGPIOD: FuriHalBus = 10;
pub const FuriHalBus_FuriHalBusGPIOE: FuriHalBus = 11;
pub const FuriHalBus_FuriHalBusGPIOH: FuriHalBus = 12;
pub const FuriHalBus_FuriHalBusADC: FuriHalBus = 13;
pub const FuriHalBus_FuriHalBusAES1: FuriHalBus = 14;
pub const FuriHalBus_FuriHalBusAHB3_GRP1: FuriHalBus = 15;
pub const FuriHalBus_FuriHalBusQUADSPI: FuriHalBus = 16;
pub const FuriHalBus_FuriHalBusPKA: FuriHalBus = 17;
pub const FuriHalBus_FuriHalBusAES2: FuriHalBus = 18;
pub const FuriHalBus_FuriHalBusRNG: FuriHalBus = 19;
pub const FuriHalBus_FuriHalBusHSEM: FuriHalBus = 20;
pub const FuriHalBus_FuriHalBusIPCC: FuriHalBus = 21;
pub const FuriHalBus_FuriHalBusFLASH: FuriHalBus = 22;
pub const FuriHalBus_FuriHalBusAPB1_GRP1: FuriHalBus = 23;
pub const FuriHalBus_FuriHalBusTIM2: FuriHalBus = 24;
pub const FuriHalBus_FuriHalBusLCD: FuriHalBus = 25;
pub const FuriHalBus_FuriHalBusSPI2: FuriHalBus = 26;
pub const FuriHalBus_FuriHalBusI2C1: FuriHalBus = 27;
pub const FuriHalBus_FuriHalBusI2C3: FuriHalBus = 28;
pub const FuriHalBus_FuriHalBusCRS: FuriHalBus = 29;
pub const FuriHalBus_FuriHalBusUSB: FuriHalBus = 30;
pub const FuriHalBus_FuriHalBusLPTIM1: FuriHalBus = 31;
pub const FuriHalBus_FuriHalBusAPB1_GRP2: FuriHalBus = 32;
pub const FuriHalBus_FuriHalBusLPUART1: FuriHalBus = 33;
pub const FuriHalBus_FuriHalBusLPTIM2: FuriHalBus = 34;
pub const FuriHalBus_FuriHalBusAPB2_GRP1: FuriHalBus = 35;
pub const FuriHalBus_FuriHalBusTIM1: FuriHalBus = 36;
pub const FuriHalBus_FuriHalBusSPI1: FuriHalBus = 37;
pub const FuriHalBus_FuriHalBusUSART1: FuriHalBus = 38;
pub const FuriHalBus_FuriHalBusTIM16: FuriHalBus = 39;
pub const FuriHalBus_FuriHalBusTIM17: FuriHalBus = 40;
pub const FuriHalBus_FuriHalBusSAI1: FuriHalBus = 41;
pub const FuriHalBus_FuriHalBusAPB3_GRP1: FuriHalBus = 42;
pub const FuriHalBus_FuriHalBusRF: FuriHalBus = 43;
pub const FuriHalBus_FuriHalBusMAX: FuriHalBus = 44;
pub type FuriHalBus = core::ffi::c_uchar;
extern "C" {
    #[doc = "Early initialization"]
    pub fn furi_hal_bus_init_early();
}
extern "C" {
    #[doc = "Early de-initialization"]
    pub fn furi_hal_bus_deinit_early();
}
extern "C" {
    #[doc = "Enable a peripheral by turning the clocking on and deasserting the reset.\n # Arguments\n\n* `[in]` - bus Peripheral to be enabled.\n Peripheral must be in disabled state in order to be enabled."]
    pub fn furi_hal_bus_enable(bus: FuriHalBus);
}
extern "C" {
    #[doc = "Reset a peripheral by sequentially asserting and deasserting the reset.\n # Arguments\n\n* `[in]` - bus Peripheral to be reset.\n Peripheral must be in enabled state in order to be reset."]
    pub fn furi_hal_bus_reset(bus: FuriHalBus);
}
extern "C" {
    #[doc = "Disable a peripheral by turning the clocking off and asserting the reset.\n # Arguments\n\n* `[in]` - bus Peripheral to be disabled.\n Peripheral must be in enabled state in order to be disabled."]
    pub fn furi_hal_bus_disable(bus: FuriHalBus);
}
extern "C" {
    #[doc = "Check if peripheral is enabled\n\n FuriHalBusAPB3_GRP1 is a special group of shared peripherals, for\n core1 its clock is always on and the only status we can report is\n peripheral reset status. Check code and Reference Manual for\n details.\n\n # Arguments\n\n* `bus` (direction in) - The peripheral to check\n\n # Returns\n\ntrue if enabled or always enabled, false otherwise"]
    pub fn furi_hal_bus_is_enabled(bus: FuriHalBus) -> bool;
}
#[doc = "< Master key"]
pub const FuriHalCryptoKeyType_FuriHalCryptoKeyTypeMaster: FuriHalCryptoKeyType = 0;
#[doc = "< Simple unencrypted key"]
pub const FuriHalCryptoKeyType_FuriHalCryptoKeyTypeSimple: FuriHalCryptoKeyType = 1;
#[doc = "< Encrypted with Master key"]
pub const FuriHalCryptoKeyType_FuriHalCryptoKeyTypeEncrypted: FuriHalCryptoKeyType = 2;
#[doc = "FuriHalCryptoKey Type"]
pub type FuriHalCryptoKeyType = core::ffi::c_uchar;
pub const FuriHalCryptoKeySize_FuriHalCryptoKeySize128: FuriHalCryptoKeySize = 0;
pub const FuriHalCryptoKeySize_FuriHalCryptoKeySize256: FuriHalCryptoKeySize = 1;
#[doc = "FuriHalCryptoKey Size in bits"]
pub type FuriHalCryptoKeySize = core::ffi::c_uchar;
#[doc = "FuriHalCryptoKey"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalCryptoKey {
    pub type_: FuriHalCryptoKeyType,
    pub size: FuriHalCryptoKeySize,
    pub data: *mut u8,
}
#[test]
fn bindgen_test_layout_FuriHalCryptoKey() {
    const UNINIT: ::core::mem::MaybeUninit<FuriHalCryptoKey> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriHalCryptoKey>(),
        8usize,
        concat!("Size of: ", stringify!(FuriHalCryptoKey))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriHalCryptoKey>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriHalCryptoKey))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalCryptoKey),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalCryptoKey),
            "::",
            stringify!(size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalCryptoKey),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "< operation successful"]
pub const FuriHalCryptoGCMState_FuriHalCryptoGCMStateOk: FuriHalCryptoGCMState = 0;
#[doc = "< error during encryption/decryption"]
pub const FuriHalCryptoGCMState_FuriHalCryptoGCMStateError: FuriHalCryptoGCMState = 1;
#[doc = "< tags do not match, auth failed"]
pub const FuriHalCryptoGCMState_FuriHalCryptoGCMStateAuthFailure: FuriHalCryptoGCMState = 2;
#[doc = "FuriHalCryptoGCMState Result of a GCM operation"]
pub type FuriHalCryptoGCMState = core::ffi::c_uchar;
extern "C" {
    #[doc = "Verify factory provisioned keys\n\n # Arguments\n\n* `keys_nb` - The keys number of\n * `valid_keys_nb` - The valid keys number of\n\n # Returns\n\ntrue if all enclave keys are intact, false otherwise"]
    pub fn furi_hal_crypto_enclave_verify(keys_nb: *mut u8, valid_keys_nb: *mut u8) -> bool;
}
extern "C" {
    #[doc = "Ensure that requested slot and slots before this slot contains keys.\n\n This function is used to provision FURI_HAL_CRYPTO_ENCLAVE_UNIQUE_KEY_SLOT. Also you\n may want to use it to generate some unique keys in user key slot range.\n\n Because of the sequential nature of the secure enclave this\n method will generate key for all slots from\n FURI_HAL_CRYPTO_ENCLAVE_FACTORY_KEY_SLOT_END to the slot your requested.\n Keys are generated using on-chip RNG.\n\n # Arguments\n\n* `key_slot` (direction in) - The key slot to enclave\n\n # Returns\n\ntrue if key exists or created, false if enclave corrupted"]
    pub fn furi_hal_crypto_enclave_ensure_key(key_slot: u8) -> bool;
}
extern "C" {
    #[doc = "Store key in crypto enclave\n\n # Arguments\n\n* `key` - FuriHalCryptoKey to be stored\n * `slot` - pointer to int where enclave slot will be stored\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_crypto_enclave_store_key(key: *mut FuriHalCryptoKey, slot: *mut u8) -> bool;
}
extern "C" {
    #[doc = "Init AES engine and load key from crypto enclave\n\n Use only with furi_hal_crypto_enclave_unload_key()\n\n # Arguments\n\n* `slot` - enclave slot\n * `iv` (direction in) - pointer to 16 bytes Initialization Vector data\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_crypto_enclave_load_key(slot: u8, iv: *const u8) -> bool;
}
extern "C" {
    #[doc = "Unload key and deinit AES engine\n\n Use only with furi_hal_crypto_enclave_load_key()\n\n # Arguments\n\n* `slot` - enclave slot\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_crypto_enclave_unload_key(slot: u8) -> bool;
}
extern "C" {
    #[doc = "Init AES engine and load supplied key\n\n Use only with furi_hal_crypto_unload_key()\n\n # Arguments\n\n* `key` (direction in) - pointer to 32 bytes key data\n * `iv` (direction in) - pointer to 16 bytes Initialization Vector data\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_crypto_load_key(key: *const u8, iv: *const u8) -> bool;
}
extern "C" {
    #[doc = "Unload key and de-init AES engine\n\n Use this function only with furi_hal_crypto_load_key()\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_crypto_unload_key() -> bool;
}
extern "C" {
    #[doc = "Encrypt data\n\n # Arguments\n\n* `input` - pointer to input data\n * `output` - pointer to output data\n * `size` - input/output buffer size in bytes\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_crypto_encrypt(input: *const u8, output: *mut u8, size: usize) -> bool;
}
extern "C" {
    #[doc = "Decrypt data\n\n # Arguments\n\n* `input` - pointer to input data\n * `output` - pointer to output data\n * `size` - input/output buffer size in bytes\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_crypto_decrypt(input: *const u8, output: *mut u8, size: usize) -> bool;
}
extern "C" {
    #[doc = "Encrypt the input using AES-CTR\n\n Decryption can be performed by supplying the ciphertext as input. Inits and\n deinits the AES engine internally.\n\n # Arguments\n\n* `key` (direction in) - pointer to 32 bytes key data\n * `iv` (direction in) - pointer to 12 bytes Initialization Vector data\n * `input` (direction in) - pointer to input data\n * `output` (direction out) - pointer to output data\n * `length` - length of the input and output in bytes\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_crypto_ctr(
        key: *const u8,
        iv: *const u8,
        input: *const u8,
        output: *mut u8,
        length: usize,
    ) -> bool;
}
extern "C" {
    #[doc = "Encrypt/decrypt the input using AES-GCM\n\n When decrypting the tag generated needs to be compared to the tag attached to\n the ciphertext in a constant-time fashion. If the tags are not equal, the\n decryption failed and the plaintext returned needs to be discarded. Inits and\n deinits the AES engine internally.\n\n # Arguments\n\n* `key` (direction in) - pointer to 32 bytes key data\n * `iv` (direction in) - pointer to 12 bytes Initialization Vector data\n * `aad` (direction in) - pointer to additional authentication data\n * `aad_length` - length of the additional authentication data in bytes\n * `input` (direction in) - pointer to input data\n * `output` (direction out) - pointer to output data\n * `length` - length of the input and output in bytes\n * `tag` (direction out) - pointer to 16 bytes space for the tag\n * `decrypt` - true for decryption, false otherwise\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_crypto_gcm(
        key: *const u8,
        iv: *const u8,
        aad: *const u8,
        aad_length: usize,
        input: *const u8,
        output: *mut u8,
        length: usize,
        tag: *mut u8,
        decrypt: bool,
    ) -> bool;
}
extern "C" {
    #[doc = "Encrypt the input using AES-GCM and generate a tag\n\n Inits and deinits the AES engine internally.\n\n # Arguments\n\n* `key` (direction in) - pointer to 32 bytes key data\n * `iv` (direction in) - pointer to 12 bytes Initialization Vector data\n * `aad` (direction in) - pointer to additional authentication data\n * `aad_length` - length of the additional authentication data in bytes\n * `input` (direction in) - pointer to input data\n * `output` (direction out) - pointer to output data\n * `length` - length of the input and output in bytes\n * `tag` (direction out) - pointer to 16 bytes space for the tag\n\n # Returns\n\nFuriHalCryptoGCMStateOk on success, FuriHalCryptoGCMStateError on\n failure"]
    pub fn furi_hal_crypto_gcm_encrypt_and_tag(
        key: *const u8,
        iv: *const u8,
        aad: *const u8,
        aad_length: usize,
        input: *const u8,
        output: *mut u8,
        length: usize,
        tag: *mut u8,
    ) -> FuriHalCryptoGCMState;
}
extern "C" {
    #[doc = "Decrypt the input using AES-GCM and verify the provided tag\n\n Inits and deinits the AES engine internally.\n\n # Arguments\n\n* `key` (direction in) - pointer to 32 bytes key data\n * `iv` (direction in) - pointer to 12 bytes Initialization Vector data\n * `aad` (direction in) - pointer to additional authentication data\n * `aad_length` - length of the additional authentication data in bytes\n * `input` (direction in) - pointer to input data\n * `output` (direction out) - pointer to output data\n * `length` - length of the input and output in bytes\n * `tag` (direction out) - pointer to 16 bytes tag\n\n # Returns\n\nFuriHalCryptoGCMStateOk on success, FuriHalCryptoGCMStateError on\n failure, FuriHalCryptoGCMStateAuthFailure if the tag does not\n match"]
    pub fn furi_hal_crypto_gcm_decrypt_and_verify(
        key: *const u8,
        iv: *const u8,
        aad: *const u8,
        aad_length: usize,
        input: *const u8,
        output: *mut u8,
        length: usize,
        tag: *const u8,
    ) -> FuriHalCryptoGCMState;
}
extern "C" {
    #[doc = "Enable MCU debug"]
    pub fn furi_hal_debug_enable();
}
extern "C" {
    #[doc = "Disable MCU debug"]
    pub fn furi_hal_debug_disable();
}
extern "C" {
    #[doc = "Check if GDB debug session is active"]
    pub fn furi_hal_debug_is_gdb_session_active() -> bool;
}
extern "C" {
    #[doc = "Early initialization"]
    pub fn furi_hal_dma_init_early();
}
extern "C" {
    #[doc = "Early de-initialization"]
    pub fn furi_hal_dma_deinit_early();
}
extern "C" {
    pub fn furi_hal_os_tick();
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalSdInfo {
    #[doc = "< total capacity in bytes"]
    pub capacity: u64,
    #[doc = "< block size"]
    pub block_size: u32,
    #[doc = "< logical capacity in blocks"]
    pub logical_block_count: u32,
    #[doc = "< logical block size in bytes"]
    pub logical_block_size: u32,
    #[doc = "< manufacturer ID"]
    pub manufacturer_id: u8,
    #[doc = "< OEM ID, 2 characters + null terminator"]
    pub oem_id: [core::ffi::c_char; 3usize],
    #[doc = "< product name, 5 characters + null terminator"]
    pub product_name: [core::ffi::c_char; 6usize],
    #[doc = "< product revision major"]
    pub product_revision_major: u8,
    #[doc = "< product revision minor"]
    pub product_revision_minor: u8,
    #[doc = "< product serial number"]
    pub product_serial_number: u32,
    #[doc = "< manufacturing month"]
    pub manufacturing_month: u8,
    #[doc = "< manufacturing year"]
    pub manufacturing_year: u16,
}
#[test]
fn bindgen_test_layout_FuriHalSdInfo() {
    const UNINIT: ::core::mem::MaybeUninit<FuriHalSdInfo> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriHalSdInfo>(),
        40usize,
        concat!("Size of: ", stringify!(FuriHalSdInfo))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriHalSdInfo>(),
        8usize,
        concat!("Alignment of ", stringify!(FuriHalSdInfo))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).capacity) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSdInfo),
            "::",
            stringify!(capacity)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).block_size) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSdInfo),
            "::",
            stringify!(block_size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).logical_block_count) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSdInfo),
            "::",
            stringify!(logical_block_count)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).logical_block_size) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSdInfo),
            "::",
            stringify!(logical_block_size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).manufacturer_id) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSdInfo),
            "::",
            stringify!(manufacturer_id)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).oem_id) as usize - ptr as usize },
        21usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSdInfo),
            "::",
            stringify!(oem_id)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).product_name) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSdInfo),
            "::",
            stringify!(product_name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).product_revision_major) as usize - ptr as usize },
        30usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSdInfo),
            "::",
            stringify!(product_revision_major)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).product_revision_minor) as usize - ptr as usize },
        31usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSdInfo),
            "::",
            stringify!(product_revision_minor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).product_serial_number) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSdInfo),
            "::",
            stringify!(product_serial_number)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).manufacturing_month) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSdInfo),
            "::",
            stringify!(manufacturing_month)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).manufacturing_year) as usize - ptr as usize },
        38usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSdInfo),
            "::",
            stringify!(manufacturing_year)
        )
    );
}
extern "C" {
    #[doc = "Init SD card presence detection"]
    pub fn furi_hal_sd_presence_init();
}
extern "C" {
    #[doc = "Get SD card status\n # Returns\n\ntrue if SD card is present"]
    pub fn furi_hal_sd_is_present() -> bool;
}
extern "C" {
    #[doc = "SD card max mount retry count\n # Returns\n\nuint8_t"]
    pub fn furi_hal_sd_max_mount_retry_count() -> u8;
}
extern "C" {
    #[doc = "Init SD card\n # Arguments\n\n* `power_reset` - reset card power\n # Returns\n\nFuriStatus"]
    pub fn furi_hal_sd_init(power_reset: bool) -> FuriStatus;
}
extern "C" {
    #[doc = "Read blocks from SD card\n # Arguments\n\n* `buff` -\n * `sector` -\n * `count` -\n # Returns\n\nFuriStatus"]
    pub fn furi_hal_sd_read_blocks(buff: *mut u32, sector: u32, count: u32) -> FuriStatus;
}
extern "C" {
    #[doc = "Write blocks to SD card\n # Arguments\n\n* `buff` -\n * `sector` -\n * `count` -\n # Returns\n\nFuriStatus"]
    pub fn furi_hal_sd_write_blocks(buff: *const u32, sector: u32, count: u32) -> FuriStatus;
}
extern "C" {
    #[doc = "Get SD card info\n # Arguments\n\n* `info` -\n # Returns\n\nFuriStatus"]
    pub fn furi_hal_sd_info(info: *mut FuriHalSdInfo) -> FuriStatus;
}
extern "C" {
    #[doc = "Get SD card state\n # Returns\n\nFuriStatus"]
    pub fn furi_hal_sd_get_card_state() -> FuriStatus;
}
#[doc = "I2C_LL_ES_INIT I2C Exported Init structure\n # "]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LL_I2C_InitTypeDef {
    #[doc = "< Specifies the peripheral mode.\nThis parameter can be a value of I2C_LL_EC_PERIPHERAL_MODE.\n\nThis feature can be modified afterwards using unitary function\nLL_I2C_SetMode()."]
    pub PeripheralMode: u32,
    #[doc = "< Specifies the SDA setup, hold time and the SCL high, low period values.\nThis parameter must be set by referring to the STM32CubeMX Tool and\nthe helper macro __LL_I2C_CONVERT_TIMINGS().\n\nThis feature can be modified afterwards using unitary function\nLL_I2C_SetTiming()."]
    pub Timing: u32,
    #[doc = "< Enables or disables analog noise filter.\nThis parameter can be a value of I2C_LL_EC_ANALOGFILTER_SELECTION.\n\nThis feature can be modified afterwards using unitary functions\nLL_I2C_EnableAnalogFilter() or LL_I2C_DisableAnalogFilter()."]
    pub AnalogFilter: u32,
    #[doc = "< Configures the digital noise filter.\nThis parameter can be a number between Min_Data = 0x00 and Max_Data = 0x0F.\n\nThis feature can be modified afterwards using unitary function\nLL_I2C_SetDigitalFilter()."]
    pub DigitalFilter: u32,
    #[doc = "< Specifies the device own address 1.\nThis parameter must be a value between Min_Data = 0x00 and Max_Data = 0x3FF.\n\nThis feature can be modified afterwards using unitary function\nLL_I2C_SetOwnAddress1()."]
    pub OwnAddress1: u32,
    #[doc = "< Specifies the ACKnowledge or Non ACKnowledge condition after the address receive\nmatch code or next received byte.\nThis parameter can be a value of I2C_LL_EC_I2C_ACKNOWLEDGE.\n\nThis feature can be modified afterwards using unitary function\nLL_I2C_AcknowledgeNextData()."]
    pub TypeAcknowledge: u32,
    #[doc = "< Specifies the device own address 1 size (7-bit or 10-bit).\nThis parameter can be a value of I2C_LL_EC_OWNADDRESS1.\n\nThis feature can be modified afterwards using unitary function\nLL_I2C_SetOwnAddress1()."]
    pub OwnAddrSize: u32,
}
#[test]
fn bindgen_test_layout_LL_I2C_InitTypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<LL_I2C_InitTypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LL_I2C_InitTypeDef>(),
        28usize,
        concat!("Size of: ", stringify!(LL_I2C_InitTypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<LL_I2C_InitTypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(LL_I2C_InitTypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PeripheralMode) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_I2C_InitTypeDef),
            "::",
            stringify!(PeripheralMode)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Timing) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_I2C_InitTypeDef),
            "::",
            stringify!(Timing)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).AnalogFilter) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_I2C_InitTypeDef),
            "::",
            stringify!(AnalogFilter)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).DigitalFilter) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_I2C_InitTypeDef),
            "::",
            stringify!(DigitalFilter)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OwnAddress1) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_I2C_InitTypeDef),
            "::",
            stringify!(OwnAddress1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TypeAcknowledge) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_I2C_InitTypeDef),
            "::",
            stringify!(TypeAcknowledge)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OwnAddrSize) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_I2C_InitTypeDef),
            "::",
            stringify!(OwnAddrSize)
        )
    );
}
extern "C" {
    #[doc = "I2C_LL_EF_Init Initialization and de-initialization functions\n # "]
    pub fn LL_I2C_Init(
        I2Cx: *mut I2C_TypeDef,
        I2C_InitStruct: *const LL_I2C_InitTypeDef,
    ) -> ErrorStatus;
}
#[doc = "< Bus initialization event, called on system start"]
pub const FuriHalI2cBusEvent_FuriHalI2cBusEventInit: FuriHalI2cBusEvent = 0;
#[doc = "< Bus deinitialization event, called on system stop"]
pub const FuriHalI2cBusEvent_FuriHalI2cBusEventDeinit: FuriHalI2cBusEvent = 1;
#[doc = "< Bus lock event, called before activation"]
pub const FuriHalI2cBusEvent_FuriHalI2cBusEventLock: FuriHalI2cBusEvent = 2;
#[doc = "< Bus unlock event, called after deactivation"]
pub const FuriHalI2cBusEvent_FuriHalI2cBusEventUnlock: FuriHalI2cBusEvent = 3;
#[doc = "< Bus activation event, called before handle activation"]
pub const FuriHalI2cBusEvent_FuriHalI2cBusEventActivate: FuriHalI2cBusEvent = 4;
#[doc = "< Bus deactivation event, called after handle deactivation"]
pub const FuriHalI2cBusEvent_FuriHalI2cBusEventDeactivate: FuriHalI2cBusEvent = 5;
#[doc = "FuriHal i2c bus states"]
pub type FuriHalI2cBusEvent = core::ffi::c_uchar;
#[doc = "FuriHal i2c bus event callback"]
pub type FuriHalI2cBusEventCallback = ::core::option::Option<
    unsafe extern "C" fn(bus: *mut FuriHalI2cBus, event: FuriHalI2cBusEvent),
>;
#[doc = "FuriHal i2c bus"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalI2cBus {
    pub i2c: *mut I2C_TypeDef,
    pub current_handle: *mut FuriHalI2cBusHandle,
    pub callback: FuriHalI2cBusEventCallback,
}
#[test]
fn bindgen_test_layout_FuriHalI2cBus() {
    const UNINIT: ::core::mem::MaybeUninit<FuriHalI2cBus> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriHalI2cBus>(),
        12usize,
        concat!("Size of: ", stringify!(FuriHalI2cBus))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriHalI2cBus>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriHalI2cBus))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).i2c) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalI2cBus),
            "::",
            stringify!(i2c)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).current_handle) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalI2cBus),
            "::",
            stringify!(current_handle)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalI2cBus),
            "::",
            stringify!(callback)
        )
    );
}
#[doc = "< Handle activate: connect gpio and apply bus config"]
pub const FuriHalI2cBusHandleEvent_FuriHalI2cBusHandleEventActivate: FuriHalI2cBusHandleEvent = 0;
#[doc = "< Handle deactivate: disconnect gpio and reset bus config"]
pub const FuriHalI2cBusHandleEvent_FuriHalI2cBusHandleEventDeactivate: FuriHalI2cBusHandleEvent = 1;
#[doc = "FuriHal i2c handle states"]
pub type FuriHalI2cBusHandleEvent = core::ffi::c_uchar;
#[doc = "FuriHal i2c handle event callback"]
pub type FuriHalI2cBusHandleEventCallback = ::core::option::Option<
    unsafe extern "C" fn(handle: *mut FuriHalI2cBusHandle, event: FuriHalI2cBusHandleEvent),
>;
#[doc = "FuriHal i2c handle"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalI2cBusHandle {
    pub bus: *mut FuriHalI2cBus,
    pub callback: FuriHalI2cBusHandleEventCallback,
}
#[test]
fn bindgen_test_layout_FuriHalI2cBusHandle() {
    const UNINIT: ::core::mem::MaybeUninit<FuriHalI2cBusHandle> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriHalI2cBusHandle>(),
        8usize,
        concat!("Size of: ", stringify!(FuriHalI2cBusHandle))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriHalI2cBusHandle>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriHalI2cBusHandle))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bus) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalI2cBusHandle),
            "::",
            stringify!(bus)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalI2cBusHandle),
            "::",
            stringify!(callback)
        )
    );
}
extern "C" {
    #[doc = "Internal(power) i2c bus, I2C1, under reset when not used"]
    pub static mut furi_hal_i2c_bus_power: FuriHalI2cBus;
}
extern "C" {
    #[doc = "External i2c bus, I2C3, under reset when not used"]
    pub static mut furi_hal_i2c_bus_external: FuriHalI2cBus;
}
extern "C" {
    #[doc = "Handle for internal(power) i2c bus\n Bus: furi_hal_i2c_bus_external\n Pins: PA9(SCL) / PA10(SDA), float on release\n Params: 400khz"]
    pub static mut furi_hal_i2c_handle_power: FuriHalI2cBusHandle;
}
extern "C" {
    #[doc = "Handle for external i2c bus\n Bus: furi_hal_i2c_bus_external\n Pins: PC0(SCL) / PC1(SDA), float on release\n Params: 100khz"]
    pub static mut furi_hal_i2c_handle_external: FuriHalI2cBusHandle;
}
#[doc = "Begin the transaction by sending a START condition followed by the\n address"]
pub const FuriHalI2cBegin_FuriHalI2cBeginStart: FuriHalI2cBegin = 0;
#[doc = "Begin the transaction by sending a RESTART condition followed by the\n address\n > **Note:** Must follow a transaction ended with\n FuriHalI2cEndAwaitRestart"]
pub const FuriHalI2cBegin_FuriHalI2cBeginRestart: FuriHalI2cBegin = 1;
#[doc = "Continue the previous transaction with new data\n > **Note:** Must follow a transaction ended with FuriHalI2cEndPause and\n be of the same type (RX/TX)"]
pub const FuriHalI2cBegin_FuriHalI2cBeginResume: FuriHalI2cBegin = 2;
#[doc = "Transaction beginning signal"]
pub type FuriHalI2cBegin = core::ffi::c_uchar;
#[doc = "End the transaction by sending a STOP condition"]
pub const FuriHalI2cEnd_FuriHalI2cEndStop: FuriHalI2cEnd = 0;
#[doc = "End the transaction by clock stretching\n > **Note:** Must be followed by a transaction using\n FuriHalI2cBeginRestart"]
pub const FuriHalI2cEnd_FuriHalI2cEndAwaitRestart: FuriHalI2cEnd = 1;
#[doc = "Pauses the transaction by clock stretching\n > **Note:** Must be followed by a transaction using FuriHalI2cBeginResume"]
pub const FuriHalI2cEnd_FuriHalI2cEndPause: FuriHalI2cEnd = 2;
#[doc = "Transaction end signal"]
pub type FuriHalI2cEnd = core::ffi::c_uchar;
extern "C" {
    #[doc = "Acquire I2C bus handle\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance"]
    pub fn furi_hal_i2c_acquire(handle: *mut FuriHalI2cBusHandle);
}
extern "C" {
    #[doc = "Release I2C bus handle\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance acquired in\n `furi_hal_i2c_acquire`"]
    pub fn furi_hal_i2c_release(handle: *mut FuriHalI2cBusHandle);
}
extern "C" {
    #[doc = "Perform I2C TX transfer\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance\n * `address` - I2C slave address\n * `data` - Pointer to data buffer\n * `size` - Size of data buffer\n * `timeout` - Timeout in milliseconds\n\n # Returns\n\ntrue on successful transfer, false otherwise"]
    pub fn furi_hal_i2c_tx(
        handle: *mut FuriHalI2cBusHandle,
        address: u8,
        data: *const u8,
        size: usize,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Perform I2C TX transfer, with additional settings.\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance\n * `address` - I2C slave address\n * `ten_bit` - Whether the address is 10 bits wide\n * `data` - Pointer to data buffer\n * `size` - Size of data buffer\n * `begin` - How to begin the transaction\n * `end` - How to end the transaction\n * `timeout` - Timeout in milliseconds\n\n # Returns\n\ntrue on successful transfer, false otherwise"]
    pub fn furi_hal_i2c_tx_ext(
        handle: *mut FuriHalI2cBusHandle,
        address: u16,
        ten_bit: bool,
        data: *const u8,
        size: usize,
        begin: FuriHalI2cBegin,
        end: FuriHalI2cEnd,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Perform I2C RX transfer\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance\n * `address` - I2C slave address\n * `data` - Pointer to data buffer\n * `size` - Size of data buffer\n * `timeout` - Timeout in milliseconds\n\n # Returns\n\ntrue on successful transfer, false otherwise"]
    pub fn furi_hal_i2c_rx(
        handle: *mut FuriHalI2cBusHandle,
        address: u8,
        data: *mut u8,
        size: usize,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Perform I2C RX transfer, with additional settings.\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance\n * `address` - I2C slave address\n * `ten_bit` - Whether the address is 10 bits wide\n * `data` - Pointer to data buffer\n * `size` - Size of data buffer\n * `begin` - How to begin the transaction\n * `end` - How to end the transaction\n * `timeout` - Timeout in milliseconds\n\n # Returns\n\ntrue on successful transfer, false otherwise"]
    pub fn furi_hal_i2c_rx_ext(
        handle: *mut FuriHalI2cBusHandle,
        address: u16,
        ten_bit: bool,
        data: *mut u8,
        size: usize,
        begin: FuriHalI2cBegin,
        end: FuriHalI2cEnd,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Perform I2C TX and RX transfers\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance\n * `address` - I2C slave address\n * `tx_data` - Pointer to TX data buffer\n * `tx_size` - Size of TX data buffer\n * `rx_data` - Pointer to RX data buffer\n * `rx_size` - Size of RX data buffer\n * `timeout` - Timeout in milliseconds\n\n # Returns\n\ntrue on successful transfer, false otherwise"]
    pub fn furi_hal_i2c_trx(
        handle: *mut FuriHalI2cBusHandle,
        address: u8,
        tx_data: *const u8,
        tx_size: usize,
        rx_data: *mut u8,
        rx_size: usize,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Check if I2C device presents on bus\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance\n * `i2c_addr` - I2C slave address\n * `timeout` - Timeout in milliseconds\n\n # Returns\n\ntrue if device present and is ready, false otherwise"]
    pub fn furi_hal_i2c_is_device_ready(
        handle: *mut FuriHalI2cBusHandle,
        i2c_addr: u8,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Perform I2C device register read (8-bit)\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance\n * `i2c_addr` - I2C slave address\n * `reg_addr` - Register address\n * `data` - Pointer to register value\n * `timeout` - Timeout in milliseconds\n\n # Returns\n\ntrue on successful transfer, false otherwise"]
    pub fn furi_hal_i2c_read_reg_8(
        handle: *mut FuriHalI2cBusHandle,
        i2c_addr: u8,
        reg_addr: u8,
        data: *mut u8,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Perform I2C device register read (16-bit)\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance\n * `i2c_addr` - I2C slave address\n * `reg_addr` - Register address\n * `data` - Pointer to register value\n * `timeout` - Timeout in milliseconds\n\n # Returns\n\ntrue on successful transfer, false otherwise"]
    pub fn furi_hal_i2c_read_reg_16(
        handle: *mut FuriHalI2cBusHandle,
        i2c_addr: u8,
        reg_addr: u8,
        data: *mut u16,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Perform I2C device memory read\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance\n * `i2c_addr` - I2C slave address\n * `mem_addr` - Memory start address\n * `data` - Pointer to data buffer\n * `len` - Size of data buffer\n * `timeout` - Timeout in milliseconds\n\n # Returns\n\ntrue on successful transfer, false otherwise"]
    pub fn furi_hal_i2c_read_mem(
        handle: *mut FuriHalI2cBusHandle,
        i2c_addr: u8,
        mem_addr: u8,
        data: *mut u8,
        len: usize,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Perform I2C device register write (8-bit)\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance\n * `i2c_addr` - I2C slave address\n * `reg_addr` - Register address\n * `data` - Register value\n * `timeout` - Timeout in milliseconds\n\n # Returns\n\ntrue on successful transfer, false otherwise"]
    pub fn furi_hal_i2c_write_reg_8(
        handle: *mut FuriHalI2cBusHandle,
        i2c_addr: u8,
        reg_addr: u8,
        data: u8,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Perform I2C device register write (16-bit)\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance\n * `i2c_addr` - I2C slave address\n * `reg_addr` - Register address\n * `data` - Register value\n * `timeout` - Timeout in milliseconds\n\n # Returns\n\ntrue on successful transfer, false otherwise"]
    pub fn furi_hal_i2c_write_reg_16(
        handle: *mut FuriHalI2cBusHandle,
        i2c_addr: u8,
        reg_addr: u8,
        data: u16,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Perform I2C device memory\n\n # Arguments\n\n* `handle` - Pointer to FuriHalI2cBusHandle instance\n * `i2c_addr` - I2C slave address\n * `mem_addr` - Memory start address\n * `data` - Pointer to data buffer\n * `len` - Size of data buffer\n * `timeout` - Timeout in milliseconds\n\n # Returns\n\ntrue on successful transfer, false otherwise"]
    pub fn furi_hal_i2c_write_mem(
        handle: *mut FuriHalI2cBusHandle,
        i2c_addr: u8,
        mem_addr: u8,
        data: *const u8,
        len: usize,
        timeout: u32,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalRegionBand {
    pub start: u32,
    pub end: u32,
    pub power_limit: i8,
    pub duty_cycle: u8,
}
#[test]
fn bindgen_test_layout_FuriHalRegionBand() {
    const UNINIT: ::core::mem::MaybeUninit<FuriHalRegionBand> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriHalRegionBand>(),
        12usize,
        concat!("Size of: ", stringify!(FuriHalRegionBand))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriHalRegionBand>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriHalRegionBand))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalRegionBand),
            "::",
            stringify!(start)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).end) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalRegionBand),
            "::",
            stringify!(end)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).power_limit) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalRegionBand),
            "::",
            stringify!(power_limit)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).duty_cycle) as usize - ptr as usize },
        9usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalRegionBand),
            "::",
            stringify!(duty_cycle)
        )
    );
}
#[repr(C)]
#[derive(Debug)]
pub struct FuriHalRegion {
    pub country_code: [core::ffi::c_char; 4usize],
    pub bands_count: u16,
    pub bands: __IncompleteArrayField<FuriHalRegionBand>,
}
#[test]
fn bindgen_test_layout_FuriHalRegion() {
    const UNINIT: ::core::mem::MaybeUninit<FuriHalRegion> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriHalRegion>(),
        8usize,
        concat!("Size of: ", stringify!(FuriHalRegion))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriHalRegion>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriHalRegion))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).country_code) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalRegion),
            "::",
            stringify!(country_code)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bands_count) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalRegion),
            "::",
            stringify!(bands_count)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bands) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalRegion),
            "::",
            stringify!(bands)
        )
    );
}
extern "C" {
    #[doc = "Get Region Data.\n\n Region data may be allocated in Flash or in RAM.\n Keep in mind that we don't do memory management on our side.\n\n # Returns\n\npointer to FuriHalRegion instance (in RAM or Flash, check before freeing on region update)"]
    pub fn furi_hal_region_get() -> *const FuriHalRegion;
}
extern "C" {
    #[doc = "Set device region data\n\n # Arguments\n\n* `region` - pointer to the FuriHalRegion"]
    pub fn furi_hal_region_set(region: *mut FuriHalRegion);
}
extern "C" {
    #[doc = "Check if region data provisioned\n\n # Returns\n\ntrue if provisioned, false otherwise"]
    pub fn furi_hal_region_is_provisioned() -> bool;
}
extern "C" {
    #[doc = "Get region name\n\n 2 letter Region code according to iso 3166 standard\n There are 2 extra values that we use in special cases:\n - \"00\" - developer edition, unlocked\n - \"WW\" - world wide, region provisioned by default\n - \"--\" - no provisioned region\n\n # Returns\n\nPointer to string"]
    pub fn furi_hal_region_get_name() -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Сheck if transmission is allowed on this frequency for your flipper region\n\n # Arguments\n\n* `frequency` (direction in) - The frequency\n * `value` - frequency in Hz\n\n # Returns\n\ntrue if allowed"]
    pub fn furi_hal_region_is_frequency_allowed(frequency: u32) -> bool;
}
extern "C" {
    #[doc = "Get band data for frequency\n\n\n\n # Arguments\n\n* `frequency` (direction in) - The frequency\n\n # Returns\n\n{ description_of_the_return_value }"]
    pub fn furi_hal_region_get_band(frequency: u32) -> *const FuriHalRegionBand;
}
pub const InputKey_InputKeyUp: InputKey = 0;
pub const InputKey_InputKeyDown: InputKey = 1;
pub const InputKey_InputKeyRight: InputKey = 2;
pub const InputKey_InputKeyLeft: InputKey = 3;
pub const InputKey_InputKeyOk: InputKey = 4;
pub const InputKey_InputKeyBack: InputKey = 5;
#[doc = "< Special value"]
pub const InputKey_InputKeyMAX: InputKey = 6;
pub type InputKey = core::ffi::c_uchar;
pub const Light_LightRed: Light = 1;
pub const Light_LightGreen: Light = 2;
pub const Light_LightBlue: Light = 4;
pub const Light_LightBacklight: Light = 8;
pub type Light = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct InputPin {
    pub gpio: *const GpioPin,
    pub key: InputKey,
    pub inverted: bool,
    pub name: *const core::ffi::c_char,
}
#[test]
fn bindgen_test_layout_InputPin() {
    const UNINIT: ::core::mem::MaybeUninit<InputPin> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<InputPin>(),
        12usize,
        concat!("Size of: ", stringify!(InputPin))
    );
    assert_eq!(
        ::core::mem::align_of::<InputPin>(),
        4usize,
        concat!("Alignment of ", stringify!(InputPin))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).gpio) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(InputPin),
            "::",
            stringify!(gpio)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(InputPin),
            "::",
            stringify!(key)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).inverted) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(InputPin),
            "::",
            stringify!(inverted)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(InputPin),
            "::",
            stringify!(name)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct GpioPinRecord {
    pub pin: *const GpioPin,
    pub name: *const core::ffi::c_char,
    pub channel: FuriHalAdcChannel,
    pub number: u8,
    pub debug: bool,
}
#[test]
fn bindgen_test_layout_GpioPinRecord() {
    const UNINIT: ::core::mem::MaybeUninit<GpioPinRecord> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<GpioPinRecord>(),
        12usize,
        concat!("Size of: ", stringify!(GpioPinRecord))
    );
    assert_eq!(
        ::core::mem::align_of::<GpioPinRecord>(),
        4usize,
        concat!("Alignment of ", stringify!(GpioPinRecord))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pin) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(GpioPinRecord),
            "::",
            stringify!(pin)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(GpioPinRecord),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).channel) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(GpioPinRecord),
            "::",
            stringify!(channel)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).number) as usize - ptr as usize },
        9usize,
        concat!(
            "Offset of field: ",
            stringify!(GpioPinRecord),
            "::",
            stringify!(number)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).debug) as usize - ptr as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(GpioPinRecord),
            "::",
            stringify!(debug)
        )
    );
}
extern "C" {
    pub static input_pins: [InputPin; 0usize];
}
extern "C" {
    pub static input_pins_count: usize;
}
extern "C" {
    pub static gpio_pins: [GpioPinRecord; 0usize];
}
extern "C" {
    pub static gpio_pins_count: usize;
}
extern "C" {
    pub static gpio_swdio: GpioPin;
}
extern "C" {
    pub static gpio_swclk: GpioPin;
}
extern "C" {
    pub static gpio_vibro: GpioPin;
}
extern "C" {
    pub static gpio_ibutton: GpioPin;
}
extern "C" {
    pub static gpio_cc1101_g0: GpioPin;
}
extern "C" {
    pub static gpio_rf_sw_0: GpioPin;
}
extern "C" {
    pub static gpio_subghz_cs: GpioPin;
}
extern "C" {
    pub static gpio_display_cs: GpioPin;
}
extern "C" {
    pub static gpio_display_rst_n: GpioPin;
}
extern "C" {
    pub static gpio_display_di: GpioPin;
}
extern "C" {
    pub static gpio_sdcard_cs: GpioPin;
}
extern "C" {
    pub static gpio_sdcard_cd: GpioPin;
}
extern "C" {
    pub static gpio_nfc_cs: GpioPin;
}
extern "C" {
    pub static gpio_button_up: GpioPin;
}
extern "C" {
    pub static gpio_button_down: GpioPin;
}
extern "C" {
    pub static gpio_button_right: GpioPin;
}
extern "C" {
    pub static gpio_button_left: GpioPin;
}
extern "C" {
    pub static gpio_button_ok: GpioPin;
}
extern "C" {
    pub static gpio_button_back: GpioPin;
}
extern "C" {
    pub static gpio_spi_d_miso: GpioPin;
}
extern "C" {
    pub static gpio_spi_d_mosi: GpioPin;
}
extern "C" {
    pub static gpio_spi_d_sck: GpioPin;
}
extern "C" {
    pub static gpio_spi_r_miso: GpioPin;
}
extern "C" {
    pub static gpio_spi_r_mosi: GpioPin;
}
extern "C" {
    pub static gpio_spi_r_sck: GpioPin;
}
extern "C" {
    pub static gpio_ext_pc0: GpioPin;
}
extern "C" {
    pub static gpio_ext_pc1: GpioPin;
}
extern "C" {
    pub static gpio_ext_pc3: GpioPin;
}
extern "C" {
    pub static gpio_ext_pb2: GpioPin;
}
extern "C" {
    pub static gpio_ext_pb3: GpioPin;
}
extern "C" {
    pub static gpio_ext_pa4: GpioPin;
}
extern "C" {
    pub static gpio_ext_pa6: GpioPin;
}
extern "C" {
    pub static gpio_ext_pa7: GpioPin;
}
extern "C" {
    pub static gpio_nfc_irq_rfid_pull: GpioPin;
}
extern "C" {
    pub static gpio_rfid_carrier_out: GpioPin;
}
extern "C" {
    pub static gpio_rfid_data_in: GpioPin;
}
extern "C" {
    pub static gpio_rfid_carrier: GpioPin;
}
extern "C" {
    pub static gpio_infrared_rx: GpioPin;
}
extern "C" {
    pub static gpio_infrared_tx: GpioPin;
}
extern "C" {
    pub static gpio_usart_tx: GpioPin;
}
extern "C" {
    pub static gpio_usart_rx: GpioPin;
}
extern "C" {
    pub static gpio_i2c_power_sda: GpioPin;
}
extern "C" {
    pub static gpio_i2c_power_scl: GpioPin;
}
extern "C" {
    pub static gpio_speaker: GpioPin;
}
extern "C" {
    pub static gpio_periph_power: GpioPin;
}
extern "C" {
    pub static gpio_usb_dm: GpioPin;
}
extern "C" {
    pub static gpio_usb_dp: GpioPin;
}
extern "C" {
    #[doc = "Get a corresponding external connector pin number for a gpio\n\n # Arguments\n\n* `gpio` - GpioPin\n\n # Returns\n\npin number or -1 if gpio is not on the external connector"]
    pub fn furi_hal_resources_get_ext_pin_number(gpio: *const GpioPin) -> i32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DateTime {
    #[doc = "< Hour in 24H format: 0-23"]
    pub hour: u8,
    #[doc = "< Minute: 0-59"]
    pub minute: u8,
    #[doc = "< Second: 0-59"]
    pub second: u8,
    #[doc = "< Current day: 1-31"]
    pub day: u8,
    #[doc = "< Current month: 1-12"]
    pub month: u8,
    #[doc = "< Current year: 2000-2099"]
    pub year: u16,
    #[doc = "< Current weekday: 1-7"]
    pub weekday: u8,
}
#[test]
fn bindgen_test_layout_DateTime() {
    const UNINIT: ::core::mem::MaybeUninit<DateTime> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<DateTime>(),
        10usize,
        concat!("Size of: ", stringify!(DateTime))
    );
    assert_eq!(
        ::core::mem::align_of::<DateTime>(),
        2usize,
        concat!("Alignment of ", stringify!(DateTime))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hour) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(DateTime),
            "::",
            stringify!(hour)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).minute) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(DateTime),
            "::",
            stringify!(minute)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).second) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(DateTime),
            "::",
            stringify!(second)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).day) as usize - ptr as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(DateTime),
            "::",
            stringify!(day)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).month) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(DateTime),
            "::",
            stringify!(month)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).year) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(DateTime),
            "::",
            stringify!(year)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).weekday) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(DateTime),
            "::",
            stringify!(weekday)
        )
    );
}
extern "C" {
    #[doc = "Validate Date Time\n\n # Arguments\n\n* `datetime` - The datetime to validate\n\n # Returns\n\n{ description_of_the_return_value }"]
    pub fn datetime_validate_datetime(datetime: *mut DateTime) -> bool;
}
extern "C" {
    #[doc = "Convert DateTime to UNIX timestamp\n\n Mind timezone when perform conversion\n\n # Arguments\n\n* `datetime` - The datetime (UTC)\n\n # Returns\n\nUNIX Timestamp in seconds from UNIX epoch start"]
    pub fn datetime_datetime_to_timestamp(datetime: *mut DateTime) -> u32;
}
extern "C" {
    #[doc = "Convert UNIX timestamp to DateTime\n\n Mind timezone when perform conversion\n\n # Arguments\n\n* `timestamp` (direction in) - UNIX Timestamp in seconds from UNIX epoch start\n * `datetime` (direction out) - The datetime (UTC)"]
    pub fn datetime_timestamp_to_datetime(timestamp: u32, datetime: *mut DateTime);
}
extern "C" {
    #[doc = "Gets the number of days in the year according to the Gregorian calendar.\n\n # Arguments\n\n* `year` - Input year.\n\n # Returns\n\nnumber of days in `year`."]
    pub fn datetime_get_days_per_year(year: u16) -> u16;
}
extern "C" {
    #[doc = "Check if a year a leap year in the Gregorian calendar.\n\n # Arguments\n\n* `year` - Input year.\n\n # Returns\n\ntrue if `year` is a leap year."]
    pub fn datetime_is_leap_year(year: u16) -> bool;
}
extern "C" {
    #[doc = "Get the number of days in the month.\n\n # Arguments\n\n* `leap_year` - true to calculate based on leap years\n * `month` - month to check, where 1 = January\n # Returns\n\nthe number of days in the month"]
    pub fn datetime_get_days_per_month(leap_year: bool, month: u8) -> u8;
}
pub const FuriHalRtcFlag_FuriHalRtcFlagDebug: FuriHalRtcFlag = 1;
pub const FuriHalRtcFlag_FuriHalRtcFlagStorageFormatInternal: FuriHalRtcFlag = 2;
pub const FuriHalRtcFlag_FuriHalRtcFlagLock: FuriHalRtcFlag = 4;
pub const FuriHalRtcFlag_FuriHalRtcFlagC2Update: FuriHalRtcFlag = 8;
pub const FuriHalRtcFlag_FuriHalRtcFlagHandOrient: FuriHalRtcFlag = 16;
pub const FuriHalRtcFlag_FuriHalRtcFlagLegacySleep: FuriHalRtcFlag = 32;
pub const FuriHalRtcFlag_FuriHalRtcFlagStealthMode: FuriHalRtcFlag = 64;
pub const FuriHalRtcFlag_FuriHalRtcFlagDetailedFilename: FuriHalRtcFlag = 128;
pub type FuriHalRtcFlag = core::ffi::c_uchar;
#[doc = "< Normal boot mode, default value"]
pub const FuriHalRtcBootMode_FuriHalRtcBootModeNormal: FuriHalRtcBootMode = 0;
#[doc = "< Boot to DFU (MCU bootloader by ST)"]
pub const FuriHalRtcBootMode_FuriHalRtcBootModeDfu: FuriHalRtcBootMode = 1;
#[doc = "< Boot to Update, pre update"]
pub const FuriHalRtcBootMode_FuriHalRtcBootModePreUpdate: FuriHalRtcBootMode = 2;
#[doc = "< Boot to Update, main"]
pub const FuriHalRtcBootMode_FuriHalRtcBootModeUpdate: FuriHalRtcBootMode = 3;
#[doc = "< Boot to Update, post update"]
pub const FuriHalRtcBootMode_FuriHalRtcBootModePostUpdate: FuriHalRtcBootMode = 4;
pub type FuriHalRtcBootMode = core::ffi::c_uchar;
#[doc = "< Disable allocation tracking"]
pub const FuriHalRtcHeapTrackMode_FuriHalRtcHeapTrackModeNone: FuriHalRtcHeapTrackMode = 0;
#[doc = "< Enable allocation tracking for main application thread"]
pub const FuriHalRtcHeapTrackMode_FuriHalRtcHeapTrackModeMain: FuriHalRtcHeapTrackMode = 1;
#[doc = "< Enable allocation tracking for main and children application threads"]
pub const FuriHalRtcHeapTrackMode_FuriHalRtcHeapTrackModeTree: FuriHalRtcHeapTrackMode = 2;
#[doc = "< Enable allocation tracking for all threads"]
pub const FuriHalRtcHeapTrackMode_FuriHalRtcHeapTrackModeAll: FuriHalRtcHeapTrackMode = 3;
pub type FuriHalRtcHeapTrackMode = core::ffi::c_uchar;
#[doc = "< RTC structure header"]
pub const FuriHalRtcRegister_FuriHalRtcRegisterHeader: FuriHalRtcRegister = 0;
#[doc = "< Various system bits"]
pub const FuriHalRtcRegister_FuriHalRtcRegisterSystem: FuriHalRtcRegister = 1;
#[doc = "< Pointer to Version"]
pub const FuriHalRtcRegister_FuriHalRtcRegisterVersion: FuriHalRtcRegister = 2;
#[doc = "< LFS geometry fingerprint"]
pub const FuriHalRtcRegister_FuriHalRtcRegisterLfsFingerprint: FuriHalRtcRegister = 3;
#[doc = "< Pointer to last fault message"]
pub const FuriHalRtcRegister_FuriHalRtcRegisterFaultData: FuriHalRtcRegister = 4;
#[doc = "< Failed PINs count"]
pub const FuriHalRtcRegister_FuriHalRtcRegisterPinFails: FuriHalRtcRegister = 5;
pub const FuriHalRtcRegister_FuriHalRtcRegisterUpdateFolderFSIndex: FuriHalRtcRegister = 6;
#[doc = "< Encoded value of the currently set PIN"]
pub const FuriHalRtcRegister_FuriHalRtcRegisterPinValue: FuriHalRtcRegister = 7;
#[doc = "< Service value, do not use"]
pub const FuriHalRtcRegister_FuriHalRtcRegisterMAX: FuriHalRtcRegister = 8;
pub type FuriHalRtcRegister = core::ffi::c_uchar;
#[doc = "< Metric measurement units"]
pub const FuriHalRtcLocaleUnits_FuriHalRtcLocaleUnitsMetric: FuriHalRtcLocaleUnits = 0;
#[doc = "< Imperial measurement units"]
pub const FuriHalRtcLocaleUnits_FuriHalRtcLocaleUnitsImperial: FuriHalRtcLocaleUnits = 1;
pub type FuriHalRtcLocaleUnits = core::ffi::c_uchar;
#[doc = "< 24-hour format"]
pub const FuriHalRtcLocaleTimeFormat_FuriHalRtcLocaleTimeFormat24h: FuriHalRtcLocaleTimeFormat = 0;
#[doc = "< 12-hour format"]
pub const FuriHalRtcLocaleTimeFormat_FuriHalRtcLocaleTimeFormat12h: FuriHalRtcLocaleTimeFormat = 1;
pub type FuriHalRtcLocaleTimeFormat = core::ffi::c_uchar;
#[doc = "< Day/Month/Year"]
pub const FuriHalRtcLocaleDateFormat_FuriHalRtcLocaleDateFormatDMY: FuriHalRtcLocaleDateFormat = 0;
#[doc = "< Month/Day/Year"]
pub const FuriHalRtcLocaleDateFormat_FuriHalRtcLocaleDateFormatMDY: FuriHalRtcLocaleDateFormat = 1;
#[doc = "< Year/Month/Day"]
pub const FuriHalRtcLocaleDateFormat_FuriHalRtcLocaleDateFormatYMD: FuriHalRtcLocaleDateFormat = 2;
pub type FuriHalRtcLocaleDateFormat = core::ffi::c_uchar;
#[doc = "< Default: USART"]
pub const FuriHalRtcLogDevice_FuriHalRtcLogDeviceUsart: FuriHalRtcLogDevice = 0;
#[doc = "< Default: LPUART"]
pub const FuriHalRtcLogDevice_FuriHalRtcLogDeviceLpuart: FuriHalRtcLogDevice = 1;
#[doc = "< Reserved for future use"]
pub const FuriHalRtcLogDevice_FuriHalRtcLogDeviceReserved: FuriHalRtcLogDevice = 2;
#[doc = "< None, disable serial logging"]
pub const FuriHalRtcLogDevice_FuriHalRtcLogDeviceNone: FuriHalRtcLogDevice = 3;
pub type FuriHalRtcLogDevice = core::ffi::c_uchar;
#[doc = "< 230400 baud"]
pub const FuriHalRtcLogBaudRate_FuriHalRtcLogBaudRate230400: FuriHalRtcLogBaudRate = 0;
#[doc = "< 9600 baud"]
pub const FuriHalRtcLogBaudRate_FuriHalRtcLogBaudRate9600: FuriHalRtcLogBaudRate = 1;
#[doc = "< 38400 baud"]
pub const FuriHalRtcLogBaudRate_FuriHalRtcLogBaudRate38400: FuriHalRtcLogBaudRate = 2;
#[doc = "< 57600 baud"]
pub const FuriHalRtcLogBaudRate_FuriHalRtcLogBaudRate57600: FuriHalRtcLogBaudRate = 3;
#[doc = "< 115200 baud"]
pub const FuriHalRtcLogBaudRate_FuriHalRtcLogBaudRate115200: FuriHalRtcLogBaudRate = 4;
#[doc = "< 460800 baud"]
pub const FuriHalRtcLogBaudRate_FuriHalRtcLogBaudRate460800: FuriHalRtcLogBaudRate = 5;
#[doc = "< 921600 baud"]
pub const FuriHalRtcLogBaudRate_FuriHalRtcLogBaudRate921600: FuriHalRtcLogBaudRate = 6;
#[doc = "< 1843200 baud"]
pub const FuriHalRtcLogBaudRate_FuriHalRtcLogBaudRate1843200: FuriHalRtcLogBaudRate = 7;
pub type FuriHalRtcLogBaudRate = core::ffi::c_uchar;
extern "C" {
    #[doc = "Force sync shadow registers"]
    pub fn furi_hal_rtc_sync_shadow();
}
extern "C" {
    #[doc = "Reset ALL RTC registers content"]
    pub fn furi_hal_rtc_reset_registers();
}
extern "C" {
    #[doc = "Get RTC register content\n\n # Arguments\n\n* `reg` (direction in) - The register identifier\n\n # Returns\n\ncontent of the register"]
    pub fn furi_hal_rtc_get_register(reg: FuriHalRtcRegister) -> u32;
}
extern "C" {
    #[doc = "Set register content\n\n # Arguments\n\n* `reg` (direction in) - The register identifier\n * `value` (direction in) - The value to store into register"]
    pub fn furi_hal_rtc_set_register(reg: FuriHalRtcRegister, value: u32);
}
extern "C" {
    #[doc = "Set Log Level value\n\n # Arguments\n\n* `level` (direction in) - The level to store"]
    pub fn furi_hal_rtc_set_log_level(level: u8);
}
extern "C" {
    #[doc = "Get Log Level value\n\n # Returns\n\nThe Log Level value"]
    pub fn furi_hal_rtc_get_log_level() -> u8;
}
extern "C" {
    #[doc = "Set logging device\n\n # Arguments\n\n* `device` (direction in) - The device"]
    pub fn furi_hal_rtc_set_log_device(device: FuriHalRtcLogDevice);
}
extern "C" {
    #[doc = "Get logging device\n\n # Returns\n\nThe furi hal rtc log device."]
    pub fn furi_hal_rtc_get_log_device() -> FuriHalRtcLogDevice;
}
extern "C" {
    #[doc = "Set logging baud rate\n\n # Arguments\n\n* `baud_rate` (direction in) - The baud rate"]
    pub fn furi_hal_rtc_set_log_baud_rate(baud_rate: FuriHalRtcLogBaudRate);
}
extern "C" {
    #[doc = "Get logging baud rate\n\n # Returns\n\nThe furi hal rtc log baud rate."]
    pub fn furi_hal_rtc_get_log_baud_rate() -> FuriHalRtcLogBaudRate;
}
extern "C" {
    #[doc = "Set RTC Flag\n\n # Arguments\n\n* `flag` (direction in) - The flag to set"]
    pub fn furi_hal_rtc_set_flag(flag: FuriHalRtcFlag);
}
extern "C" {
    #[doc = "Reset RTC Flag\n\n # Arguments\n\n* `flag` (direction in) - The flag to reset"]
    pub fn furi_hal_rtc_reset_flag(flag: FuriHalRtcFlag);
}
extern "C" {
    #[doc = "Check if RTC Flag is set\n\n # Arguments\n\n* `flag` (direction in) - The flag to check\n\n # Returns\n\ntrue if set"]
    pub fn furi_hal_rtc_is_flag_set(flag: FuriHalRtcFlag) -> bool;
}
extern "C" {
    #[doc = "Set RTC boot mode\n\n # Arguments\n\n* `mode` (direction in) - The mode to set"]
    pub fn furi_hal_rtc_set_boot_mode(mode: FuriHalRtcBootMode);
}
extern "C" {
    #[doc = "Get RTC boot mode\n\n # Returns\n\nThe RTC boot mode."]
    pub fn furi_hal_rtc_get_boot_mode() -> FuriHalRtcBootMode;
}
extern "C" {
    #[doc = "Set Heap Track mode\n\n # Arguments\n\n* `mode` (direction in) - The mode to set"]
    pub fn furi_hal_rtc_set_heap_track_mode(mode: FuriHalRtcHeapTrackMode);
}
extern "C" {
    #[doc = "Get RTC Heap Track mode\n\n # Returns\n\nThe RTC heap track mode."]
    pub fn furi_hal_rtc_get_heap_track_mode() -> FuriHalRtcHeapTrackMode;
}
extern "C" {
    #[doc = "Set locale units\n\n # Arguments\n\n* `value` (direction in) - The RTC Locale Units"]
    pub fn furi_hal_rtc_set_locale_units(value: FuriHalRtcLocaleUnits);
}
extern "C" {
    #[doc = "Get RTC Locale Units\n\n # Returns\n\nThe RTC Locale Units."]
    pub fn furi_hal_rtc_get_locale_units() -> FuriHalRtcLocaleUnits;
}
extern "C" {
    #[doc = "Set RTC Locale Time Format\n\n # Arguments\n\n* `value` (direction in) - The RTC Locale Time Format"]
    pub fn furi_hal_rtc_set_locale_timeformat(value: FuriHalRtcLocaleTimeFormat);
}
extern "C" {
    #[doc = "Get RTC Locale Time Format\n\n # Returns\n\nThe RTC Locale Time Format."]
    pub fn furi_hal_rtc_get_locale_timeformat() -> FuriHalRtcLocaleTimeFormat;
}
extern "C" {
    #[doc = "Set RTC Locale Date Format\n\n # Arguments\n\n* `value` (direction in) - The RTC Locale Date Format"]
    pub fn furi_hal_rtc_set_locale_dateformat(value: FuriHalRtcLocaleDateFormat);
}
extern "C" {
    #[doc = "Get RTC Locale Date Format\n\n # Returns\n\nThe RTC Locale Date Format"]
    pub fn furi_hal_rtc_get_locale_dateformat() -> FuriHalRtcLocaleDateFormat;
}
extern "C" {
    #[doc = "Set RTC Date Time\n\n # Arguments\n\n* `datetime` - The date time to set"]
    pub fn furi_hal_rtc_set_datetime(datetime: *mut DateTime);
}
extern "C" {
    #[doc = "Get RTC Date Time\n\n # Arguments\n\n* `datetime` - The datetime"]
    pub fn furi_hal_rtc_get_datetime(datetime: *mut DateTime);
}
extern "C" {
    #[doc = "Set RTC Fault Data\n\n # Arguments\n\n* `value` (direction in) - The value"]
    pub fn furi_hal_rtc_set_fault_data(value: u32);
}
extern "C" {
    #[doc = "Get RTC Fault Data\n\n # Returns\n\nRTC Fault Data value"]
    pub fn furi_hal_rtc_get_fault_data() -> u32;
}
extern "C" {
    #[doc = "Set PIN Fails count\n\n # Arguments\n\n* `value` (direction in) - The PIN Fails count"]
    pub fn furi_hal_rtc_set_pin_fails(value: u32);
}
extern "C" {
    #[doc = "Get PIN Fails count\n\n # Returns\n\nPIN Fails Count"]
    pub fn furi_hal_rtc_get_pin_fails() -> u32;
}
extern "C" {
    #[doc = "Get UNIX Timestamp\n\n # Returns\n\nUnix Timestamp in seconds from UNIX epoch start"]
    pub fn furi_hal_rtc_get_timestamp() -> u32;
}
extern "C" {
    #[doc = "Acquire speaker ownership\n\n You must acquire speaker ownership before use\n\n # Arguments\n\n* `timeout` - Timeout during which speaker ownership must be acquired\n\n # Returns\n\nbool returns true on success"]
    pub fn furi_hal_speaker_acquire(timeout: u32) -> bool;
}
extern "C" {
    #[doc = "Release speaker ownership\n\n You must release speaker ownership after use"]
    pub fn furi_hal_speaker_release();
}
extern "C" {
    #[doc = "Check current process speaker ownership\n\n always returns true if called from ISR\n\n # Returns\n\nbool returns true if process owns speaker"]
    pub fn furi_hal_speaker_is_mine() -> bool;
}
extern "C" {
    #[doc = "Play a note\n\n no ownership check if called from ISR\n\n # Arguments\n\n* `frequency` - The frequency\n * `volume` - The volume"]
    pub fn furi_hal_speaker_start(frequency: f32, volume: f32);
}
extern "C" {
    #[doc = "Set volume\n\n no ownership check if called from ISR\n\n # Arguments\n\n* `volume` - The volume"]
    pub fn furi_hal_speaker_set_volume(volume: f32);
}
extern "C" {
    #[doc = "Stop playback\n\n no ownership check if called from ISR"]
    pub fn furi_hal_speaker_stop();
}
extern "C" {
    #[doc = "Set light value\n\n # Arguments\n\n* `light` - Light\n * `value` - light brightness [0-255]"]
    pub fn furi_hal_light_set(light: Light, value: u8);
}
extern "C" {
    #[doc = "Start hardware LED blinking mode\n\n # Arguments\n\n* `light` - Light\n * `brightness` - light brightness [0-255]\n * `on_time` - LED on time in ms\n * `period` - LED blink period in ms"]
    pub fn furi_hal_light_blink_start(light: Light, brightness: u8, on_time: u16, period: u16);
}
extern "C" {
    #[doc = "Stop hardware LED blinking mode"]
    pub fn furi_hal_light_blink_stop();
}
extern "C" {
    #[doc = "Set color in hardware LED blinking mode\n\n # Arguments\n\n* `light` - Light"]
    pub fn furi_hal_light_blink_set_color(light: Light);
}
extern "C" {
    #[doc = "Execute sequence\n\n # Arguments\n\n* `sequence` - Sequence to execute"]
    pub fn furi_hal_light_sequence(sequence: *const core::ffi::c_char);
}
#[doc = "Callback type called every time another key-value pair of device information is ready\n\n # Arguments\n\n* `key[in]` - device information type identifier\n * `value[in]` - device information value\n * `last[in]` - whether the passed key-value pair is the last one\n * `context[in]` - to pass to callback"]
pub type PropertyValueCallback = ::core::option::Option<
    unsafe extern "C" fn(
        key: *const core::ffi::c_char,
        value: *const core::ffi::c_char,
        last: bool,
        context: *mut core::ffi::c_void,
    ),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PropertyValueContext {
    #[doc = "< key string buffer, must be initialised before use"]
    pub key: *mut FuriString,
    #[doc = "< value string buffer, must be initialised before use"]
    pub value: *mut FuriString,
    #[doc = "< output callback function"]
    pub out: PropertyValueCallback,
    #[doc = "< separator character between key parts"]
    pub sep: core::ffi::c_char,
    #[doc = "< flag to indicate last element"]
    pub last: bool,
    #[doc = "< user-defined context, passed through to out callback"]
    pub context: *mut core::ffi::c_void,
}
#[test]
fn bindgen_test_layout_PropertyValueContext() {
    const UNINIT: ::core::mem::MaybeUninit<PropertyValueContext> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<PropertyValueContext>(),
        20usize,
        concat!("Size of: ", stringify!(PropertyValueContext))
    );
    assert_eq!(
        ::core::mem::align_of::<PropertyValueContext>(),
        4usize,
        concat!("Alignment of ", stringify!(PropertyValueContext))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(PropertyValueContext),
            "::",
            stringify!(key)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(PropertyValueContext),
            "::",
            stringify!(value)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).out) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(PropertyValueContext),
            "::",
            stringify!(out)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sep) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(PropertyValueContext),
            "::",
            stringify!(sep)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).last) as usize - ptr as usize },
        13usize,
        concat!(
            "Offset of field: ",
            stringify!(PropertyValueContext),
            "::",
            stringify!(last)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(PropertyValueContext),
            "::",
            stringify!(context)
        )
    );
}
extern "C" {
    #[doc = "Builds key and value strings and outputs them via a callback function\n\n # Arguments\n\n* `ctx[in]` - local property context\n * `fmt[in]` - value format, set to NULL to bypass formatting\n * `nparts[in]` - number of key parts (separated by character)\n * `...[in]` - list of key parts followed by value"]
    pub fn property_value_out(
        ctx: *mut PropertyValueContext,
        fmt: *const core::ffi::c_char,
        nparts: core::ffi::c_uint,
        ...
    );
}
pub const FuriHalPowerIC_FuriHalPowerICCharger: FuriHalPowerIC = 0;
pub const FuriHalPowerIC_FuriHalPowerICFuelGauge: FuriHalPowerIC = 1;
#[doc = "Power IC type"]
pub type FuriHalPowerIC = core::ffi::c_uchar;
extern "C" {
    #[doc = "Check if gauge is ok\n\n Verifies that:\n - gauge is alive\n - correct profile loaded\n - self diagnostic status is good\n\n # Returns\n\ntrue if gauge is ok"]
    pub fn furi_hal_power_gauge_is_ok() -> bool;
}
extern "C" {
    #[doc = "Check if gauge requests system shutdown\n\n # Returns\n\ntrue if system shutdown requested"]
    pub fn furi_hal_power_is_shutdown_requested() -> bool;
}
extern "C" {
    #[doc = "Enter insomnia mode Prevents device from going to sleep\n Internally increases insomnia level Must be paired with\n furi_hal_power_insomnia_exit"]
    pub fn furi_hal_power_insomnia_enter();
}
extern "C" {
    #[doc = "Exit insomnia mode Allow device to go to sleep\n Internally decreases insomnia level. Must be paired with\n furi_hal_power_insomnia_enter"]
    pub fn furi_hal_power_insomnia_exit();
}
extern "C" {
    #[doc = "Check if sleep available\n\n # Returns\n\ntrue if available"]
    pub fn furi_hal_power_sleep_available() -> bool;
}
extern "C" {
    #[doc = "Go to sleep"]
    pub fn furi_hal_power_sleep();
}
extern "C" {
    #[doc = "Get predicted remaining battery capacity in percents\n\n # Returns\n\nremaining battery capacity in percents"]
    pub fn furi_hal_power_get_pct() -> u8;
}
extern "C" {
    #[doc = "Get battery health state in percents\n\n # Returns\n\nhealth in percents"]
    pub fn furi_hal_power_get_bat_health_pct() -> u8;
}
extern "C" {
    #[doc = "Get charging status\n\n # Returns\n\ntrue if charging"]
    pub fn furi_hal_power_is_charging() -> bool;
}
extern "C" {
    #[doc = "Get charge complete status\n\n # Returns\n\ntrue if done charging and connected to charger"]
    pub fn furi_hal_power_is_charging_done() -> bool;
}
extern "C" {
    #[doc = "Switch MCU to SHUTDOWN"]
    pub fn furi_hal_power_shutdown();
}
extern "C" {
    #[doc = "Poweroff device"]
    pub fn furi_hal_power_off();
}
extern "C" {
    #[doc = "Reset device"]
    pub fn furi_hal_power_reset();
}
extern "C" {
    #[doc = "OTG enable"]
    pub fn furi_hal_power_enable_otg() -> bool;
}
extern "C" {
    #[doc = "OTG disable"]
    pub fn furi_hal_power_disable_otg();
}
extern "C" {
    #[doc = "Check OTG status fault"]
    pub fn furi_hal_power_check_otg_fault() -> bool;
}
extern "C" {
    #[doc = "Check OTG status and disable it if falt happened"]
    pub fn furi_hal_power_check_otg_status();
}
extern "C" {
    #[doc = "Get OTG status\n\n # Returns\n\ntrue if enabled"]
    pub fn furi_hal_power_is_otg_enabled() -> bool;
}
extern "C" {
    #[doc = "Get battery charge voltage limit in V\n\n # Returns\n\nvoltage in V"]
    pub fn furi_hal_power_get_battery_charge_voltage_limit() -> f32;
}
extern "C" {
    #[doc = "Set battery charge voltage limit in V\n\n Invalid values will be clamped downward to the nearest valid value.\n\n # Arguments\n\n* `voltage` (direction in) - voltage in V"]
    pub fn furi_hal_power_set_battery_charge_voltage_limit(voltage: f32);
}
extern "C" {
    #[doc = "Get remaining battery battery capacity in mAh\n\n # Returns\n\ncapacity in mAh"]
    pub fn furi_hal_power_get_battery_remaining_capacity() -> u32;
}
extern "C" {
    #[doc = "Get full charge battery capacity in mAh\n\n # Returns\n\ncapacity in mAh"]
    pub fn furi_hal_power_get_battery_full_capacity() -> u32;
}
extern "C" {
    #[doc = "Get battery capacity in mAh from battery profile\n\n # Returns\n\ncapacity in mAh"]
    pub fn furi_hal_power_get_battery_design_capacity() -> u32;
}
extern "C" {
    #[doc = "Get battery voltage in V\n\n # Arguments\n\n* `ic` (direction in) - FuriHalPowerIc to get measurment\n\n # Returns\n\nvoltage in V"]
    pub fn furi_hal_power_get_battery_voltage(ic: FuriHalPowerIC) -> f32;
}
extern "C" {
    #[doc = "Get battery current in A\n\n # Arguments\n\n* `ic` (direction in) - FuriHalPowerIc to get measurment\n\n # Returns\n\ncurrent in A"]
    pub fn furi_hal_power_get_battery_current(ic: FuriHalPowerIC) -> f32;
}
extern "C" {
    #[doc = "Get temperature in C\n\n # Arguments\n\n* `ic` (direction in) - FuriHalPowerIc to get measurment\n\n # Returns\n\ntemperature in C"]
    pub fn furi_hal_power_get_battery_temperature(ic: FuriHalPowerIC) -> f32;
}
extern "C" {
    #[doc = "Get USB voltage in V\n\n # Returns\n\nvoltage in V"]
    pub fn furi_hal_power_get_usb_voltage() -> f32;
}
extern "C" {
    #[doc = "Enable 3.3v on external gpio and sd card"]
    pub fn furi_hal_power_enable_external_3_3v();
}
extern "C" {
    #[doc = "Disable 3.3v on external gpio and sd card"]
    pub fn furi_hal_power_disable_external_3_3v();
}
extern "C" {
    #[doc = "Enter supress charge mode.\n\n Use this function when your application need clean power supply."]
    pub fn furi_hal_power_suppress_charge_enter();
}
extern "C" {
    #[doc = "Exit supress charge mode"]
    pub fn furi_hal_power_suppress_charge_exit();
}
extern "C" {
    #[doc = "Get power information\n\n # Arguments\n\n* `callback` (direction in) - callback to provide with new data\n * `sep` (direction in) - category separator character\n * `context` (direction in) - context to pass to callback"]
    pub fn furi_hal_power_info_get(
        callback: PropertyValueCallback,
        sep: core::ffi::c_char,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Get power debug information\n\n # Arguments\n\n* `callback` (direction in) - callback to provide with new data\n * `context` (direction in) - context to pass to callback"]
    pub fn furi_hal_power_debug_get(
        callback: PropertyValueCallback,
        context: *mut core::ffi::c_void,
    );
}
#[doc = "TIM Time Base configuration structure definition."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LL_TIM_InitTypeDef {
    #[doc = "< Specifies the prescaler value used to divide the TIM clock.\nThis parameter can be a number between Min_Data=0x0000 and Max_Data=0xFFFF.\n\nThis feature can be modified afterwards using unitary function\nLL_TIM_SetPrescaler()."]
    pub Prescaler: u16,
    #[doc = "< Specifies the counter mode.\nThis parameter can be a value of TIM_LL_EC_COUNTERMODE.\n\nThis feature can be modified afterwards using unitary function\nLL_TIM_SetCounterMode()."]
    pub CounterMode: u32,
    #[doc = "< Specifies the auto reload value to be loaded into the active\nAuto-Reload Register at the next update event.\nThis parameter must be a number between Min_Data=0x0000 and Max_Data=0xFFFF.\nSome timer instances may support 32 bits counters. In that case this parameter must\nbe a number between 0x0000 and 0xFFFFFFFF.\n\nThis feature can be modified afterwards using unitary function\nLL_TIM_SetAutoReload()."]
    pub Autoreload: u32,
    #[doc = "< Specifies the clock division.\nThis parameter can be a value of TIM_LL_EC_CLOCKDIVISION.\n\nThis feature can be modified afterwards using unitary function\nLL_TIM_SetClockDivision()."]
    pub ClockDivision: u32,
    #[doc = "< Specifies the repetition counter value. Each time the RCR downcounter\nreaches zero, an update event is generated and counting restarts\nfrom the RCR value (N).\nThis means in PWM mode that (N+1) corresponds to:\n- the number of PWM periods in edge-aligned mode\n- the number of half PWM period in center-aligned mode\nGP timers: this parameter must be a number between Min_Data = 0x00 and\nMax_Data = 0xFF.\nAdvanced timers: this parameter must be a number between Min_Data = 0x0000 and\nMax_Data = 0xFFFF.\n\nThis feature can be modified afterwards using unitary function\nLL_TIM_SetRepetitionCounter()."]
    pub RepetitionCounter: u32,
}
#[test]
fn bindgen_test_layout_LL_TIM_InitTypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<LL_TIM_InitTypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LL_TIM_InitTypeDef>(),
        20usize,
        concat!("Size of: ", stringify!(LL_TIM_InitTypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<LL_TIM_InitTypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(LL_TIM_InitTypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Prescaler) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_InitTypeDef),
            "::",
            stringify!(Prescaler)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CounterMode) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_InitTypeDef),
            "::",
            stringify!(CounterMode)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Autoreload) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_InitTypeDef),
            "::",
            stringify!(Autoreload)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ClockDivision) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_InitTypeDef),
            "::",
            stringify!(ClockDivision)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).RepetitionCounter) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_InitTypeDef),
            "::",
            stringify!(RepetitionCounter)
        )
    );
}
#[doc = "TIM Output Compare configuration structure definition."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LL_TIM_OC_InitTypeDef {
    #[doc = "< Specifies the output mode.\nThis parameter can be a value of TIM_LL_EC_OCMODE.\n\nThis feature can be modified afterwards using unitary function\nLL_TIM_OC_SetMode()."]
    pub OCMode: u32,
    #[doc = "< Specifies the TIM Output Compare state.\nThis parameter can be a value of TIM_LL_EC_OCSTATE.\n\nThis feature can be modified afterwards using unitary functions\nLL_TIM_CC_EnableChannel() or LL_TIM_CC_DisableChannel()."]
    pub OCState: u32,
    #[doc = "< Specifies the TIM complementary Output Compare state.\nThis parameter can be a value of TIM_LL_EC_OCSTATE.\n\nThis feature can be modified afterwards using unitary functions\nLL_TIM_CC_EnableChannel() or LL_TIM_CC_DisableChannel()."]
    pub OCNState: u32,
    #[doc = "< Specifies the Compare value to be loaded into the Capture Compare Register.\nThis parameter can be a number between Min_Data=0x0000 and Max_Data=0xFFFF.\n\nThis feature can be modified afterwards using unitary function\nLL_TIM_OC_SetCompareCHx (x=1..6)."]
    pub CompareValue: u32,
    #[doc = "< Specifies the output polarity.\nThis parameter can be a value of TIM_LL_EC_OCPOLARITY.\n\nThis feature can be modified afterwards using unitary function\nLL_TIM_OC_SetPolarity()."]
    pub OCPolarity: u32,
    #[doc = "< Specifies the complementary output polarity.\nThis parameter can be a value of TIM_LL_EC_OCPOLARITY.\n\nThis feature can be modified afterwards using unitary function\nLL_TIM_OC_SetPolarity()."]
    pub OCNPolarity: u32,
    #[doc = "< Specifies the TIM Output Compare pin state during Idle state.\nThis parameter can be a value of TIM_LL_EC_OCIDLESTATE.\n\nThis feature can be modified afterwards using unitary function\nLL_TIM_OC_SetIdleState()."]
    pub OCIdleState: u32,
    #[doc = "< Specifies the TIM Output Compare pin state during Idle state.\nThis parameter can be a value of TIM_LL_EC_OCIDLESTATE.\n\nThis feature can be modified afterwards using unitary function\nLL_TIM_OC_SetIdleState()."]
    pub OCNIdleState: u32,
}
#[test]
fn bindgen_test_layout_LL_TIM_OC_InitTypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<LL_TIM_OC_InitTypeDef> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LL_TIM_OC_InitTypeDef>(),
        32usize,
        concat!("Size of: ", stringify!(LL_TIM_OC_InitTypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<LL_TIM_OC_InitTypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(LL_TIM_OC_InitTypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OCMode) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_OC_InitTypeDef),
            "::",
            stringify!(OCMode)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OCState) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_OC_InitTypeDef),
            "::",
            stringify!(OCState)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OCNState) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_OC_InitTypeDef),
            "::",
            stringify!(OCNState)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CompareValue) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_OC_InitTypeDef),
            "::",
            stringify!(CompareValue)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OCPolarity) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_OC_InitTypeDef),
            "::",
            stringify!(OCPolarity)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OCNPolarity) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_OC_InitTypeDef),
            "::",
            stringify!(OCNPolarity)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OCIdleState) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_OC_InitTypeDef),
            "::",
            stringify!(OCIdleState)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OCNIdleState) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_TIM_OC_InitTypeDef),
            "::",
            stringify!(OCNIdleState)
        )
    );
}
extern "C" {
    #[doc = "TIM_LL_EF_Init Initialisation and deinitialisation functions\n # "]
    pub fn LL_TIM_DeInit(TIMx: *mut TIM_TypeDef) -> ErrorStatus;
}
extern "C" {
    pub fn LL_TIM_Init(
        TIMx: *mut TIM_TypeDef,
        TIM_InitStruct: *const LL_TIM_InitTypeDef,
    ) -> ErrorStatus;
}
extern "C" {
    pub fn LL_TIM_OC_Init(
        TIMx: *mut TIM_TypeDef,
        Channel: u32,
        TIM_OC_InitStruct: *const LL_TIM_OC_InitTypeDef,
    ) -> ErrorStatus;
}
#[doc = "Timer ISR"]
pub type FuriHalInterruptISR =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
pub const FuriHalInterruptId_FuriHalInterruptIdTim1TrgComTim17: FuriHalInterruptId = 0;
pub const FuriHalInterruptId_FuriHalInterruptIdTim1Cc: FuriHalInterruptId = 1;
pub const FuriHalInterruptId_FuriHalInterruptIdTim1UpTim16: FuriHalInterruptId = 2;
pub const FuriHalInterruptId_FuriHalInterruptIdTIM2: FuriHalInterruptId = 3;
pub const FuriHalInterruptId_FuriHalInterruptIdDma1Ch1: FuriHalInterruptId = 4;
pub const FuriHalInterruptId_FuriHalInterruptIdDma1Ch2: FuriHalInterruptId = 5;
pub const FuriHalInterruptId_FuriHalInterruptIdDma1Ch3: FuriHalInterruptId = 6;
pub const FuriHalInterruptId_FuriHalInterruptIdDma1Ch4: FuriHalInterruptId = 7;
pub const FuriHalInterruptId_FuriHalInterruptIdDma1Ch5: FuriHalInterruptId = 8;
pub const FuriHalInterruptId_FuriHalInterruptIdDma1Ch6: FuriHalInterruptId = 9;
pub const FuriHalInterruptId_FuriHalInterruptIdDma1Ch7: FuriHalInterruptId = 10;
pub const FuriHalInterruptId_FuriHalInterruptIdDma2Ch1: FuriHalInterruptId = 11;
pub const FuriHalInterruptId_FuriHalInterruptIdDma2Ch2: FuriHalInterruptId = 12;
pub const FuriHalInterruptId_FuriHalInterruptIdDma2Ch3: FuriHalInterruptId = 13;
pub const FuriHalInterruptId_FuriHalInterruptIdDma2Ch4: FuriHalInterruptId = 14;
pub const FuriHalInterruptId_FuriHalInterruptIdDma2Ch5: FuriHalInterruptId = 15;
pub const FuriHalInterruptId_FuriHalInterruptIdDma2Ch6: FuriHalInterruptId = 16;
pub const FuriHalInterruptId_FuriHalInterruptIdDma2Ch7: FuriHalInterruptId = 17;
pub const FuriHalInterruptId_FuriHalInterruptIdRcc: FuriHalInterruptId = 18;
pub const FuriHalInterruptId_FuriHalInterruptIdCOMP: FuriHalInterruptId = 19;
pub const FuriHalInterruptId_FuriHalInterruptIdHsem: FuriHalInterruptId = 20;
pub const FuriHalInterruptId_FuriHalInterruptIdLpTim1: FuriHalInterruptId = 21;
pub const FuriHalInterruptId_FuriHalInterruptIdLpTim2: FuriHalInterruptId = 22;
pub const FuriHalInterruptId_FuriHalInterruptIdUart1: FuriHalInterruptId = 23;
pub const FuriHalInterruptId_FuriHalInterruptIdLpUart1: FuriHalInterruptId = 24;
pub const FuriHalInterruptId_FuriHalInterruptIdMax: FuriHalInterruptId = 25;
pub type FuriHalInterruptId = core::ffi::c_uchar;
pub const FuriHalInterruptPriority_FuriHalInterruptPriorityLowest: FuriHalInterruptPriority = -3;
pub const FuriHalInterruptPriority_FuriHalInterruptPriorityLower: FuriHalInterruptPriority = -2;
pub const FuriHalInterruptPriority_FuriHalInterruptPriorityLow: FuriHalInterruptPriority = -1;
pub const FuriHalInterruptPriority_FuriHalInterruptPriorityNormal: FuriHalInterruptPriority = 0;
pub const FuriHalInterruptPriority_FuriHalInterruptPriorityHigh: FuriHalInterruptPriority = 1;
pub const FuriHalInterruptPriority_FuriHalInterruptPriorityHigher: FuriHalInterruptPriority = 2;
pub const FuriHalInterruptPriority_FuriHalInterruptPriorityHighest: FuriHalInterruptPriority = 3;
pub const FuriHalInterruptPriority_FuriHalInterruptPriorityKamiSama: FuriHalInterruptPriority = 6;
pub type FuriHalInterruptPriority = core::ffi::c_schar;
extern "C" {
    #[doc = "Set ISR and enable interrupt with default priority\n\n Interrupt flags are not cleared automatically. You may want to\n ensure that your peripheral status flags are cleared.\n\n # Arguments\n\n* `index` - - interrupt ID\n * `isr` - - your interrupt service routine or use NULL to clear\n * `context` - - isr context"]
    pub fn furi_hal_interrupt_set_isr(
        index: FuriHalInterruptId,
        isr: FuriHalInterruptISR,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Set ISR and enable interrupt with custom priority\n\n Interrupt flags are not cleared automatically. You may want to\n ensure that your peripheral status flags are cleared.\n\n # Arguments\n\n* `index` - - interrupt ID\n * `priority` - - One of FuriHalInterruptPriority\n * `isr` - - your interrupt service routine or use NULL to clear\n * `context` - - isr context"]
    pub fn furi_hal_interrupt_set_isr_ex(
        index: FuriHalInterruptId,
        priority: FuriHalInterruptPriority,
        isr: FuriHalInterruptISR,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Get interrupt name by exception number.\n Exception number can be obtained from IPSR register.\n\n # Arguments\n\n* `exception_number` -\n # Returns\n\nconst char* or NULL if interrupt name is not found"]
    pub fn furi_hal_interrupt_get_name(exception_number: u8) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get total time(in CPU clocks) spent in ISR\n\n # Returns\n\ntotal time in CPU clocks"]
    pub fn furi_hal_interrupt_get_time_in_isr_total() -> u32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Version {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Get current running firmware version handle.\n\n You can store it somewhere. But if you want to retrieve data, you have to use\n 'version_*_get()' set of functions. Also, 'version_*_get()' imply to use this\n handle if no handle (NULL_PTR) provided.\n\n # Returns\n\npointer to Version data."]
    pub fn version_get() -> *const Version;
}
extern "C" {
    #[doc = "Get git commit hash.\n\n # Arguments\n\n* `v` - pointer to Version data. NULL for currently running\n software.\n\n # Returns\n\ngit hash"]
    pub fn version_get_githash(v: *const Version) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get git branch.\n\n # Arguments\n\n* `v` - pointer to Version data. NULL for currently running\n software.\n\n # Returns\n\ngit branch"]
    pub fn version_get_gitbranch(v: *const Version) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get number of commit in git branch.\n\n # Arguments\n\n* `v` - pointer to Version data. NULL for currently running\n software.\n\n # Returns\n\nnumber of commit"]
    pub fn version_get_gitbranchnum(v: *const Version) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get build date.\n\n # Arguments\n\n* `v` - pointer to Version data. NULL for currently running\n software.\n\n # Returns\n\nbuild date"]
    pub fn version_get_builddate(v: *const Version) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get build version. Build version is last tag in git history.\n\n # Arguments\n\n* `v` - pointer to Version data. NULL for currently running\n software.\n\n # Returns\n\nbuild date"]
    pub fn version_get_version(v: *const Version) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get hardware target this firmware was built for\n\n # Arguments\n\n* `v` - pointer to Version data. NULL for currently running\n software.\n\n # Returns\n\nbuild date"]
    pub fn version_get_target(v: *const Version) -> u8;
}
extern "C" {
    #[doc = "Get flag indicating if this build is \"dirty\" (source code had uncommited changes)\n\n # Arguments\n\n* `v` - pointer to Version data. NULL for currently running\n software.\n\n # Returns\n\nbuild date"]
    pub fn version_get_dirty_flag(v: *const Version) -> bool;
}
extern "C" {
    #[doc = "Get firmware origin. \"Official\" for mainline firmware, fork name for forks.\n Set by FIRMWARE_ORIGIN fbt argument."]
    pub fn version_get_firmware_origin(v: *const Version) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get git repo origin"]
    pub fn version_get_git_origin(v: *const Version) -> *const core::ffi::c_char;
}
pub const FuriHalVersionOtpVersion_FuriHalVersionOtpVersion0: FuriHalVersionOtpVersion = 0;
pub const FuriHalVersionOtpVersion_FuriHalVersionOtpVersion1: FuriHalVersionOtpVersion = 1;
pub const FuriHalVersionOtpVersion_FuriHalVersionOtpVersion2: FuriHalVersionOtpVersion = 2;
pub const FuriHalVersionOtpVersion_FuriHalVersionOtpVersionEmpty: FuriHalVersionOtpVersion =
    4294967294;
pub const FuriHalVersionOtpVersion_FuriHalVersionOtpVersionUnknown: FuriHalVersionOtpVersion =
    4294967295;
#[doc = "OTP Versions enum"]
pub type FuriHalVersionOtpVersion = core::ffi::c_uint;
pub const FuriHalVersionColor_FuriHalVersionColorUnknown: FuriHalVersionColor = 0;
pub const FuriHalVersionColor_FuriHalVersionColorBlack: FuriHalVersionColor = 1;
pub const FuriHalVersionColor_FuriHalVersionColorWhite: FuriHalVersionColor = 2;
pub const FuriHalVersionColor_FuriHalVersionColorTransparent: FuriHalVersionColor = 3;
#[doc = "Device Colors"]
pub type FuriHalVersionColor = core::ffi::c_uchar;
pub const FuriHalVersionRegion_FuriHalVersionRegionUnknown: FuriHalVersionRegion = 0;
pub const FuriHalVersionRegion_FuriHalVersionRegionEuRu: FuriHalVersionRegion = 1;
pub const FuriHalVersionRegion_FuriHalVersionRegionUsCaAu: FuriHalVersionRegion = 2;
pub const FuriHalVersionRegion_FuriHalVersionRegionJp: FuriHalVersionRegion = 3;
pub const FuriHalVersionRegion_FuriHalVersionRegionWorld: FuriHalVersionRegion = 4;
#[doc = "Device Regions"]
pub type FuriHalVersionRegion = core::ffi::c_uchar;
pub const FuriHalVersionDisplay_FuriHalVersionDisplayUnknown: FuriHalVersionDisplay = 0;
pub const FuriHalVersionDisplay_FuriHalVersionDisplayErc: FuriHalVersionDisplay = 1;
pub const FuriHalVersionDisplay_FuriHalVersionDisplayMgg: FuriHalVersionDisplay = 2;
#[doc = "Device Display"]
pub type FuriHalVersionDisplay = core::ffi::c_uchar;
extern "C" {
    #[doc = "Check target firmware version\n\n # Returns\n\ntrue if target and real matches"]
    pub fn furi_hal_version_do_i_belong_here() -> bool;
}
extern "C" {
    #[doc = "Get model name\n\n # Returns\n\nmodel name C-string"]
    pub fn furi_hal_version_get_model_name() -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get model name\n\n # Returns\n\nmodel code C-string"]
    pub fn furi_hal_version_get_model_code() -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get FCC ID\n\n # Returns\n\nFCC id as C-string"]
    pub fn furi_hal_version_get_fcc_id() -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get IC id\n\n # Returns\n\nIC id as C-string"]
    pub fn furi_hal_version_get_ic_id() -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get MIC id\n\n # Returns\n\nMIC id as C-string"]
    pub fn furi_hal_version_get_mic_id() -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get SRRC id\n\n # Returns\n\nSRRC id as C-string"]
    pub fn furi_hal_version_get_srrc_id() -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get NCC id\n\n # Returns\n\nNCC id as C-string"]
    pub fn furi_hal_version_get_ncc_id() -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get OTP version\n\n # Returns\n\nOTP Version"]
    pub fn furi_hal_version_get_otp_version() -> FuriHalVersionOtpVersion;
}
extern "C" {
    #[doc = "Get hardware version\n\n # Returns\n\nHardware Version"]
    pub fn furi_hal_version_get_hw_version() -> u8;
}
extern "C" {
    #[doc = "Get hardware target\n\n # Returns\n\nHardware Target"]
    pub fn furi_hal_version_get_hw_target() -> u8;
}
extern "C" {
    #[doc = "Get hardware body\n\n # Returns\n\nHardware Body"]
    pub fn furi_hal_version_get_hw_body() -> u8;
}
extern "C" {
    #[doc = "Get hardware body color\n\n # Returns\n\nHardware Color"]
    pub fn furi_hal_version_get_hw_color() -> FuriHalVersionColor;
}
extern "C" {
    #[doc = "Get hardware connect\n\n # Returns\n\nHardware Interconnect"]
    pub fn furi_hal_version_get_hw_connect() -> u8;
}
extern "C" {
    #[doc = "Get hardware region\n\n # Returns\n\nHardware Region"]
    pub fn furi_hal_version_get_hw_region() -> FuriHalVersionRegion;
}
extern "C" {
    #[doc = "Get hardware region name\n\n # Returns\n\nHardware Region name"]
    pub fn furi_hal_version_get_hw_region_name() -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get hardware display id\n\n # Returns\n\nDisplay id"]
    pub fn furi_hal_version_get_hw_display() -> FuriHalVersionDisplay;
}
extern "C" {
    #[doc = "Get hardware timestamp\n\n # Returns\n\nHardware Manufacture timestamp"]
    pub fn furi_hal_version_get_hw_timestamp() -> u32;
}
extern "C" {
    #[doc = "Get pointer to target name\n\n # Returns\n\nHardware Name C-string"]
    pub fn furi_hal_version_get_name_ptr() -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get pointer to target device name\n\n # Returns\n\nHardware Device Name C-string"]
    pub fn furi_hal_version_get_device_name_ptr() -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get pointer to target ble local device name\n\n # Returns\n\nBle Device Name C-string"]
    pub fn furi_hal_version_get_ble_local_device_name_ptr() -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get BLE MAC address\n\n # Returns\n\npointer to BLE MAC address"]
    pub fn furi_hal_version_get_ble_mac() -> *const u8;
}
extern "C" {
    #[doc = "Get address of version structure of firmware.\n\n # Returns\n\nAddress of firmware version structure."]
    pub fn furi_hal_version_get_firmware_version() -> *const Version;
}
extern "C" {
    #[doc = "Get platform UID size in bytes\n\n # Returns\n\nUID size in bytes"]
    pub fn furi_hal_version_uid_size() -> usize;
}
extern "C" {
    #[doc = "Get const pointer to UID\n\n # Returns\n\npointer to UID"]
    pub fn furi_hal_version_uid() -> *const u8;
}
pub const GapEventType_GapEventTypeConnected: GapEventType = 0;
pub const GapEventType_GapEventTypeDisconnected: GapEventType = 1;
pub const GapEventType_GapEventTypeStartAdvertising: GapEventType = 2;
pub const GapEventType_GapEventTypeStopAdvertising: GapEventType = 3;
pub const GapEventType_GapEventTypePinCodeShow: GapEventType = 4;
pub const GapEventType_GapEventTypePinCodeVerify: GapEventType = 5;
pub const GapEventType_GapEventTypeUpdateMTU: GapEventType = 6;
pub const GapEventType_GapEventTypeBeaconStart: GapEventType = 7;
pub const GapEventType_GapEventTypeBeaconStop: GapEventType = 8;
pub type GapEventType = core::ffi::c_uchar;
#[repr(C)]
#[derive(Copy, Clone)]
pub union GapEventData {
    pub pin_code: u32,
    pub max_packet_size: u16,
}
#[test]
fn bindgen_test_layout_GapEventData() {
    const UNINIT: ::core::mem::MaybeUninit<GapEventData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<GapEventData>(),
        4usize,
        concat!("Size of: ", stringify!(GapEventData))
    );
    assert_eq!(
        ::core::mem::align_of::<GapEventData>(),
        4usize,
        concat!("Alignment of ", stringify!(GapEventData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pin_code) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(GapEventData),
            "::",
            stringify!(pin_code)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).max_packet_size) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(GapEventData),
            "::",
            stringify!(max_packet_size)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GapEvent {
    pub type_: GapEventType,
    pub data: GapEventData,
}
#[test]
fn bindgen_test_layout_GapEvent() {
    const UNINIT: ::core::mem::MaybeUninit<GapEvent> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<GapEvent>(),
        8usize,
        concat!("Size of: ", stringify!(GapEvent))
    );
    assert_eq!(
        ::core::mem::align_of::<GapEvent>(),
        4usize,
        concat!("Alignment of ", stringify!(GapEvent))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(GapEvent),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(GapEvent),
            "::",
            stringify!(data)
        )
    );
}
pub type GapEventCallback = ::core::option::Option<
    unsafe extern "C" fn(event: GapEvent, context: *mut core::ffi::c_void) -> bool,
>;
pub const GapPairing_GapPairingNone: GapPairing = 0;
pub const GapPairing_GapPairingPinCodeShow: GapPairing = 1;
pub const GapPairing_GapPairingPinCodeVerifyYesNo: GapPairing = 2;
pub type GapPairing = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct GapConnectionParamsRequest {
    pub conn_int_min: u16,
    pub conn_int_max: u16,
    pub slave_latency: u16,
    pub supervisor_timeout: u16,
}
#[test]
fn bindgen_test_layout_GapConnectionParamsRequest() {
    const UNINIT: ::core::mem::MaybeUninit<GapConnectionParamsRequest> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<GapConnectionParamsRequest>(),
        8usize,
        concat!("Size of: ", stringify!(GapConnectionParamsRequest))
    );
    assert_eq!(
        ::core::mem::align_of::<GapConnectionParamsRequest>(),
        2usize,
        concat!("Alignment of ", stringify!(GapConnectionParamsRequest))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).conn_int_min) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(GapConnectionParamsRequest),
            "::",
            stringify!(conn_int_min)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).conn_int_max) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(GapConnectionParamsRequest),
            "::",
            stringify!(conn_int_max)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).slave_latency) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(GapConnectionParamsRequest),
            "::",
            stringify!(slave_latency)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).supervisor_timeout) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(GapConnectionParamsRequest),
            "::",
            stringify!(supervisor_timeout)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct GapConfig {
    pub adv_service_uuid: u16,
    pub appearance_char: u16,
    pub bonding_mode: bool,
    pub pairing_method: GapPairing,
    pub mac_address: [u8; 6usize],
    pub adv_name: [core::ffi::c_char; 18usize],
    pub conn_param: GapConnectionParamsRequest,
}
#[test]
fn bindgen_test_layout_GapConfig() {
    const UNINIT: ::core::mem::MaybeUninit<GapConfig> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<GapConfig>(),
        38usize,
        concat!("Size of: ", stringify!(GapConfig))
    );
    assert_eq!(
        ::core::mem::align_of::<GapConfig>(),
        2usize,
        concat!("Alignment of ", stringify!(GapConfig))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).adv_service_uuid) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(GapConfig),
            "::",
            stringify!(adv_service_uuid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).appearance_char) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(GapConfig),
            "::",
            stringify!(appearance_char)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bonding_mode) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(GapConfig),
            "::",
            stringify!(bonding_mode)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pairing_method) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(GapConfig),
            "::",
            stringify!(pairing_method)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).mac_address) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(GapConfig),
            "::",
            stringify!(mac_address)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).adv_name) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(GapConfig),
            "::",
            stringify!(adv_name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).conn_param) as usize - ptr as usize },
        30usize,
        concat!(
            "Offset of field: ",
            stringify!(GapConfig),
            "::",
            stringify!(conn_param)
        )
    );
}
pub const GapAdvChannelMap_GapAdvChannelMap37: GapAdvChannelMap = 1;
pub const GapAdvChannelMap_GapAdvChannelMap38: GapAdvChannelMap = 2;
pub const GapAdvChannelMap_GapAdvChannelMap39: GapAdvChannelMap = 4;
pub const GapAdvChannelMap_GapAdvChannelMapAll: GapAdvChannelMap = 7;
pub type GapAdvChannelMap = core::ffi::c_uchar;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg40dBm: GapAdvPowerLevelInd = 0;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg20_85dBm: GapAdvPowerLevelInd = 1;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg19_75dBm: GapAdvPowerLevelInd = 2;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg18_85dBm: GapAdvPowerLevelInd = 3;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg17_6dBm: GapAdvPowerLevelInd = 4;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg16_5dBm: GapAdvPowerLevelInd = 5;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg15_25dBm: GapAdvPowerLevelInd = 6;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg14_1dBm: GapAdvPowerLevelInd = 7;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg13_15dBm: GapAdvPowerLevelInd = 8;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg12_05dBm: GapAdvPowerLevelInd = 9;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg10_9dBm: GapAdvPowerLevelInd = 10;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg9_9dBm: GapAdvPowerLevelInd = 11;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg8_85dBm: GapAdvPowerLevelInd = 12;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg7_8dBm: GapAdvPowerLevelInd = 13;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg6_9dBm: GapAdvPowerLevelInd = 14;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg5_9dBm: GapAdvPowerLevelInd = 15;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg4_95dBm: GapAdvPowerLevelInd = 16;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg4dBm: GapAdvPowerLevelInd = 17;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg3_15dBm: GapAdvPowerLevelInd = 18;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg2_45dBm: GapAdvPowerLevelInd = 19;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg1_8dBm: GapAdvPowerLevelInd = 20;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg1_3dBm: GapAdvPowerLevelInd = 21;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg0_85dBm: GapAdvPowerLevelInd = 22;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg0_5dBm: GapAdvPowerLevelInd = 23;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_Neg0_15dBm: GapAdvPowerLevelInd = 24;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_0dBm: GapAdvPowerLevelInd = 25;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_1dBm: GapAdvPowerLevelInd = 26;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_2dBm: GapAdvPowerLevelInd = 27;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_3dBm: GapAdvPowerLevelInd = 28;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_4dBm: GapAdvPowerLevelInd = 29;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_5dBm: GapAdvPowerLevelInd = 30;
pub const GapAdvPowerLevelInd_GapAdvPowerLevel_6dBm: GapAdvPowerLevelInd = 31;
pub type GapAdvPowerLevelInd = core::ffi::c_uchar;
pub const GapAddressType_GapAddressTypePublic: GapAddressType = 0;
pub const GapAddressType_GapAddressTypeRandom: GapAddressType = 1;
pub type GapAddressType = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct GapExtraBeaconConfig {
    pub min_adv_interval_ms: u16,
    pub max_adv_interval_ms: u16,
    pub adv_channel_map: GapAdvChannelMap,
    pub adv_power_level: GapAdvPowerLevelInd,
    pub address_type: GapAddressType,
    pub address: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_GapExtraBeaconConfig() {
    const UNINIT: ::core::mem::MaybeUninit<GapExtraBeaconConfig> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<GapExtraBeaconConfig>(),
        14usize,
        concat!("Size of: ", stringify!(GapExtraBeaconConfig))
    );
    assert_eq!(
        ::core::mem::align_of::<GapExtraBeaconConfig>(),
        2usize,
        concat!("Alignment of ", stringify!(GapExtraBeaconConfig))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).min_adv_interval_ms) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(GapExtraBeaconConfig),
            "::",
            stringify!(min_adv_interval_ms)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).max_adv_interval_ms) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(GapExtraBeaconConfig),
            "::",
            stringify!(max_adv_interval_ms)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).adv_channel_map) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(GapExtraBeaconConfig),
            "::",
            stringify!(adv_channel_map)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).adv_power_level) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(GapExtraBeaconConfig),
            "::",
            stringify!(adv_power_level)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).address_type) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(GapExtraBeaconConfig),
            "::",
            stringify!(address_type)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).address) as usize - ptr as usize },
        7usize,
        concat!(
            "Offset of field: ",
            stringify!(GapExtraBeaconConfig),
            "::",
            stringify!(address)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalBleProfileBase {
    pub config: *const FuriHalBleProfileTemplate,
}
#[test]
fn bindgen_test_layout_FuriHalBleProfileBase() {
    const UNINIT: ::core::mem::MaybeUninit<FuriHalBleProfileBase> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriHalBleProfileBase>(),
        4usize,
        concat!("Size of: ", stringify!(FuriHalBleProfileBase))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriHalBleProfileBase>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriHalBleProfileBase))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).config) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalBleProfileBase),
            "::",
            stringify!(config)
        )
    );
}
pub type FuriHalBleProfileParams = *mut core::ffi::c_void;
pub type FuriHalBleProfileStart = ::core::option::Option<
    unsafe extern "C" fn(profile_params: FuriHalBleProfileParams) -> *mut FuriHalBleProfileBase,
>;
pub type FuriHalBleProfileStop =
    ::core::option::Option<unsafe extern "C" fn(profile: *mut FuriHalBleProfileBase)>;
pub type FuriHalBleProfileGetGapConfig = ::core::option::Option<
    unsafe extern "C" fn(target_config: *mut GapConfig, profile_params: FuriHalBleProfileParams),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalBleProfileTemplate {
    pub start: FuriHalBleProfileStart,
    pub stop: FuriHalBleProfileStop,
    pub get_gap_config: FuriHalBleProfileGetGapConfig,
}
#[test]
fn bindgen_test_layout_FuriHalBleProfileTemplate() {
    const UNINIT: ::core::mem::MaybeUninit<FuriHalBleProfileTemplate> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriHalBleProfileTemplate>(),
        12usize,
        concat!("Size of: ", stringify!(FuriHalBleProfileTemplate))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriHalBleProfileTemplate>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriHalBleProfileTemplate))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalBleProfileTemplate),
            "::",
            stringify!(start)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).stop) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalBleProfileTemplate),
            "::",
            stringify!(stop)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).get_gap_config) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalBleProfileTemplate),
            "::",
            stringify!(get_gap_config)
        )
    );
}
pub const BleGlueC2Mode_BleGlueC2ModeUnknown: BleGlueC2Mode = 0;
pub const BleGlueC2Mode_BleGlueC2ModeFUS: BleGlueC2Mode = 1;
pub const BleGlueC2Mode_BleGlueC2ModeStack: BleGlueC2Mode = 2;
pub type BleGlueC2Mode = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BleGlueC2Info {
    pub mode: BleGlueC2Mode,
    #[doc = "Wireless Info"]
    pub VersionMajor: u8,
    pub VersionMinor: u8,
    pub VersionSub: u8,
    pub VersionBranch: u8,
    pub VersionReleaseType: u8,
    pub MemorySizeSram2B: u8,
    pub MemorySizeSram2A: u8,
    pub MemorySizeSram1: u8,
    pub MemorySizeFlash: u8,
    pub StackType: u8,
    pub StackTypeString: [core::ffi::c_char; 20usize],
    #[doc = "Fus Info"]
    pub FusVersionMajor: u8,
    pub FusVersionMinor: u8,
    pub FusVersionSub: u8,
    pub FusMemorySizeSram2B: u8,
    pub FusMemorySizeSram2A: u8,
    pub FusMemorySizeFlash: u8,
}
#[test]
fn bindgen_test_layout_BleGlueC2Info() {
    const UNINIT: ::core::mem::MaybeUninit<BleGlueC2Info> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<BleGlueC2Info>(),
        37usize,
        concat!("Size of: ", stringify!(BleGlueC2Info))
    );
    assert_eq!(
        ::core::mem::align_of::<BleGlueC2Info>(),
        1usize,
        concat!("Alignment of ", stringify!(BleGlueC2Info))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).mode) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(mode)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).VersionMajor) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(VersionMajor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).VersionMinor) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(VersionMinor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).VersionSub) as usize - ptr as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(VersionSub)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).VersionBranch) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(VersionBranch)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).VersionReleaseType) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(VersionReleaseType)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).MemorySizeSram2B) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(MemorySizeSram2B)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).MemorySizeSram2A) as usize - ptr as usize },
        7usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(MemorySizeSram2A)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).MemorySizeSram1) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(MemorySizeSram1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).MemorySizeFlash) as usize - ptr as usize },
        9usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(MemorySizeFlash)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).StackType) as usize - ptr as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(StackType)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).StackTypeString) as usize - ptr as usize },
        11usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(StackTypeString)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).FusVersionMajor) as usize - ptr as usize },
        31usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(FusVersionMajor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).FusVersionMinor) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(FusVersionMinor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).FusVersionSub) as usize - ptr as usize },
        33usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(FusVersionSub)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).FusMemorySizeSram2B) as usize - ptr as usize },
        34usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(FusMemorySizeSram2B)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).FusMemorySizeSram2A) as usize - ptr as usize },
        35usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(FusMemorySizeSram2A)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).FusMemorySizeFlash) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGlueC2Info),
            "::",
            stringify!(FusMemorySizeFlash)
        )
    );
}
pub type BleGlueKeyStorageChangedCallback = ::core::option::Option<
    unsafe extern "C" fn(change_addr_start: *mut u8, size: u16, context: *mut core::ffi::c_void),
>;
extern "C" {
    #[doc = "Initialize start core2 and initialize transport"]
    pub fn ble_glue_init();
}
extern "C" {
    #[doc = "Is core2 alive and at least FUS is running\n\n # Returns\n\ntrue if core2 is alive"]
    pub fn ble_glue_is_alive() -> bool;
}
extern "C" {
    #[doc = "Waits for C2 to reports its mode to callback\n\n # Returns\n\ntrue if it reported before reaching timeout"]
    pub fn ble_glue_wait_for_c2_start(timeout_ms: i32) -> bool;
}
extern "C" {
    pub fn ble_glue_get_c2_info() -> *const BleGlueC2Info;
}
extern "C" {
    #[doc = "Is core2 radio stack present and ready\n\n # Returns\n\ntrue if present and ready"]
    pub fn ble_glue_is_radio_stack_ready() -> bool;
}
extern "C" {
    #[doc = "Set callback for NVM in RAM changes\n\n # Arguments\n\n* `callback` (direction in) - The callback to call on NVM change\n * `context` - The context for callback"]
    pub fn ble_glue_set_key_storage_changed_callback(
        callback: BleGlueKeyStorageChangedCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn ble_glue_reinit_c2() -> bool;
}
pub const BleGlueCommandResult_BleGlueCommandResultUnknown: BleGlueCommandResult = 0;
pub const BleGlueCommandResult_BleGlueCommandResultOK: BleGlueCommandResult = 1;
pub const BleGlueCommandResult_BleGlueCommandResultError: BleGlueCommandResult = 2;
pub const BleGlueCommandResult_BleGlueCommandResultRestartPending: BleGlueCommandResult = 3;
pub const BleGlueCommandResult_BleGlueCommandResultOperationOngoing: BleGlueCommandResult = 4;
pub type BleGlueCommandResult = core::ffi::c_uchar;
extern "C" {
    #[doc = "Restart MCU to launch radio stack firmware if necessary\n\n # Returns\n\ntrue on radio stack start command"]
    pub fn ble_glue_force_c2_mode(mode: BleGlueC2Mode) -> BleGlueCommandResult;
}
pub const FuriHalBtStack_FuriHalBtStackUnknown: FuriHalBtStack = 0;
pub const FuriHalBtStack_FuriHalBtStackLight: FuriHalBtStack = 1;
pub const FuriHalBtStack_FuriHalBtStackFull: FuriHalBtStack = 2;
pub type FuriHalBtStack = core::ffi::c_uchar;
extern "C" {
    #[doc = "Lock core2 state transition"]
    pub fn furi_hal_bt_lock_core2();
}
extern "C" {
    #[doc = "Lock core2 state transition"]
    pub fn furi_hal_bt_unlock_core2();
}
extern "C" {
    #[doc = "Start radio stack\n\n # Returns\n\ntrue on successfull radio stack start"]
    pub fn furi_hal_bt_start_radio_stack() -> bool;
}
extern "C" {
    #[doc = "Get radio stack type\n\n # Returns\n\nFuriHalBtStack instance"]
    pub fn furi_hal_bt_get_radio_stack() -> FuriHalBtStack;
}
extern "C" {
    #[doc = "Check if radio stack supports BLE GAT/GAP\n\n # Returns\n\ntrue if supported"]
    pub fn furi_hal_bt_is_gatt_gap_supported() -> bool;
}
extern "C" {
    #[doc = "Check if radio stack supports testing\n\n # Returns\n\ntrue if supported"]
    pub fn furi_hal_bt_is_testing_supported() -> bool;
}
extern "C" {
    #[doc = "Check if particular instance of profile belongs to given type\n\n # Arguments\n\n* `profile` - FuriHalBtProfile instance. If NULL, uses current profile\n * `profile_template` - basic profile template to check against\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_bt_check_profile_type(
        profile: *mut FuriHalBleProfileBase,
        profile_template: *const FuriHalBleProfileTemplate,
    ) -> bool;
}
extern "C" {
    #[doc = "Start BLE app\n\n # Arguments\n\n* `profile_template` - FuriHalBleProfileTemplate instance\n * `params` - Parameters to pass to the profile. Can be NULL\n * `event_cb` - GapEventCallback instance\n * `context` - pointer to context\n\n # Returns\n\ninstance of profile, NULL on failure"]
    pub fn furi_hal_bt_start_app(
        profile_template: *const FuriHalBleProfileTemplate,
        params: FuriHalBleProfileParams,
        event_cb: GapEventCallback,
        context: *mut core::ffi::c_void,
    ) -> *mut FuriHalBleProfileBase;
}
extern "C" {
    #[doc = "Reinitialize core2\n\n Also can be used to prepare core2 for stop modes"]
    pub fn furi_hal_bt_reinit();
}
extern "C" {
    #[doc = "Change BLE app\n Restarts 2nd core\n\n # Arguments\n\n* `profile_template` - FuriHalBleProfileTemplate instance\n * `profile_params` - Parameters to pass to the profile. Can be NULL\n * `event_cb` - GapEventCallback instance\n * `context` - pointer to context\n\n # Returns\n\ninstance of profile, NULL on failure"]
    pub fn furi_hal_bt_change_app(
        profile_template: *const FuriHalBleProfileTemplate,
        profile_params: FuriHalBleProfileParams,
        event_cb: GapEventCallback,
        context: *mut core::ffi::c_void,
    ) -> *mut FuriHalBleProfileBase;
}
extern "C" {
    #[doc = "Update battery level\n\n # Arguments\n\n* `battery_level` - battery level"]
    pub fn furi_hal_bt_update_battery_level(battery_level: u8);
}
extern "C" {
    #[doc = "Update battery power state"]
    pub fn furi_hal_bt_update_power_state(charging: bool);
}
extern "C" {
    #[doc = "Checks if BLE state is active\n\n # Returns\n\ntrue if device is connected or advertising, false otherwise"]
    pub fn furi_hal_bt_is_active() -> bool;
}
extern "C" {
    #[doc = "Start advertising"]
    pub fn furi_hal_bt_start_advertising();
}
extern "C" {
    #[doc = "Stop advertising"]
    pub fn furi_hal_bt_stop_advertising();
}
extern "C" {
    #[doc = "Get BT/BLE system component state\n\n # Arguments\n\n* `buffer` (direction in) - FuriString* buffer to write to"]
    pub fn furi_hal_bt_dump_state(buffer: *mut FuriString);
}
extern "C" {
    #[doc = "Get BT/BLE system component state\n\n # Returns\n\ntrue if core2 is alive"]
    pub fn furi_hal_bt_is_alive() -> bool;
}
extern "C" {
    #[doc = "Get key storage buffer address and size\n\n # Arguments\n\n* `key_buff_addr` - pointer to store buffer address\n * `key_buff_size` - pointer to store buffer size"]
    pub fn furi_hal_bt_get_key_storage_buff(key_buff_addr: *mut *mut u8, key_buff_size: *mut u16);
}
extern "C" {
    #[doc = "Get SRAM2 hardware semaphore\n > **Note:** Must be called before SRAM2 read/write operations"]
    pub fn furi_hal_bt_nvm_sram_sem_acquire();
}
extern "C" {
    #[doc = "Release SRAM2 hardware semaphore\n > **Note:** Must be called after SRAM2 read/write operations"]
    pub fn furi_hal_bt_nvm_sram_sem_release();
}
extern "C" {
    #[doc = "Clear key storage\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_bt_clear_white_list() -> bool;
}
extern "C" {
    #[doc = "Set key storage change callback\n\n # Arguments\n\n* `callback` - BleGlueKeyStorageChangedCallback instance\n * `context` - pointer to context"]
    pub fn furi_hal_bt_set_key_storage_change_callback(
        callback: BleGlueKeyStorageChangedCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Start ble tone tx at given channel and power\n\n # Arguments\n\n* `channel` (direction in) - The channel\n * `power` (direction in) - The power"]
    pub fn furi_hal_bt_start_tone_tx(channel: u8, power: u8);
}
extern "C" {
    #[doc = "Stop ble tone tx"]
    pub fn furi_hal_bt_stop_tone_tx();
}
extern "C" {
    #[doc = "Start sending ble packets at a given frequency and datarate\n\n # Arguments\n\n* `channel` (direction in) - The channel\n * `pattern` (direction in) - The pattern\n * `datarate` (direction in) - The datarate"]
    pub fn furi_hal_bt_start_packet_tx(channel: u8, pattern: u8, datarate: u8);
}
extern "C" {
    #[doc = "Stop sending ble packets\n\n # Returns\n\nsent packet count"]
    pub fn furi_hal_bt_stop_packet_test() -> u16;
}
extern "C" {
    #[doc = "Start receiving packets\n\n # Arguments\n\n* `channel` (direction in) - RX channel\n * `datarate` (direction in) - Datarate"]
    pub fn furi_hal_bt_start_packet_rx(channel: u8, datarate: u8);
}
extern "C" {
    #[doc = "Set up the RF to listen to a given RF channel\n\n # Arguments\n\n* `channel` (direction in) - RX channel"]
    pub fn furi_hal_bt_start_rx(channel: u8);
}
extern "C" {
    #[doc = "Stop RF listenning"]
    pub fn furi_hal_bt_stop_rx();
}
extern "C" {
    #[doc = "Get RSSI\n\n # Returns\n\nRSSI in dBm"]
    pub fn furi_hal_bt_get_rssi() -> f32;
}
extern "C" {
    #[doc = "Get number of transmitted packets\n\n # Returns\n\npacket count"]
    pub fn furi_hal_bt_get_transmitted_packets() -> u32;
}
extern "C" {
    #[doc = "Check & switch C2 to given mode\n\n # Arguments\n\n* `mode` (direction in) - mode to switch into"]
    pub fn furi_hal_bt_ensure_c2_mode(mode: BleGlueC2Mode) -> bool;
}
extern "C" {
    #[doc = "Set extra beacon data. Can be called in any state\n\n # Arguments\n\n* `data` (direction in) - data to set\n * `len` (direction in) - data length. Must be <= EXTRA_BEACON_MAX_DATA_SIZE\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_bt_extra_beacon_set_data(data: *const u8, len: u8) -> bool;
}
extern "C" {
    #[doc = "Get last configured extra beacon data\n\n # Arguments\n\n* `data` - data buffer to write to. Must be at least EXTRA_BEACON_MAX_DATA_SIZE bytes long\n\n # Returns\n\nvalid data length"]
    pub fn furi_hal_bt_extra_beacon_get_data(data: *mut u8) -> u8;
}
extern "C" {
    #[doc = "Configure extra beacon.\n\n # Arguments\n\n* `config` (direction in) - extra beacon config: interval, power, address, etc.\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_bt_extra_beacon_set_config(config: *const GapExtraBeaconConfig) -> bool;
}
extern "C" {
    #[doc = "Start extra beacon.\n Beacon must configured with furi_hal_bt_extra_beacon_set_config()\n and in stopped state before calling this function.\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_bt_extra_beacon_start() -> bool;
}
extern "C" {
    #[doc = "Stop extra beacon\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_bt_extra_beacon_stop() -> bool;
}
extern "C" {
    #[doc = "Check if extra beacon is active.\n\n # Returns\n\nextra beacon state"]
    pub fn furi_hal_bt_extra_beacon_is_active() -> bool;
}
extern "C" {
    #[doc = "Get last configured extra beacon config\n\n # Returns\n\nextra beacon config. NULL if beacon had never been configured."]
    pub fn furi_hal_bt_extra_beacon_get_config() -> *const GapExtraBeaconConfig;
}
#[doc = "SPI Init structures definition"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LL_SPI_InitTypeDef {
    #[doc = "< Specifies the SPI unidirectional or bidirectional data mode.\nThis parameter can be a value of SPI_LL_EC_TRANSFER_MODE.\n\nThis feature can be modified afterwards using unitary function LL_SPI_SetTransferDirection()."]
    pub TransferDirection: u32,
    #[doc = "< Specifies the SPI mode (Master/Slave).\nThis parameter can be a value of SPI_LL_EC_MODE.\n\nThis feature can be modified afterwards using unitary function LL_SPI_SetMode()."]
    pub Mode: u32,
    #[doc = "< Specifies the SPI data width.\nThis parameter can be a value of SPI_LL_EC_DATAWIDTH.\n\nThis feature can be modified afterwards using unitary function LL_SPI_SetDataWidth()."]
    pub DataWidth: u32,
    #[doc = "< Specifies the serial clock steady state.\nThis parameter can be a value of SPI_LL_EC_POLARITY.\n\nThis feature can be modified afterwards using unitary function LL_SPI_SetClockPolarity()."]
    pub ClockPolarity: u32,
    #[doc = "< Specifies the clock active edge for the bit capture.\nThis parameter can be a value of SPI_LL_EC_PHASE.\n\nThis feature can be modified afterwards using unitary function LL_SPI_SetClockPhase()."]
    pub ClockPhase: u32,
    #[doc = "< Specifies whether the NSS signal is managed by hardware (NSS pin) or by software using the SSI bit.\nThis parameter can be a value of SPI_LL_EC_NSS_MODE.\n\nThis feature can be modified afterwards using unitary function LL_SPI_SetNSSMode()."]
    pub NSS: u32,
    #[doc = "< Specifies the BaudRate prescaler value which will be used to configure the transmit and receive SCK clock.\nThis parameter can be a value of SPI_LL_EC_BAUDRATEPRESCALER.\n> **Note:** The communication clock is derived from the master clock. The slave clock does not need to be set.\n\nThis feature can be modified afterwards using unitary function LL_SPI_SetBaudRatePrescaler()."]
    pub BaudRate: u32,
    #[doc = "< Specifies whether data transfers start from MSB or LSB bit.\nThis parameter can be a value of SPI_LL_EC_BIT_ORDER.\n\nThis feature can be modified afterwards using unitary function LL_SPI_SetTransferBitOrder()."]
    pub BitOrder: u32,
    #[doc = "< Specifies if the CRC calculation is enabled or not.\nThis parameter can be a value of SPI_LL_EC_CRC_CALCULATION.\n\nThis feature can be modified afterwards using unitary functions LL_SPI_EnableCRC() and LL_SPI_DisableCRC()."]
    pub CRCCalculation: u32,
    #[doc = "< Specifies the polynomial used for the CRC calculation.\nThis parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFFFF.\n\nThis feature can be modified afterwards using unitary function LL_SPI_SetCRCPolynomial()."]
    pub CRCPoly: u32,
}
#[test]
fn bindgen_test_layout_LL_SPI_InitTypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<LL_SPI_InitTypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LL_SPI_InitTypeDef>(),
        40usize,
        concat!("Size of: ", stringify!(LL_SPI_InitTypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<LL_SPI_InitTypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(LL_SPI_InitTypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TransferDirection) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_SPI_InitTypeDef),
            "::",
            stringify!(TransferDirection)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Mode) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_SPI_InitTypeDef),
            "::",
            stringify!(Mode)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).DataWidth) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_SPI_InitTypeDef),
            "::",
            stringify!(DataWidth)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ClockPolarity) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_SPI_InitTypeDef),
            "::",
            stringify!(ClockPolarity)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ClockPhase) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_SPI_InitTypeDef),
            "::",
            stringify!(ClockPhase)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).NSS) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_SPI_InitTypeDef),
            "::",
            stringify!(NSS)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BaudRate) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_SPI_InitTypeDef),
            "::",
            stringify!(BaudRate)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BitOrder) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_SPI_InitTypeDef),
            "::",
            stringify!(BitOrder)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CRCCalculation) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_SPI_InitTypeDef),
            "::",
            stringify!(CRCCalculation)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).CRCPoly) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_SPI_InitTypeDef),
            "::",
            stringify!(CRCPoly)
        )
    );
}
extern "C" {
    pub fn LL_SPI_Init(
        SPIx: *mut SPI_TypeDef,
        SPI_InitStruct: *mut LL_SPI_InitTypeDef,
    ) -> ErrorStatus;
}
#[doc = "< Bus initialization event, called on system start"]
pub const FuriHalSpiBusEvent_FuriHalSpiBusEventInit: FuriHalSpiBusEvent = 0;
#[doc = "< Bus deinitialization event, called on system stop"]
pub const FuriHalSpiBusEvent_FuriHalSpiBusEventDeinit: FuriHalSpiBusEvent = 1;
#[doc = "< Bus lock event, called before activation"]
pub const FuriHalSpiBusEvent_FuriHalSpiBusEventLock: FuriHalSpiBusEvent = 2;
#[doc = "< Bus unlock event, called after deactivation"]
pub const FuriHalSpiBusEvent_FuriHalSpiBusEventUnlock: FuriHalSpiBusEvent = 3;
#[doc = "< Bus activation event, called before handle activation"]
pub const FuriHalSpiBusEvent_FuriHalSpiBusEventActivate: FuriHalSpiBusEvent = 4;
#[doc = "< Bus deactivation event, called after handle deactivation"]
pub const FuriHalSpiBusEvent_FuriHalSpiBusEventDeactivate: FuriHalSpiBusEvent = 5;
#[doc = "FuriHal spi bus states"]
pub type FuriHalSpiBusEvent = core::ffi::c_uchar;
#[doc = "FuriHal spi bus event callback"]
pub type FuriHalSpiBusEventCallback = ::core::option::Option<
    unsafe extern "C" fn(bus: *mut FuriHalSpiBus, event: FuriHalSpiBusEvent),
>;
#[doc = "FuriHal spi bus"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalSpiBus {
    pub spi: *mut SPI_TypeDef,
    pub callback: FuriHalSpiBusEventCallback,
    pub current_handle: *mut FuriHalSpiBusHandle,
}
#[test]
fn bindgen_test_layout_FuriHalSpiBus() {
    const UNINIT: ::core::mem::MaybeUninit<FuriHalSpiBus> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriHalSpiBus>(),
        12usize,
        concat!("Size of: ", stringify!(FuriHalSpiBus))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriHalSpiBus>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriHalSpiBus))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).spi) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSpiBus),
            "::",
            stringify!(spi)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSpiBus),
            "::",
            stringify!(callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).current_handle) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSpiBus),
            "::",
            stringify!(current_handle)
        )
    );
}
#[doc = "< Handle init, called on system start, initialize gpio for idle state"]
pub const FuriHalSpiBusHandleEvent_FuriHalSpiBusHandleEventInit: FuriHalSpiBusHandleEvent = 0;
#[doc = "< Handle deinit, called on system stop, deinitialize gpio for default state"]
pub const FuriHalSpiBusHandleEvent_FuriHalSpiBusHandleEventDeinit: FuriHalSpiBusHandleEvent = 1;
#[doc = "< Handle activate: connect gpio and apply bus config"]
pub const FuriHalSpiBusHandleEvent_FuriHalSpiBusHandleEventActivate: FuriHalSpiBusHandleEvent = 2;
#[doc = "< Handle deactivate: disconnect gpio and reset bus config"]
pub const FuriHalSpiBusHandleEvent_FuriHalSpiBusHandleEventDeactivate: FuriHalSpiBusHandleEvent = 3;
#[doc = "FuriHal spi handle states"]
pub type FuriHalSpiBusHandleEvent = core::ffi::c_uchar;
#[doc = "FuriHal spi handle event callback"]
pub type FuriHalSpiBusHandleEventCallback = ::core::option::Option<
    unsafe extern "C" fn(handle: *mut FuriHalSpiBusHandle, event: FuriHalSpiBusHandleEvent),
>;
#[doc = "FuriHal spi handle"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalSpiBusHandle {
    pub bus: *mut FuriHalSpiBus,
    pub callback: FuriHalSpiBusHandleEventCallback,
    pub miso: *const GpioPin,
    pub mosi: *const GpioPin,
    pub sck: *const GpioPin,
    pub cs: *const GpioPin,
}
#[test]
fn bindgen_test_layout_FuriHalSpiBusHandle() {
    const UNINIT: ::core::mem::MaybeUninit<FuriHalSpiBusHandle> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriHalSpiBusHandle>(),
        24usize,
        concat!("Size of: ", stringify!(FuriHalSpiBusHandle))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriHalSpiBusHandle>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriHalSpiBusHandle))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bus) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSpiBusHandle),
            "::",
            stringify!(bus)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSpiBusHandle),
            "::",
            stringify!(callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).miso) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSpiBusHandle),
            "::",
            stringify!(miso)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).mosi) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSpiBusHandle),
            "::",
            stringify!(mosi)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sck) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSpiBusHandle),
            "::",
            stringify!(sck)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).cs) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalSpiBusHandle),
            "::",
            stringify!(cs)
        )
    );
}
extern "C" {
    #[doc = "Preset for ST25R916"]
    pub static furi_hal_spi_preset_2edge_low_8m: LL_SPI_InitTypeDef;
}
extern "C" {
    #[doc = "Preset for CC1101"]
    pub static furi_hal_spi_preset_1edge_low_8m: LL_SPI_InitTypeDef;
}
extern "C" {
    #[doc = "Preset for ST7567 (Display)"]
    pub static furi_hal_spi_preset_1edge_low_4m: LL_SPI_InitTypeDef;
}
extern "C" {
    #[doc = "Preset for SdCard in fast mode"]
    pub static furi_hal_spi_preset_1edge_low_16m: LL_SPI_InitTypeDef;
}
extern "C" {
    #[doc = "Preset for SdCard in slow mode"]
    pub static furi_hal_spi_preset_1edge_low_2m: LL_SPI_InitTypeDef;
}
extern "C" {
    #[doc = "Furi Hal Spi Bus R (Radio: CC1101, Nfc, External)"]
    pub static mut furi_hal_spi_bus_r: FuriHalSpiBus;
}
extern "C" {
    #[doc = "Furi Hal Spi Bus D (Display, SdCard)"]
    pub static mut furi_hal_spi_bus_d: FuriHalSpiBus;
}
extern "C" {
    #[doc = "CC1101 on `furi_hal_spi_bus_r`"]
    pub static mut furi_hal_spi_bus_handle_subghz: FuriHalSpiBusHandle;
}
extern "C" {
    #[doc = "ST25R3916 on `furi_hal_spi_bus_r`"]
    pub static mut furi_hal_spi_bus_handle_nfc: FuriHalSpiBusHandle;
}
extern "C" {
    #[doc = "External on `furi_hal_spi_bus_r`\n Preset: `furi_hal_spi_preset_1edge_low_2m`\n\n miso: pa6\n mosi: pa7\n sck: pb3\n cs: pa4 (software controlled)\n\n not initialized by default, call `furi_hal_spi_bus_handle_init` to initialize\n Bus pins are floating on inactive state, CS high after initialization\n"]
    pub static mut furi_hal_spi_bus_handle_external: FuriHalSpiBusHandle;
}
extern "C" {
    #[doc = "ST7567(Display) on `furi_hal_spi_bus_d`"]
    pub static mut furi_hal_spi_bus_handle_display: FuriHalSpiBusHandle;
}
extern "C" {
    #[doc = "SdCard in fast mode on `furi_hal_spi_bus_d`"]
    pub static mut furi_hal_spi_bus_handle_sd_fast: FuriHalSpiBusHandle;
}
extern "C" {
    #[doc = "SdCard in slow mode on `furi_hal_spi_bus_d`"]
    pub static mut furi_hal_spi_bus_handle_sd_slow: FuriHalSpiBusHandle;
}
extern "C" {
    #[doc = "Initialize SPI Bus\n\n # Arguments\n\n* `handle` - pointer to FuriHalSpiBus instance"]
    pub fn furi_hal_spi_bus_init(bus: *mut FuriHalSpiBus);
}
extern "C" {
    #[doc = "Deinitialize SPI Bus\n\n # Arguments\n\n* `handle` - pointer to FuriHalSpiBus instance"]
    pub fn furi_hal_spi_bus_deinit(bus: *mut FuriHalSpiBus);
}
extern "C" {
    #[doc = "Initialize SPI Bus Handle\n\n # Arguments\n\n* `handle` - pointer to FuriHalSpiBusHandle instance"]
    pub fn furi_hal_spi_bus_handle_init(handle: *mut FuriHalSpiBusHandle);
}
extern "C" {
    #[doc = "Deinitialize SPI Bus Handle\n\n # Arguments\n\n* `handle` - pointer to FuriHalSpiBusHandle instance"]
    pub fn furi_hal_spi_bus_handle_deinit(handle: *mut FuriHalSpiBusHandle);
}
extern "C" {
    #[doc = "Acquire SPI bus\n\n blocking, calls `furi_crash` on programming error, CS transition is up to handler event routine\n\n # Arguments\n\n* `handle` - pointer to FuriHalSpiBusHandle instance"]
    pub fn furi_hal_spi_acquire(handle: *mut FuriHalSpiBusHandle);
}
extern "C" {
    #[doc = "Release SPI bus\n\n calls `furi_crash` on programming error, CS transition is up to handler event routine\n\n # Arguments\n\n* `handle` - pointer to FuriHalSpiBusHandle instance"]
    pub fn furi_hal_spi_release(handle: *mut FuriHalSpiBusHandle);
}
extern "C" {
    #[doc = "SPI Receive\n\n # Arguments\n\n* `handle` - pointer to FuriHalSpiBusHandle instance\n * `buffer` - receive buffer\n * `size` - transaction size (buffer size)\n * `timeout` - operation timeout in ms\n\n # Returns\n\ntrue on sucess"]
    pub fn furi_hal_spi_bus_rx(
        handle: *mut FuriHalSpiBusHandle,
        buffer: *mut u8,
        size: usize,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "SPI Transmit\n\n # Arguments\n\n* `handle` - pointer to FuriHalSpiBusHandle instance\n * `buffer` - transmit buffer\n * `size` - transaction size (buffer size)\n * `timeout` - operation timeout in ms\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_spi_bus_tx(
        handle: *mut FuriHalSpiBusHandle,
        buffer: *const u8,
        size: usize,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "SPI Transmit and Receive\n\n # Arguments\n\n* `handle` - pointer to FuriHalSpiBusHandle instance\n * `tx_buffer` - pointer to tx buffer\n * `rx_buffer` - pointer to rx buffer\n * `size` - transaction size (buffer size)\n * `timeout` - operation timeout in ms\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_spi_bus_trx(
        handle: *mut FuriHalSpiBusHandle,
        tx_buffer: *const u8,
        rx_buffer: *mut u8,
        size: usize,
        timeout: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "SPI Transmit and Receive with DMA\n\n # Arguments\n\n* `handle` - pointer to FuriHalSpiBusHandle instance\n * `tx_buffer` - pointer to tx buffer\n * `rx_buffer` - pointer to rx buffer\n * `size` - transaction size (buffer size)\n * `timeout_ms` - operation timeout in ms\n\n # Returns\n\ntrue on success"]
    pub fn furi_hal_spi_bus_trx_dma(
        handle: *mut FuriHalSpiBusHandle,
        tx_buffer: *mut u8,
        rx_buffer: *mut u8,
        size: usize,
        timeout_ms: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Turn on/off vibro\n\n # Arguments\n\n* `value` (direction in) - new state"]
    pub fn furi_hal_vibro_on(value: bool);
}
#[doc = "<Function has an error, STALLPID will be issued."]
pub const _usbd_respond_usbd_fail: _usbd_respond = 0;
#[doc = "<Function completes request accepted ZLP or data will be send."]
pub const _usbd_respond_usbd_ack: _usbd_respond = 1;
#[doc = "<Function is busy. NAK handshake."]
pub const _usbd_respond_usbd_nak: _usbd_respond = 2;
#[doc = "Reporting status results."]
pub type _usbd_respond = core::ffi::c_uchar;
#[doc = "Reporting status results."]
pub use self::_usbd_respond as usbd_respond;
#[doc = "Represents a USB device data."]
pub type usbd_device = _usbd_device;
#[doc = "Represents generic USB control request."]
#[repr(C)]
#[derive(Debug)]
pub struct usbd_ctlreq {
    #[doc = "<This bitmapped field identifies the characteristics of\n the specific request."]
    pub bmRequestType: u8,
    #[doc = "<This field specifies the particular request."]
    pub bRequest: u8,
    #[doc = "<It is used to pass a parameter to the device, specific to\n the request."]
    pub wValue: u16,
    #[doc = "<It is used to pass a parameter to the device, specific to\n the request."]
    pub wIndex: u16,
    #[doc = "<This field specifies the length of the data transferred\n during the second phase of the control transfer."]
    pub wLength: u16,
    #[doc = "<Data payload."]
    pub data: __IncompleteArrayField<u8>,
}
#[test]
fn bindgen_test_layout_usbd_ctlreq() {
    const UNINIT: ::core::mem::MaybeUninit<usbd_ctlreq> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<usbd_ctlreq>(),
        8usize,
        concat!("Size of: ", stringify!(usbd_ctlreq))
    );
    assert_eq!(
        ::core::mem::align_of::<usbd_ctlreq>(),
        2usize,
        concat!("Alignment of ", stringify!(usbd_ctlreq))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bmRequestType) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_ctlreq),
            "::",
            stringify!(bmRequestType)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bRequest) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_ctlreq),
            "::",
            stringify!(bRequest)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).wValue) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_ctlreq),
            "::",
            stringify!(wValue)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).wIndex) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_ctlreq),
            "::",
            stringify!(wIndex)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).wLength) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_ctlreq),
            "::",
            stringify!(wLength)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_ctlreq),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "USB device status data."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct usbd_status {
    #[doc = "<Pointer to data buffer used for control requests."]
    pub data_buf: *mut core::ffi::c_void,
    #[doc = "<Pointer to current data for control request."]
    pub data_ptr: *mut core::ffi::c_void,
    #[doc = "<Count remained data for control request."]
    pub data_count: u16,
    #[doc = "<Size of the data buffer for control requests."]
    pub data_maxsize: u16,
    #[doc = "<Size of the control endpoint."]
    pub ep0size: u8,
    #[doc = "<Current device configuration number."]
    pub device_cfg: u8,
    #[doc = "<Current usbd_machine_state."]
    pub device_state: u8,
    #[doc = "<Current usbd_ctl_state."]
    pub control_state: u8,
}
#[test]
fn bindgen_test_layout_usbd_status() {
    const UNINIT: ::core::mem::MaybeUninit<usbd_status> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<usbd_status>(),
        16usize,
        concat!("Size of: ", stringify!(usbd_status))
    );
    assert_eq!(
        ::core::mem::align_of::<usbd_status>(),
        4usize,
        concat!("Alignment of ", stringify!(usbd_status))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data_buf) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_status),
            "::",
            stringify!(data_buf)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data_ptr) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_status),
            "::",
            stringify!(data_ptr)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data_count) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_status),
            "::",
            stringify!(data_count)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data_maxsize) as usize - ptr as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_status),
            "::",
            stringify!(data_maxsize)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ep0size) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_status),
            "::",
            stringify!(ep0size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).device_cfg) as usize - ptr as usize },
        13usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_status),
            "::",
            stringify!(device_cfg)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).device_state) as usize - ptr as usize },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_status),
            "::",
            stringify!(device_state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).control_state) as usize - ptr as usize },
        15usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_status),
            "::",
            stringify!(control_state)
        )
    );
}
#[doc = "Generic USB device event callback for events and endpoints processing\n # Arguments\n\n* `dev` (direction in) - pointer to USB device\n * `event` - USB_EVENTS \"USB event\"\n * `ep` - active endpoint number\n > **Note:** endpoints with same indexes i.e. 0x01 and 0x81 shares same callback."]
pub type usbd_evt_callback =
    ::core::option::Option<unsafe extern "C" fn(dev: *mut usbd_device, event: u8, ep: u8)>;
#[doc = "USB control transfer completed callback function.\n # Arguments\n\n* `dev` (direction in) - pointer to USB device\n * `req` (direction in) - pointer to usb request structure\n > **Note:** usbd_device->complete_callback will be set to NULL after this callback completion."]
pub type usbd_rqc_callback =
    ::core::option::Option<unsafe extern "C" fn(dev: *mut usbd_device, req: *mut usbd_ctlreq)>;
#[doc = "USB control callback function.\n \n\nUses for the control request processing.\n Some requests will be handled by core if callback don't process it (returns FALSE).\n If request was not processed STALL PID will be issued.\n - GET_CONFIGURATION\n - SET_CONFIGURATION (passes to usbd_cfg_callback)\n - GET_DESCRIPTOR (passes to usbd_dsc_callback)\n - GET_STATUS\n - SET_FEATURE, CLEAR_FEATURE (endpoints only)\n - SET_ADDRESS\n # Arguments\n\n* `dev` (direction in) - points to USB device\n * `req` (direction in) - points to usb control request\n * `*callback` (direction out) - USB control transfer completion callback, default is NULL (no callback)\n # Returns\n\nusbd_respond status."]
pub type usbd_ctl_callback = ::core::option::Option<
    unsafe extern "C" fn(
        dev: *mut usbd_device,
        req: *mut usbd_ctlreq,
        callback: *mut usbd_rqc_callback,
    ) -> usbd_respond,
>;
#[doc = "USB get descriptor callback function\n \n\nCalled when GET_DESCRIPTOR request issued\n # Arguments\n\n* `req` (direction in) - pointer to usb control request structure\n * `address` (direction in, out) - pointer to the descriptor in memory. Points to req->data by default. You\n can use this buffer.\n * `dsize` (direction in, out) - descriptor size. maximum buffer size by default.\n # Returns\n\nusbd_ack if you passed the correct descriptor, usbd_fail otherwise."]
pub type usbd_dsc_callback = ::core::option::Option<
    unsafe extern "C" fn(
        req: *mut usbd_ctlreq,
        address: *mut *mut core::ffi::c_void,
        dsize: *mut u16,
    ) -> usbd_respond,
>;
#[doc = "USB set configuration callback function\n \n\ncalled when SET_CONFIGURATION request issued\n # Arguments\n\n* `dev` (direction in) - pointer to USB device\n * `cfg` (direction in) - configuration number.\n > **Note:** if config is 0 device endpoints should be de-configured\n # Returns\n\nTRUE if success"]
pub type usbd_cfg_callback =
    ::core::option::Option<unsafe extern "C" fn(dev: *mut usbd_device, cfg: u8) -> usbd_respond>;
#[doc = "USBD_HW\n # /\n/**Get USB device status and capabilities.\n # Returns\n\nHardware status and capabilities USBD_HW_CAPS"]
pub type usbd_hw_getinfo = ::core::option::Option<unsafe extern "C" fn() -> u32>;
#[doc = "Enables or disables USB hardware\n # Arguments\n\n* `enable` - Enables USB when TRUE disables otherwise."]
pub type usbd_hw_enable = ::core::option::Option<unsafe extern "C" fn(enable: bool)>;
#[doc = "Connects or disconnects USB hardware to/from usb host\n # Arguments\n\n* `connect` - Connects USB to host if TRUE, disconnects otherwise\n # Returns\n\nlanes connection status."]
pub type usbd_hw_connect = ::core::option::Option<unsafe extern "C" fn(connect: bool) -> u8>;
#[doc = "Sets USB hardware address\n # Arguments\n\n* `address` - USB address"]
pub type usbd_hw_setaddr = ::core::option::Option<unsafe extern "C" fn(address: u8)>;
#[doc = "Configures endpoint\n # Arguments\n\n* `ep` - endpoint address. Use USB_EPDIR_ macros to set endpoint direction\n * `eptype` - endpoint type. Use USB_EPTYPE_* macros.\n * `epsize` - endpoint size in bytes\n # Returns\n\nTRUE if success"]
pub type usbd_hw_ep_config =
    ::core::option::Option<unsafe extern "C" fn(ep: u8, eptype: u8, epsize: u16) -> bool>;
#[doc = "De-configures, cleans and disables endpoint\n # Arguments\n\n* `ep` - endpoint index\n > **Note:** if you have two one-direction single-buffered endpoints with same index (i.e. 0x02 and 0x82)\n both will be deconfigured."]
pub type usbd_hw_ep_deconfig = ::core::option::Option<unsafe extern "C" fn(ep: u8)>;
#[doc = "Reads data from OUT or control endpoint\n # Arguments\n\n* `ep` - endpoint index, should belong to OUT or CONTROL endpoint.\n * `buf` - pointer to read buffer\n * `blen` - size of the read buffer in bytes\n # Returns\n\nsize of the actually received data, -1 on error.\n > **Note:** if data does not fit buffer it will be truncated"]
pub type usbd_hw_ep_read = ::core::option::Option<
    unsafe extern "C" fn(ep: u8, buf: *mut core::ffi::c_void, blen: u16) -> i32,
>;
#[doc = "Writes data to IN or control endpoint\n # Arguments\n\n* `ep` - endpoint index, hould belong to IN or CONTROL endpoint\n * `buf` - pointer to data buffer\n * `blen` - size of data will be written\n # Returns\n\nnumber of written bytes"]
pub type usbd_hw_ep_write = ::core::option::Option<
    unsafe extern "C" fn(ep: u8, buf: *const core::ffi::c_void, blen: u16) -> i32,
>;
#[doc = "Stalls and unstalls endpoint\n # Arguments\n\n* `ep` - endpoint address\n * `stall` - endpoint will be stalled if TRUE and unstalled otherwise.\n > **Note:** Has no effect on inactive endpoints."]
pub type usbd_hw_ep_setstall = ::core::option::Option<unsafe extern "C" fn(ep: u8, stall: bool)>;
#[doc = "Checks endpoint for stalled state\n # Arguments\n\n* `ep` - endpoint address\n # Returns\n\nTRUE if endpoint is stalled"]
pub type usbd_hw_ep_isstalled = ::core::option::Option<unsafe extern "C" fn(ep: u8) -> bool>;
#[doc = "Polls USB hardware for the events\n # Arguments\n\n* `dev` (direction in) - pointer to usb device structure\n * `callback` - callback to event processing subroutine"]
pub type usbd_hw_poll = ::core::option::Option<
    unsafe extern "C" fn(dev: *mut usbd_device, callback: usbd_evt_callback),
>;
#[doc = "Gets frame number from usb hardware."]
pub type usbd_hw_get_frameno = ::core::option::Option<unsafe extern "C" fn() -> u16>;
#[doc = "Makes a string descriptor contains unique serial number from hardware ID's\n # Arguments\n\n* `buffer` (direction in) - pointer to buffer for the descriptor\n # Returns\n\nof the descriptor in bytes"]
pub type usbd_hw_get_serialno =
    ::core::option::Option<unsafe extern "C" fn(buffer: *mut core::ffi::c_void) -> u16>;
#[doc = "Represents a hardware USB driver call table."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct usbd_driver {
    #[doc = "<usbd_hw_getinfo"]
    pub getinfo: usbd_hw_getinfo,
    #[doc = "<usbd_hw_enable"]
    pub enable: usbd_hw_enable,
    #[doc = "<usbd_hw_connect"]
    pub connect: usbd_hw_connect,
    #[doc = "<usbd_hw_setaddr"]
    pub setaddr: usbd_hw_setaddr,
    #[doc = "<usbd_hw_ep_config"]
    pub ep_config: usbd_hw_ep_config,
    #[doc = "<usbd_hw_ep_deconfig"]
    pub ep_deconfig: usbd_hw_ep_deconfig,
    #[doc = "<usbd_hw_ep_read"]
    pub ep_read: usbd_hw_ep_read,
    #[doc = "<usbd_hw_ep_write"]
    pub ep_write: usbd_hw_ep_write,
    #[doc = "<usbd_hw_ep_setstall"]
    pub ep_setstall: usbd_hw_ep_setstall,
    #[doc = "<usbd_hw_ep_isstalled"]
    pub ep_isstalled: usbd_hw_ep_isstalled,
    #[doc = "<usbd_hw_poll"]
    pub poll: usbd_hw_poll,
    #[doc = "<usbd_hw_get_frameno"]
    pub frame_no: usbd_hw_get_frameno,
    #[doc = "<usbd_hw_get_serialno"]
    pub get_serialno_desc: usbd_hw_get_serialno,
}
#[test]
fn bindgen_test_layout_usbd_driver() {
    const UNINIT: ::core::mem::MaybeUninit<usbd_driver> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<usbd_driver>(),
        52usize,
        concat!("Size of: ", stringify!(usbd_driver))
    );
    assert_eq!(
        ::core::mem::align_of::<usbd_driver>(),
        4usize,
        concat!("Alignment of ", stringify!(usbd_driver))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).getinfo) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(getinfo)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).enable) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(enable)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).connect) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(connect)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).setaddr) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(setaddr)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ep_config) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(ep_config)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ep_deconfig) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(ep_deconfig)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ep_read) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(ep_read)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ep_write) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(ep_write)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ep_setstall) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(ep_setstall)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ep_isstalled) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(ep_isstalled)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).poll) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(poll)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).frame_no) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(frame_no)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).get_serialno_desc) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(usbd_driver),
            "::",
            stringify!(get_serialno_desc)
        )
    );
}
#[doc = "Represents a USB device data."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _usbd_device {
    #[doc = "<usbd_driver"]
    pub driver: *const usbd_driver,
    #[doc = "<usbd_ctl_callback"]
    pub control_callback: usbd_ctl_callback,
    #[doc = "<usbd_rqc_callback"]
    pub complete_callback: usbd_rqc_callback,
    #[doc = "<usbd_cfg_callback"]
    pub config_callback: usbd_cfg_callback,
    #[doc = "<usbd_dsc_callback"]
    pub descriptor_callback: usbd_dsc_callback,
    #[doc = "<array of the event callbacks."]
    pub events: [usbd_evt_callback; 8usize],
    #[doc = "<array of the endpoint callbacks."]
    pub endpoint: [usbd_evt_callback; 8usize],
    #[doc = "<usbd_status"]
    pub status: usbd_status,
}
#[test]
fn bindgen_test_layout__usbd_device() {
    const UNINIT: ::core::mem::MaybeUninit<_usbd_device> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<_usbd_device>(),
        100usize,
        concat!("Size of: ", stringify!(_usbd_device))
    );
    assert_eq!(
        ::core::mem::align_of::<_usbd_device>(),
        4usize,
        concat!("Alignment of ", stringify!(_usbd_device))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).driver) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_usbd_device),
            "::",
            stringify!(driver)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).control_callback) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(_usbd_device),
            "::",
            stringify!(control_callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).complete_callback) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_usbd_device),
            "::",
            stringify!(complete_callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).config_callback) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(_usbd_device),
            "::",
            stringify!(config_callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).descriptor_callback) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(_usbd_device),
            "::",
            stringify!(descriptor_callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).events) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(_usbd_device),
            "::",
            stringify!(events)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).endpoint) as usize - ptr as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(_usbd_device),
            "::",
            stringify!(endpoint)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).status) as usize - ptr as usize },
        84usize,
        concat!(
            "Offset of field: ",
            stringify!(_usbd_device),
            "::",
            stringify!(status)
        )
    );
}
#[doc = "Represents a USB device descriptor\n \n\nA device descriptor describes general information about a USB device. It includes\n information that applies globally to the device and all of the device’s configurations. A USB\n device has only one device descriptor. A high-speed capable device that has different device\n information for full-speed and high-speed must also have a usb_qualifier_descriptor."]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct usb_device_descriptor {
    #[doc = "<Size of the descriptor, in bytes."]
    pub bLength: u8,
    #[doc = "<USB_DTYPE_DEVICE Device descriptor."]
    pub bDescriptorType: u8,
    #[doc = "<BCD of the supported USB specification."]
    pub bcdUSB: u16,
    #[doc = "<USB device class."]
    pub bDeviceClass: u8,
    #[doc = "<USB device subclass."]
    pub bDeviceSubClass: u8,
    #[doc = "<USB device protocol."]
    pub bDeviceProtocol: u8,
    #[doc = "<Size of the control endpoint's bank in bytes."]
    pub bMaxPacketSize0: u8,
    #[doc = "<Vendor ID for the USB product."]
    pub idVendor: u16,
    #[doc = "<Unique product ID for the USB product."]
    pub idProduct: u16,
    #[doc = "<Product release (version) number."]
    pub bcdDevice: u16,
    #[doc = "<String index for the manufacturer's name."]
    pub iManufacturer: u8,
    #[doc = "<String index for the product name/details."]
    pub iProduct: u8,
    #[doc = "<String index for the product serial number."]
    pub iSerialNumber: u8,
    #[doc = "<Total number of configurations supported by the device."]
    pub bNumConfigurations: u8,
}
#[test]
fn bindgen_test_layout_usb_device_descriptor() {
    const UNINIT: ::core::mem::MaybeUninit<usb_device_descriptor> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<usb_device_descriptor>(),
        18usize,
        concat!("Size of: ", stringify!(usb_device_descriptor))
    );
    assert_eq!(
        ::core::mem::align_of::<usb_device_descriptor>(),
        1usize,
        concat!("Alignment of ", stringify!(usb_device_descriptor))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bLength) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(bLength)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bDescriptorType) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(bDescriptorType)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bcdUSB) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(bcdUSB)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bDeviceClass) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(bDeviceClass)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bDeviceSubClass) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(bDeviceSubClass)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bDeviceProtocol) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(bDeviceProtocol)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bMaxPacketSize0) as usize - ptr as usize },
        7usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(bMaxPacketSize0)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).idVendor) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(idVendor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).idProduct) as usize - ptr as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(idProduct)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bcdDevice) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(bcdDevice)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).iManufacturer) as usize - ptr as usize },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(iManufacturer)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).iProduct) as usize - ptr as usize },
        15usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(iProduct)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).iSerialNumber) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(iSerialNumber)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bNumConfigurations) as usize - ptr as usize },
        17usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_device_descriptor),
            "::",
            stringify!(bNumConfigurations)
        )
    );
}
extern "C" {
    pub static usbd_devfs: usbd_driver;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalUsbInterface {
    pub init: ::core::option::Option<
        unsafe extern "C" fn(
            dev: *mut usbd_device,
            intf: *mut FuriHalUsbInterface,
            ctx: *mut core::ffi::c_void,
        ),
    >,
    pub deinit: ::core::option::Option<unsafe extern "C" fn(dev: *mut usbd_device)>,
    pub wakeup: ::core::option::Option<unsafe extern "C" fn(dev: *mut usbd_device)>,
    pub suspend: ::core::option::Option<unsafe extern "C" fn(dev: *mut usbd_device)>,
    pub dev_descr: *mut usb_device_descriptor,
    pub str_manuf_descr: *mut core::ffi::c_void,
    pub str_prod_descr: *mut core::ffi::c_void,
    pub str_serial_descr: *mut core::ffi::c_void,
    pub cfg_descr: *mut core::ffi::c_void,
}
#[test]
fn bindgen_test_layout_FuriHalUsbInterface() {
    const UNINIT: ::core::mem::MaybeUninit<FuriHalUsbInterface> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FuriHalUsbInterface>(),
        36usize,
        concat!("Size of: ", stringify!(FuriHalUsbInterface))
    );
    assert_eq!(
        ::core::mem::align_of::<FuriHalUsbInterface>(),
        4usize,
        concat!("Alignment of ", stringify!(FuriHalUsbInterface))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).init) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalUsbInterface),
            "::",
            stringify!(init)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).deinit) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalUsbInterface),
            "::",
            stringify!(deinit)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).wakeup) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalUsbInterface),
            "::",
            stringify!(wakeup)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).suspend) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalUsbInterface),
            "::",
            stringify!(suspend)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).dev_descr) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalUsbInterface),
            "::",
            stringify!(dev_descr)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).str_manuf_descr) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalUsbInterface),
            "::",
            stringify!(str_manuf_descr)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).str_prod_descr) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalUsbInterface),
            "::",
            stringify!(str_prod_descr)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).str_serial_descr) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalUsbInterface),
            "::",
            stringify!(str_serial_descr)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).cfg_descr) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(FuriHalUsbInterface),
            "::",
            stringify!(cfg_descr)
        )
    );
}
extern "C" {
    #[doc = "USB device interface modes"]
    pub static mut usb_cdc_single: FuriHalUsbInterface;
}
extern "C" {
    pub static mut usb_cdc_dual: FuriHalUsbInterface;
}
extern "C" {
    pub static mut usb_hid: FuriHalUsbInterface;
}
extern "C" {
    pub static mut usb_hid_u2f: FuriHalUsbInterface;
}
extern "C" {
    pub static mut usb_ccid: FuriHalUsbInterface;
}
extern "C" {
    #[doc = "Set USB device configuration\n\n # Arguments\n\n* `mode` - new USB device mode\n * `ctx` - context passed to device mode init function\n # Returns\n\ntrue - mode switch started, false - mode switch is locked"]
    pub fn furi_hal_usb_set_config(
        new_if: *mut FuriHalUsbInterface,
        ctx: *mut core::ffi::c_void,
    ) -> bool;
}
extern "C" {
    #[doc = "Get USB device configuration\n\n # Returns\n\ncurrent USB device mode"]
    pub fn furi_hal_usb_get_config() -> *mut FuriHalUsbInterface;
}
extern "C" {
    #[doc = "Lock USB device mode switch"]
    pub fn furi_hal_usb_lock();
}
extern "C" {
    #[doc = "Unlock USB device mode switch"]
    pub fn furi_hal_usb_unlock();
}
extern "C" {
    #[doc = "Check if USB device mode switch locked\n\n # Returns\n\nlock state"]
    pub fn furi_hal_usb_is_locked() -> bool;
}
extern "C" {
    #[doc = "Disable USB device"]
    pub fn furi_hal_usb_disable();
}
extern "C" {
    #[doc = "Enable USB device"]
    pub fn furi_hal_usb_enable();
}
extern "C" {
    #[doc = "Restart USB device"]
    pub fn furi_hal_usb_reinit();
}
pub type HidStateCallback =
    ::core::option::Option<unsafe extern "C" fn(state: bool, context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Get USB HID connection state\n\n # Returns\n\ntrue / false"]
    pub fn furi_hal_hid_is_connected() -> bool;
}
extern "C" {
    #[doc = "Get USB HID keyboard leds state\n\n # Returns\n\nleds state"]
    pub fn furi_hal_hid_get_led_state() -> u8;
}
extern "C" {
    #[doc = "Set USB HID connect/disconnect callback\n\n # Arguments\n\n* `cb` - callback\n * `ctx` - callback context"]
    pub fn furi_hal_hid_set_state_callback(cb: HidStateCallback, ctx: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Set the following key to pressed state and send HID report\n\n # Arguments\n\n* `button` - key code"]
    pub fn furi_hal_hid_kb_press(button: u16) -> bool;
}
extern "C" {
    #[doc = "Set the following key to released state and send HID report\n\n # Arguments\n\n* `button` - key code"]
    pub fn furi_hal_hid_kb_release(button: u16) -> bool;
}
extern "C" {
    #[doc = "Clear all pressed keys and send HID report\n"]
    pub fn furi_hal_hid_kb_release_all() -> bool;
}
extern "C" {
    #[doc = "Set mouse movement and send HID report\n\n # Arguments\n\n* `dx` - x coordinate delta\n * `dy` - y coordinate delta"]
    pub fn furi_hal_hid_mouse_move(dx: i8, dy: i8) -> bool;
}
extern "C" {
    #[doc = "Set mouse button to pressed state and send HID report\n\n # Arguments\n\n* `button` - key code"]
    pub fn furi_hal_hid_mouse_press(button: u8) -> bool;
}
extern "C" {
    #[doc = "Set mouse button to released state and send HID report\n\n # Arguments\n\n* `button` - key code"]
    pub fn furi_hal_hid_mouse_release(button: u8) -> bool;
}
extern "C" {
    #[doc = "Set mouse wheel position and send HID report\n\n # Arguments\n\n* `delta` - number of scroll steps"]
    pub fn furi_hal_hid_mouse_scroll(delta: i8) -> bool;
}
extern "C" {
    #[doc = "Set the following consumer key to pressed state and send HID report\n\n # Arguments\n\n* `button` - key code"]
    pub fn furi_hal_hid_consumer_key_press(button: u16) -> bool;
}
extern "C" {
    #[doc = "Set the following consumer key to released state and send HID report\n\n # Arguments\n\n* `button` - key code"]
    pub fn furi_hal_hid_consumer_key_release(button: u16) -> bool;
}
extern "C" {
    #[doc = "Clear all pressed consumer keys and send HID report\n"]
    pub fn furi_hal_hid_consumer_key_release_all() -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CcidCallbacks {
    pub icc_power_on_callback: ::core::option::Option<
        unsafe extern "C" fn(
            dataBlock: *mut u8,
            dataBlockLen: *mut u32,
            context: *mut core::ffi::c_void,
        ),
    >,
    pub xfr_datablock_callback: ::core::option::Option<
        unsafe extern "C" fn(
            pcToReaderDataBlock: *const u8,
            pcToReaderDataBlockLen: u32,
            readerToPcDataBlock: *mut u8,
            readerToPcDataBlockLen: *mut u32,
            context: *mut core::ffi::c_void,
        ),
    >,
}
#[test]
fn bindgen_test_layout_CcidCallbacks() {
    const UNINIT: ::core::mem::MaybeUninit<CcidCallbacks> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<CcidCallbacks>(),
        8usize,
        concat!("Size of: ", stringify!(CcidCallbacks))
    );
    assert_eq!(
        ::core::mem::align_of::<CcidCallbacks>(),
        4usize,
        concat!("Alignment of ", stringify!(CcidCallbacks))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).icc_power_on_callback) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(CcidCallbacks),
            "::",
            stringify!(icc_power_on_callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).xfr_datablock_callback) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(CcidCallbacks),
            "::",
            stringify!(xfr_datablock_callback)
        )
    );
}
extern "C" {
    #[doc = "Set CCID callbacks\n\n # Arguments\n\n* `cb` - CcidCallbacks instance\n * `context` - The context for callbacks"]
    pub fn furi_hal_usb_ccid_set_callbacks(cb: *mut CcidCallbacks, context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Insert Smart Card"]
    pub fn furi_hal_usb_ccid_insert_smartcard();
}
extern "C" {
    #[doc = "Remove Smart Card"]
    pub fn furi_hal_usb_ccid_remove_smartcard();
}
pub const FuriHalSerialId_FuriHalSerialIdUsart: FuriHalSerialId = 0;
pub const FuriHalSerialId_FuriHalSerialIdLpuart: FuriHalSerialId = 1;
pub const FuriHalSerialId_FuriHalSerialIdMax: FuriHalSerialId = 2;
#[doc = "UART channels"]
pub type FuriHalSerialId = core::ffi::c_uchar;
pub const FuriHalSerialDirection_FuriHalSerialDirectionTx: FuriHalSerialDirection = 0;
pub const FuriHalSerialDirection_FuriHalSerialDirectionRx: FuriHalSerialDirection = 1;
pub const FuriHalSerialDirection_FuriHalSerialDirectionMax: FuriHalSerialDirection = 2;
pub type FuriHalSerialDirection = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FuriHalSerialHandle {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Initialize Serial Control"]
    pub fn furi_hal_serial_control_init();
}
extern "C" {
    #[doc = "De-Initialize Serial Control"]
    pub fn furi_hal_serial_control_deinit();
}
extern "C" {
    #[doc = "Acquire Serial Interface Handler\n\n # Arguments\n\n* `serial_id` (direction in) - The serial transceiver identifier\n\n # Returns\n\nThe Serial Interface Handle or null if interfaces is in use"]
    pub fn furi_hal_serial_control_acquire(serial_id: FuriHalSerialId) -> *mut FuriHalSerialHandle;
}
extern "C" {
    #[doc = "Release Serial Interface Handler\n\n # Arguments\n\n* `handle` - The handle"]
    pub fn furi_hal_serial_control_release(handle: *mut FuriHalSerialHandle);
}
extern "C" {
    #[doc = "Acquire Serial Interface Handler\n\n # Arguments\n\n* `serial_id` (direction in) - The serial transceiver identifier\n\n # Returns\n\ntrue if handle is acquired by someone"]
    pub fn furi_hal_serial_control_is_busy(serial_id: FuriHalSerialId) -> bool;
}
extern "C" {
    #[doc = "Acquire Serial Interface Handler\n\n # Arguments\n\n* `serial_id` (direction in) - The serial transceiver identifier. Use FuriHalSerialIdMax to disable logging.\n * `baud_rate` (direction in) - The baud rate\n\n # Returns\n\nThe Serial Interface Handle or null if interfaces is in use"]
    pub fn furi_hal_serial_control_set_logging_config(serial_id: FuriHalSerialId, baud_rate: u32);
}
#[doc = "Expansion module detection callback type.\n\n # Arguments\n\n* `context` (direction in, out) - Pointer to the user-defined context object."]
pub type FuriHalSerialControlExpansionCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Enable expansion module detection for a given serial interface.\n\n Passing NULL as the callback parameter disables external module detection.\n\n # Arguments\n\n* `serial_id` (direction in) - Identifier of the serial interface to be used.\n * `callback` (direction in) - Pointer to the callback function to be called upon module detection.\n * `context` (direction in, out) - Pointer to the user-defined context object. Will be passed to the callback function."]
    pub fn furi_hal_serial_control_set_expansion_callback(
        serial_id: FuriHalSerialId,
        callback: FuriHalSerialControlExpansionCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Initialize Serial\n\n Configures GPIO, configures and enables transceiver.\n\n # Arguments\n\n* `handle` - Serial handle\n * `baud` - baud rate"]
    pub fn furi_hal_serial_init(handle: *mut FuriHalSerialHandle, baud: u32);
}
extern "C" {
    #[doc = "De-initialize Serial\n\n Configures GPIO to analog, clears callback and callback context, disables\n hardware\n\n # Arguments\n\n* `handle` - Serial handle"]
    pub fn furi_hal_serial_deinit(handle: *mut FuriHalSerialHandle);
}
extern "C" {
    #[doc = "Suspend operation\n\n Suspend hardware, settings and callbacks are preserved\n\n # Arguments\n\n* `handle` - Serial handle"]
    pub fn furi_hal_serial_suspend(handle: *mut FuriHalSerialHandle);
}
extern "C" {
    #[doc = "Resume operation\n\n Resumes hardware from suspended state\n\n # Arguments\n\n* `handle` - Serial handle"]
    pub fn furi_hal_serial_resume(handle: *mut FuriHalSerialHandle);
}
extern "C" {
    #[doc = "Determine whether a certain baud rate is supported\n\n # Arguments\n\n* `handle` - Serial handle\n * `baud` - baud rate to be checked\n # Returns\n\ntrue if baud rate is supported, false otherwise."]
    pub fn furi_hal_serial_is_baud_rate_supported(
        handle: *mut FuriHalSerialHandle,
        baud: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Changes baud rate\n\n # Arguments\n\n* `handle` - Serial handle\n * `baud` - baud rate"]
    pub fn furi_hal_serial_set_br(handle: *mut FuriHalSerialHandle, baud: u32);
}
extern "C" {
    #[doc = "Transmits data in semi-blocking mode\n\n Fills transmission pipe with data, returns as soon as all bytes from buffer\n are in the pipe.\n\n Real transmission will be completed later. Use\n `furi_hal_serial_tx_wait_complete` to wait for completion if you need it.\n\n # Arguments\n\n* `handle` - Serial handle\n * `buffer` - data\n * `buffer_size` - data size (in bytes)"]
    pub fn furi_hal_serial_tx(
        handle: *mut FuriHalSerialHandle,
        buffer: *const u8,
        buffer_size: usize,
    );
}
extern "C" {
    #[doc = "Wait until transmission is completed\n\n Ensures that all data has been sent.\n\n # Arguments\n\n* `handle` - Serial handle"]
    pub fn furi_hal_serial_tx_wait_complete(handle: *mut FuriHalSerialHandle);
}
#[doc = "< Data: new data available"]
pub const FuriHalSerialRxEvent_FuriHalSerialRxEventData: FuriHalSerialRxEvent = 1;
#[doc = "< Idle: bus idle detected"]
pub const FuriHalSerialRxEvent_FuriHalSerialRxEventIdle: FuriHalSerialRxEvent = 2;
#[doc = "< Framing Error: incorrect frame detected"]
pub const FuriHalSerialRxEvent_FuriHalSerialRxEventFrameError: FuriHalSerialRxEvent = 4;
#[doc = "< Noise Error: noise on the line detected"]
pub const FuriHalSerialRxEvent_FuriHalSerialRxEventNoiseError: FuriHalSerialRxEvent = 8;
#[doc = "< Overrun Error: no space for received data"]
pub const FuriHalSerialRxEvent_FuriHalSerialRxEventOverrunError: FuriHalSerialRxEvent = 16;
#[doc = "Serial RX events"]
pub type FuriHalSerialRxEvent = core::ffi::c_uchar;
#[doc = "Receive callback\n\n Callback will be called in interrupt context, ensure thread\n safety on your side.\n # Arguments\n\n* `handle` - Serial handle\n * `event` - FuriHalSerialRxEvent\n * `context` - Callback context provided earlier"]
pub type FuriHalSerialAsyncRxCallback = ::core::option::Option<
    unsafe extern "C" fn(
        handle: *mut FuriHalSerialHandle,
        event: FuriHalSerialRxEvent,
        context: *mut core::ffi::c_void,
    ),
>;
extern "C" {
    #[doc = "Start and sets Serial Receive callback\n\n Callback will be called in interrupt context, ensure thread\n safety on your side\n\n # Arguments\n\n* `handle` - Serial handle\n * `callback` - callback pointer\n * `context` - callback context\n * `report_errors` (direction in) - report RX error"]
    pub fn furi_hal_serial_async_rx_start(
        handle: *mut FuriHalSerialHandle,
        callback: FuriHalSerialAsyncRxCallback,
        context: *mut core::ffi::c_void,
        report_errors: bool,
    );
}
extern "C" {
    #[doc = "Stop Serial Receive\n\n # Arguments\n\n* `handle` - Serial handle"]
    pub fn furi_hal_serial_async_rx_stop(handle: *mut FuriHalSerialHandle);
}
extern "C" {
    #[doc = "Check if there is data available for reading\n\n This function must be called only from the callback\n FuriHalSerialAsyncRxCallback\n\n # Arguments\n\n* `handle` - Serial handle\n # Returns\n\ntrue if data is available for reading, false otherwise"]
    pub fn furi_hal_serial_async_rx_available(handle: *mut FuriHalSerialHandle) -> bool;
}
extern "C" {
    #[doc = "Get data Serial receive\n\n This function must be called only from the callback\n FuriHalSerialAsyncRxCallback\n\n # Arguments\n\n* `handle` - Serial handle\n\n # Returns\n\ndata"]
    pub fn furi_hal_serial_async_rx(handle: *mut FuriHalSerialHandle) -> u8;
}
#[doc = "Receive DMA callback\n\n DMA Callback will be called in interrupt context, ensure thread\n safety on your side.\n\n # Arguments\n\n* `handle` - Serial handle\n * `event` - FuriHalSerialDmaRxEvent\n * `data_len` - Received data\n * `context` - Callback context provided earlier"]
pub type FuriHalSerialDmaRxCallback = ::core::option::Option<
    unsafe extern "C" fn(
        handle: *mut FuriHalSerialHandle,
        event: FuriHalSerialRxEvent,
        data_len: usize,
        context: *mut core::ffi::c_void,
    ),
>;
extern "C" {
    #[doc = "Enable an input/output directon\n\n Takes over the respective pin by reconfiguring it to\n the appropriate alternative function.\n\n # Arguments\n\n* `handle` - Serial handle\n * `direction` - Direction to enable"]
    pub fn furi_hal_serial_enable_direction(
        handle: *mut FuriHalSerialHandle,
        direction: FuriHalSerialDirection,
    );
}
extern "C" {
    #[doc = "Disable an input/output directon\n\n Releases the respective pin by reconfiguring it to\n initial state, making possible its use for other purposes.\n\n # Arguments\n\n* `handle` - Serial handle\n * `direction` - Direction to disable"]
    pub fn furi_hal_serial_disable_direction(
        handle: *mut FuriHalSerialHandle,
        direction: FuriHalSerialDirection,
    );
}
extern "C" {
    #[doc = "Get the GPIO pin associated with a serial\n\n # Arguments\n\n* `handle` - Serial handle\n * `direction` - Direction to query\n # Returns\n\npointer to the respective pin instance"]
    pub fn furi_hal_serial_get_gpio_pin(
        handle: *mut FuriHalSerialHandle,
        direction: FuriHalSerialDirection,
    ) -> *const GpioPin;
}
extern "C" {
    #[doc = "Start and sets Serial event callback receive DMA\n\n # Arguments\n\n* `handle` - Serial handle\n * `callback` - callback pointer\n * `context` - callback context\n * `report_errors` (direction in) - report RX error"]
    pub fn furi_hal_serial_dma_rx_start(
        handle: *mut FuriHalSerialHandle,
        callback: FuriHalSerialDmaRxCallback,
        context: *mut core::ffi::c_void,
        report_errors: bool,
    );
}
extern "C" {
    #[doc = "Stop Serial receive DMA\n\n # Arguments\n\n* `handle` - Serial handle"]
    pub fn furi_hal_serial_dma_rx_stop(handle: *mut FuriHalSerialHandle);
}
extern "C" {
    #[doc = "Get data Serial receive DMA\n\n This function must be called only from the callback\n FuriHalSerialDmaRxCallback\n\n # Arguments\n\n* `handle` - Serial handle\n * `data` - pointer to data buffer\n * `len` - get data size (in bytes)\n\n # Returns\n\nsize actual data receive (in bytes)"]
    pub fn furi_hal_serial_dma_rx(
        handle: *mut FuriHalSerialHandle,
        data: *mut u8,
        len: usize,
    ) -> usize;
}
extern "C" {
    pub fn furi_hal_info_get_api_version(major: *mut u16, minor: *mut u16);
}
extern "C" {
    #[doc = "Get device information\n\n # Arguments\n\n* `callback` (direction in) - callback to provide with new data\n * `sep` (direction in) - category separator character\n * `context` (direction in) - context to pass to callback"]
    pub fn furi_hal_info_get(
        callback: PropertyValueCallback,
        sep: core::ffi::c_char,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Initialize random subsystem"]
    pub fn furi_hal_random_init();
}
extern "C" {
    #[doc = "Get random value\n furi_hal_random_get() gives up to FURI_HAL_RANDOM_MAX\n rand() and random() give up to RAND_MAX\n\n # Returns\n\n32 bit random value (up to FURI_HAL_RANDOM_MAX)"]
    pub fn furi_hal_random_get() -> u32;
}
extern "C" {
    #[doc = "Fill buffer with random data\n\n # Arguments\n\n* `buf` - buffer pointer\n * `data` - buffer len"]
    pub fn furi_hal_random_fill_buf(buf: *mut u8, len: u32);
}
#[doc = "< default configuration"]
pub const FuriHalSubGhzPreset_FuriHalSubGhzPresetIDLE: FuriHalSubGhzPreset = 0;
#[doc = "< OOK, bandwidth 270kHz, asynchronous"]
pub const FuriHalSubGhzPreset_FuriHalSubGhzPresetOok270Async: FuriHalSubGhzPreset = 1;
#[doc = "< OOK, bandwidth 650kHz, asynchronous"]
pub const FuriHalSubGhzPreset_FuriHalSubGhzPresetOok650Async: FuriHalSubGhzPreset = 2;
#[doc = "< FM, deviation 2.380371 kHz, asynchronous"]
pub const FuriHalSubGhzPreset_FuriHalSubGhzPreset2FSKDev238Async: FuriHalSubGhzPreset = 3;
#[doc = "< FM, deviation 47.60742 kHz, asynchronous"]
pub const FuriHalSubGhzPreset_FuriHalSubGhzPreset2FSKDev476Async: FuriHalSubGhzPreset = 4;
#[doc = "< MSK, deviation 47.60742 kHz, 99.97Kb/s, asynchronous"]
pub const FuriHalSubGhzPreset_FuriHalSubGhzPresetMSK99_97KbAsync: FuriHalSubGhzPreset = 5;
#[doc = "< GFSK, deviation 19.042969 kHz, 9.996Kb/s, asynchronous"]
pub const FuriHalSubGhzPreset_FuriHalSubGhzPresetGFSK9_99KbAsync: FuriHalSubGhzPreset = 6;
pub const FuriHalSubGhzPreset_FuriHalSubGhzPresetCustom: FuriHalSubGhzPreset = 7;
#[doc = "Radio Presets"]
pub type FuriHalSubGhzPreset = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LevelDuration {
    pub _bitfield_align_1: [u32; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
}
#[test]
fn bindgen_test_layout_LevelDuration() {
    assert_eq!(
        ::core::mem::size_of::<LevelDuration>(),
        4usize,
        concat!("Size of: ", stringify!(LevelDuration))
    );
    assert_eq!(
        ::core::mem::align_of::<LevelDuration>(),
        4usize,
        concat!("Alignment of ", stringify!(LevelDuration))
    );
}
impl LevelDuration {
    #[inline]
    pub fn duration(&self) -> u32 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 30u8) as u32) }
    }
    #[inline]
    pub fn set_duration(&mut self, val: u32) {
        unsafe {
            let val: u32 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 30u8, val as u64)
        }
    }
    #[inline]
    pub fn level(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 2u8) as u8) }
    }
    #[inline]
    pub fn set_level(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(30usize, 2u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(duration: u32, level: u8) -> __BindgenBitfieldUnit<[u8; 4usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 30u8, {
            let duration: u32 = unsafe { ::core::mem::transmute(duration) };
            duration as u64
        });
        __bindgen_bitfield_unit.set(30usize, 2u8, {
            let level: u8 = unsafe { ::core::mem::transmute(level) };
            level as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "< Isolate Radio from antenna"]
pub const FuriHalSubGhzPath_FuriHalSubGhzPathIsolate: FuriHalSubGhzPath = 0;
#[doc = "< Center Frequency: 433MHz. Path 1: SW1RF1-SW2RF2, LCLCL"]
pub const FuriHalSubGhzPath_FuriHalSubGhzPath433: FuriHalSubGhzPath = 1;
#[doc = "< Center Frequency: 315MHz. Path 2: SW1RF2-SW2RF1, LCLCLCL"]
pub const FuriHalSubGhzPath_FuriHalSubGhzPath315: FuriHalSubGhzPath = 2;
#[doc = "< Center Frequency: 868MHz. Path 3: SW1RF3-SW2RF3, LCLC"]
pub const FuriHalSubGhzPath_FuriHalSubGhzPath868: FuriHalSubGhzPath = 3;
#[doc = "Switchable Radio Paths"]
pub type FuriHalSubGhzPath = core::ffi::c_uchar;
extern "C" {
    pub fn furi_hal_subghz_set_async_mirror_pin(pin: *const GpioPin);
}
extern "C" {
    #[doc = "Get data GPIO\n\n # Returns\n\npointer to the gpio pin structure"]
    pub fn furi_hal_subghz_get_data_gpio() -> *const GpioPin;
}
extern "C" {
    #[doc = "Send device to sleep mode"]
    pub fn furi_hal_subghz_sleep();
}
extern "C" {
    #[doc = "Load custom registers from preset\n\n # Arguments\n\n* `preset_data` - registers to load"]
    pub fn furi_hal_subghz_load_custom_preset(preset_data: *const u8);
}
extern "C" {
    #[doc = "Load registers\n\n # Arguments\n\n* `data` - Registers data"]
    pub fn furi_hal_subghz_load_registers(data: *const u8);
}
extern "C" {
    #[doc = "Load PATABLE\n\n # Arguments\n\n* `data` - 8 uint8_t values"]
    pub fn furi_hal_subghz_load_patable(data: *const u8);
}
extern "C" {
    #[doc = "Write packet to FIFO\n\n # Arguments\n\n* `data` - bytes array\n * `size` - size"]
    pub fn furi_hal_subghz_write_packet(data: *const u8, size: u8);
}
extern "C" {
    #[doc = "Check if receive pipe is not empty\n\n # Returns\n\ntrue if not empty"]
    pub fn furi_hal_subghz_rx_pipe_not_empty() -> bool;
}
extern "C" {
    #[doc = "Check if received data crc is valid\n\n # Returns\n\ntrue if valid"]
    pub fn furi_hal_subghz_is_rx_data_crc_valid() -> bool;
}
extern "C" {
    #[doc = "Read packet from FIFO\n\n # Arguments\n\n* `data` - pointer\n * `size` - size"]
    pub fn furi_hal_subghz_read_packet(data: *mut u8, size: *mut u8);
}
extern "C" {
    #[doc = "Flush rx FIFO buffer"]
    pub fn furi_hal_subghz_flush_rx();
}
extern "C" {
    #[doc = "Flush tx FIFO buffer"]
    pub fn furi_hal_subghz_flush_tx();
}
extern "C" {
    #[doc = "Shutdown Issue SPWD command\n registers content will be lost"]
    pub fn furi_hal_subghz_shutdown();
}
extern "C" {
    #[doc = "Reset Issue reset command\n registers content will be lost"]
    pub fn furi_hal_subghz_reset();
}
extern "C" {
    #[doc = "Switch to Idle"]
    pub fn furi_hal_subghz_idle();
}
extern "C" {
    #[doc = "Switch to Receive"]
    pub fn furi_hal_subghz_rx();
}
extern "C" {
    #[doc = "Switch to Transmit\n\n # Returns\n\ntrue if the transfer is allowed by belonging to the region"]
    pub fn furi_hal_subghz_tx() -> bool;
}
extern "C" {
    #[doc = "Get RSSI value in dBm\n\n # Returns\n\nRSSI value"]
    pub fn furi_hal_subghz_get_rssi() -> f32;
}
extern "C" {
    #[doc = "Get LQI\n\n # Returns\n\nLQI value"]
    pub fn furi_hal_subghz_get_lqi() -> u8;
}
extern "C" {
    #[doc = "Check if frequency is in valid range\n\n # Arguments\n\n* `value` - frequency in Hz\n\n # Returns\n\ntrue if frequency is valid, otherwise false"]
    pub fn furi_hal_subghz_is_frequency_valid(value: u32) -> bool;
}
extern "C" {
    #[doc = "Set frequency and path This function automatically selects antenna matching\n network\n\n # Arguments\n\n* `value` - frequency in Hz\n\n # Returns\n\nreal frequency in Hz"]
    pub fn furi_hal_subghz_set_frequency_and_path(value: u32) -> u32;
}
extern "C" {
    #[doc = "Set frequency\n\n # Arguments\n\n* `value` - frequency in Hz\n\n # Returns\n\nreal frequency in Hz"]
    pub fn furi_hal_subghz_set_frequency(value: u32) -> u32;
}
extern "C" {
    #[doc = "Set path\n\n # Arguments\n\n* `path` - path to use"]
    pub fn furi_hal_subghz_set_path(path: FuriHalSubGhzPath);
}
#[doc = "Signal Timings Capture callback"]
pub type FuriHalSubGhzCaptureCallback = ::core::option::Option<
    unsafe extern "C" fn(level: bool, duration: u32, context: *mut core::ffi::c_void),
>;
extern "C" {
    #[doc = "Enable signal timings capture Initializes GPIO and TIM2 for timings capture\n\n # Arguments\n\n* `callback` - FuriHalSubGhzCaptureCallback\n * `context` - callback context"]
    pub fn furi_hal_subghz_start_async_rx(
        callback: FuriHalSubGhzCaptureCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Disable signal timings capture Resets GPIO and TIM2"]
    pub fn furi_hal_subghz_stop_async_rx();
}
#[doc = "Async TX callback type\n # Arguments\n\n* `context` - callback context\n # Returns\n\nLevelDuration"]
pub type FuriHalSubGhzAsyncTxCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void) -> LevelDuration>;
extern "C" {
    #[doc = "Start async TX Initializes GPIO, TIM2 and DMA1 for signal output\n\n # Arguments\n\n* `callback` - FuriHalSubGhzAsyncTxCallback\n * `context` - callback context\n\n # Returns\n\ntrue if the transfer is allowed by belonging to the region"]
    pub fn furi_hal_subghz_start_async_tx(
        callback: FuriHalSubGhzAsyncTxCallback,
        context: *mut core::ffi::c_void,
    ) -> bool;
}
extern "C" {
    #[doc = "Wait for async transmission to complete\n\n # Returns\n\ntrue if TX complete"]
    pub fn furi_hal_subghz_is_async_tx_complete() -> bool;
}
extern "C" {
    #[doc = "Stop async transmission and cleanup resources Resets GPIO, TIM2, and DMA1"]
    pub fn furi_hal_subghz_stop_async_tx();
}
pub type FuriHalIbuttonEmulateCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Start emulation timer\n # Arguments\n\n* `period` - timer period\n * `callback` - timer callback\n * `context` - callback context"]
    pub fn furi_hal_ibutton_emulate_start(
        period: u32,
        callback: FuriHalIbuttonEmulateCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Update emulation timer period\n # Arguments\n\n* `period` - new timer period"]
    pub fn furi_hal_ibutton_emulate_set_next(period: u32);
}
extern "C" {
    #[doc = "Stop emulation timer"]
    pub fn furi_hal_ibutton_emulate_stop();
}
extern "C" {
    #[doc = "Set the pin to normal mode (open collector), and sets it to float"]
    pub fn furi_hal_ibutton_pin_configure();
}
extern "C" {
    #[doc = "Sets the pin to analog mode, and sets it to float"]
    pub fn furi_hal_ibutton_pin_reset();
}
extern "C" {
    #[doc = "iButton write pin\n # Arguments\n\n* `state` - true / false"]
    pub fn furi_hal_ibutton_pin_write(state: bool);
}
extern "C" {
    #[doc = "Config rfid pins to reset state"]
    pub fn furi_hal_rfid_pins_reset();
}
extern "C" {
    #[doc = "Release rfid pull pin"]
    pub fn furi_hal_rfid_pin_pull_release();
}
extern "C" {
    #[doc = "Pulldown rfid pull pin"]
    pub fn furi_hal_rfid_pin_pull_pulldown();
}
extern "C" {
    #[doc = "Start read timer\n # Arguments\n\n* `freq` - timer frequency\n * `duty_cycle` - timer duty cycle, 0.0-1.0"]
    pub fn furi_hal_rfid_tim_read_start(freq: f32, duty_cycle: f32);
}
extern "C" {
    #[doc = "Pause read timer, to be able to continue later"]
    pub fn furi_hal_rfid_tim_read_pause();
}
extern "C" {
    #[doc = "Continue read timer"]
    pub fn furi_hal_rfid_tim_read_continue();
}
extern "C" {
    #[doc = "Stop read timer"]
    pub fn furi_hal_rfid_tim_read_stop();
}
pub type FuriHalRfidReadCaptureCallback = ::core::option::Option<
    unsafe extern "C" fn(level: bool, duration: u32, context: *mut core::ffi::c_void),
>;
extern "C" {
    pub fn furi_hal_rfid_tim_read_capture_start(
        callback: FuriHalRfidReadCaptureCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn furi_hal_rfid_tim_read_capture_stop();
}
pub type FuriHalRfidDMACallback =
    ::core::option::Option<unsafe extern "C" fn(half: bool, context: *mut core::ffi::c_void)>;
extern "C" {
    pub fn furi_hal_rfid_tim_emulate_dma_start(
        duration: *mut u32,
        pulse: *mut u32,
        length: usize,
        callback: FuriHalRfidDMACallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn furi_hal_rfid_tim_emulate_dma_stop();
}
extern "C" {
    #[doc = "Set read timer period\n\n # Arguments\n\n* `period` - overall duration"]
    pub fn furi_hal_rfid_set_read_period(period: u32);
}
extern "C" {
    #[doc = "Set read timer pulse\n\n # Arguments\n\n* `pulse` - duration of high level"]
    pub fn furi_hal_rfid_set_read_pulse(pulse: u32);
}
extern "C" {
    #[doc = "Start/Enable comparator"]
    pub fn furi_hal_rfid_comp_start();
}
extern "C" {
    #[doc = "Stop/Disable comparator"]
    pub fn furi_hal_rfid_comp_stop();
}
pub type FuriHalRfidCompCallback =
    ::core::option::Option<unsafe extern "C" fn(level: bool, context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Set comparator callback"]
    pub fn furi_hal_rfid_comp_set_callback(
        callback: FuriHalRfidCompCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Start/Enable Field Presence detect"]
    pub fn furi_hal_rfid_field_detect_start();
}
extern "C" {
    #[doc = "Stop/Disable Field Presence detect"]
    pub fn furi_hal_rfid_field_detect_stop();
}
extern "C" {
    #[doc = "Check Field Presence\n\n # Arguments\n\n* `frequency` (direction out) - pointer to frequency value to be set if filed detected\n\n # Returns\n\ntrue if field is present, false if not"]
    pub fn furi_hal_rfid_field_is_present(frequency: *mut u32) -> bool;
}
#[doc = "< Oscillator has been started."]
pub const FuriHalNfcEvent_FuriHalNfcEventOscOn: FuriHalNfcEvent = 1;
#[doc = "< External field (carrier) has been detected."]
pub const FuriHalNfcEvent_FuriHalNfcEventFieldOn: FuriHalNfcEvent = 2;
#[doc = "< External field (carrier) has been lost."]
pub const FuriHalNfcEvent_FuriHalNfcEventFieldOff: FuriHalNfcEvent = 4;
#[doc = "< Reader has issued a wake-up command."]
pub const FuriHalNfcEvent_FuriHalNfcEventListenerActive: FuriHalNfcEvent = 8;
#[doc = "< Transmission has started."]
pub const FuriHalNfcEvent_FuriHalNfcEventTxStart: FuriHalNfcEvent = 16;
#[doc = "< Transmission has ended."]
pub const FuriHalNfcEvent_FuriHalNfcEventTxEnd: FuriHalNfcEvent = 32;
#[doc = "< Reception has started."]
pub const FuriHalNfcEvent_FuriHalNfcEventRxStart: FuriHalNfcEvent = 64;
#[doc = "< Reception has ended."]
pub const FuriHalNfcEvent_FuriHalNfcEventRxEnd: FuriHalNfcEvent = 128;
#[doc = "< A collision has occurred."]
pub const FuriHalNfcEvent_FuriHalNfcEventCollision: FuriHalNfcEvent = 256;
#[doc = "< Frame wait timer has expired."]
pub const FuriHalNfcEvent_FuriHalNfcEventTimerFwtExpired: FuriHalNfcEvent = 512;
#[doc = "< Transmission block timer has expired."]
pub const FuriHalNfcEvent_FuriHalNfcEventTimerBlockTxExpired: FuriHalNfcEvent = 1024;
pub const FuriHalNfcEvent_FuriHalNfcEventTimeout: FuriHalNfcEvent = 2048;
pub const FuriHalNfcEvent_FuriHalNfcEventAbortRequest: FuriHalNfcEvent = 4096;
#[doc = "Enumeration of possible NFC HAL events."]
pub type FuriHalNfcEvent = core::ffi::c_ushort;
#[doc = "< No error has occurred."]
pub const FuriHalNfcError_FuriHalNfcErrorNone: FuriHalNfcError = 0;
#[doc = "< The communication bus is busy."]
pub const FuriHalNfcError_FuriHalNfcErrorBusy: FuriHalNfcError = 1;
#[doc = "< NFC hardware did not respond or responded unexpectedly."]
pub const FuriHalNfcError_FuriHalNfcErrorCommunication: FuriHalNfcError = 2;
#[doc = "< Oscillator failed to start."]
pub const FuriHalNfcError_FuriHalNfcErrorOscillator: FuriHalNfcError = 3;
#[doc = "< NFC hardware did not respond in time."]
pub const FuriHalNfcError_FuriHalNfcErrorCommunicationTimeout: FuriHalNfcError = 4;
#[doc = "< Receive buffer was too small for the received data."]
pub const FuriHalNfcError_FuriHalNfcErrorBufferOverflow: FuriHalNfcError = 5;
#[doc = "< Not enough data was received to parse a valid frame."]
pub const FuriHalNfcError_FuriHalNfcErrorIncompleteFrame: FuriHalNfcError = 6;
#[doc = "< Cannot parse a frame due to unexpected/invalid data."]
pub const FuriHalNfcError_FuriHalNfcErrorDataFormat: FuriHalNfcError = 7;
#[doc = "Enumeration of possible NFC HAL errors."]
pub type FuriHalNfcError = core::ffi::c_uchar;
#[doc = "< Configure NFC HAL to operate as a poller."]
pub const FuriHalNfcMode_FuriHalNfcModePoller: FuriHalNfcMode = 0;
#[doc = "< Configure NFC HAL to operate as a listener."]
pub const FuriHalNfcMode_FuriHalNfcModeListener: FuriHalNfcMode = 1;
#[doc = "< Special value equal to the operating modes count. Internal use."]
pub const FuriHalNfcMode_FuriHalNfcModeNum: FuriHalNfcMode = 2;
#[doc = "Enumeration of possible NFC HAL operating modes."]
pub type FuriHalNfcMode = core::ffi::c_uchar;
#[doc = "< Configure NFC HAL to use the ISO14443 (type A) technology."]
pub const FuriHalNfcTech_FuriHalNfcTechIso14443a: FuriHalNfcTech = 0;
#[doc = "< Configure NFC HAL to use the ISO14443 (type B) technology."]
pub const FuriHalNfcTech_FuriHalNfcTechIso14443b: FuriHalNfcTech = 1;
#[doc = "< Configure NFC HAL to use the ISO15693 technology."]
pub const FuriHalNfcTech_FuriHalNfcTechIso15693: FuriHalNfcTech = 2;
#[doc = "< Configure NFC HAL to use the FeliCa technology."]
pub const FuriHalNfcTech_FuriHalNfcTechFelica: FuriHalNfcTech = 3;
#[doc = "< Special value equal to the supported technologies count. Internal use."]
pub const FuriHalNfcTech_FuriHalNfcTechNum: FuriHalNfcTech = 4;
#[doc = "< Special value indicating the unconfigured state. Internal use."]
pub const FuriHalNfcTech_FuriHalNfcTechInvalid: FuriHalNfcTech = 5;
#[doc = "Enumeration of supported NFC technologies."]
pub type FuriHalNfcTech = core::ffi::c_uchar;
extern "C" {
    #[doc = "Initialise the NFC HAL and associated hardware.\n\n This function is called automatically during the firmware initialisation,\n so there is no need to call it explicitly.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_init() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Check whether the NFC HAL was properly initialised and is ready.\n\n # Returns\n\nFuriHalNfcErrorNone if ready, any other error code if not ready."]
    pub fn furi_hal_nfc_is_hal_ready() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Exclusively take over the NFC HAL and associated hardware.\n\n This function needs to be called whenever an interaction with the NFC HAL\n is to take place (usually once upon the application start).\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_acquire() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Release the exclusive lock and make the NFC HAL available for others.\n\n This function needs to be called when the user code is done working\n with the NFC HAL (usually once upon application exit). It must be called\n from the same thread that has called furi_hal_nfc_acquire().\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_release() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Configure the NFC hardware to enter the low-power mode.\n\n This function must be called each time when the user code is done working\n with the NFC HAL for the time being (e.g. waiting on user input).\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_low_power_mode_start() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Configure the NFC hardware to exit the low-power mode.\n\n This function must be called each time when the user code begins working\n with the NFC HAL, as the default state is low-power mode.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_low_power_mode_stop() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Configure the NFC HAL to work in a particular mode.\n\n Not all technologies implement the listener operating mode.\n\n # Arguments\n\n* `mode` (direction in) - required operating mode.\n * `tech` (direction in) - required technology configuration.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_set_mode(mode: FuriHalNfcMode, tech: FuriHalNfcTech) -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Reset the NFC HAL to its default (unconfigured) state.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_reset_mode() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Enable field (carrier) detection by the NFC hardware.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_field_detect_start() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Disable field (carrier) detection by the NFC hardware.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_field_detect_stop() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Check if the reader field (carrier) was detected by the NFC hardware.\n\n # Returns\n\ntrue if the field was detected, false otherwise."]
    pub fn furi_hal_nfc_field_is_present() -> bool;
}
extern "C" {
    #[doc = "Enable field (carrier) generation by the NFC hardware.\n\n No carrier modulation will occur unless a transmission is explicitly started.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_poller_field_on() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Wait for an NFC HAL event in poller mode.\n\n # Arguments\n\n* `timeout_ms` (direction in) - time to wait (timeout) in milliseconds.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_poller_wait_event(timeout_ms: u32) -> FuriHalNfcEvent;
}
extern "C" {
    #[doc = "Wait for an NFC HAL event in listener mode.\n # Arguments\n\n* `timeout_ms` (direction in) - time to wait (timeout) in milliseconds.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_listener_wait_event(timeout_ms: u32) -> FuriHalNfcEvent;
}
extern "C" {
    #[doc = "Transmit data in poller mode.\n\n # Arguments\n\n* `tx_data` (direction in) - pointer to a byte array containing the data to be transmitted.\n * `tx_bits` (direction in) - transmit data size, in bits.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_poller_tx(tx_data: *const u8, tx_bits: usize) -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Receive data in poller mode.\n\n The receive buffer must be big enough to accomodate all of the expected data.\n\n # Arguments\n\n* `rx_data` (direction out) - pointer to a byte array to be filled with received data.\n * `rx_data_size` (direction in) - maximum received data size, in bytes.\n * `rx_bits` (direction out) - pointer to the variable to hold received data size, in bits.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_poller_rx(
        rx_data: *mut u8,
        rx_data_size: usize,
        rx_bits: *mut usize,
    ) -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Transmit data in listener mode.\n\n # Arguments\n\n* `tx_data` (direction in) - pointer to a byte array containing the data to be transmitted.\n * `tx_bits` (direction in) - transmit data size, in bits.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_listener_tx(tx_data: *const u8, tx_bits: usize) -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Receive data in listener mode.\n\n The receive buffer must be big enough to accomodate all of the expected data.\n\n # Arguments\n\n* `rx_data` (direction out) - pointer to a byte array to be filled with received data.\n * `rx_data_size` (direction in) - maximum received data size, in bytes.\n * `rx_bits` (direction out) - pointer to the variable to hold received data size, in bits.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_listener_rx(
        rx_data: *mut u8,
        rx_data_size: usize,
        rx_bits: *mut usize,
    ) -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Go to sleep in listener mode.\n\n Puts the passive target logic into Sleep (Halt) state.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_listener_sleep() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Go to idle in listener mode.\n\n Puts the passive target logic into Sense (Idle) state.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_listener_idle() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Enable reception in listener mode.\n\n Starts hardware receivers and receive decoders.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_listener_enable_rx() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Reset communication.\n\n Resets the communication state and stops all activities: transmission, reception, etc.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_trx_reset() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Enable generation of NFC HAL events.\n\n This function must be called from the same thread from which\n the the furi_hal_nfc_*_wait_event() calls will be made.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_event_start() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Disable generation of NFC HAL events.\n\n Unlike furi_hal_nfc_event_start(), this function may be called from any thread.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_event_stop() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Manually emit the FuriHalNfcEventAbortRequest event.\n\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_abort() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Start frame wait timeout timer.\n\n # Arguments\n\n* `time_fc` (direction in) - time to wait, in carrier cycles."]
    pub fn furi_hal_nfc_timer_fwt_start(time_fc: u32);
}
extern "C" {
    #[doc = "Stop frame wait timeout timer."]
    pub fn furi_hal_nfc_timer_fwt_stop();
}
extern "C" {
    #[doc = "Start block transmit (frame delay) timer.\n\n # Arguments\n\n* `time_fc` (direction in) - time to wait, in carrier cycles."]
    pub fn furi_hal_nfc_timer_block_tx_start(time_fc: u32);
}
extern "C" {
    #[doc = "Start block transmit (frame delay) timer.\n\n # Arguments\n\n* `time_us` (direction in) - time to wait, in microseconds."]
    pub fn furi_hal_nfc_timer_block_tx_start_us(time_us: u32);
}
extern "C" {
    #[doc = "Stop block transmit (frame delay) timer."]
    pub fn furi_hal_nfc_timer_block_tx_stop();
}
extern "C" {
    #[doc = "Check whether block transmit (frame delay) timer is running.\n\n # Returns\n\ntrue if timer is running, false otherwise."]
    pub fn furi_hal_nfc_timer_block_tx_is_running() -> bool;
}
pub const FuriHalNfcaShortFrame_FuriHalNfcaShortFrameAllReq: FuriHalNfcaShortFrame = 0;
pub const FuriHalNfcaShortFrame_FuriHalNfcaShortFrameSensReq: FuriHalNfcaShortFrame = 1;
#[doc = "Enumeration of ISO14443 (Type A) short frame types."]
pub type FuriHalNfcaShortFrame = core::ffi::c_uchar;
extern "C" {
    #[doc = "Transmit ISO14443 (Type A) short frame in poller mode.\n\n # Arguments\n\n* `frame` (direction in) - short frame type to be transmitted.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_iso14443a_poller_trx_short_frame(
        frame: FuriHalNfcaShortFrame,
    ) -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Transmit ISO14443 (Type A) SDD frame in poller mode.\n\n # Arguments\n\n* `tx_data` (direction in) - pointer to a byte array containing the data to be transmitted.\n * `tx_bits` (direction in) - transmit data size, in bits.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_iso14443a_tx_sdd_frame(
        tx_data: *const u8,
        tx_bits: usize,
    ) -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Receive ISO14443 (Type A) SDD frame in poller mode.\n\n The receive buffer must be big enough to accomodate all of the expected data.\n\n # Arguments\n\n* `rx_data` (direction in) - pointer to a byte array to be filled with received data.\n * `rx_data_size` (direction in) - maximum received data size, in bytes.\n * `rx_bits` (direction in) - pointer to the variable to hold received data size, in bits.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_iso14443a_rx_sdd_frame(
        rx_data: *mut u8,
        rx_data_size: usize,
        rx_bits: *mut usize,
    ) -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Transmit ISO14443 (Type A) frame with custom parity bits in poller mode.\n\n Same as furi_hal_nfc_poller_tx(), but uses the parity bits provided\n by the user code instead of calculating them automatically.\n\n # Arguments\n\n* `tx_data` (direction in) - pointer to a byte array containing the data to be transmitted.\n * `tx_bits` (direction in) - transmit data size, in bits.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_iso14443a_poller_tx_custom_parity(
        tx_data: *const u8,
        tx_bits: usize,
    ) -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Set ISO14443 (Type A) collision resolution parameters in listener mode.\n\n Configures the NFC hardware for automatic collision resolution.\n\n # Arguments\n\n* `uid` (direction in) - pointer to a byte array containing the UID.\n * `uid_len` (direction in) - UID length in bytes (must be supported by the protocol).\n * `atqa` (direction in) - ATQA byte value.\n * `sak` (direction in) - SAK byte value.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_iso14443a_listener_set_col_res_data(
        uid: *mut u8,
        uid_len: u8,
        atqa: *mut u8,
        sak: u8,
    ) -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Transmit ISO14443 (Type A) frame with custom parity bits in listener mode.\n\n # Arguments\n\n* `tx_data` (direction in) - pointer to a byte array containing the data to be transmitted.\n * `tx_parity` (direction in) - pointer to a (bit-packed) byte array containing the parity to be transmitted.\n * `tx_bits` (direction in) - transmit data size, in bits.\n # Returns\n\nFuriHalNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_iso14443a_listener_tx_custom_parity(
        tx_data: *const u8,
        tx_parity: *const u8,
        tx_bits: usize,
    ) -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Send ISO15693 SOF in listener mode\n\n # Returns\n\nFuriHalNfcError"]
    pub fn furi_hal_nfc_iso15693_listener_tx_sof() -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Set FeliCa collision resolution parameters in listener mode.\n\n Configures the NFC hardware for automatic collision resolution.\n\n # Arguments\n\n* `idm` (direction in) - pointer to a byte array containing the IDm.\n * `idm_len` (direction in) - IDm length in bytes.\n * `pmm` (direction in) - pointer to a byte array containing the PMm.\n * `pmm_len` (direction in) - PMm length in bytes.\n * `sys_code` (direction in) - System code from SYS_C block\n # Returns\n\nNfcErrorNone on success, any other error code on failure."]
    pub fn furi_hal_nfc_felica_listener_set_sensf_res_data(
        idm: *const u8,
        idm_len: u8,
        pmm: *const u8,
        pmm_len: u8,
        sys_code: u16,
    ) -> FuriHalNfcError;
}
extern "C" {
    #[doc = "Jump to the void*\n\n Allow your code to transfer control to another firmware.\n\n This code doesn't reset system before jump. Call it only from\n main thread, no kernel should be running. Ensure that no\n peripheral blocks active and no interrupts are pending.\n\n # Arguments\n\n* `address` - The System Vector address(start of your new firmware)"]
    pub fn furi_hal_switch(address: *mut core::ffi::c_void);
}
pub type Elf32_Addr = u32;
#[doc = "Interface for ELF loader to resolve symbols"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ElfApiInterface {
    pub api_version_major: u16,
    pub api_version_minor: u16,
    pub resolver_callback: ::core::option::Option<
        unsafe extern "C" fn(
            interface: *const ElfApiInterface,
            hash: u32,
            address: *mut Elf32_Addr,
        ) -> bool,
    >,
}
#[test]
fn bindgen_test_layout_ElfApiInterface() {
    const UNINIT: ::core::mem::MaybeUninit<ElfApiInterface> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<ElfApiInterface>(),
        8usize,
        concat!("Size of: ", stringify!(ElfApiInterface))
    );
    assert_eq!(
        ::core::mem::align_of::<ElfApiInterface>(),
        4usize,
        concat!("Alignment of ", stringify!(ElfApiInterface))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).api_version_major) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ElfApiInterface),
            "::",
            stringify!(api_version_major)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).api_version_minor) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ElfApiInterface),
            "::",
            stringify!(api_version_minor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).resolver_callback) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ElfApiInterface),
            "::",
            stringify!(resolver_callback)
        )
    );
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct FlipperApplicationManifestBase {
    pub manifest_magic: u32,
    pub manifest_version: u32,
    pub api_version: FlipperApplicationManifestBase__bindgen_ty_1,
    pub hardware_target_id: u16,
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub union FlipperApplicationManifestBase__bindgen_ty_1 {
    pub __bindgen_anon_1: FlipperApplicationManifestBase__bindgen_ty_1__bindgen_ty_1,
    pub version: u32,
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct FlipperApplicationManifestBase__bindgen_ty_1__bindgen_ty_1 {
    pub minor: u16,
    pub major: u16,
}
#[test]
fn bindgen_test_layout_FlipperApplicationManifestBase__bindgen_ty_1__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<
        FlipperApplicationManifestBase__bindgen_ty_1__bindgen_ty_1,
    > = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FlipperApplicationManifestBase__bindgen_ty_1__bindgen_ty_1>(),
        4usize,
        concat!(
            "Size of: ",
            stringify!(FlipperApplicationManifestBase__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<FlipperApplicationManifestBase__bindgen_ty_1__bindgen_ty_1>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(FlipperApplicationManifestBase__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).minor) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestBase__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(minor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).major) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestBase__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(major)
        )
    );
}
#[test]
fn bindgen_test_layout_FlipperApplicationManifestBase__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<FlipperApplicationManifestBase__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FlipperApplicationManifestBase__bindgen_ty_1>(),
        4usize,
        concat!(
            "Size of: ",
            stringify!(FlipperApplicationManifestBase__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<FlipperApplicationManifestBase__bindgen_ty_1>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(FlipperApplicationManifestBase__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).version) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestBase__bindgen_ty_1),
            "::",
            stringify!(version)
        )
    );
}
#[test]
fn bindgen_test_layout_FlipperApplicationManifestBase() {
    const UNINIT: ::core::mem::MaybeUninit<FlipperApplicationManifestBase> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FlipperApplicationManifestBase>(),
        14usize,
        concat!("Size of: ", stringify!(FlipperApplicationManifestBase))
    );
    assert_eq!(
        ::core::mem::align_of::<FlipperApplicationManifestBase>(),
        1usize,
        concat!("Alignment of ", stringify!(FlipperApplicationManifestBase))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).manifest_magic) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestBase),
            "::",
            stringify!(manifest_magic)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).manifest_version) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestBase),
            "::",
            stringify!(manifest_version)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).api_version) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestBase),
            "::",
            stringify!(api_version)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hardware_target_id) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestBase),
            "::",
            stringify!(hardware_target_id)
        )
    );
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct FlipperApplicationManifestV1 {
    pub base: FlipperApplicationManifestBase,
    pub stack_size: u16,
    pub app_version: u32,
    pub name: [core::ffi::c_char; 32usize],
    pub has_icon: core::ffi::c_char,
    pub icon: [core::ffi::c_char; 32usize],
}
#[test]
fn bindgen_test_layout_FlipperApplicationManifestV1() {
    const UNINIT: ::core::mem::MaybeUninit<FlipperApplicationManifestV1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FlipperApplicationManifestV1>(),
        85usize,
        concat!("Size of: ", stringify!(FlipperApplicationManifestV1))
    );
    assert_eq!(
        ::core::mem::align_of::<FlipperApplicationManifestV1>(),
        1usize,
        concat!("Alignment of ", stringify!(FlipperApplicationManifestV1))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestV1),
            "::",
            stringify!(base)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).stack_size) as usize - ptr as usize },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestV1),
            "::",
            stringify!(stack_size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).app_version) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestV1),
            "::",
            stringify!(app_version)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestV1),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).has_icon) as usize - ptr as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestV1),
            "::",
            stringify!(has_icon)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).icon) as usize - ptr as usize },
        53usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperApplicationManifestV1),
            "::",
            stringify!(icon)
        )
    );
}
pub type FlipperApplicationManifest = FlipperApplicationManifestV1;
extern "C" {
    #[doc = "Check if manifest is valid\n\n # Arguments\n\n* `manifest` -\n # Returns\n\nbool"]
    pub fn flipper_application_manifest_is_valid(
        manifest: *const FlipperApplicationManifest,
    ) -> bool;
}
extern "C" {
    #[doc = "Check if API Version declared in manifest is older than firmware ELF API interface\n\n # Arguments\n\n* `manifest` - The manifest\n * `api_interface` - The api interface\n\n # Returns\n\nbool"]
    pub fn flipper_application_manifest_is_too_old(
        manifest: *const FlipperApplicationManifest,
        api_interface: *const ElfApiInterface,
    ) -> bool;
}
extern "C" {
    #[doc = "Check if API Version declared in manifest is newer than firmware ELF API interface\n\n # Arguments\n\n* `manifest` - The manifest\n * `api_interface` - The api interface\n\n # Returns\n\nbool"]
    pub fn flipper_application_manifest_is_too_new(
        manifest: *const FlipperApplicationManifest,
        api_interface: *const ElfApiInterface,
    ) -> bool;
}
extern "C" {
    #[doc = "Check if application is compatible with current hardware\n\n # Arguments\n\n* `manifest` -\n # Returns\n\nbool"]
    pub fn flipper_application_manifest_is_target_compatible(
        manifest: *const FlipperApplicationManifest,
    ) -> bool;
}
#[doc = "< Read access"]
pub const FS_AccessMode_FSAM_READ: FS_AccessMode = 1;
#[doc = "< Write access"]
pub const FS_AccessMode_FSAM_WRITE: FS_AccessMode = 2;
#[doc = "< Read and write access"]
pub const FS_AccessMode_FSAM_READ_WRITE: FS_AccessMode = 3;
#[doc = "Access mode flags"]
pub type FS_AccessMode = core::ffi::c_uchar;
#[doc = "< Open file, fail if file doesn't exist"]
pub const FS_OpenMode_FSOM_OPEN_EXISTING: FS_OpenMode = 1;
#[doc = "< Open file. Create new file if not exist"]
pub const FS_OpenMode_FSOM_OPEN_ALWAYS: FS_OpenMode = 2;
#[doc = "< Open file. Create new file if not exist. Set R/W pointer to EOF"]
pub const FS_OpenMode_FSOM_OPEN_APPEND: FS_OpenMode = 4;
#[doc = "< Creates a new file. Fails if the file is exist"]
pub const FS_OpenMode_FSOM_CREATE_NEW: FS_OpenMode = 8;
#[doc = "< Creates a new file. If file exist, truncate to zero size"]
pub const FS_OpenMode_FSOM_CREATE_ALWAYS: FS_OpenMode = 16;
#[doc = "Open mode flags"]
pub type FS_OpenMode = core::ffi::c_uchar;
#[doc = "< No error"]
pub const FS_Error_FSE_OK: FS_Error = 0;
#[doc = "< FS not ready"]
pub const FS_Error_FSE_NOT_READY: FS_Error = 1;
#[doc = "< File/Dir already exist"]
pub const FS_Error_FSE_EXIST: FS_Error = 2;
#[doc = "< File/Dir does not exist"]
pub const FS_Error_FSE_NOT_EXIST: FS_Error = 3;
#[doc = "< Invalid API parameter"]
pub const FS_Error_FSE_INVALID_PARAMETER: FS_Error = 4;
#[doc = "< Access denied"]
pub const FS_Error_FSE_DENIED: FS_Error = 5;
#[doc = "< Invalid name/path"]
pub const FS_Error_FSE_INVALID_NAME: FS_Error = 6;
#[doc = "< Internal error"]
pub const FS_Error_FSE_INTERNAL: FS_Error = 7;
#[doc = "< Function not implemented"]
pub const FS_Error_FSE_NOT_IMPLEMENTED: FS_Error = 8;
#[doc = "< File/Dir already opened"]
pub const FS_Error_FSE_ALREADY_OPEN: FS_Error = 9;
#[doc = "API errors enumeration"]
pub type FS_Error = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct File {
    _unused: [u8; 0],
}
#[doc = "Structure that hold file info"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FileInfo {
    #[doc = "< flags from FS_Flags enum"]
    pub flags: u8,
    #[doc = "< file size"]
    pub size: u64,
}
#[test]
fn bindgen_test_layout_FileInfo() {
    const UNINIT: ::core::mem::MaybeUninit<FileInfo> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FileInfo>(),
        16usize,
        concat!("Size of: ", stringify!(FileInfo))
    );
    assert_eq!(
        ::core::mem::align_of::<FileInfo>(),
        8usize,
        concat!("Alignment of ", stringify!(FileInfo))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FileInfo),
            "::",
            stringify!(flags)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FileInfo),
            "::",
            stringify!(size)
        )
    );
}
extern "C" {
    #[doc = "Gets the error text from FS_Error\n # Arguments\n\n* `error_id` - error id\n # Returns\n\nconst char* error text"]
    pub fn filesystem_api_error_get_desc(error_id: FS_Error) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Checks if file info is directory\n # Arguments\n\n* `file_info` - file info pointer\n # Returns\n\nbool is directory"]
    pub fn file_info_is_dir(file_info: *const FileInfo) -> bool;
}
pub const SDFsType_FST_UNKNOWN: SDFsType = 0;
pub const SDFsType_FST_FAT12: SDFsType = 1;
pub const SDFsType_FST_FAT16: SDFsType = 2;
pub const SDFsType_FST_FAT32: SDFsType = 3;
pub const SDFsType_FST_EXFAT: SDFsType = 4;
pub type SDFsType = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SDInfo {
    pub fs_type: SDFsType,
    pub kb_total: u32,
    pub kb_free: u32,
    pub cluster_size: u16,
    pub sector_size: u16,
    pub label: [core::ffi::c_char; 34usize],
    pub manufacturer_id: u8,
    pub oem_id: [core::ffi::c_char; 3usize],
    pub product_name: [core::ffi::c_char; 6usize],
    pub product_revision_major: u8,
    pub product_revision_minor: u8,
    pub product_serial_number: u32,
    pub manufacturing_month: u8,
    pub manufacturing_year: u16,
}
#[test]
fn bindgen_test_layout_SDInfo() {
    const UNINIT: ::core::mem::MaybeUninit<SDInfo> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SDInfo>(),
        72usize,
        concat!("Size of: ", stringify!(SDInfo))
    );
    assert_eq!(
        ::core::mem::align_of::<SDInfo>(),
        4usize,
        concat!("Alignment of ", stringify!(SDInfo))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).fs_type) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(fs_type)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).kb_total) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(kb_total)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).kb_free) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(kb_free)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).cluster_size) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(cluster_size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sector_size) as usize - ptr as usize },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(sector_size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).label) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(label)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).manufacturer_id) as usize - ptr as usize },
        50usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(manufacturer_id)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).oem_id) as usize - ptr as usize },
        51usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(oem_id)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).product_name) as usize - ptr as usize },
        54usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(product_name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).product_revision_major) as usize - ptr as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(product_revision_major)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).product_revision_minor) as usize - ptr as usize },
        61usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(product_revision_minor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).product_serial_number) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(product_serial_number)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).manufacturing_month) as usize - ptr as usize },
        68usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(manufacturing_month)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).manufacturing_year) as usize - ptr as usize },
        70usize,
        concat!(
            "Offset of field: ",
            stringify!(SDInfo),
            "::",
            stringify!(manufacturing_year)
        )
    );
}
extern "C" {
    pub fn sd_api_get_fs_type_text(fs_type: SDFsType) -> *const core::ffi::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Storage {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate and initialize a file instance.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n # Returns\n\npointer to the created instance."]
    pub fn storage_file_alloc(storage: *mut Storage) -> *mut File;
}
extern "C" {
    #[doc = "Free the file instance.\n\n If the file was open, calling this function will close it automatically.\n # Arguments\n\n* `file` - pointer to the file instance to be freed."]
    pub fn storage_file_free(file: *mut File);
}
extern "C" {
    #[doc = "Get the storage pubsub instance.\n\n Storage will send StorageEvent messages.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n # Returns\n\npointer to the pubsub instance."]
    pub fn storage_get_pubsub(storage: *mut Storage) -> *mut FuriPubSub;
}
extern "C" {
    #[doc = "Open an existing file or create a new one.\n\n The calling code MUST call storage_file_close() even if the open operation had failed.\n\n # Arguments\n\n* `file` - pointer to the file instance to be opened.\n * `path` - pointer to a zero-terminated string containing the path to the file to be opened.\n * `access_mode` - access mode from FS_AccessMode.\n * `open_mode` - open mode from FS_OpenMode\n # Returns\n\ntrue if the file was successfully opened, false otherwise."]
    pub fn storage_file_open(
        file: *mut File,
        path: *const core::ffi::c_char,
        access_mode: FS_AccessMode,
        open_mode: FS_OpenMode,
    ) -> bool;
}
extern "C" {
    #[doc = "Close the file.\n\n # Arguments\n\n* `file` - pointer to the file instance to be closed.\n # Returns\n\ntrue if the file was successfully closed, false otherwise."]
    pub fn storage_file_close(file: *mut File) -> bool;
}
extern "C" {
    #[doc = "Check whether the file is open.\n\n # Arguments\n\n* `file` - pointer to the file instance in question.\n # Returns\n\ntrue if the file is open, false otherwise."]
    pub fn storage_file_is_open(file: *mut File) -> bool;
}
extern "C" {
    #[doc = "Check whether a file instance represents a directory.\n\n # Arguments\n\n* `file` - pointer to the file instance in question.\n # Returns\n\ntrue if the file instance represents a directory, false otherwise."]
    pub fn storage_file_is_dir(file: *mut File) -> bool;
}
extern "C" {
    #[doc = "Read bytes from a file into a buffer.\n\n # Arguments\n\n* `file` - pointer to the file instance to read from.\n * `buff` - pointer to the buffer to be filled with read data.\n * `bytes_to_read` - number of bytes to read. Must be less than or equal to the size of the buffer.\n # Returns\n\nactual number of bytes read (may be fewer than requested)."]
    pub fn storage_file_read(
        file: *mut File,
        buff: *mut core::ffi::c_void,
        bytes_to_read: usize,
    ) -> usize;
}
extern "C" {
    #[doc = "Write bytes from a buffer to a file.\n\n # Arguments\n\n* `file` - pointer to the file instance to write into.\n * `buff` - pointer to the buffer containing the data to be written.\n * `bytes_to_write` - number of bytes to write. Must be less than or equal to the size of the buffer.\n # Returns\n\nactual number of bytes written (may be fewer than requested)."]
    pub fn storage_file_write(
        file: *mut File,
        buff: *const core::ffi::c_void,
        bytes_to_write: usize,
    ) -> usize;
}
extern "C" {
    #[doc = "Change the current access position in a file.\n\n # Arguments\n\n* `file` - pointer to the file instance in question.\n * `offset` - access position offset (meaning depends on from_start parameter).\n * `from_start` - if true, set the access position relative to the file start, otherwise relative to the current position.\n # Returns\n\nsuccess flag"]
    pub fn storage_file_seek(file: *mut File, offset: u32, from_start: bool) -> bool;
}
extern "C" {
    #[doc = "Get the current access position.\n\n # Arguments\n\n* `file` - pointer to the file instance in question.\n # Returns\n\ncurrent access position."]
    pub fn storage_file_tell(file: *mut File) -> u64;
}
extern "C" {
    #[doc = "Truncate the file size to the current access position.\n\n # Arguments\n\n* `file` - pointer to the file instance to be truncated.\n # Returns\n\ntrue if the file was successfully truncated, false otherwise."]
    pub fn storage_file_truncate(file: *mut File) -> bool;
}
extern "C" {
    #[doc = "Get the file size.\n\n # Arguments\n\n* `file` - pointer to the file instance in question.\n # Returns\n\nsize of the file, in bytes."]
    pub fn storage_file_size(file: *mut File) -> u64;
}
extern "C" {
    #[doc = "Synchronise the file cache with the actual storage.\n\n # Arguments\n\n* `file` - pointer to the file instance in question.\n # Returns\n\ntrue if the file was successfully synchronised, false otherwise."]
    pub fn storage_file_sync(file: *mut File) -> bool;
}
extern "C" {
    #[doc = "Check whether the current access position is at the end of the file.\n\n # Arguments\n\n* `file` - pointer to a file instance in question.\n # Returns\n\nbool true if the current access position is at the end of the file, false otherwise."]
    pub fn storage_file_eof(file: *mut File) -> bool;
}
extern "C" {
    #[doc = "Check whether a file exists.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `path` - pointer to a zero-terminated string containing the path to the file in question.\n # Returns\n\ntrue if the file exists, false otherwise."]
    pub fn storage_file_exists(storage: *mut Storage, path: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Copy data from a source file to the destination file.\n\n Both files must be opened prior to calling this function.\n\n The requested amount of bytes will be copied from the current access position\n in the source file to the current access position in the destination file.\n\n # Arguments\n\n* `source` - pointer to a source file instance.\n * `destination` - pointer to a destination file instance.\n * `size` - data size to be copied, in bytes.\n # Returns\n\ntrue if the data was successfully copied, false otherwise."]
    pub fn storage_file_copy_to_file(
        source: *mut File,
        destination: *mut File,
        size: usize,
    ) -> bool;
}
extern "C" {
    #[doc = "Open a directory.\n\n Opening a directory is necessary to be able to read its contents with storage_dir_read().\n\n The calling code MUST call storage_dir_close() even if the open operation had failed.\n\n # Arguments\n\n* `file` - pointer to a file instance representing the directory in question.\n * `path` - pointer to a zero-terminated string containing the path of the directory in question.\n # Returns\n\ntrue if the directory was successfully opened, false otherwise."]
    pub fn storage_dir_open(file: *mut File, path: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Close the directory.\n\n # Arguments\n\n* `file` - pointer to a file instance representing the directory in question.\n # Returns\n\ntrue if the directory was successfully closed, false otherwise."]
    pub fn storage_dir_close(file: *mut File) -> bool;
}
extern "C" {
    #[doc = "Get the next item in the directory.\n\n If the next object does not exist, this function returns false as well\n and sets the file error id to FSE_NOT_EXIST.\n\n # Arguments\n\n* `file` - pointer to a file instance representing the directory in question.\n * `fileinfo` - pointer to the FileInfo structure to contain the info (may be NULL).\n * `name` - pointer to the buffer to contain the name (may be NULL).\n * `name_length` - maximum capacity of the name buffer, in bytes.\n # Returns\n\ntrue if the next item was successfully read, false otherwise."]
    pub fn storage_dir_read(
        file: *mut File,
        fileinfo: *mut FileInfo,
        name: *mut core::ffi::c_char,
        name_length: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Check whether a directory exists.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `path` - pointer to a zero-terminated string containing the path of the directory in question.\n # Returns\n\ntrue if the directory exists, false otherwise."]
    pub fn storage_dir_exists(storage: *mut Storage, path: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Get the last access time in UNIX format.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `path` - pointer to a zero-terminated string containing the path of the item in question.\n * `timestamp` - pointer to a value to contain the timestamp.\n # Returns\n\nFSE_OK if the timestamp has been successfully received, any other error code on failure."]
    pub fn storage_common_timestamp(
        storage: *mut Storage,
        path: *const core::ffi::c_char,
        timestamp: *mut u32,
    ) -> FS_Error;
}
extern "C" {
    #[doc = "Get information about a file or a directory.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `path` - pointer to a zero-terminated string containing the path of the item in question.\n * `fileinfo` - pointer to the FileInfo structure to contain the info (may be NULL).\n # Returns\n\nFSE_OK if the info has been successfully received, any other error code on failure."]
    pub fn storage_common_stat(
        storage: *mut Storage,
        path: *const core::ffi::c_char,
        fileinfo: *mut FileInfo,
    ) -> FS_Error;
}
extern "C" {
    #[doc = "Remove a file or a directory.\n\n The directory must be empty.\n The file or the directory must NOT be open.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `path` - pointer to a zero-terminated string containing the path of the item to be removed.\n # Returns\n\nFSE_OK if the file or directory has been successfully removed, any other error code on failure."]
    pub fn storage_common_remove(storage: *mut Storage, path: *const core::ffi::c_char)
        -> FS_Error;
}
extern "C" {
    #[doc = "Rename a file or a directory.\n\n The file or the directory must NOT be open.\n Will overwrite the destination file if it already exists.\n\n Renaming a regular file to itself does nothing and always succeeds.\n Renaming a directory to itself or to a subdirectory of itself always fails.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `old_path` - pointer to a zero-terminated string containing the source path.\n * `new_path` - pointer to a zero-terminated string containing the destination path.\n # Returns\n\nFSE_OK if the file or directory has been successfully renamed, any other error code on failure."]
    pub fn storage_common_rename(
        storage: *mut Storage,
        old_path: *const core::ffi::c_char,
        new_path: *const core::ffi::c_char,
    ) -> FS_Error;
}
extern "C" {
    #[doc = "Copy the file to a new location.\n\n The file must NOT be open at the time of calling this function.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `old_path` - pointer to a zero-terminated string containing the source path.\n * `new_path` - pointer to a zero-terminated string containing the destination path.\n # Returns\n\nFSE_OK if the file has been successfully copied, any other error code on failure."]
    pub fn storage_common_copy(
        storage: *mut Storage,
        old_path: *const core::ffi::c_char,
        new_path: *const core::ffi::c_char,
    ) -> FS_Error;
}
extern "C" {
    #[doc = "Copy the contents of one directory into another and rename all conflicting files.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `old_path` - pointer to a zero-terminated string containing the source path.\n * `new_path` - pointer to a zero-terminated string containing the destination path.\n # Returns\n\nFSE_OK if the directories have been successfully merged, any other error code on failure."]
    pub fn storage_common_merge(
        storage: *mut Storage,
        old_path: *const core::ffi::c_char,
        new_path: *const core::ffi::c_char,
    ) -> FS_Error;
}
extern "C" {
    #[doc = "Create a directory.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `path` - pointer to a zero-terminated string containing the directory path.\n # Returns\n\nFSE_OK if the directory has been successfully created, any other error code on failure."]
    pub fn storage_common_mkdir(storage: *mut Storage, path: *const core::ffi::c_char) -> FS_Error;
}
extern "C" {
    #[doc = "Get the general information about the storage.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `fs_path` - pointer to a zero-terminated string containing the path to the storage question.\n * `total_space` - pointer to the value to contain the total capacity, in bytes.\n * `free_space` - pointer to the value to contain the available space, in bytes.\n # Returns\n\nFSE_OK if the information has been successfully received, any other error code on failure."]
    pub fn storage_common_fs_info(
        storage: *mut Storage,
        fs_path: *const core::ffi::c_char,
        total_space: *mut u64,
        free_space: *mut u64,
    ) -> FS_Error;
}
extern "C" {
    #[doc = "Parse aliases in a path and replace them with the real path.\n\n Necessary special directories will be created automatically if they did not exist.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `path` - pointer to a zero-terminated string containing the path in question."]
    pub fn storage_common_resolve_path_and_ensure_app_directory(
        storage: *mut Storage,
        path: *mut FuriString,
    );
}
extern "C" {
    #[doc = "Move the contents of source folder to destination one and rename all conflicting files.\n\n Source folder will be deleted if the migration was successful.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `source` - pointer to a zero-terminated string containing the source path.\n * `dest` - pointer to a zero-terminated string containing the destination path.\n # Returns\n\nFSE_OK if the migration was successfull completed, any other error code on failure."]
    pub fn storage_common_migrate(
        storage: *mut Storage,
        source: *const core::ffi::c_char,
        dest: *const core::ffi::c_char,
    ) -> FS_Error;
}
extern "C" {
    #[doc = "Check whether a file or a directory exists.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `path` - pointer to a zero-terminated string containing the path in question.\n # Returns\n\ntrue if a file or a directory exists, false otherwise."]
    pub fn storage_common_exists(storage: *mut Storage, path: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Check whether two paths are equivalent.\n\n This function will resolve aliases and apply filesystem-specific\n rules to determine whether the two given paths are equivalent.\n\n Examples:\n - /int/text and /ext/test -> false (Different storages),\n - /int/Test and /int/test -> false (Case-sensitive storage),\n - /ext/Test and /ext/test -> true (Case-insensitive storage).\n\n If the truncate parameter is set to true, the second path will be\n truncated to be no longer than the first one. It is useful to determine\n whether path2 is a subdirectory of path1.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `path1` - pointer to a zero-terminated string containing the first path.\n * `path2` - pointer to a zero-terminated string containing the second path.\n * `truncate` - whether to truncate path2 to be no longer than path1.\n # Returns\n\ntrue if paths are equivalent, false otherwise."]
    pub fn storage_common_equivalent_path(
        storage: *mut Storage,
        path1: *const core::ffi::c_char,
        path2: *const core::ffi::c_char,
        truncate: bool,
    ) -> bool;
}
extern "C" {
    #[doc = "Get the textual description of a numeric error identifer.\n\n # Arguments\n\n* `error_id` - numeric identifier of the error in question.\n # Returns\n\npointer to a statically allocated zero-terminated string containing the respective error text."]
    pub fn storage_error_get_desc(error_id: FS_Error) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get the numeric error identifier from a file instance.\n\n It is not possible to get the error identifier after the file has been closed.\n\n # Arguments\n\n* `file` - pointer to the file instance in question (must NOT be NULL).\n # Returns\n\nnumeric identifier of the last error associated with the file instance."]
    pub fn storage_file_get_error(file: *mut File) -> FS_Error;
}
extern "C" {
    #[doc = "Get the textual description of a the last error associated with a file instance.\n\n It is not possible to get the error text after the file has been closed.\n\n # Arguments\n\n* `file` - pointer to the file instance in question (must NOT be NULL).\n # Returns\n\npointer to a statically allocated zero-terminated string containing the respective error text."]
    pub fn storage_file_get_error_desc(file: *mut File) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Format the SD Card.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n # Returns\n\nFSE_OK if the card was successfully formatted, any other error code on failure."]
    pub fn storage_sd_format(storage: *mut Storage) -> FS_Error;
}
extern "C" {
    #[doc = "Unmount the SD card.\n\n These return values have special meaning:\n - FSE_NOT_READY if the SD card is not mounted.\n - FSE_DENIED if there are open files on the SD card.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n # Returns\n\nFSE_OK if the card was successfully formatted, any other error code on failure."]
    pub fn storage_sd_unmount(storage: *mut Storage) -> FS_Error;
}
extern "C" {
    #[doc = "Mount the SD card.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n # Returns\n\nFSE_OK if the card was successfully mounted, any other error code on failure."]
    pub fn storage_sd_mount(storage: *mut Storage) -> FS_Error;
}
extern "C" {
    #[doc = "Get SD card information.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `info` - pointer to the info object to contain the requested information.\n # Returns\n\nFSE_OK if the info was successfully received, any other error code on failure."]
    pub fn storage_sd_info(storage: *mut Storage, info: *mut SDInfo) -> FS_Error;
}
extern "C" {
    #[doc = "Get SD card status.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n # Returns\n\nstorage status in the form of a numeric error identifier."]
    pub fn storage_sd_status(storage: *mut Storage) -> FS_Error;
}
#[doc = "Internal Storage Backup/Restore"]
pub type StorageNameConverter = ::core::option::Option<unsafe extern "C" fn(arg1: *mut FuriString)>;
extern "C" {
    #[doc = "Back up the internal storage contents to a *.tar archive.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `dstname` - pointer to a zero-terminated string containing the archive file path.\n # Returns\n\nFSE_OK if the storage was successfully backed up, any other error code on failure."]
    pub fn storage_int_backup(storage: *mut Storage, dstname: *const core::ffi::c_char)
        -> FS_Error;
}
extern "C" {
    #[doc = "Restore the internal storage contents from a *.tar archive.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `dstname` - pointer to a zero-terminated string containing the archive file path.\n * `converter` - pointer to a filename conversion function (may be NULL).\n # Returns\n\nFSE_OK if the storage was successfully restored, any other error code on failure."]
    pub fn storage_int_restore(
        storage: *mut Storage,
        dstname: *const core::ffi::c_char,
        converter: StorageNameConverter,
    ) -> FS_Error;
}
extern "C" {
    #[doc = "Remove a file or a directory.\n\n The following conditions must be met:\n - the directory must be empty.\n - the file or the directory must NOT be open.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `path` - pointer to a zero-terminated string containing the item path.\n # Returns\n\ntrue on success or if the item does not exist, false otherwise."]
    pub fn storage_simply_remove(storage: *mut Storage, path: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Recursively remove a file or a directory.\n\n Unlike storage_simply_remove(), the directory does not need to be empty.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `path` - pointer to a zero-terminated string containing the item path.\n # Returns\n\ntrue on success or if the item does not exist, false otherwise."]
    pub fn storage_simply_remove_recursive(
        storage: *mut Storage,
        path: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Create a directory.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `path` - pointer to a zero-terminated string containing the directory path.\n # Returns\n\ntrue on success or if directory does already exist, false otherwise."]
    pub fn storage_simply_mkdir(storage: *mut Storage, path: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Get the next free filename in a directory.\n\n Usage example:\n ```c\n FuriString* file_name = furi_string_alloc();\n Storage* storage = furi_record_open(RECORD_STORAGE);\n\n storage_get_next_filename(storage,\n \"/ext/test\",\n \"cookies\",\n \".yum\",\n 20);\n\n furi_record_close(RECORD_STORAGE);\n\n use_file_name(file_name);\n\n furi_string_free(file_name);\n ```\n Possible file_name values after calling storage_get_next_filename():\n \"cookies\", \"cookies1\", \"cookies2\", ... etc depending on whether any of\n these files have already existed in the directory.\n\n > **Note:** If the resulting next file name length is greater than set by the max_len\n parameter, the original filename will be returned instead.\n\n # Arguments\n\n* `storage` - pointer to a storage API instance.\n * `dirname` - pointer to a zero-terminated string containing the directory path.\n * `filename` - pointer to a zero-terminated string containing the file name.\n * `fileextension` - pointer to a zero-terminated string containing the file extension.\n * `nextfilename` - pointer to a dynamic string containing the resulting file name.\n * `max_len` - maximum length of the new name."]
    pub fn storage_get_next_filename(
        storage: *mut Storage,
        dirname: *const core::ffi::c_char,
        filename: *const core::ffi::c_char,
        fileextension: *const core::ffi::c_char,
        nextfilename: *mut FuriString,
        max_len: u8,
    );
}
pub const FlipperApplicationPreloadStatus_FlipperApplicationPreloadStatusSuccess:
    FlipperApplicationPreloadStatus = 0;
pub const FlipperApplicationPreloadStatus_FlipperApplicationPreloadStatusInvalidFile:
    FlipperApplicationPreloadStatus = 1;
pub const FlipperApplicationPreloadStatus_FlipperApplicationPreloadStatusNotEnoughMemory:
    FlipperApplicationPreloadStatus = 2;
pub const FlipperApplicationPreloadStatus_FlipperApplicationPreloadStatusInvalidManifest:
    FlipperApplicationPreloadStatus = 3;
pub const FlipperApplicationPreloadStatus_FlipperApplicationPreloadStatusApiTooOld:
    FlipperApplicationPreloadStatus = 4;
pub const FlipperApplicationPreloadStatus_FlipperApplicationPreloadStatusApiTooNew:
    FlipperApplicationPreloadStatus = 5;
pub const FlipperApplicationPreloadStatus_FlipperApplicationPreloadStatusTargetMismatch:
    FlipperApplicationPreloadStatus = 6;
pub type FlipperApplicationPreloadStatus = core::ffi::c_uchar;
pub const FlipperApplicationLoadStatus_FlipperApplicationLoadStatusSuccess:
    FlipperApplicationLoadStatus = 0;
pub const FlipperApplicationLoadStatus_FlipperApplicationLoadStatusUnspecifiedError:
    FlipperApplicationLoadStatus = 1;
pub const FlipperApplicationLoadStatus_FlipperApplicationLoadStatusMissingImports:
    FlipperApplicationLoadStatus = 2;
pub type FlipperApplicationLoadStatus = core::ffi::c_uchar;
extern "C" {
    #[doc = "Get text description of preload status\n # Arguments\n\n* `status` - Status code\n # Returns\n\nString pointer to description"]
    pub fn flipper_application_preload_status_to_string(
        status: FlipperApplicationPreloadStatus,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get text description of load status\n # Arguments\n\n* `status` - Status code\n # Returns\n\nString pointer to description"]
    pub fn flipper_application_load_status_to_string(
        status: FlipperApplicationLoadStatus,
    ) -> *const core::ffi::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FlipperApplication {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Initialize FlipperApplication object\n # Arguments\n\n* `storage` - Storage instance\n * `api_interface` - ELF API interface to use for pre-loading and symbol resolving\n # Returns\n\nApplication instance"]
    pub fn flipper_application_alloc(
        storage: *mut Storage,
        api_interface: *const ElfApiInterface,
    ) -> *mut FlipperApplication;
}
extern "C" {
    #[doc = "Destroy FlipperApplication object\n # Arguments\n\n* `app` - Application pointer"]
    pub fn flipper_application_free(app: *mut FlipperApplication);
}
extern "C" {
    #[doc = "Validate elf file and load application metadata\n\n # Arguments\n\n* `app` - Application pointer\n * `path` (direction in) - The path to fap file\n\n # Returns\n\nPreload result code"]
    pub fn flipper_application_preload(
        app: *mut FlipperApplication,
        path: *const core::ffi::c_char,
    ) -> FlipperApplicationPreloadStatus;
}
extern "C" {
    #[doc = "Validate elf file and load application manifest\n\n # Arguments\n\n* `app` - Application pointer\n * `path` (direction in) - The path to fap file\n\n # Returns\n\nPreload result code"]
    pub fn flipper_application_preload_manifest(
        app: *mut FlipperApplication,
        path: *const core::ffi::c_char,
    ) -> FlipperApplicationPreloadStatus;
}
extern "C" {
    #[doc = "Get pointer to application manifest for preloaded application\n # Arguments\n\n* `app` - Application pointer\n # Returns\n\nPointer to application manifest"]
    pub fn flipper_application_get_manifest(
        app: *mut FlipperApplication,
    ) -> *const FlipperApplicationManifest;
}
extern "C" {
    #[doc = "Load sections and process relocations for already pre-loaded application\n # Arguments\n\n* `app` - Application pointer\n # Returns\n\nLoad result code"]
    pub fn flipper_application_map_to_memory(
        app: *mut FlipperApplication,
    ) -> FlipperApplicationLoadStatus;
}
extern "C" {
    #[doc = "Allocate application thread at entry point address, using app name and\n stack size from metadata. Returned thread isn't started yet.\n Can be only called once for application instance.\n # Arguments\n\n* `app` - Applicaiton pointer\n * `args` - Args to pass to app's entry point\n # Returns\n\nCreated thread"]
    pub fn flipper_application_alloc_thread(
        app: *mut FlipperApplication,
        args: *const core::ffi::c_char,
    ) -> *mut FuriThread;
}
extern "C" {
    #[doc = "Check if application is a plugin (not a runnable standalone app)\n # Arguments\n\n* `app` - Application pointer\n # Returns\n\ntrue if application is a plugin, false otherwise"]
    pub fn flipper_application_is_plugin(app: *mut FlipperApplication) -> bool;
}
#[doc = "An object that describes a plugin - must be returned by plugin's entry point"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FlipperAppPluginDescriptor {
    pub appid: *const core::ffi::c_char,
    pub ep_api_version: u32,
    pub entry_point: *const core::ffi::c_void,
}
#[test]
fn bindgen_test_layout_FlipperAppPluginDescriptor() {
    const UNINIT: ::core::mem::MaybeUninit<FlipperAppPluginDescriptor> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FlipperAppPluginDescriptor>(),
        12usize,
        concat!("Size of: ", stringify!(FlipperAppPluginDescriptor))
    );
    assert_eq!(
        ::core::mem::align_of::<FlipperAppPluginDescriptor>(),
        4usize,
        concat!("Alignment of ", stringify!(FlipperAppPluginDescriptor))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).appid) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperAppPluginDescriptor),
            "::",
            stringify!(appid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ep_api_version) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperAppPluginDescriptor),
            "::",
            stringify!(ep_api_version)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).entry_point) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperAppPluginDescriptor),
            "::",
            stringify!(entry_point)
        )
    );
}
extern "C" {
    #[doc = "Get plugin descriptor for preloaded plugin\n # Arguments\n\n* `app` - Application pointer\n # Returns\n\nPointer to plugin descriptor"]
    pub fn flipper_application_plugin_get_descriptor(
        app: *mut FlipperApplication,
    ) -> *const FlipperAppPluginDescriptor;
}
extern "C" {
    #[doc = "Load name and icon from FAP file.\n\n # Arguments\n\n* `path` - Path to FAP file.\n * `storage` - Storage instance.\n * `icon_ptr` - Icon pointer.\n * `item_name` - Application name.\n # Returns\n\ntrue if icon and name were loaded successfully."]
    pub fn flipper_application_load_name_and_icon(
        path: *mut FuriString,
        storage: *mut Storage,
        icon_ptr: *mut *mut u8,
        item_name: *mut FuriString,
    ) -> bool;
}
pub type SubGhzBegin = ::core::option::Option<unsafe extern "C" fn() -> bool>;
pub type SubGhzEnd = ::core::option::Option<unsafe extern "C" fn()>;
pub type SubGhzIsConnect = ::core::option::Option<unsafe extern "C" fn() -> bool>;
pub type SubGhzReset = ::core::option::Option<unsafe extern "C" fn()>;
pub type SubGhzSleep = ::core::option::Option<unsafe extern "C" fn()>;
pub type SubGhzIdle = ::core::option::Option<unsafe extern "C" fn()>;
pub type SubGhzLoadPreset =
    ::core::option::Option<unsafe extern "C" fn(preset: FuriHalSubGhzPreset, preset_data: *mut u8)>;
pub type SubGhzSetFrequency = ::core::option::Option<unsafe extern "C" fn(frequency: u32) -> u32>;
pub type SubGhzIsFrequencyValid =
    ::core::option::Option<unsafe extern "C" fn(frequency: u32) -> bool>;
pub type SubGhzSetAsyncMirrorPin =
    ::core::option::Option<unsafe extern "C" fn(gpio: *const GpioPin)>;
pub type SubGhzGetDataGpio = ::core::option::Option<unsafe extern "C" fn() -> *const GpioPin>;
pub type SubGhzSetTx = ::core::option::Option<unsafe extern "C" fn() -> bool>;
pub type SubGhzFlushTx = ::core::option::Option<unsafe extern "C" fn()>;
pub type SubGhzStartAsyncTx = ::core::option::Option<
    unsafe extern "C" fn(callback: *mut core::ffi::c_void, context: *mut core::ffi::c_void) -> bool,
>;
pub type SubGhzIsAsyncCompleteTx = ::core::option::Option<unsafe extern "C" fn() -> bool>;
pub type SubGhzStopAsyncTx = ::core::option::Option<unsafe extern "C" fn()>;
pub type SubGhzSetRx = ::core::option::Option<unsafe extern "C" fn()>;
pub type SubGhzFlushRx = ::core::option::Option<unsafe extern "C" fn()>;
pub type SubGhzStartAsyncRx = ::core::option::Option<
    unsafe extern "C" fn(callback: *mut core::ffi::c_void, context: *mut core::ffi::c_void),
>;
pub type SubGhzStopAsyncRx = ::core::option::Option<unsafe extern "C" fn()>;
pub type SubGhzGetRSSI = ::core::option::Option<unsafe extern "C" fn() -> f32>;
pub type SubGhzGetLQI = ::core::option::Option<unsafe extern "C" fn() -> u8>;
pub type SubGhzRxPipeNotEmpty = ::core::option::Option<unsafe extern "C" fn() -> bool>;
pub type SubGhzRxIsDataCrcValid = ::core::option::Option<unsafe extern "C" fn() -> bool>;
pub type SubGhzReadPacket =
    ::core::option::Option<unsafe extern "C" fn(data: *mut u8, size: *mut u8)>;
pub type SubGhzWritePacket =
    ::core::option::Option<unsafe extern "C" fn(data: *const u8, size: u8)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzDeviceInterconnect {
    pub begin: SubGhzBegin,
    pub end: SubGhzEnd,
    pub is_connect: SubGhzIsConnect,
    pub reset: SubGhzReset,
    pub sleep: SubGhzSleep,
    pub idle: SubGhzIdle,
    pub load_preset: SubGhzLoadPreset,
    pub set_frequency: SubGhzSetFrequency,
    pub is_frequency_valid: SubGhzIsFrequencyValid,
    pub set_async_mirror_pin: SubGhzSetAsyncMirrorPin,
    pub get_data_gpio: SubGhzGetDataGpio,
    pub set_tx: SubGhzSetTx,
    pub flush_tx: SubGhzFlushTx,
    pub start_async_tx: SubGhzStartAsyncTx,
    pub is_async_complete_tx: SubGhzIsAsyncCompleteTx,
    pub stop_async_tx: SubGhzStopAsyncTx,
    pub set_rx: SubGhzSetRx,
    pub flush_rx: SubGhzFlushRx,
    pub start_async_rx: SubGhzStartAsyncRx,
    pub stop_async_rx: SubGhzStopAsyncRx,
    pub get_rssi: SubGhzGetRSSI,
    pub get_lqi: SubGhzGetLQI,
    pub rx_pipe_not_empty: SubGhzRxPipeNotEmpty,
    pub is_rx_data_crc_valid: SubGhzRxIsDataCrcValid,
    pub read_packet: SubGhzReadPacket,
    pub write_packet: SubGhzWritePacket,
}
#[test]
fn bindgen_test_layout_SubGhzDeviceInterconnect() {
    const UNINIT: ::core::mem::MaybeUninit<SubGhzDeviceInterconnect> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SubGhzDeviceInterconnect>(),
        104usize,
        concat!("Size of: ", stringify!(SubGhzDeviceInterconnect))
    );
    assert_eq!(
        ::core::mem::align_of::<SubGhzDeviceInterconnect>(),
        4usize,
        concat!("Alignment of ", stringify!(SubGhzDeviceInterconnect))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).begin) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(begin)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).end) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(end)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).is_connect) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(is_connect)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).reset) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(reset)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sleep) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(sleep)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).idle) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(idle)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).load_preset) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(load_preset)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).set_frequency) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(set_frequency)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).is_frequency_valid) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(is_frequency_valid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).set_async_mirror_pin) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(set_async_mirror_pin)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).get_data_gpio) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(get_data_gpio)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).set_tx) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(set_tx)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).flush_tx) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(flush_tx)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).start_async_tx) as usize - ptr as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(start_async_tx)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).is_async_complete_tx) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(is_async_complete_tx)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).stop_async_tx) as usize - ptr as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(stop_async_tx)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).set_rx) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(set_rx)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).flush_rx) as usize - ptr as usize },
        68usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(flush_rx)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).start_async_rx) as usize - ptr as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(start_async_rx)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).stop_async_rx) as usize - ptr as usize },
        76usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(stop_async_rx)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).get_rssi) as usize - ptr as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(get_rssi)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).get_lqi) as usize - ptr as usize },
        84usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(get_lqi)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).rx_pipe_not_empty) as usize - ptr as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(rx_pipe_not_empty)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).is_rx_data_crc_valid) as usize - ptr as usize },
        92usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(is_rx_data_crc_valid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).read_packet) as usize - ptr as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(read_packet)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).write_packet) as usize - ptr as usize },
        100usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDeviceInterconnect),
            "::",
            stringify!(write_packet)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzDevice {
    pub name: *const core::ffi::c_char,
    pub interconnect: *const SubGhzDeviceInterconnect,
}
#[test]
fn bindgen_test_layout_SubGhzDevice() {
    const UNINIT: ::core::mem::MaybeUninit<SubGhzDevice> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SubGhzDevice>(),
        8usize,
        concat!("Size of: ", stringify!(SubGhzDevice))
    );
    assert_eq!(
        ::core::mem::align_of::<SubGhzDevice>(),
        4usize,
        concat!("Alignment of ", stringify!(SubGhzDevice))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDevice),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).interconnect) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzDevice),
            "::",
            stringify!(interconnect)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Bt {
    _unused: [u8; 0],
}
pub const BtStatus_BtStatusUnavailable: BtStatus = 0;
pub const BtStatus_BtStatusOff: BtStatus = 1;
pub const BtStatus_BtStatusAdvertising: BtStatus = 2;
pub const BtStatus_BtStatusConnected: BtStatus = 3;
pub type BtStatus = core::ffi::c_uchar;
pub type BtStatusChangedCallback =
    ::core::option::Option<unsafe extern "C" fn(status: BtStatus, context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Change BLE Profile\n > **Note:** Call of this function leads to 2nd core restart\n\n # Arguments\n\n* `bt` - Bt instance\n * `profile_template` - Profile template to change to\n * `params` - Profile parameters. Can be NULL\n\n # Returns\n\ntrue on success"]
    pub fn bt_profile_start(
        bt: *mut Bt,
        profile_template: *const FuriHalBleProfileTemplate,
        params: FuriHalBleProfileParams,
    ) -> *mut FuriHalBleProfileBase;
}
extern "C" {
    #[doc = "Stop current BLE Profile and restore default profile\n > **Note:** Call of this function leads to 2nd core restart\n\n # Arguments\n\n* `bt` - Bt instance\n\n # Returns\n\ntrue on success"]
    pub fn bt_profile_restore_default(bt: *mut Bt) -> bool;
}
extern "C" {
    #[doc = "Disconnect from Central\n\n # Arguments\n\n* `bt` - Bt instance"]
    pub fn bt_disconnect(bt: *mut Bt);
}
extern "C" {
    #[doc = "Set callback for Bluetooth status change notification\n\n # Arguments\n\n* `bt` - Bt instance\n * `callback` - BtStatusChangedCallback instance\n * `context` - pointer to context"]
    pub fn bt_set_status_changed_callback(
        bt: *mut Bt,
        callback: BtStatusChangedCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Forget bonded devices\n > **Note:** Leads to wipe ble key storage and deleting bt.keys\n\n # Arguments\n\n* `bt` - Bt instance"]
    pub fn bt_forget_bonded_devices(bt: *mut Bt);
}
extern "C" {
    #[doc = "Set keys storage file path\n\n # Arguments\n\n* `bt` - Bt instance\n * `keys_storage_path` - Path to file with saved keys"]
    pub fn bt_keys_storage_set_storage_path(
        bt: *mut Bt,
        keys_storage_path: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Set default keys storage file path\n\n # Arguments\n\n* `bt` - Bt instance"]
    pub fn bt_keys_storage_set_default_path(bt: *mut Bt);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BtKeysStorage {
    _unused: [u8; 0],
}
extern "C" {
    pub fn bt_keys_storage_alloc(keys_storage_path: *const core::ffi::c_char)
        -> *mut BtKeysStorage;
}
extern "C" {
    pub fn bt_keys_storage_free(instance: *mut BtKeysStorage);
}
extern "C" {
    pub fn bt_keys_storage_set_file_path(
        instance: *mut BtKeysStorage,
        path: *const core::ffi::c_char,
    );
}
extern "C" {
    pub fn bt_keys_storage_set_ram_params(instance: *mut BtKeysStorage, buff: *mut u8, size: u16);
}
extern "C" {
    pub fn bt_keys_storage_is_changed(instance: *mut BtKeysStorage) -> bool;
}
extern "C" {
    pub fn bt_keys_storage_load(instance: *mut BtKeysStorage) -> bool;
}
extern "C" {
    pub fn bt_keys_storage_update(
        instance: *mut BtKeysStorage,
        start_addr: *mut u8,
        size: u32,
    ) -> bool;
}
extern "C" {
    pub fn bt_keys_storage_delete(instance: *mut BtKeysStorage) -> bool;
}
#[doc = "< Default, loader lock is used"]
pub const CliCommandFlag_CliCommandFlagDefault: CliCommandFlag = 0;
pub const CliCommandFlag_CliCommandFlagParallelSafe: CliCommandFlag = 1;
#[doc = "< Safe to run with insomnia mode on"]
pub const CliCommandFlag_CliCommandFlagInsomniaSafe: CliCommandFlag = 2;
pub type CliCommandFlag = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Cli {
    _unused: [u8; 0],
}
#[doc = "Cli callback function pointer. Implement this interface and use\n add_cli_command\n # Arguments\n\n* `args` - string with what was passed after command\n * `context` - pointer to whatever you gave us on cli_add_command"]
pub type CliCallback = ::core::option::Option<
    unsafe extern "C" fn(cli: *mut Cli, args: *mut FuriString, context: *mut core::ffi::c_void),
>;
extern "C" {
    #[doc = "Add cli command Registers you command callback\n\n # Arguments\n\n* `cli` - pointer to cli instance\n * `name` - command name\n * `flags` - CliCommandFlag\n * `callback` - callback function\n * `context` - pointer to whatever we need to pass to callback"]
    pub fn cli_add_command(
        cli: *mut Cli,
        name: *const core::ffi::c_char,
        flags: CliCommandFlag,
        callback: CliCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Print unified cmd usage tip\n\n # Arguments\n\n* `cmd` - cmd name\n * `usage` - usage tip\n * `arg` - arg passed by user"]
    pub fn cli_print_usage(
        cmd: *const core::ffi::c_char,
        usage: *const core::ffi::c_char,
        arg: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Delete cli command\n\n # Arguments\n\n* `cli` - pointer to cli instance\n * `name` - command name"]
    pub fn cli_delete_command(cli: *mut Cli, name: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Read from terminal\n\n # Arguments\n\n* `cli` - Cli instance\n * `buffer` - pointer to buffer\n * `size` - size of buffer in bytes\n\n # Returns\n\nbytes read"]
    pub fn cli_read(cli: *mut Cli, buffer: *mut u8, size: usize) -> usize;
}
extern "C" {
    #[doc = "Non-blocking read from terminal\n\n # Arguments\n\n* `cli` - Cli instance\n * `buffer` - pointer to buffer\n * `size` - size of buffer in bytes\n * `timeout` - timeout value in ms\n\n # Returns\n\nbytes read"]
    pub fn cli_read_timeout(cli: *mut Cli, buffer: *mut u8, size: usize, timeout: u32) -> usize;
}
extern "C" {
    #[doc = "Non-blocking check for interrupt command received\n\n # Arguments\n\n* `cli` - Cli instance\n\n # Returns\n\ntrue if received"]
    pub fn cli_cmd_interrupt_received(cli: *mut Cli) -> bool;
}
extern "C" {
    #[doc = "Write to terminal Do it only from inside of cli call.\n\n # Arguments\n\n* `cli` - Cli instance\n * `buffer` - pointer to buffer\n * `size` - size of buffer in bytes"]
    pub fn cli_write(cli: *mut Cli, buffer: *const u8, size: usize);
}
extern "C" {
    #[doc = "Read character\n\n # Arguments\n\n* `cli` - Cli instance\n\n # Returns\n\nchar"]
    pub fn cli_getc(cli: *mut Cli) -> core::ffi::c_char;
}
extern "C" {
    #[doc = "New line Send new ine sequence"]
    pub fn cli_nl(cli: *mut Cli);
}
extern "C" {
    pub fn cli_session_open(cli: *mut Cli, session: *mut core::ffi::c_void);
}
extern "C" {
    pub fn cli_session_close(cli: *mut Cli);
}
extern "C" {
    pub fn cli_is_connected(cli: *mut Cli) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CliSession {
    _unused: [u8; 0],
}
extern "C" {
    pub static mut cli_vcp: CliSession;
}
extern "C" {
    #[doc = "Get icon width\n\n # Arguments\n\n* `instance` (direction in) - pointer to Icon data\n\n # Returns\n\nwidth in pixels"]
    pub fn icon_get_width(instance: *const Icon) -> u16;
}
extern "C" {
    #[doc = "Get icon height\n\n # Arguments\n\n* `instance` (direction in) - pointer to Icon data\n\n # Returns\n\nheight in pixels"]
    pub fn icon_get_height(instance: *const Icon) -> u16;
}
extern "C" {
    #[doc = "Get Icon XBM bitmap data for the first frame\n\n # Arguments\n\n* `instance` (direction in) - pointer to Icon data\n\n # Returns\n\npointer to compressed XBM bitmap data"]
    pub fn icon_get_data(instance: *const Icon) -> *const u8;
}
extern "C" {
    #[doc = "Get Icon frame count\n\n # Arguments\n\n* `instance` (direction in) - pointer to Icon data\n\n # Returns\n\nframe count"]
    pub fn icon_get_frame_count(instance: *const Icon) -> u32;
}
extern "C" {
    #[doc = "Get Icon XBM bitmap data for a particular frame\n\n # Arguments\n\n* `instance` (direction in) - pointer to Icon data\n * `frame` (direction in) - frame index\n\n # Returns\n\npointer to compressed XBM bitmap data"]
    pub fn icon_get_frame_data(instance: *const Icon, frame: u32) -> *const u8;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IconAnimation {
    _unused: [u8; 0],
}
#[doc = "Icon Animation Callback. Used for update notification"]
pub type IconAnimationCallback = ::core::option::Option<
    unsafe extern "C" fn(instance: *mut IconAnimation, context: *mut core::ffi::c_void),
>;
extern "C" {
    #[doc = "Allocate icon animation instance with const icon data.\n\n always returns Icon or stops system if not enough memory\n\n # Arguments\n\n* `icon` (direction in) - pointer to Icon data\n\n # Returns\n\nIconAnimation instance"]
    pub fn icon_animation_alloc(icon: *const Icon) -> *mut IconAnimation;
}
extern "C" {
    #[doc = "Release icon animation instance\n\n # Arguments\n\n* `instance` - IconAnimation instance"]
    pub fn icon_animation_free(instance: *mut IconAnimation);
}
extern "C" {
    #[doc = "Set IconAnimation update callback\n\n Normally you do not need to use this function, use view_tie_icon_animation\n instead.\n\n # Arguments\n\n* `instance` - IconAnimation instance\n * `callback` (direction in) - IconAnimationCallback\n * `context` - callback context"]
    pub fn icon_animation_set_update_callback(
        instance: *mut IconAnimation,
        callback: IconAnimationCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Get icon animation width\n\n # Arguments\n\n* `instance` - IconAnimation instance\n\n # Returns\n\nwidth in pixels"]
    pub fn icon_animation_get_width(instance: *const IconAnimation) -> u8;
}
extern "C" {
    #[doc = "Get icon animation height\n\n # Arguments\n\n* `instance` - IconAnimation instance\n\n # Returns\n\nheight in pixels"]
    pub fn icon_animation_get_height(instance: *const IconAnimation) -> u8;
}
extern "C" {
    #[doc = "Start icon animation\n\n # Arguments\n\n* `instance` - IconAnimation instance"]
    pub fn icon_animation_start(instance: *mut IconAnimation);
}
extern "C" {
    #[doc = "Stop icon animation\n\n # Arguments\n\n* `instance` - IconAnimation instance"]
    pub fn icon_animation_stop(instance: *mut IconAnimation);
}
extern "C" {
    #[doc = "Returns true if current frame is a last one\n\n # Arguments\n\n* `instance` - IconAnimation instance\n\n # Returns\n\ntrue if last frame"]
    pub fn icon_animation_is_last_frame(instance: *const IconAnimation) -> bool;
}
pub const Color_ColorWhite: Color = 0;
pub const Color_ColorBlack: Color = 1;
pub const Color_ColorXOR: Color = 2;
#[doc = "Color enumeration"]
pub type Color = core::ffi::c_uchar;
pub const Font_FontPrimary: Font = 0;
pub const Font_FontSecondary: Font = 1;
pub const Font_FontKeyboard: Font = 2;
pub const Font_FontBigNumbers: Font = 3;
pub const Font_FontTotalNumber: Font = 4;
#[doc = "Fonts enumeration"]
pub type Font = core::ffi::c_uchar;
pub const Align_AlignLeft: Align = 0;
pub const Align_AlignRight: Align = 1;
pub const Align_AlignTop: Align = 2;
pub const Align_AlignBottom: Align = 3;
pub const Align_AlignCenter: Align = 4;
#[doc = "Alignment enumeration"]
pub type Align = core::ffi::c_uchar;
pub const CanvasOrientation_CanvasOrientationHorizontal: CanvasOrientation = 0;
pub const CanvasOrientation_CanvasOrientationHorizontalFlip: CanvasOrientation = 1;
pub const CanvasOrientation_CanvasOrientationVertical: CanvasOrientation = 2;
pub const CanvasOrientation_CanvasOrientationVerticalFlip: CanvasOrientation = 3;
#[doc = "Canvas Orientation"]
pub type CanvasOrientation = core::ffi::c_uchar;
pub const CanvasDirection_CanvasDirectionLeftToRight: CanvasDirection = 0;
pub const CanvasDirection_CanvasDirectionTopToBottom: CanvasDirection = 1;
pub const CanvasDirection_CanvasDirectionRightToLeft: CanvasDirection = 2;
pub const CanvasDirection_CanvasDirectionBottomToTop: CanvasDirection = 3;
#[doc = "Font Direction"]
pub type CanvasDirection = core::ffi::c_uchar;
#[doc = "Font parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CanvasFontParameters {
    pub leading_default: u8,
    pub leading_min: u8,
    pub height: u8,
    pub descender: u8,
}
#[test]
fn bindgen_test_layout_CanvasFontParameters() {
    const UNINIT: ::core::mem::MaybeUninit<CanvasFontParameters> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<CanvasFontParameters>(),
        4usize,
        concat!("Size of: ", stringify!(CanvasFontParameters))
    );
    assert_eq!(
        ::core::mem::align_of::<CanvasFontParameters>(),
        1usize,
        concat!("Alignment of ", stringify!(CanvasFontParameters))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).leading_default) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(CanvasFontParameters),
            "::",
            stringify!(leading_default)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).leading_min) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(CanvasFontParameters),
            "::",
            stringify!(leading_min)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).height) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(CanvasFontParameters),
            "::",
            stringify!(height)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).descender) as usize - ptr as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(CanvasFontParameters),
            "::",
            stringify!(descender)
        )
    );
}
pub const IconRotation_IconRotation0: IconRotation = 0;
pub const IconRotation_IconRotation90: IconRotation = 1;
pub const IconRotation_IconRotation180: IconRotation = 2;
pub const IconRotation_IconRotation270: IconRotation = 3;
#[doc = "Icon rotation"]
pub type IconRotation = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Canvas {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Reset canvas drawing tools configuration\n\n # Arguments\n\n* `canvas` - Canvas instance"]
    pub fn canvas_reset(canvas: *mut Canvas);
}
extern "C" {
    #[doc = "Commit canvas. Send buffer to display\n\n # Arguments\n\n* `canvas` - Canvas instance"]
    pub fn canvas_commit(canvas: *mut Canvas);
}
extern "C" {
    #[doc = "Get Canvas width\n\n # Arguments\n\n* `canvas` - Canvas instance\n\n # Returns\n\nwidth in pixels."]
    pub fn canvas_width(canvas: *const Canvas) -> usize;
}
extern "C" {
    #[doc = "Get Canvas height\n\n # Arguments\n\n* `canvas` - Canvas instance\n\n # Returns\n\nheight in pixels."]
    pub fn canvas_height(canvas: *const Canvas) -> usize;
}
extern "C" {
    #[doc = "Get current font height\n\n # Arguments\n\n* `canvas` - Canvas instance\n\n # Returns\n\nheight in pixels."]
    pub fn canvas_current_font_height(canvas: *const Canvas) -> usize;
}
extern "C" {
    #[doc = "Get font parameters\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `font` - Font\n\n # Returns\n\npointer to CanvasFontParameters structure"]
    pub fn canvas_get_font_params(canvas: *const Canvas, font: Font)
        -> *const CanvasFontParameters;
}
extern "C" {
    #[doc = "Clear canvas\n\n # Arguments\n\n* `canvas` - Canvas instance"]
    pub fn canvas_clear(canvas: *mut Canvas);
}
extern "C" {
    #[doc = "Set drawing color\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `color` - Color"]
    pub fn canvas_set_color(canvas: *mut Canvas, color: Color);
}
extern "C" {
    #[doc = "Set font swap Argument String Rotation Description\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `dir` - Direction font"]
    pub fn canvas_set_font_direction(canvas: *mut Canvas, dir: CanvasDirection);
}
extern "C" {
    #[doc = "Invert drawing color\n\n # Arguments\n\n* `canvas` - Canvas instance"]
    pub fn canvas_invert_color(canvas: *mut Canvas);
}
extern "C" {
    #[doc = "Set drawing font\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `font` - Font"]
    pub fn canvas_set_font(canvas: *mut Canvas, font: Font);
}
extern "C" {
    #[doc = "Set custom drawing font\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `font` - Pointer to u8g2 const uint8_t* font array"]
    pub fn canvas_set_custom_u8g2_font(canvas: *mut Canvas, font: *const u8);
}
extern "C" {
    #[doc = "Draw string at position of baseline defined by x, y.\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - anchor point x coordinate\n * `y` - anchor point y coordinate\n * `str` - C-string"]
    pub fn canvas_draw_str(canvas: *mut Canvas, x: i32, y: i32, str_: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Draw aligned string defined by x, y.\n\n Align calculated from position of baseline, string width and ascent (height\n of the glyphs above the baseline)\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - anchor point x coordinate\n * `y` - anchor point y coordinate\n * `horizontal` - horizontal alignment\n * `vertical` - vertical alignment\n * `str` - C-string"]
    pub fn canvas_draw_str_aligned(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        horizontal: Align,
        vertical: Align,
        str_: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Get string width\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `str` - C-string\n\n # Returns\n\nwidth in pixels."]
    pub fn canvas_string_width(canvas: *mut Canvas, str_: *const core::ffi::c_char) -> u16;
}
extern "C" {
    #[doc = "Get glyph width\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `symbol` (direction in) - character\n\n # Returns\n\nwidth in pixels"]
    pub fn canvas_glyph_width(canvas: *mut Canvas, symbol: u16) -> usize;
}
extern "C" {
    #[doc = "Draw bitmap picture at position defined by x,y.\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `width` - width of bitmap\n * `height` - height of bitmap\n * `compressed_bitmap_data` - compressed bitmap data"]
    pub fn canvas_draw_bitmap(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        width: usize,
        height: usize,
        compressed_bitmap_data: *const u8,
    );
}
extern "C" {
    #[doc = "Draw icon at position defined by x,y with rotation and flip.\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `icon` - Icon instance\n * `rotation` - IconRotation"]
    pub fn canvas_draw_icon_ex(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        icon: *const Icon,
        rotation: IconRotation,
    );
}
extern "C" {
    #[doc = "Draw animation at position defined by x,y.\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `icon_animation` - IconAnimation instance"]
    pub fn canvas_draw_icon_animation(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        icon_animation: *mut IconAnimation,
    );
}
extern "C" {
    #[doc = "Draw icon at position defined by x,y.\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `icon` - Icon instance"]
    pub fn canvas_draw_icon(canvas: *mut Canvas, x: i32, y: i32, icon: *const Icon);
}
extern "C" {
    #[doc = "Draw XBM bitmap\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `width` (direction in) - bitmap width\n * `height` (direction in) - bitmap height\n * `bitmap` - pointer to XBM bitmap data"]
    pub fn canvas_draw_xbm(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        width: usize,
        height: usize,
        bitmap: *const u8,
    );
}
extern "C" {
    #[doc = "Draw dot at x,y\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate"]
    pub fn canvas_draw_dot(canvas: *mut Canvas, x: i32, y: i32);
}
extern "C" {
    #[doc = "Draw box of width, height at x,y\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `width` - box width\n * `height` - box height"]
    pub fn canvas_draw_box(canvas: *mut Canvas, x: i32, y: i32, width: usize, height: usize);
}
extern "C" {
    #[doc = "Draw frame of width, height at x,y\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `width` - frame width\n * `height` - frame height"]
    pub fn canvas_draw_frame(canvas: *mut Canvas, x: i32, y: i32, width: usize, height: usize);
}
extern "C" {
    #[doc = "Draw line from x1,y1 to x2,y2\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x1` - x1 coordinate\n * `y1` - y1 coordinate\n * `x2` - x2 coordinate\n * `y2` - y2 coordinate"]
    pub fn canvas_draw_line(canvas: *mut Canvas, x1: i32, y1: i32, x2: i32, y2: i32);
}
extern "C" {
    #[doc = "Draw circle at x,y with radius r\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `radius` - radius"]
    pub fn canvas_draw_circle(canvas: *mut Canvas, x: i32, y: i32, radius: usize);
}
extern "C" {
    #[doc = "Draw disc at x,y with radius r\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `radius` - radius"]
    pub fn canvas_draw_disc(canvas: *mut Canvas, x: i32, y: i32, radius: usize);
}
extern "C" {
    #[doc = "Draw triangle with given base and height lengths and their intersection\n coordinate\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate of base and height intersection\n * `y` - y coordinate of base and height intersection\n * `base` - length of triangle side\n * `height` - length of triangle height\n * `dir` - CanvasDirection triangle orientation"]
    pub fn canvas_draw_triangle(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        base: usize,
        height: usize,
        dir: CanvasDirection,
    );
}
extern "C" {
    #[doc = "Draw glyph\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `ch` - character"]
    pub fn canvas_draw_glyph(canvas: *mut Canvas, x: i32, y: i32, ch: u16);
}
extern "C" {
    #[doc = "Set transparency mode\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `alpha` - transparency mode"]
    pub fn canvas_set_bitmap_mode(canvas: *mut Canvas, alpha: bool);
}
extern "C" {
    #[doc = "Draw rounded-corner frame of width, height at x,y, with round value radius\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `width` - frame width\n * `height` - frame height\n * `radius` - frame corner radius"]
    pub fn canvas_draw_rframe(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        width: usize,
        height: usize,
        radius: usize,
    );
}
extern "C" {
    #[doc = "Draw rounded-corner box of width, height at x,y, with round value raduis\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `width` - box width\n * `height` - box height\n * `radius` - box corner radius"]
    pub fn canvas_draw_rbox(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        width: usize,
        height: usize,
        radius: usize,
    );
}
#[doc = "< Press event, emitted after debounce"]
pub const InputType_InputTypePress: InputType = 0;
#[doc = "< Release event, emitted after debounce"]
pub const InputType_InputTypeRelease: InputType = 1;
#[doc = "< Short event, emitted after InputTypeRelease done within INPUT_LONG_PRESS interval"]
pub const InputType_InputTypeShort: InputType = 2;
#[doc = "< Long event, emitted after INPUT_LONG_PRESS_COUNTS interval, asynchronous to InputTypeRelease"]
pub const InputType_InputTypeLong: InputType = 3;
#[doc = "< Repeat event, emitted with INPUT_LONG_PRESS_COUNTS period after InputTypeLong event"]
pub const InputType_InputTypeRepeat: InputType = 4;
#[doc = "< Special value for exceptional"]
pub const InputType_InputTypeMAX: InputType = 5;
#[doc = "Input Types\n Some of them are physical events and some logical"]
pub type InputType = core::ffi::c_uchar;
#[doc = "Input Event, dispatches with FuriPubSub"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct InputEvent {
    pub __bindgen_anon_1: InputEvent__bindgen_ty_1,
    pub key: InputKey,
    pub type_: InputType,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union InputEvent__bindgen_ty_1 {
    pub sequence: u32,
    pub __bindgen_anon_1: InputEvent__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct InputEvent__bindgen_ty_1__bindgen_ty_1 {
    pub _bitfield_align_1: [u32; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
}
#[test]
fn bindgen_test_layout_InputEvent__bindgen_ty_1__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<InputEvent__bindgen_ty_1__bindgen_ty_1>(),
        4usize,
        concat!(
            "Size of: ",
            stringify!(InputEvent__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<InputEvent__bindgen_ty_1__bindgen_ty_1>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(InputEvent__bindgen_ty_1__bindgen_ty_1)
        )
    );
}
impl InputEvent__bindgen_ty_1__bindgen_ty_1 {
    #[inline]
    pub fn sequence_source(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u8) }
    }
    #[inline]
    pub fn set_sequence_source(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 2u8, val as u64)
        }
    }
    #[inline]
    pub fn sequence_counter(&self) -> u32 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) }
    }
    #[inline]
    pub fn set_sequence_counter(&mut self, val: u32) {
        unsafe {
            let val: u32 = ::core::mem::transmute(val);
            self._bitfield_1.set(2usize, 30u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        sequence_source: u8,
        sequence_counter: u32,
    ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 2u8, {
            let sequence_source: u8 = unsafe { ::core::mem::transmute(sequence_source) };
            sequence_source as u64
        });
        __bindgen_bitfield_unit.set(2usize, 30u8, {
            let sequence_counter: u32 = unsafe { ::core::mem::transmute(sequence_counter) };
            sequence_counter as u64
        });
        __bindgen_bitfield_unit
    }
}
#[test]
fn bindgen_test_layout_InputEvent__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<InputEvent__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<InputEvent__bindgen_ty_1>(),
        4usize,
        concat!("Size of: ", stringify!(InputEvent__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<InputEvent__bindgen_ty_1>(),
        4usize,
        concat!("Alignment of ", stringify!(InputEvent__bindgen_ty_1))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sequence) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(InputEvent__bindgen_ty_1),
            "::",
            stringify!(sequence)
        )
    );
}
#[test]
fn bindgen_test_layout_InputEvent() {
    const UNINIT: ::core::mem::MaybeUninit<InputEvent> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<InputEvent>(),
        8usize,
        concat!("Size of: ", stringify!(InputEvent))
    );
    assert_eq!(
        ::core::mem::align_of::<InputEvent>(),
        4usize,
        concat!("Alignment of ", stringify!(InputEvent))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(InputEvent),
            "::",
            stringify!(key)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(InputEvent),
            "::",
            stringify!(type_)
        )
    );
}
extern "C" {
    #[doc = "Get human readable input key name\n # Arguments\n\n* `key` - - InputKey\n # Returns\n\nstring"]
    pub fn input_get_key_name(key: InputKey) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get human readable input type name\n # Arguments\n\n* `type` - - InputType\n # Returns\n\nstring"]
    pub fn input_get_type_name(type_: InputType) -> *const core::ffi::c_char;
}
pub const ViewOrientation_ViewOrientationHorizontal: ViewOrientation = 0;
pub const ViewOrientation_ViewOrientationHorizontalFlip: ViewOrientation = 1;
pub const ViewOrientation_ViewOrientationVertical: ViewOrientation = 2;
pub const ViewOrientation_ViewOrientationVerticalFlip: ViewOrientation = 3;
pub type ViewOrientation = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct View {
    _unused: [u8; 0],
}
#[doc = "View Draw callback\n # Arguments\n\n* `canvas` - pointer to canvas\n * `model` - pointer to model\n called from GUI thread"]
pub type ViewDrawCallback = ::core::option::Option<
    unsafe extern "C" fn(canvas: *mut Canvas, model: *mut core::ffi::c_void),
>;
#[doc = "View Input callback\n # Arguments\n\n* `event` - pointer to input event data\n * `context` - pointer to context\n # Returns\n\ntrue if event handled, false if event ignored\n called from GUI thread"]
pub type ViewInputCallback = ::core::option::Option<
    unsafe extern "C" fn(event: *mut InputEvent, context: *mut core::ffi::c_void) -> bool,
>;
#[doc = "View Custom callback\n # Arguments\n\n* `event` - number of custom event\n * `context` - pointer to context\n # Returns\n\ntrue if event handled, false if event ignored"]
pub type ViewCustomCallback = ::core::option::Option<
    unsafe extern "C" fn(event: u32, context: *mut core::ffi::c_void) -> bool,
>;
#[doc = "View navigation callback\n # Arguments\n\n* `context` - pointer to context\n # Returns\n\nnext view id\n called from GUI thread"]
pub type ViewNavigationCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void) -> u32>;
#[doc = "View callback\n # Arguments\n\n* `context` - pointer to context\n called from GUI thread"]
pub type ViewCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[doc = "View Update Callback Called upon model change, need to be propagated to GUI\n throw ViewPort update\n # Arguments\n\n* `view` - pointer to view\n * `context` - pointer to context\n called from GUI thread"]
pub type ViewUpdateCallback =
    ::core::option::Option<unsafe extern "C" fn(view: *mut View, context: *mut core::ffi::c_void)>;
#[doc = "Model is not allocated"]
pub const ViewModelType_ViewModelTypeNone: ViewModelType = 0;
#[doc = "Model consist of atomic types and/or partial update is not critical for rendering.\n Lock free."]
pub const ViewModelType_ViewModelTypeLockFree: ViewModelType = 1;
#[doc = "Model access is guarded with mutex.\n Locking gui thread."]
pub const ViewModelType_ViewModelTypeLocking: ViewModelType = 2;
#[doc = "View model types"]
pub type ViewModelType = core::ffi::c_uchar;
extern "C" {
    #[doc = "Allocate and init View\n # Returns\n\nView instance"]
    pub fn view_alloc() -> *mut View;
}
extern "C" {
    #[doc = "Free View\n\n # Arguments\n\n* `view` - instance"]
    pub fn view_free(view: *mut View);
}
extern "C" {
    #[doc = "Tie IconAnimation with View\n\n # Arguments\n\n* `view` - View instance\n * `icon_animation` - IconAnimation instance"]
    pub fn view_tie_icon_animation(view: *mut View, icon_animation: *mut IconAnimation);
}
extern "C" {
    #[doc = "Set View Draw callback\n\n # Arguments\n\n* `view` - View instance\n * `callback` - draw callback"]
    pub fn view_set_draw_callback(view: *mut View, callback: ViewDrawCallback);
}
extern "C" {
    #[doc = "Set View Input callback\n\n # Arguments\n\n* `view` - View instance\n * `callback` - input callback"]
    pub fn view_set_input_callback(view: *mut View, callback: ViewInputCallback);
}
extern "C" {
    #[doc = "Set View Custom callback\n\n # Arguments\n\n* `view` - View instance\n * `callback` - input callback"]
    pub fn view_set_custom_callback(view: *mut View, callback: ViewCustomCallback);
}
extern "C" {
    #[doc = "Set Navigation Previous callback\n\n # Arguments\n\n* `view` - View instance\n * `callback` - input callback"]
    pub fn view_set_previous_callback(view: *mut View, callback: ViewNavigationCallback);
}
extern "C" {
    #[doc = "Set Enter callback\n\n # Arguments\n\n* `view` - View instance\n * `callback` - callback"]
    pub fn view_set_enter_callback(view: *mut View, callback: ViewCallback);
}
extern "C" {
    #[doc = "Set Exit callback\n\n # Arguments\n\n* `view` - View instance\n * `callback` - callback"]
    pub fn view_set_exit_callback(view: *mut View, callback: ViewCallback);
}
extern "C" {
    #[doc = "Set Update callback\n\n # Arguments\n\n* `view` - View instance\n * `callback` - callback"]
    pub fn view_set_update_callback(view: *mut View, callback: ViewUpdateCallback);
}
extern "C" {
    #[doc = "Set View Draw callback\n\n # Arguments\n\n* `view` - View instance\n * `context` - context for callbacks"]
    pub fn view_set_update_callback_context(view: *mut View, context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Set View Draw callback\n\n # Arguments\n\n* `view` - View instance\n * `context` - context for callbacks"]
    pub fn view_set_context(view: *mut View, context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Set View Orientation\n\n # Arguments\n\n* `view` - View instance\n * `orientation` - either vertical or horizontal"]
    pub fn view_set_orientation(view: *mut View, orientation: ViewOrientation);
}
extern "C" {
    #[doc = "Allocate view model.\n\n # Arguments\n\n* `view` - View instance\n * `type` - View Model Type\n * `size` - size"]
    pub fn view_allocate_model(view: *mut View, type_: ViewModelType, size: usize);
}
extern "C" {
    #[doc = "Free view model data memory.\n\n # Arguments\n\n* `view` - View instance"]
    pub fn view_free_model(view: *mut View);
}
extern "C" {
    #[doc = "Get view model data\n\n # Arguments\n\n* `view` - View instance\n\n # Returns\n\npointer to model data\n Don't forget to commit model changes"]
    pub fn view_get_model(view: *mut View) -> *mut core::ffi::c_void;
}
extern "C" {
    #[doc = "Commit view model\n\n # Arguments\n\n* `view` - View instance\n * `update` - true if you want to emit view update, false otherwise"]
    pub fn view_commit_model(view: *mut View, update: bool);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FileBrowser {
    _unused: [u8; 0],
}
pub type FileBrowserCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
pub type FileBrowserLoadItemCallback = ::core::option::Option<
    unsafe extern "C" fn(
        path: *mut FuriString,
        context: *mut core::ffi::c_void,
        icon: *mut *mut u8,
        item_name: *mut FuriString,
    ) -> bool,
>;
extern "C" {
    pub fn file_browser_alloc(result_path: *mut FuriString) -> *mut FileBrowser;
}
extern "C" {
    pub fn file_browser_free(browser: *mut FileBrowser);
}
extern "C" {
    pub fn file_browser_get_view(browser: *mut FileBrowser) -> *mut View;
}
extern "C" {
    pub fn file_browser_configure(
        browser: *mut FileBrowser,
        extension: *const core::ffi::c_char,
        base_path: *const core::ffi::c_char,
        skip_assets: bool,
        hide_dot_files: bool,
        file_icon: *const Icon,
        hide_ext: bool,
    );
}
extern "C" {
    pub fn file_browser_start(browser: *mut FileBrowser, path: *mut FuriString);
}
extern "C" {
    pub fn file_browser_stop(browser: *mut FileBrowser);
}
extern "C" {
    pub fn file_browser_set_callback(
        browser: *mut FileBrowser,
        callback: FileBrowserCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn file_browser_set_item_callback(
        browser: *mut FileBrowser,
        callback: FileBrowserLoadItemCallback,
        context: *mut core::ffi::c_void,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DialogsApp {
    _unused: [u8; 0],
}
#[doc = "File browser dialog extra options.\n This can be default-initialized using {dialog_file_browser_set_basic_options}.\n # Arguments\n\n* `extension` - file extension to be offered for selection\n * `base_path` - root folder path for navigation with back key\n * `skip_assets` - true - do not show assets folders\n * `hide_dot_files` - true - hide dot files\n * `icon` - file icon pointer, NULL for default icon\n * `hide_ext` - true - hide extensions for files\n * `item_loader_callback` - callback function for providing custom icon & entry name\n * `hide_ext` - callback context"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DialogsFileBrowserOptions {
    pub extension: *const core::ffi::c_char,
    pub base_path: *const core::ffi::c_char,
    pub skip_assets: bool,
    pub hide_dot_files: bool,
    pub icon: *const Icon,
    pub hide_ext: bool,
    pub item_loader_callback: FileBrowserLoadItemCallback,
    pub item_loader_context: *mut core::ffi::c_void,
}
#[test]
fn bindgen_test_layout_DialogsFileBrowserOptions() {
    const UNINIT: ::core::mem::MaybeUninit<DialogsFileBrowserOptions> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<DialogsFileBrowserOptions>(),
        28usize,
        concat!("Size of: ", stringify!(DialogsFileBrowserOptions))
    );
    assert_eq!(
        ::core::mem::align_of::<DialogsFileBrowserOptions>(),
        4usize,
        concat!("Alignment of ", stringify!(DialogsFileBrowserOptions))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).extension) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(DialogsFileBrowserOptions),
            "::",
            stringify!(extension)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).base_path) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(DialogsFileBrowserOptions),
            "::",
            stringify!(base_path)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).skip_assets) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(DialogsFileBrowserOptions),
            "::",
            stringify!(skip_assets)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hide_dot_files) as usize - ptr as usize },
        9usize,
        concat!(
            "Offset of field: ",
            stringify!(DialogsFileBrowserOptions),
            "::",
            stringify!(hide_dot_files)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).icon) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(DialogsFileBrowserOptions),
            "::",
            stringify!(icon)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hide_ext) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(DialogsFileBrowserOptions),
            "::",
            stringify!(hide_ext)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).item_loader_callback) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(DialogsFileBrowserOptions),
            "::",
            stringify!(item_loader_callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).item_loader_context) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(DialogsFileBrowserOptions),
            "::",
            stringify!(item_loader_context)
        )
    );
}
extern "C" {
    #[doc = "Initialize file browser dialog options and set default values.\n This is guaranteed to initialize all fields\n so it is safe to pass pointer to uninitialized {options}\n and assume that the data behind it becomes fully initialized after the call.\n # Arguments\n\n* `options` - pointer to options structure\n * `extension` - file extension to filter\n * `icon` - file icon pointer, NULL for default icon"]
    pub fn dialog_file_browser_set_basic_options(
        options: *mut DialogsFileBrowserOptions,
        extension: *const core::ffi::c_char,
        icon: *const Icon,
    );
}
extern "C" {
    #[doc = "Shows and processes the file browser dialog\n # Arguments\n\n* `context` - api pointer\n * `result_path` - selected file path string pointer\n * `path` - preselected file path string pointer\n * `options` - file browser dialog extra options, may be null\n # Returns\n\nbool whether a file was selected"]
    pub fn dialog_file_browser_show(
        context: *mut DialogsApp,
        result_path: *mut FuriString,
        path: *mut FuriString,
        options: *const DialogsFileBrowserOptions,
    ) -> bool;
}
pub const DialogMessageButton_DialogMessageButtonBack: DialogMessageButton = 0;
pub const DialogMessageButton_DialogMessageButtonLeft: DialogMessageButton = 1;
pub const DialogMessageButton_DialogMessageButtonCenter: DialogMessageButton = 2;
pub const DialogMessageButton_DialogMessageButtonRight: DialogMessageButton = 3;
#[doc = "Message result type"]
pub type DialogMessageButton = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DialogMessage {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate and fill message\n # Returns\n\nDialogMessage*"]
    pub fn dialog_message_alloc() -> *mut DialogMessage;
}
extern "C" {
    #[doc = "Free message struct\n # Arguments\n\n* `message` - message pointer"]
    pub fn dialog_message_free(message: *mut DialogMessage);
}
extern "C" {
    #[doc = "Set message text\n # Arguments\n\n* `message` - message pointer\n * `text` - text, can be NULL if you don't want to display the text\n * `x` - x position\n * `y` - y position\n * `horizontal` - horizontal alignment\n * `vertical` - vertical alignment"]
    pub fn dialog_message_set_text(
        message: *mut DialogMessage,
        text: *const core::ffi::c_char,
        x: u8,
        y: u8,
        horizontal: Align,
        vertical: Align,
    );
}
extern "C" {
    #[doc = "Set message header\n # Arguments\n\n* `message` - message pointer\n * `text` - text, can be NULL if you don't want to display the header\n * `x` - x position\n * `y` - y position\n * `horizontal` - horizontal alignment\n * `vertical` - vertical alignment"]
    pub fn dialog_message_set_header(
        message: *mut DialogMessage,
        text: *const core::ffi::c_char,
        x: u8,
        y: u8,
        horizontal: Align,
        vertical: Align,
    );
}
extern "C" {
    #[doc = "Set message icon\n # Arguments\n\n* `message` - message pointer\n * `icon` - icon pointer, can be NULL if you don't want to display the icon\n * `x` - x position\n * `y` - y position"]
    pub fn dialog_message_set_icon(message: *mut DialogMessage, icon: *const Icon, x: u8, y: u8);
}
extern "C" {
    #[doc = "Set message buttons text, button text can be NULL if you don't want to display and process some buttons\n # Arguments\n\n* `message` - message pointer\n * `left` - left button text, can be NULL if you don't want to display the left button\n * `center` - center button text, can be NULL if you don't want to display the center button\n * `right` - right button text, can be NULL if you don't want to display the right button"]
    pub fn dialog_message_set_buttons(
        message: *mut DialogMessage,
        left: *const core::ffi::c_char,
        center: *const core::ffi::c_char,
        right: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Show message from filled struct\n # Arguments\n\n* `context` - api pointer\n * `message` - message struct pointer to be shown\n # Returns\n\nDialogMessageButton type"]
    pub fn dialog_message_show(
        context: *mut DialogsApp,
        message: *const DialogMessage,
    ) -> DialogMessageButton;
}
extern "C" {
    #[doc = "Show SD error message (with question sign)\n # Arguments\n\n* `context` -\n * `error_text` -"]
    pub fn dialog_message_show_storage_error(
        context: *mut DialogsApp,
        error_text: *const core::ffi::c_char,
    );
}
pub const DolphinApp_DolphinAppSubGhz: DolphinApp = 0;
pub const DolphinApp_DolphinAppRfid: DolphinApp = 1;
pub const DolphinApp_DolphinAppNfc: DolphinApp = 2;
pub const DolphinApp_DolphinAppIr: DolphinApp = 3;
pub const DolphinApp_DolphinAppIbutton: DolphinApp = 4;
pub const DolphinApp_DolphinAppBadusb: DolphinApp = 5;
pub const DolphinApp_DolphinAppPlugin: DolphinApp = 6;
pub const DolphinApp_DolphinAppMAX: DolphinApp = 7;
pub type DolphinApp = core::ffi::c_uchar;
pub const DolphinDeed_DolphinDeedSubGhzReceiverInfo: DolphinDeed = 0;
pub const DolphinDeed_DolphinDeedSubGhzSave: DolphinDeed = 1;
pub const DolphinDeed_DolphinDeedSubGhzRawRec: DolphinDeed = 2;
pub const DolphinDeed_DolphinDeedSubGhzAddManually: DolphinDeed = 3;
pub const DolphinDeed_DolphinDeedSubGhzSend: DolphinDeed = 4;
pub const DolphinDeed_DolphinDeedSubGhzFrequencyAnalyzer: DolphinDeed = 5;
pub const DolphinDeed_DolphinDeedRfidRead: DolphinDeed = 6;
pub const DolphinDeed_DolphinDeedRfidReadSuccess: DolphinDeed = 7;
pub const DolphinDeed_DolphinDeedRfidSave: DolphinDeed = 8;
pub const DolphinDeed_DolphinDeedRfidEmulate: DolphinDeed = 9;
pub const DolphinDeed_DolphinDeedRfidAdd: DolphinDeed = 10;
pub const DolphinDeed_DolphinDeedNfcRead: DolphinDeed = 11;
pub const DolphinDeed_DolphinDeedNfcReadSuccess: DolphinDeed = 12;
pub const DolphinDeed_DolphinDeedNfcSave: DolphinDeed = 13;
pub const DolphinDeed_DolphinDeedNfcDetectReader: DolphinDeed = 14;
pub const DolphinDeed_DolphinDeedNfcEmulate: DolphinDeed = 15;
pub const DolphinDeed_DolphinDeedNfcMfcAdd: DolphinDeed = 16;
pub const DolphinDeed_DolphinDeedNfcAddSave: DolphinDeed = 17;
pub const DolphinDeed_DolphinDeedNfcAddEmulate: DolphinDeed = 18;
pub const DolphinDeed_DolphinDeedIrSend: DolphinDeed = 19;
pub const DolphinDeed_DolphinDeedIrLearnSuccess: DolphinDeed = 20;
pub const DolphinDeed_DolphinDeedIrSave: DolphinDeed = 21;
pub const DolphinDeed_DolphinDeedIbuttonRead: DolphinDeed = 22;
pub const DolphinDeed_DolphinDeedIbuttonReadSuccess: DolphinDeed = 23;
pub const DolphinDeed_DolphinDeedIbuttonSave: DolphinDeed = 24;
pub const DolphinDeed_DolphinDeedIbuttonEmulate: DolphinDeed = 25;
pub const DolphinDeed_DolphinDeedIbuttonAdd: DolphinDeed = 26;
pub const DolphinDeed_DolphinDeedBadUsbPlayScript: DolphinDeed = 27;
pub const DolphinDeed_DolphinDeedU2fAuthorized: DolphinDeed = 28;
pub const DolphinDeed_DolphinDeedGpioUartBridge: DolphinDeed = 29;
pub const DolphinDeed_DolphinDeedPluginStart: DolphinDeed = 30;
pub const DolphinDeed_DolphinDeedPluginGameStart: DolphinDeed = 31;
pub const DolphinDeed_DolphinDeedPluginGameWin: DolphinDeed = 32;
pub const DolphinDeed_DolphinDeedMAX: DolphinDeed = 33;
pub const DolphinDeed_DolphinDeedTestLeft: DolphinDeed = 34;
pub const DolphinDeed_DolphinDeedTestRight: DolphinDeed = 35;
pub type DolphinDeed = core::ffi::c_uchar;
extern "C" {
    pub fn dolphin_deed_get_app(deed: DolphinDeed) -> DolphinApp;
}
extern "C" {
    pub fn dolphin_deed_get_app_limit(app: DolphinApp) -> u8;
}
extern "C" {
    pub fn dolphin_deed_get_weight(deed: DolphinDeed) -> u8;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Dolphin {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DolphinStats {
    pub icounter: u32,
    pub butthurt: u32,
    pub timestamp: u64,
    pub level: u8,
    pub level_up_is_pending: bool,
}
#[test]
fn bindgen_test_layout_DolphinStats() {
    const UNINIT: ::core::mem::MaybeUninit<DolphinStats> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<DolphinStats>(),
        24usize,
        concat!("Size of: ", stringify!(DolphinStats))
    );
    assert_eq!(
        ::core::mem::align_of::<DolphinStats>(),
        8usize,
        concat!("Alignment of ", stringify!(DolphinStats))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).icounter) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(DolphinStats),
            "::",
            stringify!(icounter)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).butthurt) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(DolphinStats),
            "::",
            stringify!(butthurt)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(DolphinStats),
            "::",
            stringify!(timestamp)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).level) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(DolphinStats),
            "::",
            stringify!(level)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).level_up_is_pending) as usize - ptr as usize },
        17usize,
        concat!(
            "Offset of field: ",
            stringify!(DolphinStats),
            "::",
            stringify!(level_up_is_pending)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DolphinSettings {
    pub happy_mode: bool,
}
#[test]
fn bindgen_test_layout_DolphinSettings() {
    const UNINIT: ::core::mem::MaybeUninit<DolphinSettings> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<DolphinSettings>(),
        1usize,
        concat!("Size of: ", stringify!(DolphinSettings))
    );
    assert_eq!(
        ::core::mem::align_of::<DolphinSettings>(),
        1usize,
        concat!("Alignment of ", stringify!(DolphinSettings))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).happy_mode) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(DolphinSettings),
            "::",
            stringify!(happy_mode)
        )
    );
}
extern "C" {
    #[doc = "Deed complete notification. Call it on deed completion.\n See dolphin_deed.h for available deeds. In futures it will become part of assets.\n Thread safe, async"]
    pub fn dolphin_deed(deed: DolphinDeed);
}
extern "C" {
    pub fn dolphin_get_settings(dolphin: *mut Dolphin, settings: *mut DolphinSettings);
}
extern "C" {
    pub fn dolphin_set_settings(dolphin: *mut Dolphin, settings: *mut DolphinSettings);
}
extern "C" {
    #[doc = "Retrieve dolphin stats\n Thread safe, blocking"]
    pub fn dolphin_stats(dolphin: *mut Dolphin) -> DolphinStats;
}
extern "C" {
    #[doc = "Flush dolphin queue and save state\n Thread safe, blocking"]
    pub fn dolphin_flush(dolphin: *mut Dolphin);
}
extern "C" {
    pub fn dolphin_upgrade_level(dolphin: *mut Dolphin);
}
extern "C" {
    pub fn dolphin_get_pubsub(dolphin: *mut Dolphin) -> *mut FuriPubSub;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Expansion {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Enable support for expansion modules.\n\n Calling this function will load user settings and enable\n expansion module support on the serial port specified in said settings.\n\n If expansion module support was disabled in settings, this function\n does nothing.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the Expansion instance."]
    pub fn expansion_enable(instance: *mut Expansion);
}
extern "C" {
    #[doc = "Disable support for expansion modules.\n\n Calling this function will cease all communications with the\n expansion module (if any), release the serial handle and\n reset the respective pins to the default state.\n\n > **Note:** Applications requiring serial port access MUST call\n this function BEFORE calling furi_hal_serial_control_acquire().\n Similarly, an expansion_enable() call MUST be made right AFTER\n a call to furi_hal_serial_control_release() to ensure that\n the user settings are properly restored.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the Expansion instance."]
    pub fn expansion_disable(instance: *mut Expansion);
}
extern "C" {
    #[doc = "Enable support for expansion modules on designated serial port.\n\n Only one serial port can be used to communicate with an expansion\n module at a time.\n\n Calling this function when expansion module support is already enabled\n will first disable the previous setting, then enable the current one.\n\n This function does not respect user settings for expansion modules,\n so calling it might leave the system in inconsistent state. Avoid using it\n unless absolutely necessary.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the Expansion instance.\n * `serial_id` (direction in) - numerical identifier of the serial."]
    pub fn expansion_set_listen_serial(instance: *mut Expansion, serial_id: FuriHalSerialId);
}
extern "C" {
    #[doc = "Draw progress bar.\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - progress bar position on X axis\n * `y` - progress bar position on Y axis\n * `width` - progress bar width\n * `progress` - progress (0.0 - 1.0)"]
    pub fn elements_progress_bar(canvas: *mut Canvas, x: i32, y: i32, width: usize, progress: f32);
}
extern "C" {
    #[doc = "Draw progress bar with text.\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - progress bar position on X axis\n * `y` - progress bar position on Y axis\n * `width` - progress bar width\n * `progress` - progress (0.0 - 1.0)\n * `text` - text to draw"]
    pub fn elements_progress_bar_with_text(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        width: usize,
        progress: f32,
        text: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Draw scrollbar on canvas at specific position.\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - scrollbar position on X axis\n * `y` - scrollbar position on Y axis\n * `height` - scrollbar height\n * `pos` - current element\n * `total` - total elements"]
    pub fn elements_scrollbar_pos(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        height: usize,
        pos: usize,
        total: usize,
    );
}
extern "C" {
    #[doc = "Draw scrollbar on canvas.\n > **Note:** width 3px, height equal to canvas height\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `pos` - current element of total elements\n * `total` - total elements"]
    pub fn elements_scrollbar(canvas: *mut Canvas, pos: usize, total: usize);
}
extern "C" {
    #[doc = "Draw rounded frame\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x,` - y top left corner coordinates\n * `width,` - height frame width and height"]
    pub fn elements_frame(canvas: *mut Canvas, x: i32, y: i32, width: usize, height: usize);
}
extern "C" {
    #[doc = "Draw button in left corner\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `str` - button text"]
    pub fn elements_button_left(canvas: *mut Canvas, str_: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Draw button in right corner\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `str` - button text"]
    pub fn elements_button_right(canvas: *mut Canvas, str_: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "This function draws a button in the top left corner of the canvas with icon and string.\n\n The design and layout of the button is defined within this function.\n\n # Arguments\n\n* `canvas` (direction in) - This is a pointer to the `Canvas` structure where the button will be drawn.\n * `str` (direction in) - This is a pointer to the character string that will be drawn within the button.\n"]
    pub fn elements_button_up(canvas: *mut Canvas, str_: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "This function draws a button in the top right corner of the canvas with icon and string.\n\n The design and layout of the button is defined within this function.\n\n # Arguments\n\n* `canvas` (direction in) - This is a pointer to the `Canvas` structure where the button will be drawn.\n * `str` (direction in) - This is a pointer to the character string that will be drawn within the button.\n"]
    pub fn elements_button_down(canvas: *mut Canvas, str_: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Draw button in center\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `str` - button text"]
    pub fn elements_button_center(canvas: *mut Canvas, str_: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Draw aligned multiline text\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x,` - y coordinates based on align param\n * `horizontal,` - vertical alignment of multiline text\n * `text` - string (possible multiline)"]
    pub fn elements_multiline_text_aligned(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        horizontal: Align,
        vertical: Align,
        text: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Draw multiline text\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - top left corner coordinates\n * `y` - top left corner coordinates\n * `text` - string (possible multiline)"]
    pub fn elements_multiline_text(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        text: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Draw framed multiline text\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - top left corner coordinates\n * `y` - top left corner coordinates\n * `text` - string (possible multiline)"]
    pub fn elements_multiline_text_framed(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        text: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Draw slightly rounded frame\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - top left corner coordinates\n * `y` - top left corner coordinates\n * `width` - width of frame\n * `height` - height of frame"]
    pub fn elements_slightly_rounded_frame(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        width: usize,
        height: usize,
    );
}
extern "C" {
    #[doc = "Draw slightly rounded box\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - top left corner coordinates\n * `y` - top left corner coordinates\n * `width` - height of box\n * `height` - height of box"]
    pub fn elements_slightly_rounded_box(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        width: usize,
        height: usize,
    );
}
extern "C" {
    #[doc = "Draw bold rounded frame\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - top left corner coordinates\n * `y` - top left corner coordinates\n * `width` - width of frame\n * `height` - height of frame"]
    pub fn elements_bold_rounded_frame(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        width: usize,
        height: usize,
    );
}
extern "C" {
    #[doc = "Draw bubble frame for text\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - left x coordinates\n * `y` - top y coordinate\n * `width` - bubble width\n * `height` - bubble height"]
    pub fn elements_bubble(canvas: *mut Canvas, x: i32, y: i32, width: usize, height: usize);
}
extern "C" {
    #[doc = "Draw bubble frame for text with corner\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - left x coordinates\n * `y` - top y coordinate\n * `text` - text to display\n * `horizontal` - horizontal aligning\n * `vertical` - aligning"]
    pub fn elements_bubble_str(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        text: *const core::ffi::c_char,
        horizontal: Align,
        vertical: Align,
    );
}
extern "C" {
    #[doc = "Trim string buffer to fit width in pixels\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `string` - string to trim\n * `width` - max width"]
    pub fn elements_string_fit_width(canvas: *mut Canvas, string: *mut FuriString, width: usize);
}
extern "C" {
    #[doc = "Draw scrollable text line\n\n # Arguments\n\n* `canvas` - The canvas\n * `x` (direction in) - X coordinate\n * `y` (direction in) - Y coordinate\n * `width` (direction in) - The width\n * `string` - The string\n * `scroll` (direction in) - The scroll counter: 0 - no scroll, any other number - scroll. Just count up, everything else will be calculated on the inside.\n * `ellipsis` (direction in) - The ellipsis flag: true to add ellipse"]
    pub fn elements_scrollable_text_line(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        width: usize,
        string: *mut FuriString,
        scroll: usize,
        ellipsis: bool,
    );
}
extern "C" {
    #[doc = "Draw text box element\n\n # Arguments\n\n* `canvas` - Canvas instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `width` - width to fit text\n * `height` - height to fit text\n * `horizontal` - Align instance\n * `vertical` - Align instance\n * `text` (direction in) - Formatted text. The following formats are available:\n \"text- bold font is used\n \"text- monospaced font is used\n \"text- white text on black background\n * `strip_to_dots` - Strip text to ... if does not fit to width"]
    pub fn elements_text_box(
        canvas: *mut Canvas,
        x: i32,
        y: i32,
        width: usize,
        height: usize,
        horizontal: Align,
        vertical: Align,
        text: *const core::ffi::c_char,
        strip_to_dots: bool,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ViewPort {
    _unused: [u8; 0],
}
pub const ViewPortOrientation_ViewPortOrientationHorizontal: ViewPortOrientation = 0;
pub const ViewPortOrientation_ViewPortOrientationHorizontalFlip: ViewPortOrientation = 1;
pub const ViewPortOrientation_ViewPortOrientationVertical: ViewPortOrientation = 2;
pub const ViewPortOrientation_ViewPortOrientationVerticalFlip: ViewPortOrientation = 3;
#[doc = "< Special value, don't use it"]
pub const ViewPortOrientation_ViewPortOrientationMAX: ViewPortOrientation = 4;
pub type ViewPortOrientation = core::ffi::c_uchar;
#[doc = "ViewPort Draw callback\n called from GUI thread"]
pub type ViewPortDrawCallback = ::core::option::Option<
    unsafe extern "C" fn(canvas: *mut Canvas, context: *mut core::ffi::c_void),
>;
#[doc = "ViewPort Input callback\n called from GUI thread"]
pub type ViewPortInputCallback = ::core::option::Option<
    unsafe extern "C" fn(event: *mut InputEvent, context: *mut core::ffi::c_void),
>;
extern "C" {
    #[doc = "ViewPort allocator\n\n always returns view_port or stops system if not enough memory.\n\n # Returns\n\nViewPort instance"]
    pub fn view_port_alloc() -> *mut ViewPort;
}
extern "C" {
    #[doc = "ViewPort deallocator\n\n Ensure that view_port was unregistered in GUI system before use.\n\n # Arguments\n\n* `view_port` - ViewPort instance"]
    pub fn view_port_free(view_port: *mut ViewPort);
}
extern "C" {
    #[doc = "Set view_port width.\n\n Will be used to limit canvas drawing area and autolayout feature.\n\n # Arguments\n\n* `view_port` - ViewPort instance\n * `width` - wanted width, 0 - auto."]
    pub fn view_port_set_width(view_port: *mut ViewPort, width: u8);
}
extern "C" {
    pub fn view_port_get_width(view_port: *const ViewPort) -> u8;
}
extern "C" {
    #[doc = "Set view_port height.\n\n Will be used to limit canvas drawing area and autolayout feature.\n\n # Arguments\n\n* `view_port` - ViewPort instance\n * `height` - wanted height, 0 - auto."]
    pub fn view_port_set_height(view_port: *mut ViewPort, height: u8);
}
extern "C" {
    pub fn view_port_get_height(view_port: *const ViewPort) -> u8;
}
extern "C" {
    #[doc = "Enable or disable view_port rendering.\n\n # Arguments\n\n* `view_port` - ViewPort instance\n * `enabled` - Indicates if enabled\n automatically dispatches update event"]
    pub fn view_port_enabled_set(view_port: *mut ViewPort, enabled: bool);
}
extern "C" {
    pub fn view_port_is_enabled(view_port: *const ViewPort) -> bool;
}
extern "C" {
    #[doc = "ViewPort event callbacks\n\n # Arguments\n\n* `view_port` - ViewPort instance\n * `callback` - appropriate callback function\n * `context` - context to pass to callback"]
    pub fn view_port_draw_callback_set(
        view_port: *mut ViewPort,
        callback: ViewPortDrawCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn view_port_input_callback_set(
        view_port: *mut ViewPort,
        callback: ViewPortInputCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Emit update signal to GUI system.\n\n Rendering will happen later after GUI system process signal.\n\n # Arguments\n\n* `view_port` - ViewPort instance"]
    pub fn view_port_update(view_port: *mut ViewPort);
}
extern "C" {
    #[doc = "Set ViewPort orientation.\n\n # Arguments\n\n* `view_port` - ViewPort instance\n * `orientation` - display orientation, horizontal or vertical."]
    pub fn view_port_set_orientation(view_port: *mut ViewPort, orientation: ViewPortOrientation);
}
extern "C" {
    pub fn view_port_get_orientation(view_port: *const ViewPort) -> ViewPortOrientation;
}
#[doc = "< Desktop layer for internal use. Like fullscreen but with status bar"]
pub const GuiLayer_GuiLayerDesktop: GuiLayer = 0;
#[doc = "< Window layer, status bar is shown"]
pub const GuiLayer_GuiLayerWindow: GuiLayer = 1;
#[doc = "< Status bar left-side layer, auto-layout"]
pub const GuiLayer_GuiLayerStatusBarLeft: GuiLayer = 2;
#[doc = "< Status bar right-side layer, auto-layout"]
pub const GuiLayer_GuiLayerStatusBarRight: GuiLayer = 3;
#[doc = "< Fullscreen layer, no status bar"]
pub const GuiLayer_GuiLayerFullscreen: GuiLayer = 4;
#[doc = "< Don't use or move, special value"]
pub const GuiLayer_GuiLayerMAX: GuiLayer = 5;
#[doc = "Gui layers"]
pub type GuiLayer = core::ffi::c_uchar;
#[doc = "Gui Canvas Commit Callback"]
pub type GuiCanvasCommitCallback = ::core::option::Option<
    unsafe extern "C" fn(
        data: *mut u8,
        size: usize,
        orientation: CanvasOrientation,
        context: *mut core::ffi::c_void,
    ),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Gui {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Add view_port to view_port tree\n\n > thread safe\n\n # Arguments\n\n* `gui` - Gui instance\n * `view_port` - ViewPort instance\n * `layer` (direction in) - GuiLayer where to place view_port"]
    pub fn gui_add_view_port(gui: *mut Gui, view_port: *mut ViewPort, layer: GuiLayer);
}
extern "C" {
    #[doc = "Remove view_port from rendering tree\n\n > thread safe\n\n # Arguments\n\n* `gui` - Gui instance\n * `view_port` - ViewPort instance"]
    pub fn gui_remove_view_port(gui: *mut Gui, view_port: *mut ViewPort);
}
extern "C" {
    #[doc = "Send ViewPort to the front\n\n Places selected ViewPort to the top of the drawing stack\n\n # Arguments\n\n* `gui` - Gui instance\n * `view_port` - ViewPort instance"]
    pub fn gui_view_port_send_to_front(gui: *mut Gui, view_port: *mut ViewPort);
}
extern "C" {
    #[doc = "Add gui canvas commit callback\n\n This callback will be called upon Canvas commit Callback dispatched from GUI\n thread and is time critical\n\n # Arguments\n\n* `gui` - Gui instance\n * `callback` - GuiCanvasCommitCallback\n * `context` - GuiCanvasCommitCallback context"]
    pub fn gui_add_framebuffer_callback(
        gui: *mut Gui,
        callback: GuiCanvasCommitCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Remove gui canvas commit callback\n\n # Arguments\n\n* `gui` - Gui instance\n * `callback` - GuiCanvasCommitCallback\n * `context` - GuiCanvasCommitCallback context"]
    pub fn gui_remove_framebuffer_callback(
        gui: *mut Gui,
        callback: GuiCanvasCommitCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Get gui canvas frame buffer size\n *\n # Arguments\n\n* `gui` - Gui instance\n # Returns\n\nsize_t size of frame buffer in bytes"]
    pub fn gui_get_framebuffer_size(gui: *const Gui) -> usize;
}
extern "C" {
    #[doc = "Set lockdown mode\n\n When lockdown mode is enabled, only GuiLayerDesktop is shown.\n This feature prevents services from showing sensitive information when flipper is locked.\n\n # Arguments\n\n* `gui` - Gui instance\n * `lockdown` - bool, true if enabled"]
    pub fn gui_set_lockdown(gui: *mut Gui, lockdown: bool);
}
extern "C" {
    #[doc = "Acquire Direct Draw lock and get Canvas instance\n\n This method return Canvas instance for use in monopoly mode. Direct draw lock\n disables input and draw call dispatch functions in GUI service. No other\n applications or services will be able to draw until gui_direct_draw_release\n call.\n\n # Arguments\n\n* `gui` - The graphical user interface\n\n # Returns\n\nCanvas instance"]
    pub fn gui_direct_draw_acquire(gui: *mut Gui) -> *mut Canvas;
}
extern "C" {
    #[doc = "Release Direct Draw Lock\n\n Release Direct Draw Lock, enables Input and Draw call processing. Canvas\n acquired in gui_direct_draw_acquire will become invalid after this call.\n\n # Arguments\n\n* `gui` - Gui instance"]
    pub fn gui_direct_draw_release(gui: *mut Gui);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Icon {
    pub width: u16,
    pub height: u16,
    pub frame_count: u8,
    pub frame_rate: u8,
    pub frames: *const *const u8,
}
#[test]
fn bindgen_test_layout_Icon() {
    const UNINIT: ::core::mem::MaybeUninit<Icon> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<Icon>(),
        12usize,
        concat!("Size of: ", stringify!(Icon))
    );
    assert_eq!(
        ::core::mem::align_of::<Icon>(),
        4usize,
        concat!("Alignment of ", stringify!(Icon))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).width) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Icon),
            "::",
            stringify!(width)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).height) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(Icon),
            "::",
            stringify!(height)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).frame_count) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(Icon),
            "::",
            stringify!(frame_count)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).frame_rate) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(Icon),
            "::",
            stringify!(frame_rate)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).frames) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(Icon),
            "::",
            stringify!(frames)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ButtonMenu {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ButtonMenuItem {
    _unused: [u8; 0],
}
#[doc = "Callback for any button menu actions"]
pub type ButtonMenuItemCallback = ::core::option::Option<
    unsafe extern "C" fn(context: *mut core::ffi::c_void, index: i32, type_: InputType),
>;
pub const ButtonMenuItemType_ButtonMenuItemTypeCommon: ButtonMenuItemType = 0;
pub const ButtonMenuItemType_ButtonMenuItemTypeControl: ButtonMenuItemType = 1;
#[doc = "Type of button. Difference in drawing buttons."]
pub type ButtonMenuItemType = core::ffi::c_uchar;
extern "C" {
    #[doc = "Get button menu view\n\n # Arguments\n\n* `button_menu` - ButtonMenu instance\n\n # Returns\n\nView instance that can be used for embedding"]
    pub fn button_menu_get_view(button_menu: *mut ButtonMenu) -> *mut View;
}
extern "C" {
    #[doc = "Clean button menu\n\n # Arguments\n\n* `button_menu` - ButtonMenu instance"]
    pub fn button_menu_reset(button_menu: *mut ButtonMenu);
}
extern "C" {
    #[doc = "Add item to button menu instance\n\n # Arguments\n\n* `button_menu` - ButtonMenu instance\n * `label` - text inside new button\n * `index` - value to distinct between buttons inside\n ButtonMenuItemCallback\n * `callback` - The callback\n * `type` - type of button to create. Differ by button\n drawing. Control buttons have no frames, and\n have more squared borders.\n * `callback_context` - The callback context\n\n # Returns\n\npointer to just-created item"]
    pub fn button_menu_add_item(
        button_menu: *mut ButtonMenu,
        label: *const core::ffi::c_char,
        index: i32,
        callback: ButtonMenuItemCallback,
        type_: ButtonMenuItemType,
        callback_context: *mut core::ffi::c_void,
    ) -> *mut ButtonMenuItem;
}
extern "C" {
    #[doc = "Allocate and initialize new instance of ButtonMenu model\n\n # Returns\n\njust-created ButtonMenu model"]
    pub fn button_menu_alloc() -> *mut ButtonMenu;
}
extern "C" {
    #[doc = "Free ButtonMenu element\n\n # Arguments\n\n* `button_menu` - ButtonMenu instance"]
    pub fn button_menu_free(button_menu: *mut ButtonMenu);
}
extern "C" {
    #[doc = "Set ButtonMenu header on top of canvas\n\n # Arguments\n\n* `button_menu` - ButtonMenu instance\n * `header` - header on the top of button menu"]
    pub fn button_menu_set_header(button_menu: *mut ButtonMenu, header: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Set selected item\n\n # Arguments\n\n* `button_menu` - ButtonMenu instance\n * `index` - index of ButtonMenu to be selected"]
    pub fn button_menu_set_selected_item(button_menu: *mut ButtonMenu, index: u32);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ButtonPanel {
    _unused: [u8; 0],
}
#[doc = "Callback type to call for handling selecting button_panel items"]
pub type ButtonItemCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void, index: u32)>;
extern "C" {
    #[doc = "Allocate new button_panel module.\n\n # Returns\n\nButtonPanel instance"]
    pub fn button_panel_alloc() -> *mut ButtonPanel;
}
extern "C" {
    #[doc = "Free button_panel module.\n\n # Arguments\n\n* `button_panel` - ButtonPanel instance"]
    pub fn button_panel_free(button_panel: *mut ButtonPanel);
}
extern "C" {
    #[doc = "Free items from button_panel module. Preallocated matrix stays unchanged.\n\n # Arguments\n\n* `button_panel` - ButtonPanel instance"]
    pub fn button_panel_reset(button_panel: *mut ButtonPanel);
}
extern "C" {
    #[doc = "Reserve space for adding items.\n\n One does not simply use button_panel_add_item() without this function. It\n should be allocated space for it first.\n\n # Arguments\n\n* `button_panel` - ButtonPanel instance\n * `reserve_x` - number of columns in button_panel\n * `reserve_y` - number of rows in button_panel"]
    pub fn button_panel_reserve(button_panel: *mut ButtonPanel, reserve_x: usize, reserve_y: usize);
}
extern "C" {
    #[doc = "Add item to button_panel module.\n\n Have to set element in bounds of allocated size by X and by Y.\n\n # Arguments\n\n* `button_panel` - ButtonPanel instance\n * `index` - value to pass to callback\n * `matrix_place_x` - coordinates by x-axis on virtual grid, it\n is only used for navigation\n * `matrix_place_y` - coordinates by y-axis on virtual grid, it\n is only used for naviagation\n * `x` - x-coordinate to draw icon on\n * `y` - y-coordinate to draw icon on\n * `icon_name` - name of the icon to draw\n * `icon_name_selected` - name of the icon to draw when current\n element is selected\n * `callback` - function to call when specific element is\n selected (pressed Ok on selected item)\n * `callback_context` - context to pass to callback"]
    pub fn button_panel_add_item(
        button_panel: *mut ButtonPanel,
        index: u32,
        matrix_place_x: u16,
        matrix_place_y: u16,
        x: u16,
        y: u16,
        icon_name: *const Icon,
        icon_name_selected: *const Icon,
        callback: ButtonItemCallback,
        callback_context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Get button_panel view.\n\n # Arguments\n\n* `button_panel` - ButtonPanel instance\n\n # Returns\n\nacquired view"]
    pub fn button_panel_get_view(button_panel: *mut ButtonPanel) -> *mut View;
}
extern "C" {
    #[doc = "Add label to button_panel module.\n\n # Arguments\n\n* `button_panel` - ButtonPanel instance\n * `x` - x-coordinate to place label\n * `y` - y-coordinate to place label\n * `font` - font to write label with\n * `label_str` - string label to write"]
    pub fn button_panel_add_label(
        button_panel: *mut ButtonPanel,
        x: u16,
        y: u16,
        font: Font,
        label_str: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Add a non-button icon to button_panel module.\n\n # Arguments\n\n* `button_panel` - ButtonPanel instance\n * `x` - x-coordinate to place icon\n * `y` - y-coordinate to place icon\n * `icon_name` - name of the icon to draw"]
    pub fn button_panel_add_icon(
        button_panel: *mut ButtonPanel,
        x: u16,
        y: u16,
        icon_name: *const Icon,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ByteInput {
    _unused: [u8; 0],
}
#[doc = "callback that is executed on save button press"]
pub type ByteInputCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[doc = "callback that is executed when byte buffer is changed"]
pub type ByteChangedCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Allocate and initialize byte input. This byte input is used to enter bytes.\n\n # Returns\n\nByteInput instance pointer"]
    pub fn byte_input_alloc() -> *mut ByteInput;
}
extern "C" {
    #[doc = "Deinitialize and free byte input\n\n # Arguments\n\n* `byte_input` - Byte input instance"]
    pub fn byte_input_free(byte_input: *mut ByteInput);
}
extern "C" {
    #[doc = "Get byte input view\n\n # Arguments\n\n* `byte_input` - byte input instance\n\n # Returns\n\nView instance that can be used for embedding"]
    pub fn byte_input_get_view(byte_input: *mut ByteInput) -> *mut View;
}
extern "C" {
    #[doc = "Set byte input result callback\n\n # Arguments\n\n* `byte_input` - byte input instance\n * `input_callback` - input callback fn\n * `changed_callback` - changed callback fn\n * `callback_context` - callback context\n * `bytes` - buffer to use\n * `bytes_count` - buffer length"]
    pub fn byte_input_set_result_callback(
        byte_input: *mut ByteInput,
        input_callback: ByteInputCallback,
        changed_callback: ByteChangedCallback,
        callback_context: *mut core::ffi::c_void,
        bytes: *mut u8,
        bytes_count: u8,
    );
}
extern "C" {
    #[doc = "Set byte input header text\n\n # Arguments\n\n* `byte_input` - byte input instance\n * `text` - text to be shown"]
    pub fn byte_input_set_header_text(byte_input: *mut ByteInput, text: *const core::ffi::c_char);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DialogEx {
    _unused: [u8; 0],
}
pub const DialogExResult_DialogExResultLeft: DialogExResult = 0;
pub const DialogExResult_DialogExResultCenter: DialogExResult = 1;
pub const DialogExResult_DialogExResultRight: DialogExResult = 2;
pub const DialogExResult_DialogExPressLeft: DialogExResult = 3;
pub const DialogExResult_DialogExPressCenter: DialogExResult = 4;
pub const DialogExResult_DialogExPressRight: DialogExResult = 5;
pub const DialogExResult_DialogExReleaseLeft: DialogExResult = 6;
pub const DialogExResult_DialogExReleaseCenter: DialogExResult = 7;
pub const DialogExResult_DialogExReleaseRight: DialogExResult = 8;
#[doc = "DialogEx result"]
pub type DialogExResult = core::ffi::c_uchar;
#[doc = "DialogEx result callback type\n comes from GUI thread"]
pub type DialogExResultCallback = ::core::option::Option<
    unsafe extern "C" fn(result: DialogExResult, context: *mut core::ffi::c_void),
>;
extern "C" {
    #[doc = "Allocate and initialize dialog\n\n This dialog used to ask simple questions\n\n # Returns\n\nDialogEx instance"]
    pub fn dialog_ex_alloc() -> *mut DialogEx;
}
extern "C" {
    #[doc = "Deinitialize and free dialog\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance"]
    pub fn dialog_ex_free(dialog_ex: *mut DialogEx);
}
extern "C" {
    #[doc = "Get dialog view\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance\n\n # Returns\n\nView instance that can be used for embedding"]
    pub fn dialog_ex_get_view(dialog_ex: *mut DialogEx) -> *mut View;
}
extern "C" {
    #[doc = "Set dialog result callback\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance\n * `callback` - result callback function"]
    pub fn dialog_ex_set_result_callback(
        dialog_ex: *mut DialogEx,
        callback: DialogExResultCallback,
    );
}
extern "C" {
    #[doc = "Set dialog context\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance\n * `context` - context pointer, will be passed to result callback"]
    pub fn dialog_ex_set_context(dialog_ex: *mut DialogEx, context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Set dialog header text\n\n If text is null, dialog header will not be rendered\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance\n * `text` - text to be shown, can be multiline\n * `x` - x position\n * `y` - y position\n * `horizontal` - horizontal text alignment\n * `vertical` - vertical text alignment"]
    pub fn dialog_ex_set_header(
        dialog_ex: *mut DialogEx,
        text: *const core::ffi::c_char,
        x: u8,
        y: u8,
        horizontal: Align,
        vertical: Align,
    );
}
extern "C" {
    #[doc = "Set dialog text\n\n If text is null, dialog text will not be rendered\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance\n * `text` - text to be shown, can be multiline\n * `x` - x position\n * `y` - y position\n * `horizontal` - horizontal text alignment\n * `vertical` - vertical text alignment"]
    pub fn dialog_ex_set_text(
        dialog_ex: *mut DialogEx,
        text: *const core::ffi::c_char,
        x: u8,
        y: u8,
        horizontal: Align,
        vertical: Align,
    );
}
extern "C" {
    #[doc = "Set dialog icon\n\n If x or y is negative, dialog icon will not be rendered\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance\n * `x` - x position\n * `y` - y position\n * `icon` - The icon"]
    pub fn dialog_ex_set_icon(dialog_ex: *mut DialogEx, x: u8, y: u8, icon: *const Icon);
}
extern "C" {
    #[doc = "Set left button text\n\n If text is null, left button will not be rendered and processed\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance\n * `text` - text to be shown"]
    pub fn dialog_ex_set_left_button_text(dialog_ex: *mut DialogEx, text: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Set center button text\n\n If text is null, center button will not be rendered and processed\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance\n * `text` - text to be shown"]
    pub fn dialog_ex_set_center_button_text(
        dialog_ex: *mut DialogEx,
        text: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Set right button text\n\n If text is null, right button will not be rendered and processed\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance\n * `text` - text to be shown"]
    pub fn dialog_ex_set_right_button_text(
        dialog_ex: *mut DialogEx,
        text: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Clean dialog\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance"]
    pub fn dialog_ex_reset(dialog_ex: *mut DialogEx);
}
extern "C" {
    #[doc = "Enable press/release events\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance"]
    pub fn dialog_ex_enable_extended_events(dialog_ex: *mut DialogEx);
}
extern "C" {
    #[doc = "Disable press/release events\n\n # Arguments\n\n* `dialog_ex` - DialogEx instance"]
    pub fn dialog_ex_disable_extended_events(dialog_ex: *mut DialogEx);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct EmptyScreen {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate and initialize empty screen\n\n This empty screen used to ask simple questions like Yes/\n\n # Returns\n\nEmptyScreen instance"]
    pub fn empty_screen_alloc() -> *mut EmptyScreen;
}
extern "C" {
    #[doc = "Deinitialize and free empty screen\n\n # Arguments\n\n* `empty_screen` - Empty screen instance"]
    pub fn empty_screen_free(empty_screen: *mut EmptyScreen);
}
extern "C" {
    #[doc = "Get empty screen view\n\n # Arguments\n\n* `empty_screen` - Empty screen instance\n\n # Returns\n\nView instance that can be used for embedding"]
    pub fn empty_screen_get_view(empty_screen: *mut EmptyScreen) -> *mut View;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BrowserWorker {
    _unused: [u8; 0],
}
pub type BrowserWorkerFolderOpenCallback = ::core::option::Option<
    unsafe extern "C" fn(
        context: *mut core::ffi::c_void,
        item_cnt: u32,
        file_idx: i32,
        is_root: bool,
    ),
>;
pub type BrowserWorkerListLoadCallback = ::core::option::Option<
    unsafe extern "C" fn(context: *mut core::ffi::c_void, list_load_offset: u32),
>;
pub type BrowserWorkerListItemCallback = ::core::option::Option<
    unsafe extern "C" fn(
        context: *mut core::ffi::c_void,
        item_path: *mut FuriString,
        is_folder: bool,
        is_last: bool,
    ),
>;
pub type BrowserWorkerLongLoadCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
extern "C" {
    pub fn file_browser_worker_alloc(
        path: *mut FuriString,
        base_path: *const core::ffi::c_char,
        ext_filter: *const core::ffi::c_char,
        skip_assets: bool,
        hide_dot_files: bool,
    ) -> *mut BrowserWorker;
}
extern "C" {
    pub fn file_browser_worker_free(browser: *mut BrowserWorker);
}
extern "C" {
    pub fn file_browser_worker_set_callback_context(
        browser: *mut BrowserWorker,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn file_browser_worker_set_folder_callback(
        browser: *mut BrowserWorker,
        cb: BrowserWorkerFolderOpenCallback,
    );
}
extern "C" {
    pub fn file_browser_worker_set_list_callback(
        browser: *mut BrowserWorker,
        cb: BrowserWorkerListLoadCallback,
    );
}
extern "C" {
    pub fn file_browser_worker_set_item_callback(
        browser: *mut BrowserWorker,
        cb: BrowserWorkerListItemCallback,
    );
}
extern "C" {
    pub fn file_browser_worker_set_long_load_callback(
        browser: *mut BrowserWorker,
        cb: BrowserWorkerLongLoadCallback,
    );
}
extern "C" {
    pub fn file_browser_worker_set_config(
        browser: *mut BrowserWorker,
        path: *mut FuriString,
        ext_filter: *const core::ffi::c_char,
        skip_assets: bool,
        hide_dot_files: bool,
    );
}
extern "C" {
    pub fn file_browser_worker_folder_enter(
        browser: *mut BrowserWorker,
        path: *mut FuriString,
        item_idx: i32,
    );
}
extern "C" {
    pub fn file_browser_worker_is_in_start_folder(browser: *mut BrowserWorker) -> bool;
}
extern "C" {
    pub fn file_browser_worker_folder_exit(browser: *mut BrowserWorker);
}
extern "C" {
    pub fn file_browser_worker_folder_refresh(browser: *mut BrowserWorker, item_idx: i32);
}
extern "C" {
    pub fn file_browser_worker_load(browser: *mut BrowserWorker, offset: u32, count: u32);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Loading {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate and initialize\n\n This View used to show system is doing some processing\n\n # Returns\n\nLoading View instance"]
    pub fn loading_alloc() -> *mut Loading;
}
extern "C" {
    #[doc = "Deinitialize and free Loading View\n\n # Arguments\n\n* `instance` - Loading instance"]
    pub fn loading_free(instance: *mut Loading);
}
extern "C" {
    #[doc = "Get Loading view\n\n # Arguments\n\n* `instance` - Loading instance\n\n # Returns\n\nView instance that can be used for embedding"]
    pub fn loading_get_view(instance: *mut Loading) -> *mut View;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Menu {
    _unused: [u8; 0],
}
#[doc = "Menu Item Callback"]
pub type MenuItemCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void, index: u32)>;
extern "C" {
    #[doc = "Menu allocation and initialization\n\n # Returns\n\nMenu instance"]
    pub fn menu_alloc() -> *mut Menu;
}
extern "C" {
    #[doc = "Free menu\n\n # Arguments\n\n* `menu` - Menu instance"]
    pub fn menu_free(menu: *mut Menu);
}
extern "C" {
    #[doc = "Get Menu view\n\n # Arguments\n\n* `menu` - Menu instance\n\n # Returns\n\nView instance"]
    pub fn menu_get_view(menu: *mut Menu) -> *mut View;
}
extern "C" {
    #[doc = "Add item to menu\n\n # Arguments\n\n* `menu` - Menu instance\n * `label` - menu item string label\n * `icon` - IconAnimation instance\n * `index` - menu item index\n * `callback` - MenuItemCallback instance\n * `context` - pointer to context"]
    pub fn menu_add_item(
        menu: *mut Menu,
        label: *const core::ffi::c_char,
        icon: *const Icon,
        index: u32,
        callback: MenuItemCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Clean menu\n > **Note:** this function does not free menu instance\n\n # Arguments\n\n* `menu` - Menu instance"]
    pub fn menu_reset(menu: *mut Menu);
}
extern "C" {
    #[doc = "Set current menu item\n\n # Arguments\n\n* `menu` - Menu instance\n * `index` - The index"]
    pub fn menu_set_selected_item(menu: *mut Menu, index: u32);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NumberInput {
    _unused: [u8; 0],
}
#[doc = "Callback to be called on save button press"]
pub type NumberInputCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void, number: i32)>;
extern "C" {
    #[doc = "Allocate and initialize Number input.\n\n This Number input is used to enter Numbers (Integers).\n\n # Returns\n\nNumberInput instance pointer"]
    pub fn number_input_alloc() -> *mut NumberInput;
}
extern "C" {
    #[doc = "Deinitialize and free byte input\n\n # Arguments\n\n* `number_input` - Number input instance"]
    pub fn number_input_free(number_input: *mut NumberInput);
}
extern "C" {
    #[doc = "Get byte input view\n\n # Arguments\n\n* `number_input` - byte input instance\n\n # Returns\n\nView instance that can be used for embedding"]
    pub fn number_input_get_view(number_input: *mut NumberInput) -> *mut View;
}
extern "C" {
    #[doc = "Set byte input result callback\n\n # Arguments\n\n* `number_input` - byte input instance\n * `input_callback` - input callback fn\n * `callback_context` - callback context\n * `current_number` (direction in) - The current number\n * `min_value` - Min number value\n * `max_value` - Max number value"]
    pub fn number_input_set_result_callback(
        number_input: *mut NumberInput,
        input_callback: NumberInputCallback,
        callback_context: *mut core::ffi::c_void,
        current_number: i32,
        min_value: i32,
        max_value: i32,
    );
}
extern "C" {
    #[doc = "Set byte input header text\n\n # Arguments\n\n* `number_input` - byte input instance\n * `text` - text to be shown"]
    pub fn number_input_set_header_text(
        number_input: *mut NumberInput,
        text: *const core::ffi::c_char,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Popup {
    _unused: [u8; 0],
}
#[doc = "Popup result callback type\n comes from GUI thread"]
pub type PopupCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Allocate and initialize popup\n\n This popup used to ask simple questions like Yes/\n\n # Returns\n\nPopup instance"]
    pub fn popup_alloc() -> *mut Popup;
}
extern "C" {
    #[doc = "Deinitialize and free popup\n\n # Arguments\n\n* `popup` - Popup instance"]
    pub fn popup_free(popup: *mut Popup);
}
extern "C" {
    #[doc = "Get popup view\n\n # Arguments\n\n* `popup` - Popup instance\n\n # Returns\n\nView instance that can be used for embedding"]
    pub fn popup_get_view(popup: *mut Popup) -> *mut View;
}
extern "C" {
    #[doc = "Set popup header text\n\n # Arguments\n\n* `popup` - Popup instance\n * `callback` - PopupCallback"]
    pub fn popup_set_callback(popup: *mut Popup, callback: PopupCallback);
}
extern "C" {
    #[doc = "Set popup context\n\n # Arguments\n\n* `popup` - Popup instance\n * `context` - context pointer, will be passed to result callback"]
    pub fn popup_set_context(popup: *mut Popup, context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Set popup header text\n\n If text is null, popup header will not be rendered\n\n # Arguments\n\n* `popup` - Popup instance\n * `text` - text to be shown, can be multiline\n * `x` - x position\n * `y` - y position\n * `horizontal` - horizontal alignment\n * `vertical` - vertical alignment"]
    pub fn popup_set_header(
        popup: *mut Popup,
        text: *const core::ffi::c_char,
        x: u8,
        y: u8,
        horizontal: Align,
        vertical: Align,
    );
}
extern "C" {
    #[doc = "Set popup text\n\n If text is null, popup text will not be rendered\n\n # Arguments\n\n* `popup` - Popup instance\n * `text` - text to be shown, can be multiline\n * `x` - x position\n * `y` - y position\n * `horizontal` - horizontal alignment\n * `vertical` - vertical alignment"]
    pub fn popup_set_text(
        popup: *mut Popup,
        text: *const core::ffi::c_char,
        x: u8,
        y: u8,
        horizontal: Align,
        vertical: Align,
    );
}
extern "C" {
    #[doc = "Set popup icon\n\n If icon position is negative, popup icon will not be rendered\n\n # Arguments\n\n* `popup` - Popup instance\n * `x` - x position\n * `y` - y position\n * `icon` - pointer to Icon data"]
    pub fn popup_set_icon(popup: *mut Popup, x: u8, y: u8, icon: *const Icon);
}
extern "C" {
    #[doc = "Set popup timeout\n\n # Arguments\n\n* `popup` - Popup instance\n * `timeout_in_ms` - popup timeout value in milliseconds"]
    pub fn popup_set_timeout(popup: *mut Popup, timeout_in_ms: u32);
}
extern "C" {
    #[doc = "Enable popup timeout\n\n # Arguments\n\n* `popup` - Popup instance"]
    pub fn popup_enable_timeout(popup: *mut Popup);
}
extern "C" {
    #[doc = "Disable popup timeout\n\n # Arguments\n\n* `popup` - Popup instance"]
    pub fn popup_disable_timeout(popup: *mut Popup);
}
extern "C" {
    #[doc = "Reset popup instance state\n\n # Arguments\n\n* `popup` - Popup instance"]
    pub fn popup_reset(popup: *mut Popup);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Submenu {
    _unused: [u8; 0],
}
pub type SubmenuItemCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void, index: u32)>;
extern "C" {
    #[doc = "Allocate and initialize submenu\n\n This submenu is used to select one option\n\n # Returns\n\nSubmenu instance"]
    pub fn submenu_alloc() -> *mut Submenu;
}
extern "C" {
    #[doc = "Deinitialize and free submenu\n\n # Arguments\n\n* `submenu` - Submenu instance"]
    pub fn submenu_free(submenu: *mut Submenu);
}
extern "C" {
    #[doc = "Get submenu view\n\n # Arguments\n\n* `submenu` - Submenu instance\n\n # Returns\n\nView instance that can be used for embedding"]
    pub fn submenu_get_view(submenu: *mut Submenu) -> *mut View;
}
extern "C" {
    #[doc = "Add item to submenu\n\n # Arguments\n\n* `submenu` - Submenu instance\n * `label` - menu item label\n * `index` - menu item index, used for callback, may be\n the same with other items\n * `callback` - menu item callback\n * `callback_context` - menu item callback context"]
    pub fn submenu_add_item(
        submenu: *mut Submenu,
        label: *const core::ffi::c_char,
        index: u32,
        callback: SubmenuItemCallback,
        callback_context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Change label of an existing item\n\n # Arguments\n\n* `submenu` - Submenu instance\n * `index` - The index of the item\n * `label` - The new label"]
    pub fn submenu_change_item_label(
        submenu: *mut Submenu,
        index: u32,
        label: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Remove all items from submenu\n\n # Arguments\n\n* `submenu` - Submenu instance"]
    pub fn submenu_reset(submenu: *mut Submenu);
}
extern "C" {
    #[doc = "Get submenu selected item index\n\n # Arguments\n\n* `submenu` - Submenu instance\n\n # Returns\n\nIndex of the selected item"]
    pub fn submenu_get_selected_item(submenu: *mut Submenu) -> u32;
}
extern "C" {
    #[doc = "Set submenu selected item by index\n\n # Arguments\n\n* `submenu` - Submenu instance\n * `index` - The index of the selected item"]
    pub fn submenu_set_selected_item(submenu: *mut Submenu, index: u32);
}
extern "C" {
    #[doc = "Set optional header for submenu\n\n # Arguments\n\n* `submenu` - Submenu instance\n * `header` - header to set"]
    pub fn submenu_set_header(submenu: *mut Submenu, header: *const core::ffi::c_char);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TextBox {
    _unused: [u8; 0],
}
pub const TextBoxFont_TextBoxFontText: TextBoxFont = 0;
pub const TextBoxFont_TextBoxFontHex: TextBoxFont = 1;
pub type TextBoxFont = core::ffi::c_uchar;
pub const TextBoxFocus_TextBoxFocusStart: TextBoxFocus = 0;
pub const TextBoxFocus_TextBoxFocusEnd: TextBoxFocus = 1;
pub type TextBoxFocus = core::ffi::c_uchar;
extern "C" {
    #[doc = "Allocate and initialize text_box\n\n # Returns\n\nTextBox instance"]
    pub fn text_box_alloc() -> *mut TextBox;
}
extern "C" {
    #[doc = "Deinitialize and free text_box\n\n # Arguments\n\n* `text_box` - text_box instance"]
    pub fn text_box_free(text_box: *mut TextBox);
}
extern "C" {
    #[doc = "Get text_box view\n\n # Arguments\n\n* `text_box` - TextBox instance\n\n # Returns\n\nView instance that can be used for embedding"]
    pub fn text_box_get_view(text_box: *mut TextBox) -> *mut View;
}
extern "C" {
    #[doc = "Clean text_box\n\n # Arguments\n\n* `text_box` - TextBox instance"]
    pub fn text_box_reset(text_box: *mut TextBox);
}
extern "C" {
    #[doc = "Set text for text_box\n\n # Arguments\n\n* `text_box` - TextBox instance\n * `text` - text to set"]
    pub fn text_box_set_text(text_box: *mut TextBox, text: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Set TextBox font\n\n # Arguments\n\n* `text_box` - TextBox instance\n * `font` - TextBoxFont instance"]
    pub fn text_box_set_font(text_box: *mut TextBox, font: TextBoxFont);
}
extern "C" {
    #[doc = "Set TextBox focus\n > **Note:** Use to display from start or from end\n\n # Arguments\n\n* `text_box` - TextBox instance\n * `focus` - TextBoxFocus instance"]
    pub fn text_box_set_focus(text_box: *mut TextBox, focus: TextBoxFocus);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ValidatorIsFile {
    _unused: [u8; 0],
}
extern "C" {
    pub fn validator_is_file_alloc_init(
        app_path_folder: *const core::ffi::c_char,
        app_extension: *const core::ffi::c_char,
        current_name: *const core::ffi::c_char,
    ) -> *mut ValidatorIsFile;
}
extern "C" {
    pub fn validator_is_file_free(instance: *mut ValidatorIsFile);
}
extern "C" {
    pub fn validator_is_file_callback(
        text: *const core::ffi::c_char,
        error: *mut FuriString,
        context: *mut core::ffi::c_void,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TextInput {
    _unused: [u8; 0],
}
pub type TextInputCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
pub type TextInputValidatorCallback = ::core::option::Option<
    unsafe extern "C" fn(
        text: *const core::ffi::c_char,
        error: *mut FuriString,
        context: *mut core::ffi::c_void,
    ) -> bool,
>;
extern "C" {
    #[doc = "Allocate and initialize text input\n\n This text input is used to enter string\n\n # Returns\n\nTextInput instance"]
    pub fn text_input_alloc() -> *mut TextInput;
}
extern "C" {
    #[doc = "Deinitialize and free text input\n\n # Arguments\n\n* `text_input` - TextInput instance"]
    pub fn text_input_free(text_input: *mut TextInput);
}
extern "C" {
    #[doc = "Clean text input view Note: this function does not free memory\n\n # Arguments\n\n* `text_input` - Text input instance"]
    pub fn text_input_reset(text_input: *mut TextInput);
}
extern "C" {
    #[doc = "Get text input view\n\n # Arguments\n\n* `text_input` - TextInput instance\n\n # Returns\n\nView instance that can be used for embedding"]
    pub fn text_input_get_view(text_input: *mut TextInput) -> *mut View;
}
extern "C" {
    #[doc = "Set text input result callback\n\n # Arguments\n\n* `text_input` - TextInput instance\n * `callback` - callback fn\n * `callback_context` - callback context\n * `text_buffer` - pointer to YOUR text buffer, that we going\n to modify\n * `text_buffer_size` - YOUR text buffer size in bytes. Max string\n length will be text_buffer_size-1.\n * `clear_default_text` - clear text from text_buffer on first OK\n event"]
    pub fn text_input_set_result_callback(
        text_input: *mut TextInput,
        callback: TextInputCallback,
        callback_context: *mut core::ffi::c_void,
        text_buffer: *mut core::ffi::c_char,
        text_buffer_size: usize,
        clear_default_text: bool,
    );
}
extern "C" {
    pub fn text_input_set_validator(
        text_input: *mut TextInput,
        callback: TextInputValidatorCallback,
        callback_context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn text_input_get_validator_callback(
        text_input: *mut TextInput,
    ) -> TextInputValidatorCallback;
}
extern "C" {
    pub fn text_input_get_validator_callback_context(
        text_input: *mut TextInput,
    ) -> *mut core::ffi::c_void;
}
extern "C" {
    #[doc = "Set text input header text\n\n # Arguments\n\n* `text_input` - TextInput instance\n * `text` - text to be shown"]
    pub fn text_input_set_header_text(text_input: *mut TextInput, text: *const core::ffi::c_char);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct VariableItemList {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct VariableItem {
    _unused: [u8; 0],
}
pub type VariableItemChangeCallback =
    ::core::option::Option<unsafe extern "C" fn(item: *mut VariableItem)>;
pub type VariableItemListEnterCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void, index: u32)>;
extern "C" {
    #[doc = "Allocate and initialize VariableItemList\n\n # Returns\n\nVariableItemList*"]
    pub fn variable_item_list_alloc() -> *mut VariableItemList;
}
extern "C" {
    #[doc = "Deinitialize and free VariableItemList\n\n # Arguments\n\n* `variable_item_list` - VariableItemList instance"]
    pub fn variable_item_list_free(variable_item_list: *mut VariableItemList);
}
extern "C" {
    #[doc = "Clear all elements from list\n\n # Arguments\n\n* `variable_item_list` - VariableItemList instance"]
    pub fn variable_item_list_reset(variable_item_list: *mut VariableItemList);
}
extern "C" {
    #[doc = "Get VariableItemList View instance\n\n # Arguments\n\n* `variable_item_list` - VariableItemList instance\n\n # Returns\n\nView instance"]
    pub fn variable_item_list_get_view(variable_item_list: *mut VariableItemList) -> *mut View;
}
extern "C" {
    #[doc = "Add item to VariableItemList\n\n # Arguments\n\n* `variable_item_list` - VariableItemList instance\n * `label` - item name\n * `values_count` - item values count\n * `change_callback` - called on value change in gui\n * `context` - item context\n\n # Returns\n\nVariableItem* item instance"]
    pub fn variable_item_list_add(
        variable_item_list: *mut VariableItemList,
        label: *const core::ffi::c_char,
        values_count: u8,
        change_callback: VariableItemChangeCallback,
        context: *mut core::ffi::c_void,
    ) -> *mut VariableItem;
}
extern "C" {
    #[doc = "Set enter callback\n\n # Arguments\n\n* `variable_item_list` - VariableItemList instance\n * `callback` - VariableItemListEnterCallback instance\n * `context` - pointer to context"]
    pub fn variable_item_list_set_enter_callback(
        variable_item_list: *mut VariableItemList,
        callback: VariableItemListEnterCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn variable_item_list_set_selected_item(
        variable_item_list: *mut VariableItemList,
        index: u8,
    );
}
extern "C" {
    pub fn variable_item_list_get_selected_item_index(
        variable_item_list: *mut VariableItemList,
    ) -> u8;
}
extern "C" {
    #[doc = "Set item current selected index\n\n # Arguments\n\n* `item` - VariableItem* instance\n * `current_value_index` - The current value index"]
    pub fn variable_item_set_current_value_index(item: *mut VariableItem, current_value_index: u8);
}
extern "C" {
    #[doc = "Set number of values for item\n\n # Arguments\n\n* `item` - VariableItem* instance\n * `values_count` - The new values count"]
    pub fn variable_item_set_values_count(item: *mut VariableItem, values_count: u8);
}
extern "C" {
    #[doc = "Set item current selected text\n\n # Arguments\n\n* `item` - VariableItem* instance\n * `current_value_text` - The current value text"]
    pub fn variable_item_set_current_value_text(
        item: *mut VariableItem,
        current_value_text: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Get item current selected index\n\n # Arguments\n\n* `item` - VariableItem* instance\n\n # Returns\n\nuint8_t current selected index"]
    pub fn variable_item_get_current_value_index(item: *mut VariableItem) -> u8;
}
extern "C" {
    #[doc = "Get item context\n\n # Arguments\n\n* `item` - VariableItem* instance\n\n # Returns\n\nvoid* item context"]
    pub fn variable_item_get_context(item: *mut VariableItem) -> *mut core::ffi::c_void;
}
pub const GuiButtonType_GuiButtonTypeLeft: GuiButtonType = 0;
pub const GuiButtonType_GuiButtonTypeCenter: GuiButtonType = 1;
pub const GuiButtonType_GuiButtonTypeRight: GuiButtonType = 2;
pub type GuiButtonType = core::ffi::c_uchar;
pub type ButtonCallback = ::core::option::Option<
    unsafe extern "C" fn(result: GuiButtonType, type_: InputType, context: *mut core::ffi::c_void),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Widget {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate Widget that holds Widget Elements\n\n # Returns\n\nWidget instance"]
    pub fn widget_alloc() -> *mut Widget;
}
extern "C" {
    #[doc = "Free Widget\n > **Note:** this function free allocated Widget Elements\n\n # Arguments\n\n* `widget` - Widget instance"]
    pub fn widget_free(widget: *mut Widget);
}
extern "C" {
    #[doc = "Reset Widget\n\n # Arguments\n\n* `widget` - Widget instance"]
    pub fn widget_reset(widget: *mut Widget);
}
extern "C" {
    #[doc = "Get Widget view\n\n # Arguments\n\n* `widget` - Widget instance\n\n # Returns\n\nView instance"]
    pub fn widget_get_view(widget: *mut Widget) -> *mut View;
}
extern "C" {
    #[doc = "Add Multi String Element\n\n # Arguments\n\n* `widget` - Widget instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `horizontal` - Align instance\n * `vertical` - Align instance\n * `font` - Font instance\n * `text` (direction in) - The text"]
    pub fn widget_add_string_multiline_element(
        widget: *mut Widget,
        x: u8,
        y: u8,
        horizontal: Align,
        vertical: Align,
        font: Font,
        text: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Add String Element\n\n # Arguments\n\n* `widget` - Widget instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `horizontal` - Align instance\n * `vertical` - Align instance\n * `font` - Font instance\n * `text` (direction in) - The text"]
    pub fn widget_add_string_element(
        widget: *mut Widget,
        x: u8,
        y: u8,
        horizontal: Align,
        vertical: Align,
        font: Font,
        text: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Add Text Box Element\n\n # Arguments\n\n* `widget` - Widget instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `width` - width to fit text\n * `height` - height to fit text\n * `horizontal` - Align instance\n * `vertical` - Align instance\n * `text` (direction in) - Formatted text. The following formats are available:\n \"text- bold font is used\n \"text- monospaced font is used\n \"text- white text on black background\n * `strip_to_dots` - Strip text to ... if does not fit to width"]
    pub fn widget_add_text_box_element(
        widget: *mut Widget,
        x: u8,
        y: u8,
        width: u8,
        height: u8,
        horizontal: Align,
        vertical: Align,
        text: *const core::ffi::c_char,
        strip_to_dots: bool,
    );
}
extern "C" {
    #[doc = "Add Text Scroll Element\n\n # Arguments\n\n* `widget` - Widget instance\n * `x` - x coordinate\n * `y` - y coordinate\n * `width` - width to fit text\n * `height` - height to fit text\n * `text` (direction in) - Formatted text. Default format: align left, Secondary font.\n The following formats are available:\n \"text\" - sets bold font before until next 'symbol\n \"text- sets monospaced font before until next 'symbol\n \"text\" - sets center horizontal align until the next 'symbol\n \"text\" - sets right horizontal align until the next 'symbol"]
    pub fn widget_add_text_scroll_element(
        widget: *mut Widget,
        x: u8,
        y: u8,
        width: u8,
        height: u8,
        text: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Add Button Element\n\n # Arguments\n\n* `widget` - Widget instance\n * `button_type` - GuiButtonType instance\n * `text` - text on allocated button\n * `callback` - ButtonCallback instance\n * `context` - pointer to context"]
    pub fn widget_add_button_element(
        widget: *mut Widget,
        button_type: GuiButtonType,
        text: *const core::ffi::c_char,
        callback: ButtonCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Add Icon Element\n\n # Arguments\n\n* `widget` - Widget instance\n * `x` - top left x coordinate\n * `y` - top left y coordinate\n * `icon` - Icon instance"]
    pub fn widget_add_icon_element(widget: *mut Widget, x: u8, y: u8, icon: *const Icon);
}
extern "C" {
    #[doc = "Add Frame Element\n\n # Arguments\n\n* `widget` - Widget instance\n * `x` - top left x coordinate\n * `y` - top left y coordinate\n * `width` - frame width\n * `height` - frame height\n * `radius` - frame radius"]
    pub fn widget_add_frame_element(
        widget: *mut Widget,
        x: u8,
        y: u8,
        width: u8,
        height: u8,
        radius: u8,
    );
}
pub const SceneManagerEventType_SceneManagerEventTypeCustom: SceneManagerEventType = 0;
pub const SceneManagerEventType_SceneManagerEventTypeBack: SceneManagerEventType = 1;
pub const SceneManagerEventType_SceneManagerEventTypeTick: SceneManagerEventType = 2;
#[doc = "Scene Manager events type"]
pub type SceneManagerEventType = core::ffi::c_uchar;
#[doc = "Scene Manager event"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SceneManagerEvent {
    pub type_: SceneManagerEventType,
    pub event: u32,
}
#[test]
fn bindgen_test_layout_SceneManagerEvent() {
    const UNINIT: ::core::mem::MaybeUninit<SceneManagerEvent> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SceneManagerEvent>(),
        8usize,
        concat!("Size of: ", stringify!(SceneManagerEvent))
    );
    assert_eq!(
        ::core::mem::align_of::<SceneManagerEvent>(),
        4usize,
        concat!("Alignment of ", stringify!(SceneManagerEvent))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SceneManagerEvent),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).event) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SceneManagerEvent),
            "::",
            stringify!(event)
        )
    );
}
#[doc = "Prototype for Scene on_enter handler"]
pub type AppSceneOnEnterCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[doc = "Prototype for Scene on_event handler"]
pub type AppSceneOnEventCallback = ::core::option::Option<
    unsafe extern "C" fn(context: *mut core::ffi::c_void, event: SceneManagerEvent) -> bool,
>;
#[doc = "Prototype for Scene on_exit handler"]
pub type AppSceneOnExitCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[doc = "Scene Manager configuration structure\n Contains array of Scene handlers"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SceneManagerHandlers {
    pub on_enter_handlers: *const AppSceneOnEnterCallback,
    pub on_event_handlers: *const AppSceneOnEventCallback,
    pub on_exit_handlers: *const AppSceneOnExitCallback,
    pub scene_num: u32,
}
#[test]
fn bindgen_test_layout_SceneManagerHandlers() {
    const UNINIT: ::core::mem::MaybeUninit<SceneManagerHandlers> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SceneManagerHandlers>(),
        16usize,
        concat!("Size of: ", stringify!(SceneManagerHandlers))
    );
    assert_eq!(
        ::core::mem::align_of::<SceneManagerHandlers>(),
        4usize,
        concat!("Alignment of ", stringify!(SceneManagerHandlers))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).on_enter_handlers) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SceneManagerHandlers),
            "::",
            stringify!(on_enter_handlers)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).on_event_handlers) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SceneManagerHandlers),
            "::",
            stringify!(on_event_handlers)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).on_exit_handlers) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SceneManagerHandlers),
            "::",
            stringify!(on_exit_handlers)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).scene_num) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(SceneManagerHandlers),
            "::",
            stringify!(scene_num)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SceneManager {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Set Scene state\n\n # Arguments\n\n* `scene_manager` - SceneManager instance\n * `scene_id` - Scene ID\n * `state` - Scene new state"]
    pub fn scene_manager_set_scene_state(
        scene_manager: *mut SceneManager,
        scene_id: u32,
        state: u32,
    );
}
extern "C" {
    #[doc = "Get Scene state\n\n # Arguments\n\n* `scene_manager` - SceneManager instance\n * `scene_id` - Scene ID\n\n # Returns\n\nScene state"]
    pub fn scene_manager_get_scene_state(scene_manager: *const SceneManager, scene_id: u32) -> u32;
}
extern "C" {
    #[doc = "Scene Manager allocation and configuration\n\n Scene Manager allocates all scenes internally\n\n # Arguments\n\n* `app_scene_handlers` - SceneManagerHandlers instance\n * `context` - context to be set on Scene handlers calls\n\n # Returns\n\nSceneManager instance"]
    pub fn scene_manager_alloc(
        app_scene_handlers: *const SceneManagerHandlers,
        context: *mut core::ffi::c_void,
    ) -> *mut SceneManager;
}
extern "C" {
    #[doc = "Free Scene Manager with allocated Scenes\n\n # Arguments\n\n* `scene_manager` - SceneManager instance"]
    pub fn scene_manager_free(scene_manager: *mut SceneManager);
}
extern "C" {
    #[doc = "Custom event handler\n\n Calls Scene event handler with Custom event parameter\n\n # Arguments\n\n* `scene_manager` - SceneManager instance\n * `custom_event` - Custom event code\n\n # Returns\n\ntrue if event was consumed, false otherwise"]
    pub fn scene_manager_handle_custom_event(
        scene_manager: *mut SceneManager,
        custom_event: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Back event handler\n\n Calls Scene event handler with Back event parameter\n\n # Arguments\n\n* `scene_manager` - SceneManager instance\n\n # Returns\n\ntrue if event was consumed, false otherwise"]
    pub fn scene_manager_handle_back_event(scene_manager: *mut SceneManager) -> bool;
}
extern "C" {
    #[doc = "Tick event handler\n\n Calls Scene event handler with Tick event parameter\n\n # Arguments\n\n* `scene_manager` - SceneManager instance"]
    pub fn scene_manager_handle_tick_event(scene_manager: *mut SceneManager);
}
extern "C" {
    #[doc = "Add and run next Scene\n\n # Arguments\n\n* `scene_manager` - SceneManager instance\n * `next_scene_id` - next Scene ID"]
    pub fn scene_manager_next_scene(scene_manager: *mut SceneManager, next_scene_id: u32);
}
extern "C" {
    #[doc = "Run previous Scene\n\n # Arguments\n\n* `scene_manager` - SceneManager instance\n\n # Returns\n\ntrue if previous scene was found, false otherwise"]
    pub fn scene_manager_previous_scene(scene_manager: *mut SceneManager) -> bool;
}
extern "C" {
    #[doc = "Search previous Scene\n\n # Arguments\n\n* `scene_manager` - SceneManager instance\n * `scene_id` - Scene ID\n\n # Returns\n\ntrue if previous scene was found, false otherwise"]
    pub fn scene_manager_has_previous_scene(
        scene_manager: *const SceneManager,
        scene_id: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Search and switch to previous Scene\n\n # Arguments\n\n* `scene_manager` - SceneManager instance\n * `scene_id` - Scene ID\n\n # Returns\n\ntrue if previous scene was found, false otherwise"]
    pub fn scene_manager_search_and_switch_to_previous_scene(
        scene_manager: *mut SceneManager,
        scene_id: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Search and switch to previous Scene, multiple choice\n\n # Arguments\n\n* `scene_manager` - SceneManager instance\n * `scene_ids` - Array of scene IDs\n * `scene_ids_size` - Array of scene IDs size\n\n # Returns\n\ntrue if one of previous scenes was found, false otherwise"]
    pub fn scene_manager_search_and_switch_to_previous_scene_one_of(
        scene_manager: *mut SceneManager,
        scene_ids: *const u32,
        scene_ids_size: usize,
    ) -> bool;
}
extern "C" {
    #[doc = "Clear Scene stack and switch to another Scene\n\n # Arguments\n\n* `scene_manager` - SceneManager instance\n * `scene_id` - Scene ID\n\n # Returns\n\ntrue if previous scene was found, false otherwise"]
    pub fn scene_manager_search_and_switch_to_another_scene(
        scene_manager: *mut SceneManager,
        scene_id: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Exit from current scene\n\n # Arguments\n\n* `scene_manager` - SceneManager instance"]
    pub fn scene_manager_stop(scene_manager: *mut SceneManager);
}
#[doc = "< Desktop layer: fullscreen with status bar on top of it. For internal usage."]
pub const ViewDispatcherType_ViewDispatcherTypeDesktop: ViewDispatcherType = 0;
#[doc = "< Window layer: with status bar"]
pub const ViewDispatcherType_ViewDispatcherTypeWindow: ViewDispatcherType = 1;
#[doc = "< Fullscreen layer: without status bar"]
pub const ViewDispatcherType_ViewDispatcherTypeFullscreen: ViewDispatcherType = 2;
#[doc = "ViewDispatcher view_port placement"]
pub type ViewDispatcherType = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ViewDispatcher {
    _unused: [u8; 0],
}
#[doc = "Prototype for custom event callback"]
pub type ViewDispatcherCustomEventCallback = ::core::option::Option<
    unsafe extern "C" fn(context: *mut core::ffi::c_void, event: u32) -> bool,
>;
#[doc = "Prototype for navigation event callback"]
pub type ViewDispatcherNavigationEventCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void) -> bool>;
#[doc = "Prototype for tick event callback"]
pub type ViewDispatcherTickEventCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Allocate ViewDispatcher instance\n\n # Returns\n\npointer to ViewDispatcher instance"]
    pub fn view_dispatcher_alloc() -> *mut ViewDispatcher;
}
extern "C" {
    #[doc = "Free ViewDispatcher instance\n\n All added views MUST be removed using view_dispatcher_remove_view()\n before calling this function.\n\n # Arguments\n\n* `view_dispatcher` - pointer to ViewDispatcher"]
    pub fn view_dispatcher_free(view_dispatcher: *mut ViewDispatcher);
}
extern "C" {
    #[doc = "Enable queue support\n\n > **Deprecated** Do NOT use in new code and remove all calls to it from existing code.\n The queue support is now always enabled during construction. If no queue support\n is required, consider using ViewHolder instead.\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance"]
    pub fn view_dispatcher_enable_queue(view_dispatcher: *mut ViewDispatcher);
}
extern "C" {
    #[doc = "Send custom event\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance\n * `event` (direction in) - The event"]
    pub fn view_dispatcher_send_custom_event(view_dispatcher: *mut ViewDispatcher, event: u32);
}
extern "C" {
    #[doc = "Set custom event handler\n\n Called on Custom Event, if it is not consumed by view\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance\n * `callback` - ViewDispatcherCustomEventCallback instance"]
    pub fn view_dispatcher_set_custom_event_callback(
        view_dispatcher: *mut ViewDispatcher,
        callback: ViewDispatcherCustomEventCallback,
    );
}
extern "C" {
    #[doc = "Set navigation event handler\n\n Called on Input Short Back Event, if it is not consumed by view\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance\n * `callback` - ViewDispatcherNavigationEventCallback instance"]
    pub fn view_dispatcher_set_navigation_event_callback(
        view_dispatcher: *mut ViewDispatcher,
        callback: ViewDispatcherNavigationEventCallback,
    );
}
extern "C" {
    #[doc = "Set tick event handler\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance\n * `callback` - ViewDispatcherTickEventCallback\n * `tick_period` - callback call period"]
    pub fn view_dispatcher_set_tick_event_callback(
        view_dispatcher: *mut ViewDispatcher,
        callback: ViewDispatcherTickEventCallback,
        tick_period: u32,
    );
}
extern "C" {
    #[doc = "Set event callback context\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance\n * `context` - pointer to context"]
    pub fn view_dispatcher_set_event_callback_context(
        view_dispatcher: *mut ViewDispatcher,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Get event_loop instance\n\n Use the return value to connect additional supported primitives (message queues, timers, etc)\n to this ViewDispatcher instance's event loop.\n\n Do NOT call furi_event_loop_run() on the returned instance, it is done internally\n in the view_dispatcher_run() call.\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance\n\n # Returns\n\nThe event_loop instance."]
    pub fn view_dispatcher_get_event_loop(
        view_dispatcher: *mut ViewDispatcher,
    ) -> *mut FuriEventLoop;
}
extern "C" {
    #[doc = "Run ViewDispatcher\n\n This function will start the event loop and block until view_dispatcher_stop() is called\n or the current thread receives a FuriSignalExit signal.\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance"]
    pub fn view_dispatcher_run(view_dispatcher: *mut ViewDispatcher);
}
extern "C" {
    #[doc = "Stop ViewDispatcher\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance"]
    pub fn view_dispatcher_stop(view_dispatcher: *mut ViewDispatcher);
}
extern "C" {
    #[doc = "Add view to ViewDispatcher\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance\n * `view_id` - View id to register\n * `view` - View instance"]
    pub fn view_dispatcher_add_view(
        view_dispatcher: *mut ViewDispatcher,
        view_id: u32,
        view: *mut View,
    );
}
extern "C" {
    #[doc = "Remove view from ViewDispatcher\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance\n * `view_id` - View id to remove"]
    pub fn view_dispatcher_remove_view(view_dispatcher: *mut ViewDispatcher, view_id: u32);
}
extern "C" {
    #[doc = "Switch to View\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance\n * `view_id` - View id to register\n switching may be delayed till input events complementarity\n reached"]
    pub fn view_dispatcher_switch_to_view(view_dispatcher: *mut ViewDispatcher, view_id: u32);
}
extern "C" {
    #[doc = "Send ViewPort of this ViewDispatcher instance to front\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance"]
    pub fn view_dispatcher_send_to_front(view_dispatcher: *mut ViewDispatcher);
}
extern "C" {
    #[doc = "Send ViewPort of this ViewDispatcher instance to back\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance"]
    pub fn view_dispatcher_send_to_back(view_dispatcher: *mut ViewDispatcher);
}
extern "C" {
    #[doc = "Attach ViewDispatcher to GUI\n\n # Arguments\n\n* `view_dispatcher` - ViewDispatcher instance\n * `gui` - GUI instance to attach to\n * `type` (direction in) - The type"]
    pub fn view_dispatcher_attach_to_gui(
        view_dispatcher: *mut ViewDispatcher,
        gui: *mut Gui,
        type_: ViewDispatcherType,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ViewHolder {
    _unused: [u8; 0],
}
#[doc = "Free callback type"]
pub type FreeCallback =
    ::core::option::Option<unsafe extern "C" fn(free_context: *mut core::ffi::c_void)>;
#[doc = "Back callback type\n\n Will be called from the GUI thread"]
pub type BackCallback =
    ::core::option::Option<unsafe extern "C" fn(back_context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Allocate ViewHolder\n # Returns\n\npointer to ViewHolder instance"]
    pub fn view_holder_alloc() -> *mut ViewHolder;
}
extern "C" {
    #[doc = "Free ViewHolder and call Free callback\n\n The current view must be unset prior to freeing a ViewHolder instance.\n\n # Arguments\n\n* `view_holder` - pointer to ViewHolder"]
    pub fn view_holder_free(view_holder: *mut ViewHolder);
}
extern "C" {
    #[doc = "Set view for ViewHolder\n\n Pass NULL as the view parameter to unset the current view.\n\n # Arguments\n\n* `view_holder` - ViewHolder instance\n * `view` - View instance"]
    pub fn view_holder_set_view(view_holder: *mut ViewHolder, view: *mut View);
}
extern "C" {
    #[doc = "Set Free callback\n\n # Arguments\n\n* `view_holder` - ViewHolder instance\n * `free_callback` - callback pointer\n * `free_context` - callback context"]
    pub fn view_holder_set_free_callback(
        view_holder: *mut ViewHolder,
        free_callback: FreeCallback,
        free_context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Free callback context getter.\n\n Useful if your Free callback is a module destructor, so you can get an instance of the module using this method.\n\n # Arguments\n\n* `view_holder` - ViewHolder instance\n # Returns\n\nvoid* free callback context"]
    pub fn view_holder_get_free_context(view_holder: *mut ViewHolder) -> *mut core::ffi::c_void;
}
extern "C" {
    #[doc = "Set the back key callback.\n\n The callback function will be called if the user has pressed the Back key\n and the current view did not handle this event.\n\n # Arguments\n\n* `view_holder` - ViewHolder instance\n * `back_callback` - pointer to the callback function\n * `back_context` - pointer to a user-specific object, can be NULL"]
    pub fn view_holder_set_back_callback(
        view_holder: *mut ViewHolder,
        back_callback: BackCallback,
        back_context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Attach ViewHolder to GUI\n\n # Arguments\n\n* `view_holder` - ViewHolder instance\n * `gui` - GUI instance to attach to"]
    pub fn view_holder_attach_to_gui(view_holder: *mut ViewHolder, gui: *mut Gui);
}
extern "C" {
    #[doc = "View Update Handler\n\n # Arguments\n\n* `view` - View Instance\n * `context` - ViewHolder instance"]
    pub fn view_holder_update(view: *mut View, context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Send ViewPort of this ViewHolder instance to front\n\n # Arguments\n\n* `view_holder` - ViewHolder instance"]
    pub fn view_holder_send_to_front(view_holder: *mut ViewHolder);
}
extern "C" {
    #[doc = "Send ViewPort of this ViewHolder instance to back\n\n # Arguments\n\n* `view_holder` - ViewHolder instance"]
    pub fn view_holder_send_to_back(view_holder: *mut ViewHolder);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ViewStack {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate and init ViewStack\n\n # Returns\n\nViewStack instance"]
    pub fn view_stack_alloc() -> *mut ViewStack;
}
extern "C" {
    #[doc = "Free ViewStack instance\n\n # Arguments\n\n* `view_stack` - instance"]
    pub fn view_stack_free(view_stack: *mut ViewStack);
}
extern "C" {
    #[doc = "Get View of ViewStack.\n Should this View to any view manager such as\n ViewDispatcher or ViewHolder.\n\n # Arguments\n\n* `view_stack` - instance"]
    pub fn view_stack_get_view(view_stack: *mut ViewStack) -> *mut View;
}
extern "C" {
    #[doc = "Add View to ViewStack.\n Adds View on top of ViewStack.\n\n # Arguments\n\n* `view_stack` - instance\n * `view` - view to add"]
    pub fn view_stack_add_view(view_stack: *mut ViewStack, view: *mut View);
}
extern "C" {
    #[doc = "Remove any View in ViewStack.\n If no View to remove found - ignore.\n\n # Arguments\n\n* `view_stack` - instance\n * `view` - view to remove"]
    pub fn view_stack_remove_view(view_stack: *mut ViewStack, view: *mut View);
}
extern "C" {
    pub static firmware_api_interface: *const ElfApiInterface;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Loader {
    _unused: [u8; 0],
}
pub const LoaderStatus_LoaderStatusOk: LoaderStatus = 0;
pub const LoaderStatus_LoaderStatusErrorAppStarted: LoaderStatus = 1;
pub const LoaderStatus_LoaderStatusErrorUnknownApp: LoaderStatus = 2;
pub const LoaderStatus_LoaderStatusErrorInternal: LoaderStatus = 3;
pub type LoaderStatus = core::ffi::c_uchar;
extern "C" {
    #[doc = "Start application\n # Arguments\n\n* `instance` (direction in) - loader instance\n * `name` (direction in) - application name or id\n * `args` (direction in) - application arguments\n * `error_message` (direction out) - detailed error message, can be NULL\n # Returns\n\nLoaderStatus"]
    pub fn loader_start(
        instance: *mut Loader,
        name: *const core::ffi::c_char,
        args: *const core::ffi::c_char,
        error_message: *mut FuriString,
    ) -> LoaderStatus;
}
extern "C" {
    #[doc = "Start application with GUI error message\n # Arguments\n\n* `instance` (direction in) - loader instance\n * `name` (direction in) - application name or id\n * `args` (direction in) - application arguments\n # Returns\n\nLoaderStatus"]
    pub fn loader_start_with_gui_error(
        loader: *mut Loader,
        name: *const core::ffi::c_char,
        args: *const core::ffi::c_char,
    ) -> LoaderStatus;
}
extern "C" {
    #[doc = "Start application detached with GUI error message\n # Arguments\n\n* `instance` (direction in) - loader instance\n * `name` (direction in) - application name or id\n * `args` (direction in) - application arguments"]
    pub fn loader_start_detached_with_gui_error(
        loader: *mut Loader,
        name: *const core::ffi::c_char,
        args: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Lock application start\n # Arguments\n\n* `instance` (direction in) - loader instance\n # Returns\n\ntrue on success"]
    pub fn loader_lock(instance: *mut Loader) -> bool;
}
extern "C" {
    #[doc = "Unlock application start\n # Arguments\n\n* `instance` (direction in) - loader instance"]
    pub fn loader_unlock(instance: *mut Loader);
}
extern "C" {
    #[doc = "Check if loader is locked\n # Arguments\n\n* `instance` (direction in) - loader instance\n # Returns\n\ntrue if locked"]
    pub fn loader_is_locked(instance: *mut Loader) -> bool;
}
extern "C" {
    #[doc = "Show loader menu\n # Arguments\n\n* `instance` (direction in) - loader instance"]
    pub fn loader_show_menu(instance: *mut Loader);
}
extern "C" {
    #[doc = "Get loader pubsub\n # Arguments\n\n* `instance` (direction in) - loader instance\n # Returns\n\nFuriPubSub*"]
    pub fn loader_get_pubsub(instance: *mut Loader) -> *mut FuriPubSub;
}
extern "C" {
    #[doc = "Send a signal to the currently running application\n\n # Arguments\n\n* `instance` (direction in) - pointer to the loader instance\n * `signal` (direction in) - signal value to be sent\n * `arg` (direction in, out) - optional argument (can be of any value, including NULL)\n\n # Returns\n\ntrue if the signal was handled by the application, false otherwise"]
    pub fn loader_signal(instance: *mut Loader, signal: u32, arg: *mut core::ffi::c_void) -> bool;
}
extern "C" {
    #[doc = "Get the name of the currently running application\n\n # Arguments\n\n* `instance` (direction in) - pointer to the loader instance\n * `name` (direction in, out) - pointer to the string to contain the name (must be allocated)\n # Returns\n\ntrue if it was possible to get an application name, false otherwise"]
    pub fn loader_get_application_name(instance: *mut Loader, name: *mut FuriString) -> bool;
}
#[doc = "< Metric measurement units"]
pub const LocaleMeasurementUnits_LocaleMeasurementUnitsMetric: LocaleMeasurementUnits = 0;
#[doc = "< Imperial measurement units"]
pub const LocaleMeasurementUnits_LocaleMeasurementUnitsImperial: LocaleMeasurementUnits = 1;
pub type LocaleMeasurementUnits = core::ffi::c_uchar;
#[doc = "< 24-hour format"]
pub const LocaleTimeFormat_LocaleTimeFormat24h: LocaleTimeFormat = 0;
#[doc = "< 12-hour format"]
pub const LocaleTimeFormat_LocaleTimeFormat12h: LocaleTimeFormat = 1;
pub type LocaleTimeFormat = core::ffi::c_uchar;
#[doc = "< Day/Month/Year"]
pub const LocaleDateFormat_LocaleDateFormatDMY: LocaleDateFormat = 0;
#[doc = "< Month/Day/Year"]
pub const LocaleDateFormat_LocaleDateFormatMDY: LocaleDateFormat = 1;
#[doc = "< Year/Month/Day"]
pub const LocaleDateFormat_LocaleDateFormatYMD: LocaleDateFormat = 2;
pub type LocaleDateFormat = core::ffi::c_uchar;
extern "C" {
    #[doc = "Get Locale measurement units\n\n # Returns\n\nThe locale measurement units."]
    pub fn locale_get_measurement_unit() -> LocaleMeasurementUnits;
}
extern "C" {
    #[doc = "Set locale measurement units\n\n # Arguments\n\n* `format` (direction in) - The locale measurements units"]
    pub fn locale_set_measurement_unit(format: LocaleMeasurementUnits);
}
extern "C" {
    #[doc = "Convert Fahrenheit to Celsius\n\n # Arguments\n\n* `temp_f` (direction in) - The Temperature in Fahrenheit\n\n # Returns\n\nThe Temperature in Celsius"]
    pub fn locale_fahrenheit_to_celsius(temp_f: f32) -> f32;
}
extern "C" {
    #[doc = "Convert Celsius to Fahrenheit\n\n # Arguments\n\n* `temp_c` (direction in) - The Temperature in Celsius\n\n # Returns\n\nThe Temperature in Fahrenheit"]
    pub fn locale_celsius_to_fahrenheit(temp_c: f32) -> f32;
}
extern "C" {
    #[doc = "Get Locale time format\n\n # Returns\n\nThe locale time format."]
    pub fn locale_get_time_format() -> LocaleTimeFormat;
}
extern "C" {
    #[doc = "Set Locale Time Format\n\n # Arguments\n\n* `format` (direction in) - The Locale Time Format"]
    pub fn locale_set_time_format(format: LocaleTimeFormat);
}
extern "C" {
    #[doc = "Format time to furi string\n\n # Arguments\n\n* `out_str` (direction out) - The FuriString to store formatted time\n * `datetime` (direction in) - Pointer to the datetime\n * `format` (direction in) - The Locale Time Format\n * `show_seconds` (direction in) - The show seconds flag"]
    pub fn locale_format_time(
        out_str: *mut FuriString,
        datetime: *const DateTime,
        format: LocaleTimeFormat,
        show_seconds: bool,
    );
}
extern "C" {
    #[doc = "Get Locale DateFormat\n\n # Returns\n\nThe Locale DateFormat."]
    pub fn locale_get_date_format() -> LocaleDateFormat;
}
extern "C" {
    #[doc = "Set Locale DateFormat\n\n # Arguments\n\n* `format` (direction in) - The Locale DateFormat"]
    pub fn locale_set_date_format(format: LocaleDateFormat);
}
extern "C" {
    #[doc = "Format date to furi string\n\n # Arguments\n\n* `out_str` (direction out) - The FuriString to store formatted date\n * `datetime` (direction in) - Pointer to the datetime\n * `format` (direction in) - The format\n * `separator` (direction in) - The separator"]
    pub fn locale_format_date(
        out_str: *mut FuriString,
        datetime: *const DateTime,
        format: LocaleDateFormat,
        separator: *const core::ffi::c_char,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NotificationApp {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NotificationMessageDataSound {
    pub frequency: f32,
    pub volume: f32,
}
#[test]
fn bindgen_test_layout_NotificationMessageDataSound() {
    const UNINIT: ::core::mem::MaybeUninit<NotificationMessageDataSound> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NotificationMessageDataSound>(),
        8usize,
        concat!("Size of: ", stringify!(NotificationMessageDataSound))
    );
    assert_eq!(
        ::core::mem::align_of::<NotificationMessageDataSound>(),
        4usize,
        concat!("Alignment of ", stringify!(NotificationMessageDataSound))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).frequency) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageDataSound),
            "::",
            stringify!(frequency)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).volume) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageDataSound),
            "::",
            stringify!(volume)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NotificationMessageDataLed {
    pub value: u8,
}
#[test]
fn bindgen_test_layout_NotificationMessageDataLed() {
    const UNINIT: ::core::mem::MaybeUninit<NotificationMessageDataLed> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NotificationMessageDataLed>(),
        1usize,
        concat!("Size of: ", stringify!(NotificationMessageDataLed))
    );
    assert_eq!(
        ::core::mem::align_of::<NotificationMessageDataLed>(),
        1usize,
        concat!("Alignment of ", stringify!(NotificationMessageDataLed))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageDataLed),
            "::",
            stringify!(value)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NotificationMessageDataVibro {
    pub on: bool,
}
#[test]
fn bindgen_test_layout_NotificationMessageDataVibro() {
    const UNINIT: ::core::mem::MaybeUninit<NotificationMessageDataVibro> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NotificationMessageDataVibro>(),
        1usize,
        concat!("Size of: ", stringify!(NotificationMessageDataVibro))
    );
    assert_eq!(
        ::core::mem::align_of::<NotificationMessageDataVibro>(),
        1usize,
        concat!("Alignment of ", stringify!(NotificationMessageDataVibro))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).on) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageDataVibro),
            "::",
            stringify!(on)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NotificationMessageDataDelay {
    pub length: u32,
}
#[test]
fn bindgen_test_layout_NotificationMessageDataDelay() {
    const UNINIT: ::core::mem::MaybeUninit<NotificationMessageDataDelay> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NotificationMessageDataDelay>(),
        4usize,
        concat!("Size of: ", stringify!(NotificationMessageDataDelay))
    );
    assert_eq!(
        ::core::mem::align_of::<NotificationMessageDataDelay>(),
        4usize,
        concat!("Alignment of ", stringify!(NotificationMessageDataDelay))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).length) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageDataDelay),
            "::",
            stringify!(length)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NotificationMessageDataForcedSettings {
    pub speaker_volume: f32,
    pub vibro: bool,
    pub display_brightness: f32,
}
#[test]
fn bindgen_test_layout_NotificationMessageDataForcedSettings() {
    const UNINIT: ::core::mem::MaybeUninit<NotificationMessageDataForcedSettings> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NotificationMessageDataForcedSettings>(),
        12usize,
        concat!(
            "Size of: ",
            stringify!(NotificationMessageDataForcedSettings)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<NotificationMessageDataForcedSettings>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(NotificationMessageDataForcedSettings)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).speaker_volume) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageDataForcedSettings),
            "::",
            stringify!(speaker_volume)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).vibro) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageDataForcedSettings),
            "::",
            stringify!(vibro)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).display_brightness) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageDataForcedSettings),
            "::",
            stringify!(display_brightness)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NotificationMessageDataLedBlink {
    pub on_time: u16,
    pub period: u16,
    pub color: Light,
}
#[test]
fn bindgen_test_layout_NotificationMessageDataLedBlink() {
    const UNINIT: ::core::mem::MaybeUninit<NotificationMessageDataLedBlink> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NotificationMessageDataLedBlink>(),
        6usize,
        concat!("Size of: ", stringify!(NotificationMessageDataLedBlink))
    );
    assert_eq!(
        ::core::mem::align_of::<NotificationMessageDataLedBlink>(),
        2usize,
        concat!("Alignment of ", stringify!(NotificationMessageDataLedBlink))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).on_time) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageDataLedBlink),
            "::",
            stringify!(on_time)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).period) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageDataLedBlink),
            "::",
            stringify!(period)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).color) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageDataLedBlink),
            "::",
            stringify!(color)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union NotificationMessageData {
    pub sound: NotificationMessageDataSound,
    pub led: NotificationMessageDataLed,
    pub led_blink: NotificationMessageDataLedBlink,
    pub vibro: NotificationMessageDataVibro,
    pub delay: NotificationMessageDataDelay,
    pub forced_settings: NotificationMessageDataForcedSettings,
}
#[test]
fn bindgen_test_layout_NotificationMessageData() {
    const UNINIT: ::core::mem::MaybeUninit<NotificationMessageData> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NotificationMessageData>(),
        12usize,
        concat!("Size of: ", stringify!(NotificationMessageData))
    );
    assert_eq!(
        ::core::mem::align_of::<NotificationMessageData>(),
        4usize,
        concat!("Alignment of ", stringify!(NotificationMessageData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sound) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageData),
            "::",
            stringify!(sound)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).led) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageData),
            "::",
            stringify!(led)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).led_blink) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageData),
            "::",
            stringify!(led_blink)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).vibro) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageData),
            "::",
            stringify!(vibro)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).delay) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageData),
            "::",
            stringify!(delay)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).forced_settings) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessageData),
            "::",
            stringify!(forced_settings)
        )
    );
}
pub const NotificationMessageType_NotificationMessageTypeVibro: NotificationMessageType = 0;
pub const NotificationMessageType_NotificationMessageTypeSoundOn: NotificationMessageType = 1;
pub const NotificationMessageType_NotificationMessageTypeSoundOff: NotificationMessageType = 2;
pub const NotificationMessageType_NotificationMessageTypeLedRed: NotificationMessageType = 3;
pub const NotificationMessageType_NotificationMessageTypeLedGreen: NotificationMessageType = 4;
pub const NotificationMessageType_NotificationMessageTypeLedBlue: NotificationMessageType = 5;
pub const NotificationMessageType_NotificationMessageTypeLedBlinkStart: NotificationMessageType = 6;
pub const NotificationMessageType_NotificationMessageTypeLedBlinkStop: NotificationMessageType = 7;
pub const NotificationMessageType_NotificationMessageTypeLedBlinkColor: NotificationMessageType = 8;
pub const NotificationMessageType_NotificationMessageTypeDelay: NotificationMessageType = 9;
pub const NotificationMessageType_NotificationMessageTypeLedDisplayBacklight:
    NotificationMessageType = 10;
pub const NotificationMessageType_NotificationMessageTypeLedDisplayBacklightEnforceOn:
    NotificationMessageType = 11;
pub const NotificationMessageType_NotificationMessageTypeLedDisplayBacklightEnforceAuto:
    NotificationMessageType = 12;
pub const NotificationMessageType_NotificationMessageTypeDoNotReset: NotificationMessageType = 13;
pub const NotificationMessageType_NotificationMessageTypeForceSpeakerVolumeSetting:
    NotificationMessageType = 14;
pub const NotificationMessageType_NotificationMessageTypeForceVibroSetting:
    NotificationMessageType = 15;
pub const NotificationMessageType_NotificationMessageTypeForceDisplayBrightnessSetting:
    NotificationMessageType = 16;
pub const NotificationMessageType_NotificationMessageTypeLedBrightnessSettingApply:
    NotificationMessageType = 17;
pub const NotificationMessageType_NotificationMessageTypeLcdContrastUpdate:
    NotificationMessageType = 18;
pub type NotificationMessageType = core::ffi::c_uchar;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct NotificationMessage {
    pub type_: NotificationMessageType,
    pub data: NotificationMessageData,
}
#[test]
fn bindgen_test_layout_NotificationMessage() {
    const UNINIT: ::core::mem::MaybeUninit<NotificationMessage> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NotificationMessage>(),
        16usize,
        concat!("Size of: ", stringify!(NotificationMessage))
    );
    assert_eq!(
        ::core::mem::align_of::<NotificationMessage>(),
        4usize,
        concat!("Alignment of ", stringify!(NotificationMessage))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessage),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(NotificationMessage),
            "::",
            stringify!(data)
        )
    );
}
pub type NotificationSequence = [*const NotificationMessage; 0usize];
extern "C" {
    pub fn notification_message(app: *mut NotificationApp, sequence: *const NotificationSequence);
}
extern "C" {
    pub fn notification_message_block(
        app: *mut NotificationApp,
        sequence: *const NotificationSequence,
    );
}
extern "C" {
    #[doc = "Send internal (apply to permanent layer) notification message. Think twice before use.\n\n # Arguments\n\n* `app` - notification record content\n * `sequence` - notification sequence"]
    pub fn notification_internal_message(
        app: *mut NotificationApp,
        sequence: *const NotificationSequence,
    );
}
extern "C" {
    #[doc = "Send internal (apply to permanent layer) notification message and wait for notification end. Think twice before use.\n\n # Arguments\n\n* `app` - notification record content\n * `sequence` - notification sequence"]
    pub fn notification_internal_message_block(
        app: *mut NotificationApp,
        sequence: *const NotificationSequence,
    );
}
extern "C" {
    pub static message_click: NotificationMessage;
}
extern "C" {
    pub static message_note_c0: NotificationMessage;
}
extern "C" {
    pub static message_note_cs0: NotificationMessage;
}
extern "C" {
    pub static message_note_d0: NotificationMessage;
}
extern "C" {
    pub static message_note_ds0: NotificationMessage;
}
extern "C" {
    pub static message_note_e0: NotificationMessage;
}
extern "C" {
    pub static message_note_f0: NotificationMessage;
}
extern "C" {
    pub static message_note_fs0: NotificationMessage;
}
extern "C" {
    pub static message_note_g0: NotificationMessage;
}
extern "C" {
    pub static message_note_gs0: NotificationMessage;
}
extern "C" {
    pub static message_note_a0: NotificationMessage;
}
extern "C" {
    pub static message_note_as0: NotificationMessage;
}
extern "C" {
    pub static message_note_b0: NotificationMessage;
}
extern "C" {
    pub static message_note_c1: NotificationMessage;
}
extern "C" {
    pub static message_note_cs1: NotificationMessage;
}
extern "C" {
    pub static message_note_d1: NotificationMessage;
}
extern "C" {
    pub static message_note_ds1: NotificationMessage;
}
extern "C" {
    pub static message_note_e1: NotificationMessage;
}
extern "C" {
    pub static message_note_f1: NotificationMessage;
}
extern "C" {
    pub static message_note_fs1: NotificationMessage;
}
extern "C" {
    pub static message_note_g1: NotificationMessage;
}
extern "C" {
    pub static message_note_gs1: NotificationMessage;
}
extern "C" {
    pub static message_note_a1: NotificationMessage;
}
extern "C" {
    pub static message_note_as1: NotificationMessage;
}
extern "C" {
    pub static message_note_b1: NotificationMessage;
}
extern "C" {
    pub static message_note_c2: NotificationMessage;
}
extern "C" {
    pub static message_note_cs2: NotificationMessage;
}
extern "C" {
    pub static message_note_d2: NotificationMessage;
}
extern "C" {
    pub static message_note_ds2: NotificationMessage;
}
extern "C" {
    pub static message_note_e2: NotificationMessage;
}
extern "C" {
    pub static message_note_f2: NotificationMessage;
}
extern "C" {
    pub static message_note_fs2: NotificationMessage;
}
extern "C" {
    pub static message_note_g2: NotificationMessage;
}
extern "C" {
    pub static message_note_gs2: NotificationMessage;
}
extern "C" {
    pub static message_note_a2: NotificationMessage;
}
extern "C" {
    pub static message_note_as2: NotificationMessage;
}
extern "C" {
    pub static message_note_b2: NotificationMessage;
}
extern "C" {
    pub static message_note_c3: NotificationMessage;
}
extern "C" {
    pub static message_note_cs3: NotificationMessage;
}
extern "C" {
    pub static message_note_d3: NotificationMessage;
}
extern "C" {
    pub static message_note_ds3: NotificationMessage;
}
extern "C" {
    pub static message_note_e3: NotificationMessage;
}
extern "C" {
    pub static message_note_f3: NotificationMessage;
}
extern "C" {
    pub static message_note_fs3: NotificationMessage;
}
extern "C" {
    pub static message_note_g3: NotificationMessage;
}
extern "C" {
    pub static message_note_gs3: NotificationMessage;
}
extern "C" {
    pub static message_note_a3: NotificationMessage;
}
extern "C" {
    pub static message_note_as3: NotificationMessage;
}
extern "C" {
    pub static message_note_b3: NotificationMessage;
}
extern "C" {
    pub static message_note_c4: NotificationMessage;
}
extern "C" {
    pub static message_note_cs4: NotificationMessage;
}
extern "C" {
    pub static message_note_d4: NotificationMessage;
}
extern "C" {
    pub static message_note_ds4: NotificationMessage;
}
extern "C" {
    pub static message_note_e4: NotificationMessage;
}
extern "C" {
    pub static message_note_f4: NotificationMessage;
}
extern "C" {
    pub static message_note_fs4: NotificationMessage;
}
extern "C" {
    pub static message_note_g4: NotificationMessage;
}
extern "C" {
    pub static message_note_gs4: NotificationMessage;
}
extern "C" {
    pub static message_note_a4: NotificationMessage;
}
extern "C" {
    pub static message_note_as4: NotificationMessage;
}
extern "C" {
    pub static message_note_b4: NotificationMessage;
}
extern "C" {
    pub static message_note_c5: NotificationMessage;
}
extern "C" {
    pub static message_note_cs5: NotificationMessage;
}
extern "C" {
    pub static message_note_d5: NotificationMessage;
}
extern "C" {
    pub static message_note_ds5: NotificationMessage;
}
extern "C" {
    pub static message_note_e5: NotificationMessage;
}
extern "C" {
    pub static message_note_f5: NotificationMessage;
}
extern "C" {
    pub static message_note_fs5: NotificationMessage;
}
extern "C" {
    pub static message_note_g5: NotificationMessage;
}
extern "C" {
    pub static message_note_gs5: NotificationMessage;
}
extern "C" {
    pub static message_note_a5: NotificationMessage;
}
extern "C" {
    pub static message_note_as5: NotificationMessage;
}
extern "C" {
    pub static message_note_b5: NotificationMessage;
}
extern "C" {
    pub static message_note_c6: NotificationMessage;
}
extern "C" {
    pub static message_note_cs6: NotificationMessage;
}
extern "C" {
    pub static message_note_d6: NotificationMessage;
}
extern "C" {
    pub static message_note_ds6: NotificationMessage;
}
extern "C" {
    pub static message_note_e6: NotificationMessage;
}
extern "C" {
    pub static message_note_f6: NotificationMessage;
}
extern "C" {
    pub static message_note_fs6: NotificationMessage;
}
extern "C" {
    pub static message_note_g6: NotificationMessage;
}
extern "C" {
    pub static message_note_gs6: NotificationMessage;
}
extern "C" {
    pub static message_note_a6: NotificationMessage;
}
extern "C" {
    pub static message_note_as6: NotificationMessage;
}
extern "C" {
    pub static message_note_b6: NotificationMessage;
}
extern "C" {
    pub static message_note_c7: NotificationMessage;
}
extern "C" {
    pub static message_note_cs7: NotificationMessage;
}
extern "C" {
    pub static message_note_d7: NotificationMessage;
}
extern "C" {
    pub static message_note_ds7: NotificationMessage;
}
extern "C" {
    pub static message_note_e7: NotificationMessage;
}
extern "C" {
    pub static message_note_f7: NotificationMessage;
}
extern "C" {
    pub static message_note_fs7: NotificationMessage;
}
extern "C" {
    pub static message_note_g7: NotificationMessage;
}
extern "C" {
    pub static message_note_gs7: NotificationMessage;
}
extern "C" {
    pub static message_note_a7: NotificationMessage;
}
extern "C" {
    pub static message_note_as7: NotificationMessage;
}
extern "C" {
    pub static message_note_b7: NotificationMessage;
}
extern "C" {
    pub static message_note_c8: NotificationMessage;
}
extern "C" {
    pub static message_note_cs8: NotificationMessage;
}
extern "C" {
    pub static message_note_d8: NotificationMessage;
}
extern "C" {
    pub static message_note_ds8: NotificationMessage;
}
extern "C" {
    pub static message_note_e8: NotificationMessage;
}
extern "C" {
    pub static message_note_f8: NotificationMessage;
}
extern "C" {
    pub static message_note_fs8: NotificationMessage;
}
extern "C" {
    pub static message_note_g8: NotificationMessage;
}
extern "C" {
    pub static message_note_gs8: NotificationMessage;
}
extern "C" {
    pub static message_note_a8: NotificationMessage;
}
extern "C" {
    pub static message_note_as8: NotificationMessage;
}
extern "C" {
    pub static message_note_b8: NotificationMessage;
}
extern "C" {
    #[doc = "Messages"]
    pub static message_display_backlight_on: NotificationMessage;
}
extern "C" {
    pub static message_display_backlight_off: NotificationMessage;
}
extern "C" {
    pub static message_display_backlight_enforce_on: NotificationMessage;
}
extern "C" {
    pub static message_display_backlight_enforce_auto: NotificationMessage;
}
extern "C" {
    pub static message_red_255: NotificationMessage;
}
extern "C" {
    pub static message_green_255: NotificationMessage;
}
extern "C" {
    pub static message_blue_255: NotificationMessage;
}
extern "C" {
    pub static message_red_0: NotificationMessage;
}
extern "C" {
    pub static message_green_0: NotificationMessage;
}
extern "C" {
    pub static message_blue_0: NotificationMessage;
}
extern "C" {
    pub static message_blink_start_10: NotificationMessage;
}
extern "C" {
    pub static message_blink_start_100: NotificationMessage;
}
extern "C" {
    pub static message_blink_stop: NotificationMessage;
}
extern "C" {
    pub static message_blink_set_color_red: NotificationMessage;
}
extern "C" {
    pub static message_blink_set_color_green: NotificationMessage;
}
extern "C" {
    pub static message_blink_set_color_blue: NotificationMessage;
}
extern "C" {
    pub static message_blink_set_color_cyan: NotificationMessage;
}
extern "C" {
    pub static message_blink_set_color_magenta: NotificationMessage;
}
extern "C" {
    pub static message_blink_set_color_yellow: NotificationMessage;
}
extern "C" {
    pub static message_blink_set_color_white: NotificationMessage;
}
extern "C" {
    pub static message_delay_1: NotificationMessage;
}
extern "C" {
    pub static message_delay_10: NotificationMessage;
}
extern "C" {
    pub static message_delay_25: NotificationMessage;
}
extern "C" {
    pub static message_delay_50: NotificationMessage;
}
extern "C" {
    pub static message_delay_100: NotificationMessage;
}
extern "C" {
    pub static message_delay_250: NotificationMessage;
}
extern "C" {
    pub static message_delay_500: NotificationMessage;
}
extern "C" {
    pub static message_delay_1000: NotificationMessage;
}
extern "C" {
    pub static message_sound_off: NotificationMessage;
}
extern "C" {
    pub static message_vibro_on: NotificationMessage;
}
extern "C" {
    pub static message_vibro_off: NotificationMessage;
}
extern "C" {
    pub static message_do_not_reset: NotificationMessage;
}
extern "C" {
    pub static message_force_speaker_volume_setting_1f: NotificationMessage;
}
extern "C" {
    pub static message_force_vibro_setting_on: NotificationMessage;
}
extern "C" {
    pub static message_force_vibro_setting_off: NotificationMessage;
}
extern "C" {
    pub static message_force_display_brightness_setting_1f: NotificationMessage;
}
extern "C" {
    pub static message_lcd_contrast_update: NotificationMessage;
}
extern "C" {
    #[doc = "Message sequences"]
    pub static sequence_reset_red: NotificationSequence;
}
extern "C" {
    pub static sequence_reset_green: NotificationSequence;
}
extern "C" {
    pub static sequence_reset_blue: NotificationSequence;
}
extern "C" {
    pub static sequence_reset_rgb: NotificationSequence;
}
extern "C" {
    pub static sequence_reset_display: NotificationSequence;
}
extern "C" {
    pub static sequence_reset_sound: NotificationSequence;
}
extern "C" {
    pub static sequence_reset_vibro: NotificationSequence;
}
extern "C" {
    pub static sequence_set_vibro_on: NotificationSequence;
}
extern "C" {
    #[doc = "Display: backlight wakeup"]
    pub static sequence_display_backlight_on: NotificationSequence;
}
extern "C" {
    #[doc = "Display: backlight force off"]
    pub static sequence_display_backlight_off: NotificationSequence;
}
extern "C" {
    #[doc = "Display: backlight force off after a delay of 1000ms"]
    pub static sequence_display_backlight_off_delay_1000: NotificationSequence;
}
extern "C" {
    #[doc = "Display: backlight always on lock"]
    pub static sequence_display_backlight_enforce_on: NotificationSequence;
}
extern "C" {
    #[doc = "Display: backlight always on unlock"]
    pub static sequence_display_backlight_enforce_auto: NotificationSequence;
}
extern "C" {
    pub static sequence_charging: NotificationSequence;
}
extern "C" {
    pub static sequence_charged: NotificationSequence;
}
extern "C" {
    pub static sequence_not_charging: NotificationSequence;
}
extern "C" {
    pub static sequence_set_only_red_255: NotificationSequence;
}
extern "C" {
    pub static sequence_set_only_green_255: NotificationSequence;
}
extern "C" {
    pub static sequence_set_only_blue_255: NotificationSequence;
}
extern "C" {
    pub static sequence_set_red_255: NotificationSequence;
}
extern "C" {
    pub static sequence_set_green_255: NotificationSequence;
}
extern "C" {
    pub static sequence_set_blue_255: NotificationSequence;
}
extern "C" {
    pub static sequence_solid_yellow: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_blue_10: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_red_10: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_green_10: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_yellow_10: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_cyan_10: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_magenta_10: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_red_100: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_green_100: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_blue_100: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_yellow_100: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_cyan_100: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_magenta_100: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_white_100: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_start_blue: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_start_red: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_start_green: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_start_yellow: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_start_cyan: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_start_magenta: NotificationSequence;
}
extern "C" {
    pub static sequence_blink_stop: NotificationSequence;
}
extern "C" {
    pub static sequence_single_vibro: NotificationSequence;
}
extern "C" {
    pub static sequence_double_vibro: NotificationSequence;
}
extern "C" {
    pub static sequence_success: NotificationSequence;
}
extern "C" {
    pub static sequence_semi_success: NotificationSequence;
}
extern "C" {
    pub static sequence_error: NotificationSequence;
}
extern "C" {
    pub static sequence_audiovisual_alert: NotificationSequence;
}
extern "C" {
    pub static sequence_lcd_contrast_update: NotificationSequence;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Power {
    _unused: [u8; 0],
}
pub const PowerBootMode_PowerBootModeNormal: PowerBootMode = 0;
pub const PowerBootMode_PowerBootModeDfu: PowerBootMode = 1;
pub const PowerBootMode_PowerBootModeUpdateStart: PowerBootMode = 2;
pub type PowerBootMode = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PowerInfo {
    pub gauge_is_ok: bool,
    pub is_charging: bool,
    pub is_shutdown_requested: bool,
    pub current_charger: f32,
    pub current_gauge: f32,
    pub voltage_battery_charge_limit: f32,
    pub voltage_charger: f32,
    pub voltage_gauge: f32,
    pub voltage_vbus: f32,
    pub capacity_remaining: u32,
    pub capacity_full: u32,
    pub temperature_charger: f32,
    pub temperature_gauge: f32,
    pub charge: u8,
    pub health: u8,
}
#[test]
fn bindgen_test_layout_PowerInfo() {
    const UNINIT: ::core::mem::MaybeUninit<PowerInfo> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<PowerInfo>(),
        48usize,
        concat!("Size of: ", stringify!(PowerInfo))
    );
    assert_eq!(
        ::core::mem::align_of::<PowerInfo>(),
        4usize,
        concat!("Alignment of ", stringify!(PowerInfo))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).gauge_is_ok) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(gauge_is_ok)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).is_charging) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(is_charging)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).is_shutdown_requested) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(is_shutdown_requested)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).current_charger) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(current_charger)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).current_gauge) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(current_gauge)
        )
    );
    assert_eq!(
        unsafe {
            ::core::ptr::addr_of!((*ptr).voltage_battery_charge_limit) as usize - ptr as usize
        },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(voltage_battery_charge_limit)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).voltage_charger) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(voltage_charger)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).voltage_gauge) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(voltage_gauge)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).voltage_vbus) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(voltage_vbus)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).capacity_remaining) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(capacity_remaining)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).capacity_full) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(capacity_full)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).temperature_charger) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(temperature_charger)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).temperature_gauge) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(temperature_gauge)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).charge) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(charge)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).health) as usize - ptr as usize },
        45usize,
        concat!(
            "Offset of field: ",
            stringify!(PowerInfo),
            "::",
            stringify!(health)
        )
    );
}
extern "C" {
    #[doc = "Power off device"]
    pub fn power_off(power: *mut Power);
}
extern "C" {
    #[doc = "Reboot device\n\n # Arguments\n\n* `mode` - PowerBootMode"]
    pub fn power_reboot(power: *mut Power, mode: PowerBootMode);
}
extern "C" {
    #[doc = "Get power info\n\n # Arguments\n\n* `power` - Power instance\n * `info` - PowerInfo instance"]
    pub fn power_get_info(power: *mut Power, info: *mut PowerInfo);
}
extern "C" {
    #[doc = "Get power event pubsub handler\n\n # Arguments\n\n* `power` - Power instance\n\n # Returns\n\nFuriPubSub instance"]
    pub fn power_get_pubsub(power: *mut Power) -> *mut FuriPubSub;
}
extern "C" {
    #[doc = "Check battery health\n\n # Returns\n\ntrue if battery is healthy"]
    pub fn power_is_battery_healthy(power: *mut Power) -> bool;
}
extern "C" {
    #[doc = "Enable or disable battery low level notification message\n\n # Arguments\n\n* `power` - Power instance\n * `enable` - true - enable, false - disable"]
    pub fn power_enable_low_battery_level_notification(power: *mut Power, enable: bool);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Rpc {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RpcSession {
    _unused: [u8; 0],
}
#[doc = "Callback to send to client any data (e.g. response to command)"]
pub type RpcSendBytesCallback = ::core::option::Option<
    unsafe extern "C" fn(context: *mut core::ffi::c_void, bytes: *mut u8, bytes_len: usize),
>;
#[doc = "Callback to notify client that buffer is empty"]
pub type RpcBufferIsEmptyCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[doc = "Callback to notify transport layer that close_session command\n is received. Any other actions lays on transport layer.\n No destruction or session close performed."]
pub type RpcSessionClosedCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[doc = "Callback to notify transport layer that session was closed\n and all operations were finished"]
pub type RpcSessionTerminatedCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
pub const RpcOwner_RpcOwnerUnknown: RpcOwner = 0;
pub const RpcOwner_RpcOwnerBle: RpcOwner = 1;
pub const RpcOwner_RpcOwnerUsb: RpcOwner = 2;
pub const RpcOwner_RpcOwnerUart: RpcOwner = 3;
pub const RpcOwner_RpcOwnerCount: RpcOwner = 4;
#[doc = "RPC owner"]
pub type RpcOwner = core::ffi::c_uchar;
extern "C" {
    #[doc = "Get RPC session owner\n\n # Arguments\n\n* `session` - pointer to RpcSession descriptor\n # Returns\n\nsession owner"]
    pub fn rpc_session_get_owner(session: *mut RpcSession) -> RpcOwner;
}
extern "C" {
    #[doc = "Open RPC session\n\n USAGE:\n 1) rpc_session_open();\n 2) rpc_session_set_context();\n 3) rpc_session_set_send_bytes_callback();\n 4) rpc_session_set_close_callback();\n 5) while(1) {\n rpc_session_feed();\n }\n 6) rpc_session_close();\n\n\n # Arguments\n\n* `rpc` - instance\n * `owner` - owner of session\n # Returns\n\npointer to RpcSession descriptor, or\n NULL if RPC is busy and can't open session now"]
    pub fn rpc_session_open(rpc: *mut Rpc, owner: RpcOwner) -> *mut RpcSession;
}
extern "C" {
    #[doc = "Close RPC session\n It is guaranteed that no callbacks will be called\n as soon as session is closed. So no need in setting\n callbacks to NULL after session close.\n\n # Arguments\n\n* `session` - pointer to RpcSession descriptor"]
    pub fn rpc_session_close(session: *mut RpcSession);
}
extern "C" {
    #[doc = "Set session context for callbacks to pass\n\n # Arguments\n\n* `session` - pointer to RpcSession descriptor\n * `context` - context to pass to callbacks"]
    pub fn rpc_session_set_context(session: *mut RpcSession, context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Set callback to send bytes to client\n WARN: It's forbidden to call RPC API within RpcSendBytesCallback\n\n # Arguments\n\n* `session` - pointer to RpcSession descriptor\n * `callback` - callback to send bytes to client (can be NULL)"]
    pub fn rpc_session_set_send_bytes_callback(
        session: *mut RpcSession,
        callback: RpcSendBytesCallback,
    );
}
extern "C" {
    #[doc = "Set callback to notify that buffer is empty\n\n # Arguments\n\n* `session` - pointer to RpcSession descriptor\n * `callback` - callback to notify client that buffer is empty (can be NULL)\n * `context` - context to pass to callback"]
    pub fn rpc_session_set_buffer_is_empty_callback(
        session: *mut RpcSession,
        callback: RpcBufferIsEmptyCallback,
    );
}
extern "C" {
    #[doc = "Set callback to be called when RPC command to close session is received\n WARN: It's forbidden to call RPC API within RpcSessionClosedCallback\n\n # Arguments\n\n* `session` - pointer to RpcSession descriptor\n * `callback` - callback to inform about RPC close session command (can be NULL)"]
    pub fn rpc_session_set_close_callback(
        session: *mut RpcSession,
        callback: RpcSessionClosedCallback,
    );
}
extern "C" {
    #[doc = "Set callback to be called when RPC session is closed\n\n # Arguments\n\n* `session` - pointer to RpcSession descriptor\n * `callback` - callback to inform about RPC session state"]
    pub fn rpc_session_set_terminated_callback(
        session: *mut RpcSession,
        callback: RpcSessionTerminatedCallback,
    );
}
extern "C" {
    #[doc = "Give bytes to RPC service to decode them and perform command\n\n # Arguments\n\n* `session` - pointer to RpcSession descriptor\n * `buffer` - buffer to provide to RPC service\n * `size` - size of buffer\n * `timeout` - max timeout to wait till all buffer will be consumed\n\n # Returns\n\nactually consumed bytes"]
    pub fn rpc_session_feed(
        session: *mut RpcSession,
        buffer: *const u8,
        size: usize,
        timeout: u32,
    ) -> usize;
}
extern "C" {
    #[doc = "Get available size of RPC buffer\n\n # Arguments\n\n* `session` - pointer to RpcSession descriptor\n\n # Returns\n\nbytes available in buffer"]
    pub fn rpc_session_get_available_size(session: *mut RpcSession) -> usize;
}
#[doc = "< No data is provided by the event."]
pub const RpcAppSystemEventDataType_RpcAppSystemEventDataTypeNone: RpcAppSystemEventDataType = 0;
#[doc = "< Event data contains a zero-terminated string."]
pub const RpcAppSystemEventDataType_RpcAppSystemEventDataTypeString: RpcAppSystemEventDataType = 1;
#[doc = "< Event data contains a signed 32-bit integer."]
pub const RpcAppSystemEventDataType_RpcAppSystemEventDataTypeInt32: RpcAppSystemEventDataType = 2;
#[doc = "< Event data contains zero or more bytes."]
pub const RpcAppSystemEventDataType_RpcAppSystemEventDataTypeBytes: RpcAppSystemEventDataType = 3;
#[doc = "Enumeration of possible event data types."]
pub type RpcAppSystemEventDataType = core::ffi::c_uchar;
#[doc = "Event data structure, containing the type and associated data.\n\n All below fields except for type are valid only if the respective type is set."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RpcAppSystemEventData {
    #[doc = "< Type of the data. The meaning of other fields depends on this one."]
    pub type_: RpcAppSystemEventDataType,
    pub __bindgen_anon_1: RpcAppSystemEventData__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union RpcAppSystemEventData__bindgen_ty_1 {
    #[doc = "< Pointer to a zero-terminated character string."]
    pub string: *const core::ffi::c_char,
    #[doc = "< Signed 32-bit integer value."]
    pub i32_: i32,
    #[doc = "< Byte array of arbitrary length."]
    pub bytes: RpcAppSystemEventData__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RpcAppSystemEventData__bindgen_ty_1__bindgen_ty_1 {
    #[doc = "< Pointer to the byte array data."]
    pub ptr: *const u8,
    #[doc = "< Size of the byte array, in bytes."]
    pub size: usize,
}
#[test]
fn bindgen_test_layout_RpcAppSystemEventData__bindgen_ty_1__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<RpcAppSystemEventData__bindgen_ty_1__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<RpcAppSystemEventData__bindgen_ty_1__bindgen_ty_1>(),
        8usize,
        concat!(
            "Size of: ",
            stringify!(RpcAppSystemEventData__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<RpcAppSystemEventData__bindgen_ty_1__bindgen_ty_1>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(RpcAppSystemEventData__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(RpcAppSystemEventData__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(ptr)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(RpcAppSystemEventData__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(size)
        )
    );
}
#[test]
fn bindgen_test_layout_RpcAppSystemEventData__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<RpcAppSystemEventData__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<RpcAppSystemEventData__bindgen_ty_1>(),
        8usize,
        concat!("Size of: ", stringify!(RpcAppSystemEventData__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<RpcAppSystemEventData__bindgen_ty_1>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(RpcAppSystemEventData__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).string) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(RpcAppSystemEventData__bindgen_ty_1),
            "::",
            stringify!(string)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).i32_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(RpcAppSystemEventData__bindgen_ty_1),
            "::",
            stringify!(i32_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bytes) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(RpcAppSystemEventData__bindgen_ty_1),
            "::",
            stringify!(bytes)
        )
    );
}
#[test]
fn bindgen_test_layout_RpcAppSystemEventData() {
    const UNINIT: ::core::mem::MaybeUninit<RpcAppSystemEventData> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<RpcAppSystemEventData>(),
        12usize,
        concat!("Size of: ", stringify!(RpcAppSystemEventData))
    );
    assert_eq!(
        ::core::mem::align_of::<RpcAppSystemEventData>(),
        4usize,
        concat!("Alignment of ", stringify!(RpcAppSystemEventData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(RpcAppSystemEventData),
            "::",
            stringify!(type_)
        )
    );
}
#[doc = "Denotes an invalid state.\n\n An event of this type shall never be passed into the callback."]
pub const RpcAppSystemEventType_RpcAppEventTypeInvalid: RpcAppSystemEventType = 0;
#[doc = "The client side has closed the session.\n\n After receiving this event, the RPC context is no more valid."]
pub const RpcAppSystemEventType_RpcAppEventTypeSessionClose: RpcAppSystemEventType = 1;
#[doc = "The client has requested the application to exit.\n\n The application must exit after receiving this command."]
pub const RpcAppSystemEventType_RpcAppEventTypeAppExit: RpcAppSystemEventType = 2;
#[doc = "The client has requested the application to load a file.\n\n This command's meaning is application-specific, i.e. the application might or\n might not require additional commands after loading a file to do anything useful."]
pub const RpcAppSystemEventType_RpcAppEventTypeLoadFile: RpcAppSystemEventType = 3;
#[doc = "The client has informed the application that a button has been pressed.\n\n This command's meaning is application-specific, e.g. to select a part of the\n previously loaded file or to invoke a particular function within the application."]
pub const RpcAppSystemEventType_RpcAppEventTypeButtonPress: RpcAppSystemEventType = 4;
#[doc = "The client has informed the application that a button has been released.\n\n This command's meaning is application-specific, e.g. to cease\n all activities to be conducted while a button is being pressed."]
pub const RpcAppSystemEventType_RpcAppEventTypeButtonRelease: RpcAppSystemEventType = 5;
#[doc = "The client has sent a byte array of arbitrary size.\n\n This command's purpose is bi-directional exchange of arbitrary raw data.\n Useful for implementing higher-level protocols while using the RPC as a transport layer."]
pub const RpcAppSystemEventType_RpcAppEventTypeDataExchange: RpcAppSystemEventType = 6;
#[doc = "Enumeration of possible event types."]
pub type RpcAppSystemEventType = core::ffi::c_uchar;
#[doc = "RPC application subsystem event structure."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RpcAppSystemEvent {
    #[doc = "< Type of the event."]
    pub type_: RpcAppSystemEventType,
    #[doc = "< Data associated with the event."]
    pub data: RpcAppSystemEventData,
}
#[test]
fn bindgen_test_layout_RpcAppSystemEvent() {
    const UNINIT: ::core::mem::MaybeUninit<RpcAppSystemEvent> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<RpcAppSystemEvent>(),
        16usize,
        concat!("Size of: ", stringify!(RpcAppSystemEvent))
    );
    assert_eq!(
        ::core::mem::align_of::<RpcAppSystemEvent>(),
        4usize,
        concat!("Alignment of ", stringify!(RpcAppSystemEvent))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(RpcAppSystemEvent),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(RpcAppSystemEvent),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "Callback function type.\n\n A function of this type must be passed to rpc_system_app_set_callback() by the user code.\n\n The event pointer is valid ONLY inside the callback function.\n\n # Arguments\n\n* `event` (direction in) - pointer to the event object. Valid only inside the callback function.\n * `context` (direction in, out) - pointer to the user-defined context object."]
pub type RpcAppSystemCallback = ::core::option::Option<
    unsafe extern "C" fn(event: *const RpcAppSystemEvent, context: *mut core::ffi::c_void),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RpcAppSystem {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Set the callback function for use by an RpcAppSystem instance.\n\n # Arguments\n\n* `rpc_app` (direction in, out) - pointer to the instance to be configured.\n * `callback` (direction in) - pointer to the function to be called upon message reception.\n * `context` (direction in, out) - pointer to the user-defined context object. Will be passed to the callback."]
    pub fn rpc_system_app_set_callback(
        rpc_app: *mut RpcAppSystem,
        callback: RpcAppSystemCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Send a notification that an RpcAppSystem instance has been started and is ready.\n\n Call this function once right after acquiring an RPC context and setting the callback.\n\n # Arguments\n\n* `rpc_app` (direction in, out) - pointer to the instance to be used."]
    pub fn rpc_system_app_send_started(rpc_app: *mut RpcAppSystem);
}
extern "C" {
    #[doc = "Send a notification that the application using an RpcAppSystem instance is about to exit.\n\n Call this function when the application is about to exit (usually in the *_free() function).\n\n # Arguments\n\n* `rpc_app` (direction in, out) - pointer to the instance to be used."]
    pub fn rpc_system_app_send_exited(rpc_app: *mut RpcAppSystem);
}
extern "C" {
    #[doc = "Send a confirmation that the application using an RpcAppSystem instance has handled the event.\n\n An explicit confirmation is required for the following event types:\n - RpcAppEventTypeAppExit\n - RpcAppEventTypeLoadFile\n - RpcAppEventTypeButtonPress\n - RpcAppEventTypeButtonRelease\n - RpcAppEventTypeDataExchange\n\n Not confirming these events will result in a client-side timeout.\n\n # Arguments\n\n* `rpc_app` (direction in, out) - pointer to the instance to be used.\n * `result` (direction in) - whether the command was successfully handled or not (true for success)."]
    pub fn rpc_system_app_confirm(rpc_app: *mut RpcAppSystem, result: bool);
}
extern "C" {
    #[doc = "Set the error code stored in an RpcAppSystem instance.\n\n The error code can be retrieved by the client at any time by using the GetError request.\n The error code value has no meaning within the subsystem, i.e. it is only passed through to the client.\n\n # Arguments\n\n* `rpc_app` (direction in, out) - pointer to the instance to be modified.\n * `error_code` (direction in) - arbitrary error code to be set."]
    pub fn rpc_system_app_set_error_code(rpc_app: *mut RpcAppSystem, error_code: u32);
}
extern "C" {
    #[doc = "Set the error text stored in an RpcAppSystem instance.\n\n The error text can be retrieved by the client at any time by using the GetError request.\n The text has no meaning within the subsystem, i.e. it is only passed through to the client.\n\n # Arguments\n\n* `rpc_app` (direction in, out) - pointer to the instance to be modified.\n * `error_text` (direction in) - Pointer to a zero-terminated string containing the error text."]
    pub fn rpc_system_app_set_error_text(
        rpc_app: *mut RpcAppSystem,
        error_text: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Reset the error code and text stored in an RpcAppSystem instance.\n\n Resets the error code to 0 and error text to \"\" (empty string).\n\n # Arguments\n\n* `rpc_app` (direction in, out) - pointer to the instance to be reset."]
    pub fn rpc_system_app_error_reset(rpc_app: *mut RpcAppSystem);
}
extern "C" {
    #[doc = "Send a byte array of arbitrary data to the client using an RpcAppSystem instance.\n\n # Arguments\n\n* `rpc_app` (direction in, out) - pointer to the instance to be used.\n * `data` (direction in) - pointer to the data buffer to be sent.\n * `data_size` (direction in) - size of the data buffer, in bytes."]
    pub fn rpc_system_app_exchange_data(
        rpc_app: *mut RpcAppSystem,
        data: *const u8,
        data_size: usize,
    );
}
pub const BitLibParity_BitLibParityEven: BitLibParity = 0;
pub const BitLibParity_BitLibParityOdd: BitLibParity = 1;
pub const BitLibParity_BitLibParityAlways0: BitLibParity = 2;
pub const BitLibParity_BitLibParityAlways1: BitLibParity = 3;
pub type BitLibParity = core::ffi::c_uchar;
extern "C" {
    #[doc = "Push a bit into a byte array.\n # Arguments\n\n* `data` - array to push bit into\n * `data_size` - array size\n * `bit` - bit to push"]
    pub fn bit_lib_push_bit(data: *mut u8, data_size: usize, bit: bool);
}
extern "C" {
    #[doc = "Set a bit in a byte array.\n # Arguments\n\n* `data` - array to set bit in\n * `position` - The position of the bit to set.\n * `bit` - bit value to set"]
    pub fn bit_lib_set_bit(data: *mut u8, position: usize, bit: bool);
}
extern "C" {
    #[doc = "Set the bit at the given position to the given value.\n # Arguments\n\n* `data` - The data to set the bit in.\n * `position` - The position of the bit to set.\n * `byte` - The data to set the bit to.\n * `length` - The length of the data."]
    pub fn bit_lib_set_bits(data: *mut u8, position: usize, byte: u8, length: u8);
}
extern "C" {
    #[doc = "Get the bit of a byte.\n # Arguments\n\n* `data` - The byte to get the bits from.\n * `position` - The position of the bit.\n # Returns\n\nThe bit."]
    pub fn bit_lib_get_bit(data: *const u8, position: usize) -> bool;
}
extern "C" {
    #[doc = "Get the bits of a data, as uint8_t.\n # Arguments\n\n* `data` - The data to get the bits from.\n * `position` - The position of the first bit.\n * `length` - The length of the bits.\n # Returns\n\nThe bits."]
    pub fn bit_lib_get_bits(data: *const u8, position: usize, length: u8) -> u8;
}
extern "C" {
    #[doc = "Get the bits of a data, as uint16_t.\n # Arguments\n\n* `data` - The data to get the bits from.\n * `position` - The position of the first bit.\n * `length` - The length of the bits.\n # Returns\n\nThe bits."]
    pub fn bit_lib_get_bits_16(data: *const u8, position: usize, length: u8) -> u16;
}
extern "C" {
    #[doc = "Get the bits of a data, as uint32_t.\n # Arguments\n\n* `data` - The data to get the bits from.\n * `position` - The position of the first bit.\n * `length` - The length of the bits.\n # Returns\n\nThe bits."]
    pub fn bit_lib_get_bits_32(data: *const u8, position: usize, length: u8) -> u32;
}
extern "C" {
    #[doc = "Get the bits of a data, as uint64_t.\n # Arguments\n\n* `data` - The data to get the bits from.\n * `position` - The position of the first bit.\n * `length` - The length of the bits.\n # Returns\n\nThe bits."]
    pub fn bit_lib_get_bits_64(data: *const u8, position: usize, length: u8) -> u64;
}
extern "C" {
    #[doc = "Test parity of given bits\n # Arguments\n\n* `bits` - Bits to test parity of\n * `parity` - Parity to test against\n # Returns\n\ntrue if parity is correct, false otherwise"]
    pub fn bit_lib_test_parity_32(bits: u32, parity: BitLibParity) -> bool;
}
extern "C" {
    #[doc = "Test parity of bit array, check parity for every parity_length block from start\n\n # Arguments\n\n* `data` - Bit array\n * `position` - Start position\n * `length` - Bit count\n * `parity` - Parity to test against\n * `parity_length` - Parity block length\n # Returns\n\ntrue\n false"]
    pub fn bit_lib_test_parity(
        data: *const u8,
        position: usize,
        length: u8,
        parity: BitLibParity,
        parity_length: u8,
    ) -> bool;
}
extern "C" {
    #[doc = "Add parity to bit array\n\n # Arguments\n\n* `data` - Source bit array\n * `position` - Start position\n * `dest` - Destination bit array\n * `dest_position` - Destination position\n * `source_length` - Source bit count\n * `parity_length` - Parity block length\n * `parity` - Parity to test against\n # Returns\n\nsize_t"]
    pub fn bit_lib_add_parity(
        data: *const u8,
        position: usize,
        dest: *mut u8,
        dest_position: usize,
        source_length: u8,
        parity_length: u8,
        parity: BitLibParity,
    ) -> usize;
}
extern "C" {
    #[doc = "Remove bit every n in array and shift array left. Useful to remove parity.\n\n # Arguments\n\n* `data` - Bit array\n * `position` - Start position\n * `length` - Bit count\n * `n` - every n bit will be removed\n # Returns\n\nsize_t"]
    pub fn bit_lib_remove_bit_every_nth(data: *mut u8, position: usize, length: u8, n: u8)
        -> usize;
}
extern "C" {
    #[doc = "Copy bits from source to destination.\n\n # Arguments\n\n* `data` - destination array\n * `position` - position in destination array\n * `length` - length of bits to copy\n * `source` - source array\n * `source_position` - position in source array"]
    pub fn bit_lib_copy_bits(
        data: *mut u8,
        position: usize,
        length: usize,
        source: *const u8,
        source_position: usize,
    );
}
extern "C" {
    #[doc = "Reverse bits in bit array\n\n # Arguments\n\n* `data` - Bit array\n * `position` - start position\n * `length` - length of bits to reverse"]
    pub fn bit_lib_reverse_bits(data: *mut u8, position: usize, length: u8);
}
extern "C" {
    #[doc = "Count 1 bits in data\n\n # Arguments\n\n* `data` -\n # Returns\n\nuint8_t set bit count"]
    pub fn bit_lib_get_bit_count(data: u32) -> u8;
}
extern "C" {
    #[doc = "Print data as bit array\n\n # Arguments\n\n* `data` -\n * `length` -"]
    pub fn bit_lib_print_bits(data: *const u8, length: usize);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BitLibRegion {
    pub mark: core::ffi::c_char,
    pub start: usize,
    pub length: usize,
}
#[test]
fn bindgen_test_layout_BitLibRegion() {
    const UNINIT: ::core::mem::MaybeUninit<BitLibRegion> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<BitLibRegion>(),
        12usize,
        concat!("Size of: ", stringify!(BitLibRegion))
    );
    assert_eq!(
        ::core::mem::align_of::<BitLibRegion>(),
        4usize,
        concat!("Alignment of ", stringify!(BitLibRegion))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).mark) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(BitLibRegion),
            "::",
            stringify!(mark)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(BitLibRegion),
            "::",
            stringify!(start)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).length) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(BitLibRegion),
            "::",
            stringify!(length)
        )
    );
}
extern "C" {
    #[doc = "Print data as bit array and mark regions. Regions needs to be sorted by start position.\n\n # Arguments\n\n* `regions` -\n * `region_count` -\n * `data` -\n * `length` -"]
    pub fn bit_lib_print_regions(
        regions: *const BitLibRegion,
        region_count: usize,
        data: *const u8,
        length: usize,
    );
}
extern "C" {
    #[doc = "Reverse bits in uint16_t, faster than generic bit_lib_reverse_bits.\n\n # Arguments\n\n* `data` -\n # Returns\n\nuint16_t"]
    pub fn bit_lib_reverse_16_fast(data: u16) -> u16;
}
extern "C" {
    #[doc = "Reverse bits in uint8_t, faster than generic bit_lib_reverse_bits.\n\n # Arguments\n\n* `byte` - Byte\n # Returns\n\nuint8_t the reversed byte"]
    pub fn bit_lib_reverse_8_fast(byte: u8) -> u8;
}
extern "C" {
    #[doc = "Slow, but generic CRC8 implementation\n\n # Arguments\n\n* `data` -\n * `data_size` -\n * `polynom` - CRC polynom\n * `init` - init value\n * `ref_in` - true if the right bit is older\n * `ref_out` - true to reverse output\n * `xor_out` - xor output with this value\n # Returns\n\nuint8_t"]
    pub fn bit_lib_crc8(
        data: *const u8,
        data_size: usize,
        polynom: u8,
        init: u8,
        ref_in: bool,
        ref_out: bool,
        xor_out: u8,
    ) -> u16;
}
extern "C" {
    #[doc = "Slow, but generic CRC16 implementation\n\n # Arguments\n\n* `data` -\n * `data_size` -\n * `polynom` - CRC polynom\n * `init` - init value\n * `ref_in` - true if the right bit is older\n * `ref_out` - true to reverse output\n * `xor_out` - xor output with this value\n # Returns\n\nuint16_t"]
    pub fn bit_lib_crc16(
        data: *const u8,
        data_size: usize,
        polynom: u16,
        init: u16,
        ref_in: bool,
        ref_out: bool,
        xor_out: u16,
    ) -> u16;
}
extern "C" {
    #[doc = "Convert number to bytes in big endian order\n\n # Arguments\n\n* `src` - number to convert\n * `len` - max used bytes count\n * `dest` - destination\n # Returns\n\nvoid"]
    pub fn bit_lib_num_to_bytes_be(src: u64, len: u8, dest: *mut u8);
}
extern "C" {
    #[doc = "Convert number to bytes in little endian order\n\n # Arguments\n\n* `src` - number to convert\n * `len` - max used bytes count\n * `dest` - destination\n # Returns\n\nvoid"]
    pub fn bit_lib_num_to_bytes_le(src: u64, len: u8, dest: *mut u8);
}
extern "C" {
    #[doc = "Convert bytes to number in big endian order\n\n # Arguments\n\n* `src` - byte array\n * `len` - max used bytes count\n # Returns\n\nuint64_t"]
    pub fn bit_lib_bytes_to_num_be(src: *const u8, len: u8) -> u64;
}
extern "C" {
    #[doc = "Convert bytes to number in little endian order\n\n # Arguments\n\n* `src` - byte array\n * `len` - max used bytes count\n # Returns\n\nuint64_t"]
    pub fn bit_lib_bytes_to_num_le(src: *const u8, len: u8) -> u64;
}
extern "C" {
    #[doc = "Convert bytes in binary-coded decimal encoding to number\n\n # Arguments\n\n* `src` - byte array\n * `len` - max used bytes count\n * `is_bcd` - will be true if all processed bytes is BCD encoded (no A-F nibbles)\n # Returns\n\nuint64_t"]
    pub fn bit_lib_bytes_to_num_bcd(src: *const u8, len: u8, is_bcd: *mut bool) -> u64;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DigitalSignal {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Append one period to the end of the DigitalSignal instance.\n\n # Arguments\n\n* `signal` (direction in, out) - pointer to a the instance to append to.\n * `ticks` (direction in) - the period length, in 10 picosecond units."]
    pub fn digital_signal_add_period(signal: *mut DigitalSignal, ticks: u32);
}
extern "C" {
    #[doc = "Append one period to the end of the DigitalSignal instance, with the level specified.\n\n If the level is the same as the last level contained in the instance, then it is extened\n by the given ticks value. Otherwise, the behaviour is identical to digital_signal_add_period().\n\n Example 1: add tc with HIGH level\n ```\n before:\n ... ------+\n ta | tb\n +-------\n after:\n ... ------+ +-------\n ta | tb | tc\n +------+\n ```\n Example 2: add tc with LOW level\n ```\n before:\n ... ------+\n ta | tb\n +-------\n after:\n ... ------+\n ta | tb + tc\n +--------------\n ```\n\n # Arguments\n\n* `signal` (direction in, out) - pointer to the instance to append to.\n * `ticks` (direction in) - the period length, in 10 picosecond units.\n * `level` (direction in) - the level to be set during the period."]
    pub fn digital_signal_add_period_with_level(
        signal: *mut DigitalSignal,
        ticks: u32,
        level: bool,
    );
}
extern "C" {
    #[doc = "Get the current start level contained in the DigitalSignal instance.\n\n If not explicitly set with digital_signal_set_start_level(), it defaults to false.\n\n # Arguments\n\n* `signal` (direction in) - pointer to the instance to be queried.\n # Returns\n\nthe start level value."]
    pub fn digital_signal_get_start_level(signal: *const DigitalSignal) -> bool;
}
extern "C" {
    #[doc = "Set the start level contained in the DigitalSignal instance.\n\n # Arguments\n\n* `signal` (direction in, out) - pointer to the instance to be modified.\n * `level` (direction in) - signal level to be set as the start level."]
    pub fn digital_signal_set_start_level(signal: *mut DigitalSignal, level: bool);
}
extern "C" {
    #[doc = "Get the number of periods currently stored in a DigitalSignal instance.\n\n # Arguments\n\n* `signal` (direction in) - pointer to the instance to be queried.\n # Returns\n\nthe number of periods stored in the instance."]
    pub fn digital_signal_get_size(signal: *const DigitalSignal) -> u32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DigitalSequence {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Register a signal within a DigitalSequence instance by its index.\n\n This function must be called for each signal to be used in the sequence. The DigitalSequence\n instance does not own the signals, therefore, their lifetime must be no less than the instance's.\n\n The user is responsible for creation and deletion of DigitalSignal instances and\n also for keeping track of their respective indices.\n\n # Arguments\n\n* `sequence` (direction in, out) - pointer to the instance to be modified.\n * `signal_index` (direction in) - index to register the signal under (must be less than 32).\n * `signal` (direction in) - pointer to the DigitalSignal instance to be registered."]
    pub fn digital_sequence_register_signal(
        sequence: *mut DigitalSequence,
        signal_index: u8,
        signal: *const DigitalSignal,
    );
}
extern "C" {
    #[doc = "Append a signal index to a DigitalSequence instance.\n\n The signal under the index must be registered beforehand by calling digital_sequence_set_signal().\n\n # Arguments\n\n* `sequence` (direction in, out) - pointer to the instance to be modified.\n * `signal_index` (direction in) - signal index to be appended to the sequence (must be less than 32)."]
    pub fn digital_sequence_add_signal(sequence: *mut DigitalSequence, signal_index: u8);
}
extern "C" {
    #[doc = "Transmit the sequence contained in the DigitalSequence instance.\n\n Must contain at least one registered signal and one signal index.\n\n NOTE: The current implementation will properly initialise the GPIO provided during construction,\n but it is the caller's responsibility to reconfigure it back before reusing for other purposes.\n This is due to performance reasons.\n\n # Arguments\n\n* `sequence` (direction in) - pointer to the sequence to be transmitted."]
    pub fn digital_sequence_transmit(sequence: *mut DigitalSequence);
}
extern "C" {
    #[doc = "Read register\n\n # Arguments\n\n* `handle` - - pointer t FuriHalSpiBusHandle instance\n * `reg` - - register address\n * `val` - - pointer to the variable to store the read value"]
    pub fn st25r3916_read_reg(handle: *mut FuriHalSpiBusHandle, reg: u8, val: *mut u8);
}
extern "C" {
    #[doc = "Read multiple registers\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `reg_start` - - start register address\n * `values` - - pointer to the buffer to store the read values\n * `length` - - number of registers to read"]
    pub fn st25r3916_read_burst_regs(
        handle: *mut FuriHalSpiBusHandle,
        reg_start: u8,
        values: *mut u8,
        length: u8,
    );
}
extern "C" {
    #[doc = "Write register\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `reg` - - register address\n * `val` - - value to write"]
    pub fn st25r3916_write_reg(handle: *mut FuriHalSpiBusHandle, reg: u8, val: u8);
}
extern "C" {
    #[doc = "Write multiple registers\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `reg_start` - - start register address\n * `values` - - pointer to buffer to write\n * `length` - - number of registers to write"]
    pub fn st25r3916_write_burst_regs(
        handle: *mut FuriHalSpiBusHandle,
        reg_start: u8,
        values: *const u8,
        length: u8,
    );
}
extern "C" {
    #[doc = "Write fifo register\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `buff` - - buffer to write to FIFO\n * `length` - - number of bytes to write"]
    pub fn st25r3916_reg_write_fifo(
        handle: *mut FuriHalSpiBusHandle,
        buff: *const u8,
        length: usize,
    );
}
extern "C" {
    #[doc = "Read fifo register\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `buff` - - buffer to store the read values\n * `length` - - number of bytes to read"]
    pub fn st25r3916_reg_read_fifo(handle: *mut FuriHalSpiBusHandle, buff: *mut u8, length: usize);
}
extern "C" {
    #[doc = "Write PTA memory register\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `values` - - pointer to buffer to write\n * `length` - - number of bytes to write"]
    pub fn st25r3916_write_pta_mem(
        handle: *mut FuriHalSpiBusHandle,
        values: *const u8,
        length: usize,
    );
}
extern "C" {
    #[doc = "Read PTA memory register\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `values` - - buffer to store the read values\n * `length` - - number of bytes to read"]
    pub fn st25r3916_read_pta_mem(handle: *mut FuriHalSpiBusHandle, values: *mut u8, length: usize);
}
extern "C" {
    #[doc = "Write PTF memory register\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `values` - - pointer to buffer to write\n * `length` - - number of bytes to write"]
    pub fn st25r3916_write_ptf_mem(
        handle: *mut FuriHalSpiBusHandle,
        values: *const u8,
        length: usize,
    );
}
extern "C" {
    #[doc = "Read PTTSN memory register\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `values` - - pointer to buffer to write\n * `length` - - number of bytes to write"]
    pub fn st25r3916_write_pttsn_mem(
        handle: *mut FuriHalSpiBusHandle,
        values: *mut u8,
        length: usize,
    );
}
extern "C" {
    #[doc = "Send Direct command\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `cmd` - - direct command"]
    pub fn st25r3916_direct_cmd(handle: *mut FuriHalSpiBusHandle, cmd: u8);
}
extern "C" {
    #[doc = "Read test register\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `reg` - - register address\n * `val` - - pointer to the variable to store the read value"]
    pub fn st25r3916_read_test_reg(handle: *mut FuriHalSpiBusHandle, reg: u8, val: *mut u8);
}
extern "C" {
    #[doc = "Write test register\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `reg` - - register address\n * `val` - - value to write"]
    pub fn st25r3916_write_test_reg(handle: *mut FuriHalSpiBusHandle, reg: u8, val: u8);
}
extern "C" {
    #[doc = "Clear register bits\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `reg` - - register address\n * `clr_mask` - - bit mask to clear"]
    pub fn st25r3916_clear_reg_bits(handle: *mut FuriHalSpiBusHandle, reg: u8, clr_mask: u8);
}
extern "C" {
    #[doc = "Set register bits\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `reg` - - register address\n * `set_mask` - - bit mask to set"]
    pub fn st25r3916_set_reg_bits(handle: *mut FuriHalSpiBusHandle, reg: u8, set_mask: u8);
}
extern "C" {
    #[doc = "Change register bits\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `reg` - - register address\n * `mask` - - bit mask to change\n * `value` - - new register value to write"]
    pub fn st25r3916_change_reg_bits(
        handle: *mut FuriHalSpiBusHandle,
        reg: u8,
        mask: u8,
        value: u8,
    );
}
extern "C" {
    #[doc = "Modify register\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `reg` - - register address\n * `clr_mask` - - bit mask to clear\n * `set_mask` - - bit mask to set"]
    pub fn st25r3916_modify_reg(
        handle: *mut FuriHalSpiBusHandle,
        reg: u8,
        clr_mask: u8,
        set_mask: u8,
    );
}
extern "C" {
    #[doc = "Change test register bits\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `reg` - - register address\n * `mask` - - bit mask to change\n * `value` - - new register value to write"]
    pub fn st25r3916_change_test_reg_bits(
        handle: *mut FuriHalSpiBusHandle,
        reg: u8,
        mask: u8,
        value: u8,
    );
}
extern "C" {
    #[doc = "Check register\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `reg` - - register address\n * `mask` - - bit mask to check\n * `val` - - expected register value\n\n # Returns\n\ntrue if register value matches the expected value, false otherwise"]
    pub fn st25r3916_check_reg(
        handle: *mut FuriHalSpiBusHandle,
        reg: u8,
        mask: u8,
        val: u8,
    ) -> bool;
}
extern "C" {
    #[doc = "Mask st25r3916 interrupts\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `mask` - - mask of interrupts to be disabled"]
    pub fn st25r3916_mask_irq(handle: *mut FuriHalSpiBusHandle, mask: u32);
}
extern "C" {
    #[doc = "Get st25r3916 interrupts\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n\n # Returns\n\nreceived interrupts"]
    pub fn st25r3916_get_irq(handle: *mut FuriHalSpiBusHandle) -> u32;
}
extern "C" {
    #[doc = "Write FIFO\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `buff` - - buffer to write to FIFO\n * `bits` - - number of bits to write"]
    pub fn st25r3916_write_fifo(handle: *mut FuriHalSpiBusHandle, buff: *const u8, bits: usize);
}
extern "C" {
    #[doc = "Read FIFO\n\n # Arguments\n\n* `handle` - - pointer to FuriHalSpiBusHandle instance\n * `buff` - - buffer to read from FIFO\n * `buff_size` - - buffer size n bytes\n * `buff_bits` - - pointer to number of bits read\n\n # Returns\n\ntrue if read success, false otherwise"]
    pub fn st25r3916_read_fifo(
        handle: *mut FuriHalSpiBusHandle,
        buff: *mut u8,
        buff_size: usize,
        buff_bits: *mut usize,
    ) -> bool;
}
extern "C" {
    #[doc = "Resolver for API entries using a pre-sorted table with hashes\n # Arguments\n\n* `interface` - pointer to HashtableApiInterface\n * `hash` - gnu hash of function name\n * `address` - output for function address\n # Returns\n\ntrue if the table contains a function"]
    pub fn elf_resolve_from_hashtable(
        interface: *const ElfApiInterface,
        hash: u32,
        address: *mut Elf32_Addr,
    ) -> bool;
}
extern "C" {
    pub fn elf_symbolname_hash(s: *const core::ffi::c_char) -> u32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CompositeApiResolver {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate composite API resolver\n # Returns\n\nCompositeApiResolver* instance"]
    pub fn composite_api_resolver_alloc() -> *mut CompositeApiResolver;
}
extern "C" {
    #[doc = "Free composite API resolver\n # Arguments\n\n* `resolver` - Instance"]
    pub fn composite_api_resolver_free(resolver: *mut CompositeApiResolver);
}
extern "C" {
    #[doc = "Add API resolver to composite resolver\n # Arguments\n\n* `resolver` - Instance\n * `interface` - API resolver"]
    pub fn composite_api_resolver_add(
        resolver: *mut CompositeApiResolver,
        interface: *const ElfApiInterface,
    );
}
extern "C" {
    #[doc = "Get API interface from composite resolver\n # Arguments\n\n* `resolver` - Instance\n # Returns\n\nAPI interface"]
    pub fn composite_api_resolver_get(
        resolver: *mut CompositeApiResolver,
    ) -> *const ElfApiInterface;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PluginManager {
    _unused: [u8; 0],
}
pub const PluginManagerError_PluginManagerErrorNone: PluginManagerError = 0;
pub const PluginManagerError_PluginManagerErrorLoaderError: PluginManagerError = 1;
pub const PluginManagerError_PluginManagerErrorApplicationIdMismatch: PluginManagerError = 2;
pub const PluginManagerError_PluginManagerErrorAPIVersionMismatch: PluginManagerError = 3;
pub type PluginManagerError = core::ffi::c_uchar;
extern "C" {
    #[doc = "Allocates new PluginManager\n # Arguments\n\n* `application_id` - Application ID filter - only plugins with matching ID will be loaded\n * `api_version` - Application API version filter - only plugins with matching API version\n * `api_interface` - Application API interface - used to resolve plugins' API imports\n If plugin uses private application's API, use CompoundApiInterface\n # Returns\n\nnew PluginManager instance"]
    pub fn plugin_manager_alloc(
        application_id: *const core::ffi::c_char,
        api_version: u32,
        api_interface: *const ElfApiInterface,
    ) -> *mut PluginManager;
}
extern "C" {
    #[doc = "Frees PluginManager\n # Arguments\n\n* `manager` - PluginManager instance"]
    pub fn plugin_manager_free(manager: *mut PluginManager);
}
extern "C" {
    #[doc = "Loads single plugin by full path\n # Arguments\n\n* `manager` - PluginManager instance\n * `path` - Path to plugin\n # Returns\n\nError code"]
    pub fn plugin_manager_load_single(
        manager: *mut PluginManager,
        path: *const core::ffi::c_char,
    ) -> PluginManagerError;
}
extern "C" {
    #[doc = "Loads all plugins from specified directory\n # Arguments\n\n* `manager` - PluginManager instance\n * `path` - Path to directory\n # Returns\n\nError code"]
    pub fn plugin_manager_load_all(
        manager: *mut PluginManager,
        path: *const core::ffi::c_char,
    ) -> PluginManagerError;
}
extern "C" {
    #[doc = "Returns number of loaded plugins\n # Arguments\n\n* `manager` - PluginManager instance\n # Returns\n\nNumber of loaded plugins"]
    pub fn plugin_manager_get_count(manager: *mut PluginManager) -> u32;
}
extern "C" {
    #[doc = "Returns plugin descriptor by index\n # Arguments\n\n* `manager` - PluginManager instance\n * `index` - Plugin index\n # Returns\n\nPlugin descriptor"]
    pub fn plugin_manager_get(
        manager: *mut PluginManager,
        index: u32,
    ) -> *const FlipperAppPluginDescriptor;
}
extern "C" {
    #[doc = "Returns plugin entry point by index\n # Arguments\n\n* `manager` - PluginManager instance\n * `index` - Plugin index\n # Returns\n\nPlugin entry point"]
    pub fn plugin_manager_get_ep(
        manager: *mut PluginManager,
        index: u32,
    ) -> *const core::ffi::c_void;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FlipperFormat {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate FlipperFormat as string.\n\n # Returns\n\nFlipperFormat* pointer to a FlipperFormat instance"]
    pub fn flipper_format_string_alloc() -> *mut FlipperFormat;
}
extern "C" {
    #[doc = "Allocate FlipperFormat as file.\n\n # Arguments\n\n* `storage` - The storage\n\n # Returns\n\nFlipperFormat* pointer to a FlipperFormat instance"]
    pub fn flipper_format_file_alloc(storage: *mut Storage) -> *mut FlipperFormat;
}
extern "C" {
    #[doc = "Allocate FlipperFormat as file, buffered mode.\n\n # Arguments\n\n* `storage` - The storage\n\n # Returns\n\nFlipperFormat* pointer to a FlipperFormat instance"]
    pub fn flipper_format_buffered_file_alloc(storage: *mut Storage) -> *mut FlipperFormat;
}
extern "C" {
    #[doc = "Open existing file. Use only if FlipperFormat allocated as a file.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `path` - File path\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_file_open_existing(
        flipper_format: *mut FlipperFormat,
        path: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Open existing file, buffered mode. Use only if FlipperFormat allocated as a\n buffered file.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `path` - File path\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_buffered_file_open_existing(
        flipper_format: *mut FlipperFormat,
        path: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Open existing file for writing and add values to the end of file. Use only if\n FlipperFormat allocated as a file.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `path` - File path\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_file_open_append(
        flipper_format: *mut FlipperFormat,
        path: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Open file. Creates a new file, or deletes the contents of the file if it\n already exists. Use only if FlipperFormat allocated as a file.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `path` - File path\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_file_open_always(
        flipper_format: *mut FlipperFormat,
        path: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Open file. Creates a new file, or deletes the contents of the file if it\n already exists, buffered mode. Use only if FlipperFormat allocated as a\n buffered file.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `path` - File path\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_buffered_file_open_always(
        flipper_format: *mut FlipperFormat,
        path: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Open file. Creates a new file, fails if file already exists. Use only if\n FlipperFormat allocated as a file.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `path` - File path\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_file_open_new(
        flipper_format: *mut FlipperFormat,
        path: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Closes the file, use only if FlipperFormat allocated as a file.\n\n # Arguments\n\n* `flipper_format` - The flipper format\n\n # Returns\n\ntrue\n false"]
    pub fn flipper_format_file_close(flipper_format: *mut FlipperFormat) -> bool;
}
extern "C" {
    #[doc = "Closes the file, use only if FlipperFormat allocated as a buffered file.\n\n # Arguments\n\n* `flipper_format` - The flipper format\n\n # Returns\n\ntrue\n false"]
    pub fn flipper_format_buffered_file_close(flipper_format: *mut FlipperFormat) -> bool;
}
extern "C" {
    #[doc = "Free FlipperFormat.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance"]
    pub fn flipper_format_free(flipper_format: *mut FlipperFormat);
}
extern "C" {
    #[doc = "Set FlipperFormat mode.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `strict_mode` - True obligates not to skip valid fields. False by\n default."]
    pub fn flipper_format_set_strict_mode(flipper_format: *mut FlipperFormat, strict_mode: bool);
}
extern "C" {
    #[doc = "Rewind the RW pointer.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_rewind(flipper_format: *mut FlipperFormat) -> bool;
}
extern "C" {
    #[doc = "Move the RW pointer at the end. Can be useful if you want to add some data\n after reading.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_seek_to_end(flipper_format: *mut FlipperFormat) -> bool;
}
extern "C" {
    #[doc = "Check if the key exists.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n\n # Returns\n\ntrue key exists\n false key is not exists"]
    pub fn flipper_format_key_exist(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Read the header (file type and version).\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `filetype` - File type string\n * `version` - Version Value\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_read_header(
        flipper_format: *mut FlipperFormat,
        filetype: *mut FuriString,
        version: *mut u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Write the header (file type and version).\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `filetype` - File type string\n * `version` - Version Value\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_write_header(
        flipper_format: *mut FlipperFormat,
        filetype: *mut FuriString,
        version: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Write the header (file type and version). Plain C string version.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `filetype` - File type string\n * `version` - Version Value\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_write_header_cstr(
        flipper_format: *mut FlipperFormat,
        filetype: *const core::ffi::c_char,
        version: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Get the count of values by key\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - The key\n * `count` - The count\n\n # Returns\n\nbool"]
    pub fn flipper_format_get_value_count(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        count: *mut u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Read a string by key\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_read_string(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *mut FuriString,
    ) -> bool;
}
extern "C" {
    #[doc = "Write key and string\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_write_string(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *mut FuriString,
    ) -> bool;
}
extern "C" {
    #[doc = "Write key and string. Plain C string version.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_write_string_cstr(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Read array of uint64 in hex format by key\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` - Values count\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_read_hex_uint64(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *mut u64,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Write key and array of uint64 in hex format\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` - Values count\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_write_hex_uint64(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const u64,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Read array of uint32 by key\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` - Values count\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_read_uint32(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *mut u32,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Write key and array of uint32\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` - Values count\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_write_uint32(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const u32,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Read array of int32 by key\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` - Values count\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_read_int32(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *mut i32,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Write key and array of int32\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` - Values count\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_write_int32(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const i32,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Read array of bool by key\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` - Values count\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_read_bool(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *mut bool,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Write key and array of bool\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` - Values count\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_write_bool(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const bool,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Read array of float by key\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` - Values count\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_read_float(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *mut f32,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Write key and array of float\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` - Values count\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_write_float(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const f32,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Read array of hex-formatted bytes by key\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` - Values count\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_read_hex(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *mut u8,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Write key and array of hex-formatted bytes\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` - Values count\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_write_hex(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const u8,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Write comment\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `data` - Comment text\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_write_comment(
        flipper_format: *mut FlipperFormat,
        data: *mut FuriString,
    ) -> bool;
}
extern "C" {
    #[doc = "Write comment. Plain C string version.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `data` - Comment text\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_write_comment_cstr(
        flipper_format: *mut FlipperFormat,
        data: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Removes the first matching key and its value. Sets the RW pointer to a\n position of deleted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_delete_key(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to a string value. Sets the RW\n pointer to a position at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_update_string(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *mut FuriString,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to a string value. Plain C\n version. Sets the RW pointer to a position at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_update_string_cstr(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to a uint32 array value. Sets the\n RW pointer to a position at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` (direction in) - The data size\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_update_uint32(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const u32,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to a int32 array value. Sets the\n RW pointer to a position at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` (direction in) - The data size\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_update_int32(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const i32,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to a bool array value. Sets the\n RW pointer to a position at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` (direction in) - The data size\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_update_bool(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const bool,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to a float array value. Sets the\n RW pointer to a position at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` (direction in) - The data size\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_update_float(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const f32,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to an array of hex-formatted\n bytes. Sets the RW pointer to a position at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` (direction in) - The data size\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_update_hex(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const u8,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to a string value, or adds the\n key and value if the key did not exist. Sets the RW pointer to a position at\n the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_insert_or_update_string(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *mut FuriString,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to a string value, or adds the\n key and value if the key did not exist. Plain C version. Sets the RW pointer\n to a position at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_insert_or_update_string_cstr(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to a uint32 array value, or adds\n the key and value if the key did not exist. Sets the RW pointer to a position\n at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` (direction in) - The data size\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_insert_or_update_uint32(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const u32,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to a int32 array value, or adds\n the key and value if the key did not exist. Sets the RW pointer to a position\n at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` (direction in) - The data size\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_insert_or_update_int32(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const i32,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to a bool array value, or adds\n the key and value if the key did not exist. Sets the RW pointer to a position\n at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` (direction in) - The data size\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_insert_or_update_bool(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const bool,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to a float array value, or adds\n the key and value if the key did not exist. Sets the RW pointer to a position\n at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` (direction in) - The data size\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_insert_or_update_float(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const f32,
        data_size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Updates the value of the first matching key to an array of hex-formatted\n bytes, or adds the key and value if the key did not exist. Sets the RW\n pointer to a position at the end of inserted data.\n\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `key` - Key\n * `data` - Value\n * `data_size` (direction in) - The data size\n\n # Returns\n\nTrue on success"]
    pub fn flipper_format_insert_or_update_hex(
        flipper_format: *mut FlipperFormat,
        key: *const core::ffi::c_char,
        data: *const u8,
        data_size: u16,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Stream {
    _unused: [u8; 0],
}
pub const StreamOffset_StreamOffsetFromCurrent: StreamOffset = 0;
pub const StreamOffset_StreamOffsetFromStart: StreamOffset = 1;
pub const StreamOffset_StreamOffsetFromEnd: StreamOffset = 2;
pub type StreamOffset = core::ffi::c_uchar;
pub const StreamDirection_StreamDirectionForward: StreamDirection = 0;
pub const StreamDirection_StreamDirectionBackward: StreamDirection = 1;
pub type StreamDirection = core::ffi::c_uchar;
pub type StreamWriteCB = ::core::option::Option<
    unsafe extern "C" fn(stream: *mut Stream, context: *const core::ffi::c_void) -> bool,
>;
extern "C" {
    #[doc = "Free Stream\n # Arguments\n\n* `stream` - Stream instance"]
    pub fn stream_free(stream: *mut Stream);
}
extern "C" {
    #[doc = "Clean (empty) Stream\n # Arguments\n\n* `stream` - Stream instance"]
    pub fn stream_clean(stream: *mut Stream);
}
extern "C" {
    #[doc = "Indicates that the RW pointer is at the end of the stream\n # Arguments\n\n* `stream` - Stream instance\n # Returns\n\ntrue if RW pointer is at the end of the stream\n false if RW pointer is not at the end of the stream"]
    pub fn stream_eof(stream: *mut Stream) -> bool;
}
extern "C" {
    #[doc = "Moves the RW pointer.\n # Arguments\n\n* `stream` - Stream instance\n * `offset` - how much to move the pointer\n * `offset_type` - starting from what\n # Returns\n\ntrue\n false"]
    pub fn stream_seek(stream: *mut Stream, offset: i32, offset_type: StreamOffset) -> bool;
}
extern "C" {
    #[doc = "Seek to next occurrence of the character\n\n # Arguments\n\n* `stream` - Pointer to the stream instance\n * `c` (direction in) - The Character\n * `direction` (direction in) - The Direction\n\n # Returns\n\ntrue on success"]
    pub fn stream_seek_to_char(
        stream: *mut Stream,
        c: core::ffi::c_char,
        direction: StreamDirection,
    ) -> bool;
}
extern "C" {
    #[doc = "Gets the value of the RW pointer\n # Arguments\n\n* `stream` - Stream instance\n # Returns\n\nsize_t value of the RW pointer"]
    pub fn stream_tell(stream: *mut Stream) -> usize;
}
extern "C" {
    #[doc = "Gets the size of the stream\n # Arguments\n\n* `stream` - Stream instance\n # Returns\n\nsize_t size of the stream"]
    pub fn stream_size(stream: *mut Stream) -> usize;
}
extern "C" {
    #[doc = "Write N bytes to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `data` - data to write\n * `size` - size of data to be written\n # Returns\n\nsize_t how many bytes was written"]
    pub fn stream_write(stream: *mut Stream, data: *const u8, size: usize) -> usize;
}
extern "C" {
    #[doc = "Read N bytes from stream\n # Arguments\n\n* `stream` - Stream instance\n * `data` - data to be read\n * `count` - size of data to be read\n # Returns\n\nsize_t how many bytes was read"]
    pub fn stream_read(stream: *mut Stream, data: *mut u8, count: usize) -> usize;
}
extern "C" {
    #[doc = "Delete N chars from the stream and write data by calling write_callback(context)\n # Arguments\n\n* `stream` - Stream instance\n * `delete_size` - size of data to be deleted\n * `write_callback` - write callback\n * `context` - write callback context\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_delete_and_insert(
        stream: *mut Stream,
        delete_size: usize,
        write_callback: StreamWriteCB,
        context: *const core::ffi::c_void,
    ) -> bool;
}
extern "C" {
    #[doc = "Read line from a stream (supports LF and CRLF line endings)\n # Arguments\n\n* `stream` -\n * `str_result` -\n # Returns\n\ntrue if line length is not zero\n false otherwise"]
    pub fn stream_read_line(stream: *mut Stream, str_result: *mut FuriString) -> bool;
}
extern "C" {
    #[doc = "Moves the RW pointer to the start\n # Arguments\n\n* `stream` - Stream instance"]
    pub fn stream_rewind(stream: *mut Stream) -> bool;
}
extern "C" {
    #[doc = "Write char to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `c` - char value\n # Returns\n\nsize_t how many bytes was written"]
    pub fn stream_write_char(stream: *mut Stream, c: core::ffi::c_char) -> usize;
}
extern "C" {
    #[doc = "Write string to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `string` - string value\n # Returns\n\nsize_t how many bytes was written"]
    pub fn stream_write_string(stream: *mut Stream, string: *mut FuriString) -> usize;
}
extern "C" {
    #[doc = "Write const char* to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `string` - c-string value\n # Returns\n\nsize_t how many bytes was written"]
    pub fn stream_write_cstring(stream: *mut Stream, string: *const core::ffi::c_char) -> usize;
}
extern "C" {
    #[doc = "Write formatted string to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `format` -\n * `...` -\n # Returns\n\nsize_t how many bytes was written"]
    pub fn stream_write_format(stream: *mut Stream, format: *const core::ffi::c_char, ...)
        -> usize;
}
extern "C" {
    #[doc = "Write formatted string to the stream, va_list version\n # Arguments\n\n* `stream` - Stream instance\n * `format` -\n * `args` -\n # Returns\n\nsize_t how many bytes was written"]
    pub fn stream_write_vaformat(
        stream: *mut Stream,
        format: *const core::ffi::c_char,
        args: va_list,
    ) -> usize;
}
extern "C" {
    #[doc = "Insert N chars to the stream, starting at the current pointer.\n Data will be inserted, not overwritten, so the stream will be increased in size.\n # Arguments\n\n* `stream` - Stream instance\n * `data` - data to be inserted\n * `size` - size of data to be inserted\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_insert(stream: *mut Stream, data: *const u8, size: usize) -> bool;
}
extern "C" {
    #[doc = "Insert char to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `c` - char value\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_insert_char(stream: *mut Stream, c: core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Insert string to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `string` - string value\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_insert_string(stream: *mut Stream, string: *mut FuriString) -> bool;
}
extern "C" {
    #[doc = "Insert const char* to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `string` - c-string value\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_insert_cstring(stream: *mut Stream, string: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Insert formatted string to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `format` -\n * `...` -\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_insert_format(stream: *mut Stream, format: *const core::ffi::c_char, ...)
        -> bool;
}
extern "C" {
    #[doc = "Insert formatted string to the stream, va_list version\n # Arguments\n\n* `stream` - Stream instance\n * `format` -\n * `args` -\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_insert_vaformat(
        stream: *mut Stream,
        format: *const core::ffi::c_char,
        args: va_list,
    ) -> bool;
}
extern "C" {
    #[doc = "Delete N chars from the stream and insert char to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `delete_size` - size of data to be deleted\n * `c` - char value\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_delete_and_insert_char(
        stream: *mut Stream,
        delete_size: usize,
        c: core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Delete N chars from the stream and insert string to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `delete_size` - size of data to be deleted\n * `string` - string value\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_delete_and_insert_string(
        stream: *mut Stream,
        delete_size: usize,
        string: *mut FuriString,
    ) -> bool;
}
extern "C" {
    #[doc = "Delete N chars from the stream and insert const char* to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `delete_size` - size of data to be deleted\n * `string` - c-string value\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_delete_and_insert_cstring(
        stream: *mut Stream,
        delete_size: usize,
        string: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Delete N chars from the stream and insert formatted string to the stream\n # Arguments\n\n* `stream` - Stream instance\n * `delete_size` - size of data to be deleted\n * `format` -\n * `...` -\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_delete_and_insert_format(
        stream: *mut Stream,
        delete_size: usize,
        format: *const core::ffi::c_char,
        ...
    ) -> bool;
}
extern "C" {
    #[doc = "Delete N chars from the stream and insert formatted string to the stream, va_list version\n # Arguments\n\n* `stream` - Stream instance\n * `delete_size` - size of data to be deleted\n * `format` -\n * `args` -\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_delete_and_insert_vaformat(
        stream: *mut Stream,
        delete_size: usize,
        format: *const core::ffi::c_char,
        args: va_list,
    ) -> bool;
}
extern "C" {
    #[doc = "Remove N chars from the stream, starting at the current pointer.\n The size may be larger than stream size, the stream will be cleared from current RW pointer to the end.\n # Arguments\n\n* `stream` - Stream instance\n * `size` - how many chars need to be deleted\n # Returns\n\ntrue if the operation was successful\n false on error"]
    pub fn stream_delete(stream: *mut Stream, size: usize) -> bool;
}
extern "C" {
    #[doc = "Copy data from one stream to another. Data will be copied from current RW pointer and to current RW pointer.\n # Arguments\n\n* `stream_from` -\n * `stream_to` -\n * `size` -\n # Returns\n\nsize_t"]
    pub fn stream_copy(stream_from: *mut Stream, stream_to: *mut Stream, size: usize) -> usize;
}
extern "C" {
    #[doc = "Copy data from one stream to another. Data will be copied from start of one stream and to start of other stream.\n # Arguments\n\n* `stream_from` -\n * `stream_to` -\n # Returns\n\nsize_t"]
    pub fn stream_copy_full(stream_from: *mut Stream, stream_to: *mut Stream) -> usize;
}
extern "C" {
    #[doc = "Splits one stream into two others. The original stream will remain untouched.\n # Arguments\n\n* `stream` -\n * `stream_left` -\n * `stream_right` -\n # Returns\n\ntrue\n false"]
    pub fn stream_split(
        stream: *mut Stream,
        stream_left: *mut Stream,
        stream_right: *mut Stream,
    ) -> bool;
}
extern "C" {
    #[doc = "Loads data to the stream from a file. Data will be loaded to the current RW pointer. RW pointer will be moved to the end of the stream.\n # Arguments\n\n* `stream` - Stream instance\n * `storage` -\n * `path` -\n # Returns\n\nsize_t"]
    pub fn stream_load_from_file(
        stream: *mut Stream,
        storage: *mut Storage,
        path: *const core::ffi::c_char,
    ) -> usize;
}
extern "C" {
    #[doc = "Writes data from a stream to a file. Data will be saved starting from the current RW pointer. RW pointer will be moved to the end of the stream.\n # Arguments\n\n* `stream` - Stream instance\n * `storage` -\n * `path` -\n * `mode` -\n # Returns\n\nsize_t"]
    pub fn stream_save_to_file(
        stream: *mut Stream,
        storage: *mut Storage,
        path: *const core::ffi::c_char,
        mode: FS_OpenMode,
    ) -> usize;
}
extern "C" {
    #[doc = "Dump stream inner data (size, RW position, content)\n # Arguments\n\n* `stream` - Stream instance"]
    pub fn stream_dump_data(stream: *mut Stream);
}
extern "C" {
    #[doc = "Returns the underlying stream instance.\n Use only if you know what you are doing.\n # Arguments\n\n* `flipper_format` -\n # Returns\n\nStream*"]
    pub fn flipper_format_get_raw_stream(flipper_format: *mut FlipperFormat) -> *mut Stream;
}
pub const FlipperStreamValue_FlipperStreamValueIgnore: FlipperStreamValue = 0;
pub const FlipperStreamValue_FlipperStreamValueStr: FlipperStreamValue = 1;
pub const FlipperStreamValue_FlipperStreamValueHex: FlipperStreamValue = 2;
pub const FlipperStreamValue_FlipperStreamValueFloat: FlipperStreamValue = 3;
pub const FlipperStreamValue_FlipperStreamValueInt32: FlipperStreamValue = 4;
pub const FlipperStreamValue_FlipperStreamValueUint32: FlipperStreamValue = 5;
pub const FlipperStreamValue_FlipperStreamValueHexUint64: FlipperStreamValue = 6;
pub const FlipperStreamValue_FlipperStreamValueBool: FlipperStreamValue = 7;
pub type FlipperStreamValue = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FlipperStreamWriteData {
    pub key: *const core::ffi::c_char,
    pub type_: FlipperStreamValue,
    pub data: *const core::ffi::c_void,
    pub data_size: usize,
}
#[test]
fn bindgen_test_layout_FlipperStreamWriteData() {
    const UNINIT: ::core::mem::MaybeUninit<FlipperStreamWriteData> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FlipperStreamWriteData>(),
        16usize,
        concat!("Size of: ", stringify!(FlipperStreamWriteData))
    );
    assert_eq!(
        ::core::mem::align_of::<FlipperStreamWriteData>(),
        4usize,
        concat!("Alignment of ", stringify!(FlipperStreamWriteData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperStreamWriteData),
            "::",
            stringify!(key)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperStreamWriteData),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperStreamWriteData),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data_size) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(FlipperStreamWriteData),
            "::",
            stringify!(data_size)
        )
    );
}
extern "C" {
    #[doc = "Writes a key/value pair to the stream.\n # Arguments\n\n* `stream` -\n * `write_data` -\n # Returns\n\ntrue\n false"]
    pub fn flipper_format_stream_write_value_line(
        stream: *mut Stream,
        write_data: *mut FlipperStreamWriteData,
    ) -> bool;
}
extern "C" {
    #[doc = "Reads a value by key from a stream.\n # Arguments\n\n* `stream` -\n * `key` -\n * `type` -\n * `_data` -\n * `data_size` -\n * `strict_mode` -\n # Returns\n\ntrue\n false"]
    pub fn flipper_format_stream_read_value_line(
        stream: *mut Stream,
        key: *const core::ffi::c_char,
        type_: FlipperStreamValue,
        _data: *mut core::ffi::c_void,
        data_size: usize,
        strict_mode: bool,
    ) -> bool;
}
extern "C" {
    #[doc = "Get the count of values by key from a stream.\n # Arguments\n\n* `stream` -\n * `key` -\n * `count` -\n * `strict_mode` -\n # Returns\n\ntrue\n false"]
    pub fn flipper_format_stream_get_value_count(
        stream: *mut Stream,
        key: *const core::ffi::c_char,
        count: *mut u32,
        strict_mode: bool,
    ) -> bool;
}
extern "C" {
    #[doc = "Removes a key and the corresponding value string from the stream and inserts a new key/value pair.\n # Arguments\n\n* `stream` -\n * `write_data` -\n * `strict_mode` -\n # Returns\n\ntrue\n false"]
    pub fn flipper_format_stream_delete_key_and_write(
        stream: *mut Stream,
        write_data: *mut FlipperStreamWriteData,
        strict_mode: bool,
    ) -> bool;
}
extern "C" {
    #[doc = "Writes a comment string to the stream.\n # Arguments\n\n* `stream` -\n * `data` -\n # Returns\n\ntrue\n false"]
    pub fn flipper_format_stream_write_comment_cstr(
        stream: *mut Stream,
        data: *const core::ffi::c_char,
    ) -> bool;
}
pub type iButtonProtocolId = i32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iButtonEditableData {
    pub ptr: *mut u8,
    pub size: usize,
}
#[test]
fn bindgen_test_layout_iButtonEditableData() {
    const UNINIT: ::core::mem::MaybeUninit<iButtonEditableData> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<iButtonEditableData>(),
        8usize,
        concat!("Size of: ", stringify!(iButtonEditableData))
    );
    assert_eq!(
        ::core::mem::align_of::<iButtonEditableData>(),
        4usize,
        concat!("Alignment of ", stringify!(iButtonEditableData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(iButtonEditableData),
            "::",
            stringify!(ptr)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(iButtonEditableData),
            "::",
            stringify!(size)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iButtonKey {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate a key object\n # Arguments\n\n* `[in]` - data_size maximum data size held by the key\n # Returns\n\npointer to the key object"]
    pub fn ibutton_key_alloc(data_size: usize) -> *mut iButtonKey;
}
extern "C" {
    #[doc = "Destroy the key object, free resources\n # Arguments\n\n* `[in]` - key pointer to the key object"]
    pub fn ibutton_key_free(key: *mut iButtonKey);
}
extern "C" {
    #[doc = "Get the protocol id held by the key\n # Arguments\n\n* `[in]` - key pointer to the key object\n # Returns\n\nprotocol id held by the key"]
    pub fn ibutton_key_get_protocol_id(key: *const iButtonKey) -> iButtonProtocolId;
}
extern "C" {
    #[doc = "Set the protocol id held by the key\n # Arguments\n\n* `[in]` - key pointer to the key object\n * `[in]` - protocol_id new protocol id"]
    pub fn ibutton_key_set_protocol_id(key: *mut iButtonKey, protocol_id: iButtonProtocolId);
}
extern "C" {
    #[doc = "Reset the protocol id and data held by the key\n # Arguments\n\n* `[in]` - key pointer to the key object"]
    pub fn ibutton_key_reset(key: *mut iButtonKey);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iButtonProtocols {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate an iButtonProtocols object\n # Returns\n\npointer to an iButtonProtocols object"]
    pub fn ibutton_protocols_alloc() -> *mut iButtonProtocols;
}
extern "C" {
    #[doc = "Destroy an iButtonProtocols object, free resources\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object"]
    pub fn ibutton_protocols_free(protocols: *mut iButtonProtocols);
}
extern "C" {
    #[doc = "Get the total number of available protocols"]
    pub fn ibutton_protocols_get_protocol_count() -> u32;
}
extern "C" {
    #[doc = "Get maximum data size out of all protocols available\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n # Returns\n\nmaximum data size in bytes"]
    pub fn ibutton_protocols_get_max_data_size(protocols: *mut iButtonProtocols) -> usize;
}
extern "C" {
    #[doc = "Get the protocol id based on its name\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - name pointer to a string containing the name\n # Returns\n\nprotocol id on success on iButtonProtocolIdInvalid on failure"]
    pub fn ibutton_protocols_get_id_by_name(
        protocols: *mut iButtonProtocols,
        name: *const core::ffi::c_char,
    ) -> iButtonProtocolId;
}
extern "C" {
    #[doc = "Get the manufacturer name based on the protocol id\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - id id of the protocol in question\n # Returns\n\npointer to a statically allocated string with manufacturer name"]
    pub fn ibutton_protocols_get_manufacturer(
        protocols: *mut iButtonProtocols,
        id: iButtonProtocolId,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get the protocol name based on the protocol id\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - id id of the protocol in question\n # Returns\n\npointer to a statically allocated string with protocol name"]
    pub fn ibutton_protocols_get_name(
        protocols: *mut iButtonProtocols,
        id: iButtonProtocolId,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get protocol features bitmask by protocol id\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - id id of the protocol in question"]
    pub fn ibutton_protocols_get_features(
        protocols: *mut iButtonProtocols,
        id: iButtonProtocolId,
    ) -> u32;
}
extern "C" {
    #[doc = "Read a physical device (a key or an emulator)\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[out]` - key pointer to the key to read into (must be allocated before)\n # Returns\n\ntrue on success, false on failure"]
    pub fn ibutton_protocols_read(protocols: *mut iButtonProtocols, key: *mut iButtonKey) -> bool;
}
extern "C" {
    #[doc = "Write the key to a blank\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - key pointer to the key to be written\n # Returns\n\ntrue on success, false on failure"]
    pub fn ibutton_protocols_write_id(
        protocols: *mut iButtonProtocols,
        key: *mut iButtonKey,
    ) -> bool;
}
extern "C" {
    #[doc = "Write the key to another one of the same type\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - key pointer to the key to be written\n # Returns\n\ntrue on success, false on failure"]
    pub fn ibutton_protocols_write_copy(
        protocols: *mut iButtonProtocols,
        key: *mut iButtonKey,
    ) -> bool;
}
extern "C" {
    #[doc = "Start emulating the key\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - key pointer to the key to be emulated"]
    pub fn ibutton_protocols_emulate_start(protocols: *mut iButtonProtocols, key: *mut iButtonKey);
}
extern "C" {
    #[doc = "Stop emulating the key\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - key pointer to the key to be emulated"]
    pub fn ibutton_protocols_emulate_stop(protocols: *mut iButtonProtocols, key: *mut iButtonKey);
}
extern "C" {
    #[doc = "Save the key data to a file.\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - key pointer to the key to be saved\n * `[in]` - file_name full absolute path to the file name\n # Returns\n\ntrue on success, false on failure"]
    pub fn ibutton_protocols_save(
        protocols: *mut iButtonProtocols,
        key: *const iButtonKey,
        file_name: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Load the key from a file.\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[out]` - key pointer to the key to load into (must be allocated before)\n * `[in]` - file_name full absolute path to the file name\n # Returns\n\ntrue on success, false on failure"]
    pub fn ibutton_protocols_load(
        protocols: *mut iButtonProtocols,
        key: *mut iButtonKey,
        file_name: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Format a string containing defice UID\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - key pointer to the key to be rendered\n * `[out]` - result pointer to the FuriString instance (must be initialized)"]
    pub fn ibutton_protocols_render_uid(
        protocols: *mut iButtonProtocols,
        key: *const iButtonKey,
        result: *mut FuriString,
    );
}
extern "C" {
    #[doc = "Format a string containing device full data\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - key pointer to the key to be rendered\n * `[out]` - result pointer to the FuriString instance (must be initialized)"]
    pub fn ibutton_protocols_render_data(
        protocols: *mut iButtonProtocols,
        key: *const iButtonKey,
        result: *mut FuriString,
    );
}
extern "C" {
    #[doc = "Format a string containing device brief data\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - key pointer to the key to be rendered\n * `[out]` - result pointer to the FuriString instance (must be initialized)"]
    pub fn ibutton_protocols_render_brief_data(
        protocols: *mut iButtonProtocols,
        key: *const iButtonKey,
        result: *mut FuriString,
    );
}
extern "C" {
    #[doc = "Format a string containing error message (for invalid keys)\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - key pointer to the key to be rendered\n * `[out]` - result pointer to the FuriString instance (must be initialized)"]
    pub fn ibutton_protocols_render_error(
        protocols: *mut iButtonProtocols,
        key: *const iButtonKey,
        result: *mut FuriString,
    );
}
extern "C" {
    #[doc = "Check whether the key data is valid\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - key pointer to the key to be checked\n # Returns\n\ntrue if data is valid, false otherwise"]
    pub fn ibutton_protocols_is_valid(
        protocols: *mut iButtonProtocols,
        key: *const iButtonKey,
    ) -> bool;
}
extern "C" {
    #[doc = "Get a pointer to the key's editable data (for in-place editing)\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in]` - key pointer to the key to be checked\n * `[out]` - editable pointer to a structure to contain the editable data"]
    pub fn ibutton_protocols_get_editable_data(
        protocols: *mut iButtonProtocols,
        key: *const iButtonKey,
        editable: *mut iButtonEditableData,
    );
}
extern "C" {
    #[doc = "Make all necessary internal adjustments after editing the key\n # Arguments\n\n* `[in]` - protocols pointer to an iButtonProtocols object\n * `[in,out]` - key pointer to the key to be adjusted"]
    pub fn ibutton_protocols_apply_edits(protocols: *mut iButtonProtocols, key: *const iButtonKey);
}
pub const iButtonWorkerWriteResult_iButtonWorkerWriteOK: iButtonWorkerWriteResult = 0;
pub const iButtonWorkerWriteResult_iButtonWorkerWriteSameKey: iButtonWorkerWriteResult = 1;
pub const iButtonWorkerWriteResult_iButtonWorkerWriteNoDetect: iButtonWorkerWriteResult = 2;
pub const iButtonWorkerWriteResult_iButtonWorkerWriteCannotWrite: iButtonWorkerWriteResult = 3;
pub type iButtonWorkerWriteResult = core::ffi::c_uchar;
pub type iButtonWorkerReadCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
pub type iButtonWorkerWriteCallback = ::core::option::Option<
    unsafe extern "C" fn(context: *mut core::ffi::c_void, result: iButtonWorkerWriteResult),
>;
pub type iButtonWorkerEmulateCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void, emulated: bool)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iButtonWorker {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate ibutton worker\n # Returns\n\niButtonWorker*"]
    pub fn ibutton_worker_alloc(protocols: *mut iButtonProtocols) -> *mut iButtonWorker;
}
extern "C" {
    #[doc = "Free ibutton worker\n # Arguments\n\n* `worker` -"]
    pub fn ibutton_worker_free(worker: *mut iButtonWorker);
}
extern "C" {
    #[doc = "Start ibutton worker thread\n # Arguments\n\n* `worker` -"]
    pub fn ibutton_worker_start_thread(worker: *mut iButtonWorker);
}
extern "C" {
    #[doc = "Stop ibutton worker thread\n # Arguments\n\n* `worker` -"]
    pub fn ibutton_worker_stop_thread(worker: *mut iButtonWorker);
}
extern "C" {
    #[doc = "Set \"read success\" callback\n # Arguments\n\n* `worker` -\n * `callback` -\n * `context` -"]
    pub fn ibutton_worker_read_set_callback(
        worker: *mut iButtonWorker,
        callback: iButtonWorkerReadCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Start read mode\n # Arguments\n\n* `worker` -\n * `key` -"]
    pub fn ibutton_worker_read_start(worker: *mut iButtonWorker, key: *mut iButtonKey);
}
extern "C" {
    #[doc = "Set \"write event\" callback\n # Arguments\n\n* `worker` -\n * `callback` -\n * `context` -"]
    pub fn ibutton_worker_write_set_callback(
        worker: *mut iButtonWorker,
        callback: iButtonWorkerWriteCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Start write blank mode\n # Arguments\n\n* `worker` -\n * `key` -"]
    pub fn ibutton_worker_write_id_start(worker: *mut iButtonWorker, key: *mut iButtonKey);
}
extern "C" {
    #[doc = "Start write copy mode\n # Arguments\n\n* `worker` -\n * `key` -"]
    pub fn ibutton_worker_write_copy_start(worker: *mut iButtonWorker, key: *mut iButtonKey);
}
extern "C" {
    #[doc = "Set \"emulate success\" callback\n # Arguments\n\n* `worker` -\n * `callback` -\n * `context` -"]
    pub fn ibutton_worker_emulate_set_callback(
        worker: *mut iButtonWorker,
        callback: iButtonWorkerEmulateCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Start emulate mode\n # Arguments\n\n* `worker` -\n * `key` -"]
    pub fn ibutton_worker_emulate_start(worker: *mut iButtonWorker, key: *mut iButtonKey);
}
extern "C" {
    #[doc = "Stop all modes\n # Arguments\n\n* `worker` -"]
    pub fn ibutton_worker_stop(worker: *mut iButtonWorker);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct InfraredDecoderHandler {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct InfraredEncoderHandler {
    _unused: [u8; 0],
}
pub const InfraredProtocol_InfraredProtocolUnknown: InfraredProtocol = -1;
pub const InfraredProtocol_InfraredProtocolNEC: InfraredProtocol = 0;
pub const InfraredProtocol_InfraredProtocolNECext: InfraredProtocol = 1;
pub const InfraredProtocol_InfraredProtocolNEC42: InfraredProtocol = 2;
pub const InfraredProtocol_InfraredProtocolNEC42ext: InfraredProtocol = 3;
pub const InfraredProtocol_InfraredProtocolSamsung32: InfraredProtocol = 4;
pub const InfraredProtocol_InfraredProtocolRC6: InfraredProtocol = 5;
pub const InfraredProtocol_InfraredProtocolRC5: InfraredProtocol = 6;
pub const InfraredProtocol_InfraredProtocolRC5X: InfraredProtocol = 7;
pub const InfraredProtocol_InfraredProtocolSIRC: InfraredProtocol = 8;
pub const InfraredProtocol_InfraredProtocolSIRC15: InfraredProtocol = 9;
pub const InfraredProtocol_InfraredProtocolSIRC20: InfraredProtocol = 10;
pub const InfraredProtocol_InfraredProtocolKaseikyo: InfraredProtocol = 11;
pub const InfraredProtocol_InfraredProtocolRCA: InfraredProtocol = 12;
pub const InfraredProtocol_InfraredProtocolPioneer: InfraredProtocol = 13;
pub const InfraredProtocol_InfraredProtocolMAX: InfraredProtocol = 14;
pub type InfraredProtocol = core::ffi::c_schar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct InfraredMessage {
    pub protocol: InfraredProtocol,
    pub address: u32,
    pub command: u32,
    pub repeat: bool,
}
#[test]
fn bindgen_test_layout_InfraredMessage() {
    const UNINIT: ::core::mem::MaybeUninit<InfraredMessage> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<InfraredMessage>(),
        16usize,
        concat!("Size of: ", stringify!(InfraredMessage))
    );
    assert_eq!(
        ::core::mem::align_of::<InfraredMessage>(),
        4usize,
        concat!("Alignment of ", stringify!(InfraredMessage))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).protocol) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(InfraredMessage),
            "::",
            stringify!(protocol)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).address) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(InfraredMessage),
            "::",
            stringify!(address)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).command) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(InfraredMessage),
            "::",
            stringify!(command)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).repeat) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(InfraredMessage),
            "::",
            stringify!(repeat)
        )
    );
}
pub const InfraredStatus_InfraredStatusError: InfraredStatus = 0;
pub const InfraredStatus_InfraredStatusOk: InfraredStatus = 1;
pub const InfraredStatus_InfraredStatusDone: InfraredStatus = 2;
pub const InfraredStatus_InfraredStatusReady: InfraredStatus = 3;
pub type InfraredStatus = core::ffi::c_uchar;
extern "C" {
    #[doc = "Initialize decoder.\n\n # Returns\n\nreturns pointer to INFRARED decoder handler if success, otherwise - error."]
    pub fn infrared_alloc_decoder() -> *mut InfraredDecoderHandler;
}
extern "C" {
    #[doc = "Provide to decoder next timing.\n\n # Arguments\n\n* `handler` (direction in) - - handler to INFRARED decoders. Should be acquired with `infrared_alloc_decoder().`\n * `level` (direction in) - - high(true) or low(false) level of input signal to analyze.\n it should alternate every call, otherwise it is an error case,\n and decoder resets its state and start decoding from the start.\n * `duration` (direction in) - - duration of steady high/low input signal.\n # Returns\n\nif message is ready, returns pointer to decoded message, returns NULL.\n Note: ownership of returned ptr belongs to handler. So pointer is valid\n up to next infrared_free_decoder(), infrared_reset_decoder(),\n infrared_decode(), infrared_check_decoder_ready() calls."]
    pub fn infrared_decode(
        handler: *mut InfraredDecoderHandler,
        level: bool,
        duration: u32,
    ) -> *const InfraredMessage;
}
extern "C" {
    #[doc = "Check whether decoder is ready.\n Functionality is quite similar to infrared_decode(), but with no timing providing.\n Some protocols (e.g. Sony SIRC) has variable payload length, which means we\n can't recognize end of message right after receiving last bit. That's why\n application should call to infrared_check_decoder_ready() after some timeout to\n retrieve decoded message, if so.\n\n # Arguments\n\n* `handler` (direction in) - - handler to INFRARED decoders. Should be acquired with `infrared_alloc_decoder().`\n # Returns\n\nif message is ready, returns pointer to decoded message, returns NULL.\n Note: ownership of returned ptr belongs to handler. So pointer is valid\n up to next infrared_free_decoder(), infrared_reset_decoder(),\n infrared_decode(), infrared_check_decoder_ready() calls."]
    pub fn infrared_check_decoder_ready(
        handler: *mut InfraredDecoderHandler,
    ) -> *const InfraredMessage;
}
extern "C" {
    #[doc = "Deinitialize decoder and free allocated memory.\n\n # Arguments\n\n* `handler` (direction in) - - handler to INFRARED decoders. Should be acquired with `infrared_alloc_decoder().`"]
    pub fn infrared_free_decoder(handler: *mut InfraredDecoderHandler);
}
extern "C" {
    #[doc = "Reset INFRARED decoder.\n\n # Arguments\n\n* `handler` (direction in) - - handler to INFRARED decoders. Should be acquired with `infrared_alloc_decoder().`"]
    pub fn infrared_reset_decoder(handler: *mut InfraredDecoderHandler);
}
extern "C" {
    #[doc = "Get protocol name by protocol enum.\n\n # Arguments\n\n* `protocol` (direction in) - - protocol identifier.\n # Returns\n\nstring to protocol name."]
    pub fn infrared_get_protocol_name(protocol: InfraredProtocol) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get protocol enum by protocol name.\n\n # Arguments\n\n* `protocol_name` (direction in) - - string to protocol name.\n # Returns\n\nprotocol identifier."]
    pub fn infrared_get_protocol_by_name(
        protocol_name: *const core::ffi::c_char,
    ) -> InfraredProtocol;
}
extern "C" {
    #[doc = "Get address length by protocol enum.\n\n # Arguments\n\n* `protocol` (direction in) - - protocol identifier.\n # Returns\n\nlength of address in bits."]
    pub fn infrared_get_protocol_address_length(protocol: InfraredProtocol) -> u8;
}
extern "C" {
    #[doc = "Get command length by protocol enum.\n\n # Arguments\n\n* `protocol` (direction in) - - protocol identifier.\n # Returns\n\nlength of command in bits."]
    pub fn infrared_get_protocol_command_length(protocol: InfraredProtocol) -> u8;
}
extern "C" {
    #[doc = "Checks whether protocol valid.\n\n # Arguments\n\n* `protocol` (direction in) - - protocol identifier.\n # Returns\n\ntrue if protocol is valid, false otherwise."]
    pub fn infrared_is_protocol_valid(protocol: InfraredProtocol) -> bool;
}
extern "C" {
    #[doc = "Allocate INFRARED encoder.\n\n # Returns\n\nencoder handler."]
    pub fn infrared_alloc_encoder() -> *mut InfraredEncoderHandler;
}
extern "C" {
    #[doc = "Free encoder handler previously allocated with `infrared_alloc_encoder().`\n\n # Arguments\n\n* `handler` (direction in) - - handler to INFRARED encoder. Should be acquired with `infrared_alloc_encoder().`"]
    pub fn infrared_free_encoder(handler: *mut InfraredEncoderHandler);
}
extern "C" {
    #[doc = "Encode previously set INFRARED message.\n Usage:\n 1) alloc with `infrared_alloc_encoder()`\n 2) set message to encode with `infrared_reset_encoder()`\n 3) call for `infrared_encode()` to continuously get one at a time timings.\n 4) when `infrared_encode()` returns InfraredStatusDone, it means new message is fully encoded.\n 5) to encode additional timings, just continue calling `infrared_encode().`\n\n # Arguments\n\n* `handler` (direction in) - - handler to INFRARED encoder. Should be acquired with `infrared_alloc_encoder().`\n * `duration` (direction out) - - encoded timing.\n * `level` (direction out) - - encoded level.\n\n # Returns\n\nstatus of encode operation."]
    pub fn infrared_encode(
        handler: *mut InfraredEncoderHandler,
        duration: *mut u32,
        level: *mut bool,
    ) -> InfraredStatus;
}
extern "C" {
    #[doc = "Reset INFRARED encoder and set new message to encode. If it's not called after receiveing\n InfraredStatusDone in `infrared_encode(),` encoder will encode repeat messages\n till the end of time.\n\n # Arguments\n\n* `handler` (direction in) - - handler to INFRARED encoder. Should be acquired with `infrared_alloc_encoder().`\n * `message` (direction in) - - message to encode."]
    pub fn infrared_reset_encoder(
        handler: *mut InfraredEncoderHandler,
        message: *const InfraredMessage,
    );
}
extern "C" {
    #[doc = "Get PWM frequency value for selected protocol\n\n # Arguments\n\n* `protocol` (direction in) - - protocol to get from PWM frequency\n\n # Returns\n\nfrequency"]
    pub fn infrared_get_protocol_frequency(protocol: InfraredProtocol) -> u32;
}
extern "C" {
    #[doc = "Get PWM duty cycle value for selected protocol\n\n # Arguments\n\n* `protocol` (direction in) - - protocol to get from PWM duty cycle\n\n # Returns\n\nduty cycle"]
    pub fn infrared_get_protocol_duty_cycle(protocol: InfraredProtocol) -> f32;
}
extern "C" {
    #[doc = "Get the minimum count of signal repeats for the selected protocol\n\n # Arguments\n\n* `protocol` (direction in) - - protocol to get the repeat count from\n\n # Returns\n\nrepeat count"]
    pub fn infrared_get_protocol_min_repeat_count(protocol: InfraredProtocol) -> usize;
}
pub const FuriHalInfraredTxPin_FuriHalInfraredTxPinInternal: FuriHalInfraredTxPin = 0;
pub const FuriHalInfraredTxPin_FuriHalInfraredTxPinExtPA7: FuriHalInfraredTxPin = 1;
pub const FuriHalInfraredTxPin_FuriHalInfraredTxPinMax: FuriHalInfraredTxPin = 2;
pub type FuriHalInfraredTxPin = core::ffi::c_uchar;
#[doc = "< New data obtained"]
pub const FuriHalInfraredTxGetDataState_FuriHalInfraredTxGetDataStateOk:
    FuriHalInfraredTxGetDataState = 0;
#[doc = "< New data obtained, and this is end of package"]
pub const FuriHalInfraredTxGetDataState_FuriHalInfraredTxGetDataStateDone:
    FuriHalInfraredTxGetDataState = 1;
#[doc = "< New data obtained, and this is end of package and no more data available"]
pub const FuriHalInfraredTxGetDataState_FuriHalInfraredTxGetDataStateLastDone:
    FuriHalInfraredTxGetDataState = 2;
pub type FuriHalInfraredTxGetDataState = core::ffi::c_uchar;
#[doc = "Callback type for providing data to INFRARED DMA TX system. It is called every tim"]
pub type FuriHalInfraredTxGetDataISRCallback = ::core::option::Option<
    unsafe extern "C" fn(
        context: *mut core::ffi::c_void,
        duration: *mut u32,
        level: *mut bool,
    ) -> FuriHalInfraredTxGetDataState,
>;
#[doc = "Callback type called every time signal is sent by DMA to Timer.\n\n Actually, it means there are 2 timings left to send for this signal, which is\n almost end. Don't use this callback to stop transmission, as far as there are\n next signal is charged for transmission by DMA."]
pub type FuriHalInfraredTxSignalSentISRCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[doc = "Signature of callback function for receiving continuous INFRARED rx signal.\n\n # Arguments\n\n* `ctx` (direction in) - context to pass to callback\n * `level` (direction in) - level of input INFRARED rx signal\n * `duration` (direction in) - duration of continuous rx signal level in us"]
pub type FuriHalInfraredRxCaptureCallback = ::core::option::Option<
    unsafe extern "C" fn(ctx: *mut core::ffi::c_void, level: bool, duration: u32),
>;
#[doc = "Signature of callback function for reaching silence timeout on INFRARED port.\n\n # Arguments\n\n* `ctx` (direction in) - context to pass to callback"]
pub type FuriHalInfraredRxTimeoutCallback =
    ::core::option::Option<unsafe extern "C" fn(ctx: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Initialize INFRARED RX timer to receive interrupts.\n\n It provides interrupts for every RX-signal edge changing with its duration."]
    pub fn furi_hal_infrared_async_rx_start();
}
extern "C" {
    #[doc = "Deinitialize INFRARED RX interrupt."]
    pub fn furi_hal_infrared_async_rx_stop();
}
extern "C" {
    #[doc = "Setup hal for receiving silence timeout.\n\n Should be used with 'furi_hal_infrared_timeout_irq_set_callback()'.\n\n # Arguments\n\n* `timeout_us` (direction in) - time to wait for silence on INFRARED port before\n generating IRQ."]
    pub fn furi_hal_infrared_async_rx_set_timeout(timeout_us: u32);
}
extern "C" {
    #[doc = "Setup callback for previously initialized INFRARED RX interrupt.\n\n # Arguments\n\n* `callback` (direction in) - callback to call when RX signal edge changing occurs\n * `ctx` (direction in) - context for callback"]
    pub fn furi_hal_infrared_async_rx_set_capture_isr_callback(
        callback: FuriHalInfraredRxCaptureCallback,
        ctx: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Setup callback for reaching silence timeout on INFRARED port.\n\n Should setup hal with 'furi_hal_infrared_setup_rx_timeout_irq()' first.\n\n # Arguments\n\n* `callback` (direction in) - callback for silence timeout\n * `ctx` (direction in) - context to pass to callback"]
    pub fn furi_hal_infrared_async_rx_set_timeout_isr_callback(
        callback: FuriHalInfraredRxTimeoutCallback,
        ctx: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Check if INFRARED is in use now.\n\n # Returns\n\ntrue if INFRARED is busy, false otherwise."]
    pub fn furi_hal_infrared_is_busy() -> bool;
}
extern "C" {
    #[doc = "Set callback providing new data.\n\n This function has to be called before furi_hal_infrared_async_tx_start().\n\n # Arguments\n\n* `callback` (direction in) - function to provide new data\n * `context` (direction in) - context for callback"]
    pub fn furi_hal_infrared_async_tx_set_data_isr_callback(
        callback: FuriHalInfraredTxGetDataISRCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Start IR asynchronous transmission.\n\n It can be stopped by 2 reasons:\n 1. implicit call for furi_hal_infrared_async_tx_stop()\n 2. callback can provide FuriHalInfraredTxGetDataStateLastDone response which\n means no more data available for transmission.\n\n Any func (furi_hal_infrared_async_tx_stop() or\n furi_hal_infrared_async_tx_wait_termination()) has to be called to wait end of\n transmission and free resources.\n\n # Arguments\n\n* `freq` (direction in) - frequency for PWM\n * `duty_cycle` (direction in) - duty cycle for PWM"]
    pub fn furi_hal_infrared_async_tx_start(freq: u32, duty_cycle: f32);
}
extern "C" {
    #[doc = "Stop IR asynchronous transmission and free resources.\n\n Transmission will stop as soon as transmission reaches end of package\n (FuriHalInfraredTxGetDataStateDone or FuriHalInfraredTxGetDataStateLastDone)."]
    pub fn furi_hal_infrared_async_tx_stop();
}
extern "C" {
    #[doc = "Wait for end of IR asynchronous transmission and free resources.\n\n Transmission will stop as soon as transmission reaches end of transmission\n (FuriHalInfraredTxGetDataStateLastDone)."]
    pub fn furi_hal_infrared_async_tx_wait_termination();
}
extern "C" {
    #[doc = "Set callback for end of signal transmission\n\n # Arguments\n\n* `callback` (direction in) - function to call when signal is sent\n * `context` (direction in) - context for callback"]
    pub fn furi_hal_infrared_async_tx_set_signal_sent_isr_callback(
        callback: FuriHalInfraredTxSignalSentISRCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Detect which pin has an external IR module connected.\n\n External IR modules are detected by enabling a weak pull-up\n on supported pins and testing whether the input is still low.\n\n This method works best on modules that employ a FET with a\n strong pull-down or a BJT for driving IR LEDs.\n\n The module MUST pull the input voltage down to at least 0.9V\n or lower in order for it to be detected.\n\n If no module has been detected, FuriHalInfraredTxPinInternal is returned.\n\n # Returns\n\nnumeric identifier of the first pin with a module detected."]
    pub fn furi_hal_infrared_detect_tx_output() -> FuriHalInfraredTxPin;
}
extern "C" {
    #[doc = "Set which pin will be used to transmit infrared signals.\n\n # Arguments\n\n* `tx_pin` (direction in) - pin to be used for signal transmission."]
    pub fn furi_hal_infrared_set_tx_output(tx_pin: FuriHalInfraredTxPin);
}
extern "C" {
    #[doc = "Send message over INFRARED.\n\n # Arguments\n\n* `message` (direction in) - - message to send.\n * `times` (direction in) - - number of times message should be sent."]
    pub fn infrared_send(message: *const InfraredMessage, times: core::ffi::c_int);
}
extern "C" {
    #[doc = "Send raw data through infrared port.\n\n # Arguments\n\n* `timings` (direction in) - - array of timings to send.\n * `timings_cnt` (direction in) - - timings array size.\n * `start_from_mark` (direction in) - - true if timings starts from mark,\n otherwise from space"]
    pub fn infrared_send_raw(timings: *const u32, timings_cnt: u32, start_from_mark: bool);
}
extern "C" {
    #[doc = "Send raw data through infrared port, with additional settings.\n\n # Arguments\n\n* `timings` (direction in) - - array of timings to send.\n * `timings_cnt` (direction in) - - timings array size.\n * `start_from_mark` (direction in) - - true if timings starts from mark,\n otherwise from space\n * `duty_cycle` (direction in) - - duty cycle to generate on PWM\n * `frequency` (direction in) - - frequency to generate on PWM"]
    pub fn infrared_send_raw_ext(
        timings: *const u32,
        timings_cnt: u32,
        start_from_mark: bool,
        frequency: u32,
        duty_cycle: f32,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct InfraredWorker {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct InfraredWorkerSignal {
    _unused: [u8; 0],
}
pub const InfraredWorkerGetSignalResponse_InfraredWorkerGetSignalResponseNew:
    InfraredWorkerGetSignalResponse = 0;
#[doc = "Signal, provided by callback is new and encoder should be reseted"]
pub const InfraredWorkerGetSignalResponse_InfraredWorkerGetSignalResponseSame:
    InfraredWorkerGetSignalResponse = 1;
#[doc = "Signal, provided by callback is same. No encoder resetting."]
pub const InfraredWorkerGetSignalResponse_InfraredWorkerGetSignalResponseStop:
    InfraredWorkerGetSignalResponse = 2;
pub type InfraredWorkerGetSignalResponse = core::ffi::c_uchar;
#[doc = "Callback type for providing next signal to send. Should be used with\n infrared_worker_make_decoded_signal() or infrared_worker_make_raw_signal()"]
pub type InfraredWorkerGetSignalCallback = ::core::option::Option<
    unsafe extern "C" fn(
        context: *mut core::ffi::c_void,
        instance: *mut InfraredWorker,
    ) -> InfraredWorkerGetSignalResponse,
>;
#[doc = "Callback type for 'message is sent' event"]
pub type InfraredWorkerMessageSentCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[doc = "Callback type to call by InfraredWorker thread when new signal is received"]
pub type InfraredWorkerReceivedSignalCallback = ::core::option::Option<
    unsafe extern "C" fn(
        context: *mut core::ffi::c_void,
        received_signal: *mut InfraredWorkerSignal,
    ),
>;
extern "C" {
    #[doc = "Allocate InfraredWorker\n\n # Returns\n\njust created instance of InfraredWorker"]
    pub fn infrared_worker_alloc() -> *mut InfraredWorker;
}
extern "C" {
    #[doc = "Free InfraredWorker\n\n # Arguments\n\n* `instance` (direction in) - - InfraredWorker instance"]
    pub fn infrared_worker_free(instance: *mut InfraredWorker);
}
extern "C" {
    #[doc = "Start InfraredWorker thread, initialise furi_hal, prepare all work.\n\n # Arguments\n\n* `instance` (direction in) - - InfraredWorker instance"]
    pub fn infrared_worker_rx_start(instance: *mut InfraredWorker);
}
extern "C" {
    #[doc = "Stop InfraredWorker thread, deinitialize furi_hal.\n\n # Arguments\n\n* `instance` (direction in) - - InfraredWorker instance"]
    pub fn infrared_worker_rx_stop(instance: *mut InfraredWorker);
}
extern "C" {
    #[doc = "Set received data callback InfraredWorker\n\n # Arguments\n\n* `instance` (direction in) - - InfraredWorker instance\n * `context` (direction in) - - context to pass to callbacks\n * `callback` (direction in) - - InfraredWorkerReceivedSignalCallback callback"]
    pub fn infrared_worker_rx_set_received_signal_callback(
        instance: *mut InfraredWorker,
        callback: InfraredWorkerReceivedSignalCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Enable blinking on receiving any signal on IR port.\n\n # Arguments\n\n* `instance` (direction in) - - instance of InfraredWorker\n * `enable` (direction in) - - true if you want to enable blinking\n false otherwise"]
    pub fn infrared_worker_rx_enable_blink_on_receiving(
        instance: *mut InfraredWorker,
        enable: bool,
    );
}
extern "C" {
    #[doc = "Enable decoding of received infrared signals.\n\n # Arguments\n\n* `instance` (direction in) - - instance of InfraredWorker\n * `enable` (direction in) - - true if you want to enable decoding\n false otherwise"]
    pub fn infrared_worker_rx_enable_signal_decoding(instance: *mut InfraredWorker, enable: bool);
}
extern "C" {
    #[doc = "Clarify is received signal either decoded or raw\n\n # Arguments\n\n* `signal` (direction in) - - received signal\n # Returns\n\ntrue if signal is decoded, false if signal is raw"]
    pub fn infrared_worker_signal_is_decoded(signal: *const InfraredWorkerSignal) -> bool;
}
extern "C" {
    #[doc = "Start transmitting signal. Callback InfraredWorkerGetSignalCallback should be\n set before this function is called, as it calls for it to fill buffer before\n starting transmission.\n\n # Arguments\n\n* `instance` (direction in) - - InfraredWorker instance"]
    pub fn infrared_worker_tx_start(instance: *mut InfraredWorker);
}
extern "C" {
    #[doc = "Stop transmitting signal. Waits for end of current signal and stops transmission.\n\n # Arguments\n\n* `instance` (direction in) - - InfraredWorker instance"]
    pub fn infrared_worker_tx_stop(instance: *mut InfraredWorker);
}
extern "C" {
    #[doc = "Set callback for providing next signal to send\n\n # Arguments\n\n* `instance` (direction in) - - InfraredWorker instance\n * `context` (direction in) - - context to pass to callbacks\n * `callback` (direction in) - - InfraredWorkerGetSignalCallback callback"]
    pub fn infrared_worker_tx_set_get_signal_callback(
        instance: *mut InfraredWorker,
        callback: InfraredWorkerGetSignalCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Set callback for end of signal transmitting\n\n # Arguments\n\n* `instance` (direction in) - - InfraredWorker instance\n * `context` (direction in) - - context to pass to callbacks\n * `callback` (direction in) - - InfraredWorkerMessageSentCallback callback"]
    pub fn infrared_worker_tx_set_signal_sent_callback(
        instance: *mut InfraredWorker,
        callback: InfraredWorkerMessageSentCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Callback to pass to infrared_worker_tx_set_get_signal_callback() if signal\n is steady and will not be changed between infrared_worker start and stop.\n Before starting transmission, desired steady signal must be set with\n infrared_worker_set_decoded_signal() or infrared_worker_set_raw_signal().\n\n This function should not be called directly.\n\n # Arguments\n\n* `context` (direction in) - - context\n * `instance` (direction out) - - InfraredWorker instance"]
    pub fn infrared_worker_tx_get_signal_steady_callback(
        context: *mut core::ffi::c_void,
        instance: *mut InfraredWorker,
    ) -> InfraredWorkerGetSignalResponse;
}
extern "C" {
    #[doc = "Acquire raw signal from interface struct 'InfraredWorkerSignal'.\n First, you have to ensure that signal is raw.\n\n # Arguments\n\n* `signal` (direction in) - - received signal\n * `timings` (direction out) - - pointer to array of timings\n * `timings_cnt` (direction out) - - pointer to amount of timings"]
    pub fn infrared_worker_get_raw_signal(
        signal: *const InfraredWorkerSignal,
        timings: *mut *const u32,
        timings_cnt: *mut usize,
    );
}
extern "C" {
    #[doc = "Acquire decoded message from interface struct 'InfraredWorkerSignal'.\n First, you have to ensure that signal is decoded.\n\n # Arguments\n\n* `signal` (direction in) - - received signal\n # Returns\n\ndecoded INFRARED message"]
    pub fn infrared_worker_get_decoded_signal(
        signal: *const InfraredWorkerSignal,
    ) -> *const InfraredMessage;
}
extern "C" {
    #[doc = "Set current decoded signal for InfraredWorker instance\n\n # Arguments\n\n* `instance` (direction out) - - InfraredWorker instance\n * `message` (direction in) - - decoded signal"]
    pub fn infrared_worker_set_decoded_signal(
        instance: *mut InfraredWorker,
        message: *const InfraredMessage,
    );
}
extern "C" {
    #[doc = "Set current raw signal for InfraredWorker instance\n\n # Arguments\n\n* `instance` (direction out) - - InfraredWorker instance\n * `timings` (direction in) - - array of raw timings\n * `timings_cnt` (direction in) - - size of array of raw timings\n * `frequency` (direction in) - - carrier frequency in Hertz\n * `duty_cycle` (direction in) - - carrier duty cycle (0.0 - 1.0)"]
    pub fn infrared_worker_set_raw_signal(
        instance: *mut InfraredWorker,
        timings: *const u32,
        timings_cnt: usize,
        frequency: u32,
        duty_cycle: f32,
    );
}
pub type ProtocolAlloc = ::core::option::Option<unsafe extern "C" fn() -> *mut core::ffi::c_void>;
pub type ProtocolFree =
    ::core::option::Option<unsafe extern "C" fn(protocol: *mut core::ffi::c_void)>;
pub type ProtocolGetData =
    ::core::option::Option<unsafe extern "C" fn(protocol: *mut core::ffi::c_void) -> *mut u8>;
pub type ProtocolDecoderStart =
    ::core::option::Option<unsafe extern "C" fn(protocol: *mut core::ffi::c_void)>;
pub type ProtocolDecoderFeed = ::core::option::Option<
    unsafe extern "C" fn(protocol: *mut core::ffi::c_void, level: bool, duration: u32) -> bool,
>;
pub type ProtocolEncoderStart =
    ::core::option::Option<unsafe extern "C" fn(protocol: *mut core::ffi::c_void) -> bool>;
pub type ProtocolEncoderYield =
    ::core::option::Option<unsafe extern "C" fn(protocol: *mut core::ffi::c_void) -> LevelDuration>;
pub type ProtocolRenderData = ::core::option::Option<
    unsafe extern "C" fn(protocol: *mut core::ffi::c_void, result: *mut FuriString),
>;
pub type ProtocolWriteData = ::core::option::Option<
    unsafe extern "C" fn(protocol: *mut core::ffi::c_void, data: *mut core::ffi::c_void) -> bool,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ProtocolDecoder {
    pub start: ProtocolDecoderStart,
    pub feed: ProtocolDecoderFeed,
}
#[test]
fn bindgen_test_layout_ProtocolDecoder() {
    const UNINIT: ::core::mem::MaybeUninit<ProtocolDecoder> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<ProtocolDecoder>(),
        8usize,
        concat!("Size of: ", stringify!(ProtocolDecoder))
    );
    assert_eq!(
        ::core::mem::align_of::<ProtocolDecoder>(),
        4usize,
        concat!("Alignment of ", stringify!(ProtocolDecoder))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolDecoder),
            "::",
            stringify!(start)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).feed) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolDecoder),
            "::",
            stringify!(feed)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ProtocolEncoder {
    pub start: ProtocolEncoderStart,
    pub yield_: ProtocolEncoderYield,
}
#[test]
fn bindgen_test_layout_ProtocolEncoder() {
    const UNINIT: ::core::mem::MaybeUninit<ProtocolEncoder> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<ProtocolEncoder>(),
        8usize,
        concat!("Size of: ", stringify!(ProtocolEncoder))
    );
    assert_eq!(
        ::core::mem::align_of::<ProtocolEncoder>(),
        4usize,
        concat!("Alignment of ", stringify!(ProtocolEncoder))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolEncoder),
            "::",
            stringify!(start)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).yield_) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolEncoder),
            "::",
            stringify!(yield_)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ProtocolBase {
    pub data_size: usize,
    pub name: *const core::ffi::c_char,
    pub manufacturer: *const core::ffi::c_char,
    pub features: u32,
    pub validate_count: u8,
    pub alloc: ProtocolAlloc,
    pub free: ProtocolFree,
    pub get_data: ProtocolGetData,
    pub decoder: ProtocolDecoder,
    pub encoder: ProtocolEncoder,
    pub render_uid: ProtocolRenderData,
    pub render_data: ProtocolRenderData,
    pub render_brief_data: ProtocolRenderData,
    pub write_data: ProtocolWriteData,
}
#[test]
fn bindgen_test_layout_ProtocolBase() {
    const UNINIT: ::core::mem::MaybeUninit<ProtocolBase> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<ProtocolBase>(),
        64usize,
        concat!("Size of: ", stringify!(ProtocolBase))
    );
    assert_eq!(
        ::core::mem::align_of::<ProtocolBase>(),
        4usize,
        concat!("Alignment of ", stringify!(ProtocolBase))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data_size) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(data_size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).manufacturer) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(manufacturer)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).features) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(features)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).validate_count) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(validate_count)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).alloc) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(alloc)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).free) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(free)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).get_data) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(get_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).decoder) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(decoder)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).encoder) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(encoder)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).render_uid) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(render_uid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).render_data) as usize - ptr as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(render_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).render_brief_data) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(render_brief_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).write_data) as usize - ptr as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(ProtocolBase),
            "::",
            stringify!(write_data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ProtocolDict {
    _unused: [u8; 0],
}
pub type ProtocolId = i32;
extern "C" {
    pub fn protocol_dict_alloc(
        protocols: *mut *const ProtocolBase,
        protocol_count: usize,
    ) -> *mut ProtocolDict;
}
extern "C" {
    pub fn protocol_dict_free(dict: *mut ProtocolDict);
}
extern "C" {
    pub fn protocol_dict_set_data(
        dict: *mut ProtocolDict,
        protocol_index: usize,
        data: *const u8,
        data_size: usize,
    );
}
extern "C" {
    pub fn protocol_dict_get_data(
        dict: *mut ProtocolDict,
        protocol_index: usize,
        data: *mut u8,
        data_size: usize,
    );
}
extern "C" {
    pub fn protocol_dict_get_data_size(dict: *mut ProtocolDict, protocol_index: usize) -> usize;
}
extern "C" {
    pub fn protocol_dict_get_max_data_size(dict: *mut ProtocolDict) -> usize;
}
extern "C" {
    pub fn protocol_dict_get_name(
        dict: *mut ProtocolDict,
        protocol_index: usize,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn protocol_dict_get_manufacturer(
        dict: *mut ProtocolDict,
        protocol_index: usize,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn protocol_dict_decoders_start(dict: *mut ProtocolDict);
}
extern "C" {
    pub fn protocol_dict_get_features(dict: *mut ProtocolDict, protocol_index: usize) -> u32;
}
extern "C" {
    pub fn protocol_dict_decoders_feed(
        dict: *mut ProtocolDict,
        level: bool,
        duration: u32,
    ) -> ProtocolId;
}
extern "C" {
    pub fn protocol_dict_decoders_feed_by_feature(
        dict: *mut ProtocolDict,
        feature: u32,
        level: bool,
        duration: u32,
    ) -> ProtocolId;
}
extern "C" {
    pub fn protocol_dict_decoders_feed_by_id(
        dict: *mut ProtocolDict,
        protocol_index: usize,
        level: bool,
        duration: u32,
    ) -> ProtocolId;
}
extern "C" {
    pub fn protocol_dict_encoder_start(dict: *mut ProtocolDict, protocol_index: usize) -> bool;
}
extern "C" {
    pub fn protocol_dict_encoder_yield(
        dict: *mut ProtocolDict,
        protocol_index: usize,
    ) -> LevelDuration;
}
extern "C" {
    pub fn protocol_dict_render_uid(
        dict: *mut ProtocolDict,
        result: *mut FuriString,
        protocol_index: usize,
    );
}
extern "C" {
    pub fn protocol_dict_render_data(
        dict: *mut ProtocolDict,
        result: *mut FuriString,
        protocol_index: usize,
    );
}
extern "C" {
    pub fn protocol_dict_render_brief_data(
        dict: *mut ProtocolDict,
        result: *mut FuriString,
        protocol_index: usize,
    );
}
extern "C" {
    pub fn protocol_dict_get_validate_count(dict: *mut ProtocolDict, protocol_index: usize) -> u32;
}
extern "C" {
    pub fn protocol_dict_get_protocol_by_name(
        dict: *mut ProtocolDict,
        name: *const core::ffi::c_char,
    ) -> ProtocolId;
}
extern "C" {
    pub fn protocol_dict_get_write_data(
        dict: *mut ProtocolDict,
        protocol_index: usize,
        data: *mut core::ffi::c_void,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LFRFIDT5577 {
    pub block: [u32; 8usize],
    pub blocks_to_write: u32,
    pub mask: u8,
}
#[test]
fn bindgen_test_layout_LFRFIDT5577() {
    const UNINIT: ::core::mem::MaybeUninit<LFRFIDT5577> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LFRFIDT5577>(),
        40usize,
        concat!("Size of: ", stringify!(LFRFIDT5577))
    );
    assert_eq!(
        ::core::mem::align_of::<LFRFIDT5577>(),
        4usize,
        concat!("Alignment of ", stringify!(LFRFIDT5577))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).block) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LFRFIDT5577),
            "::",
            stringify!(block)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).blocks_to_write) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(LFRFIDT5577),
            "::",
            stringify!(blocks_to_write)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).mask) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(LFRFIDT5577),
            "::",
            stringify!(mask)
        )
    );
}
extern "C" {
    #[doc = "Write T5577 tag data to tag\n\n # Arguments\n\n* `data` -"]
    pub fn t5577_write(data: *mut LFRFIDT5577);
}
extern "C" {
    pub fn t5577_write_with_pass(data: *mut LFRFIDT5577, password: u32);
}
extern "C" {
    pub fn t5577_write_with_mask(data: *mut LFRFIDT5577, page: u8, with_pass: bool, password: u32);
}
pub const LFRFIDProtocol_LFRFIDProtocolEM4100: LFRFIDProtocol = 0;
pub const LFRFIDProtocol_LFRFIDProtocolEM410032: LFRFIDProtocol = 1;
pub const LFRFIDProtocol_LFRFIDProtocolEM410016: LFRFIDProtocol = 2;
pub const LFRFIDProtocol_LFRFIDProtocolElectra: LFRFIDProtocol = 3;
pub const LFRFIDProtocol_LFRFIDProtocolH10301: LFRFIDProtocol = 4;
pub const LFRFIDProtocol_LFRFIDProtocolIdteck: LFRFIDProtocol = 5;
pub const LFRFIDProtocol_LFRFIDProtocolIndala26: LFRFIDProtocol = 6;
pub const LFRFIDProtocol_LFRFIDProtocolIOProxXSF: LFRFIDProtocol = 7;
pub const LFRFIDProtocol_LFRFIDProtocolAwid: LFRFIDProtocol = 8;
pub const LFRFIDProtocol_LFRFIDProtocolFDXA: LFRFIDProtocol = 9;
pub const LFRFIDProtocol_LFRFIDProtocolFDXB: LFRFIDProtocol = 10;
pub const LFRFIDProtocol_LFRFIDProtocolHidGeneric: LFRFIDProtocol = 11;
pub const LFRFIDProtocol_LFRFIDProtocolHidExGeneric: LFRFIDProtocol = 12;
pub const LFRFIDProtocol_LFRFIDProtocolPyramid: LFRFIDProtocol = 13;
pub const LFRFIDProtocol_LFRFIDProtocolViking: LFRFIDProtocol = 14;
pub const LFRFIDProtocol_LFRFIDProtocolJablotron: LFRFIDProtocol = 15;
pub const LFRFIDProtocol_LFRFIDProtocolParadox: LFRFIDProtocol = 16;
pub const LFRFIDProtocol_LFRFIDProtocolPACStanley: LFRFIDProtocol = 17;
pub const LFRFIDProtocol_LFRFIDProtocolKeri: LFRFIDProtocol = 18;
pub const LFRFIDProtocol_LFRFIDProtocolGallagher: LFRFIDProtocol = 19;
pub const LFRFIDProtocol_LFRFIDProtocolNexwatch: LFRFIDProtocol = 20;
pub const LFRFIDProtocol_LFRFIDProtocolSecurakey: LFRFIDProtocol = 21;
pub const LFRFIDProtocol_LFRFIDProtocolGProxII: LFRFIDProtocol = 22;
pub const LFRFIDProtocol_LFRFIDProtocolMax: LFRFIDProtocol = 23;
pub type LFRFIDProtocol = core::ffi::c_uchar;
extern "C" {
    pub static mut lfrfid_protocols: [*const ProtocolBase; 0usize];
}
extern "C" {
    #[doc = "Save protocol from dictionary to file\n\n # Arguments\n\n* `dict` -\n * `protocol` -\n * `filename` -\n # Returns\n\ntrue\n false"]
    pub fn lfrfid_dict_file_save(
        dict: *mut ProtocolDict,
        protocol: ProtocolId,
        filename: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Load protocol from file to dictionary\n\n # Arguments\n\n* `dict` -\n * `filename` -\n # Returns\n\nProtocolId"]
    pub fn lfrfid_dict_file_load(
        dict: *mut ProtocolDict,
        filename: *const core::ffi::c_char,
    ) -> ProtocolId;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LFRFIDRawFile {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate a new LFRFIDRawFile instance\n\n # Arguments\n\n* `storage` -\n # Returns\n\nLFRFIDRawFile*"]
    pub fn lfrfid_raw_file_alloc(storage: *mut Storage) -> *mut LFRFIDRawFile;
}
extern "C" {
    #[doc = "Free a LFRFIDRawFile instance\n\n # Arguments\n\n* `file` -"]
    pub fn lfrfid_raw_file_free(file: *mut LFRFIDRawFile);
}
extern "C" {
    #[doc = "Open RAW file for writing\n\n # Arguments\n\n* `file` -\n * `file_path` -\n # Returns\n\nbool"]
    pub fn lfrfid_raw_file_open_write(
        file: *mut LFRFIDRawFile,
        file_path: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Open RAW file for reading\n # Arguments\n\n* `file` -\n * `file_path` -\n # Returns\n\nbool"]
    pub fn lfrfid_raw_file_open_read(
        file: *mut LFRFIDRawFile,
        file_path: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Write RAW file header\n\n # Arguments\n\n* `file` -\n * `frequency` -\n * `duty_cycle` -\n * `max_buffer_size` -\n # Returns\n\nbool"]
    pub fn lfrfid_raw_file_write_header(
        file: *mut LFRFIDRawFile,
        frequency: f32,
        duty_cycle: f32,
        max_buffer_size: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Write data to RAW file\n\n # Arguments\n\n* `file` -\n * `buffer_data` -\n * `buffer_size` -\n # Returns\n\nbool"]
    pub fn lfrfid_raw_file_write_buffer(
        file: *mut LFRFIDRawFile,
        buffer_data: *mut u8,
        buffer_size: usize,
    ) -> bool;
}
extern "C" {
    #[doc = "Read RAW file header\n\n # Arguments\n\n* `file` -\n * `frequency` -\n * `duty_cycle` -\n # Returns\n\nbool"]
    pub fn lfrfid_raw_file_read_header(
        file: *mut LFRFIDRawFile,
        frequency: *mut f32,
        duty_cycle: *mut f32,
    ) -> bool;
}
extern "C" {
    #[doc = "Read varint-encoded pair from RAW file\n\n # Arguments\n\n* `file` -\n * `duration` -\n * `pulse` -\n * `pass_end` - file was wrapped around, can be NULL\n # Returns\n\nbool"]
    pub fn lfrfid_raw_file_read_pair(
        file: *mut LFRFIDRawFile,
        duration: *mut u32,
        pulse: *mut u32,
        pass_end: *mut bool,
    ) -> bool;
}
pub const LFRFIDWorkerWriteResult_LFRFIDWorkerWriteOK: LFRFIDWorkerWriteResult = 0;
pub const LFRFIDWorkerWriteResult_LFRFIDWorkerWriteProtocolCannotBeWritten:
    LFRFIDWorkerWriteResult = 1;
pub const LFRFIDWorkerWriteResult_LFRFIDWorkerWriteFobCannotBeWritten: LFRFIDWorkerWriteResult = 2;
pub const LFRFIDWorkerWriteResult_LFRFIDWorkerWriteTooLongToWrite: LFRFIDWorkerWriteResult = 3;
pub type LFRFIDWorkerWriteResult = core::ffi::c_uchar;
pub const LFRFIDWorkerReadType_LFRFIDWorkerReadTypeAuto: LFRFIDWorkerReadType = 0;
pub const LFRFIDWorkerReadType_LFRFIDWorkerReadTypeASKOnly: LFRFIDWorkerReadType = 1;
pub const LFRFIDWorkerReadType_LFRFIDWorkerReadTypePSKOnly: LFRFIDWorkerReadType = 2;
pub type LFRFIDWorkerReadType = core::ffi::c_uchar;
pub const LFRFIDWorkerReadResult_LFRFIDWorkerReadSenseStart: LFRFIDWorkerReadResult = 0;
pub const LFRFIDWorkerReadResult_LFRFIDWorkerReadSenseEnd: LFRFIDWorkerReadResult = 1;
pub const LFRFIDWorkerReadResult_LFRFIDWorkerReadSenseCardStart: LFRFIDWorkerReadResult = 2;
pub const LFRFIDWorkerReadResult_LFRFIDWorkerReadSenseCardEnd: LFRFIDWorkerReadResult = 3;
pub const LFRFIDWorkerReadResult_LFRFIDWorkerReadStartASK: LFRFIDWorkerReadResult = 4;
pub const LFRFIDWorkerReadResult_LFRFIDWorkerReadStartPSK: LFRFIDWorkerReadResult = 5;
pub const LFRFIDWorkerReadResult_LFRFIDWorkerReadDone: LFRFIDWorkerReadResult = 6;
pub type LFRFIDWorkerReadResult = core::ffi::c_uchar;
pub const LFRFIDWorkerReadRawResult_LFRFIDWorkerReadRawFileError: LFRFIDWorkerReadRawResult = 0;
pub const LFRFIDWorkerReadRawResult_LFRFIDWorkerReadRawOverrun: LFRFIDWorkerReadRawResult = 1;
pub type LFRFIDWorkerReadRawResult = core::ffi::c_uchar;
pub const LFRFIDWorkerEmulateRawResult_LFRFIDWorkerEmulateRawFileError:
    LFRFIDWorkerEmulateRawResult = 0;
pub const LFRFIDWorkerEmulateRawResult_LFRFIDWorkerEmulateRawOverrun: LFRFIDWorkerEmulateRawResult =
    1;
pub type LFRFIDWorkerEmulateRawResult = core::ffi::c_uchar;
pub type LFRFIDWorkerReadCallback = ::core::option::Option<
    unsafe extern "C" fn(
        result: LFRFIDWorkerReadResult,
        protocol: ProtocolId,
        context: *mut core::ffi::c_void,
    ),
>;
pub type LFRFIDWorkerWriteCallback = ::core::option::Option<
    unsafe extern "C" fn(result: LFRFIDWorkerWriteResult, context: *mut core::ffi::c_void),
>;
pub type LFRFIDWorkerReadRawCallback = ::core::option::Option<
    unsafe extern "C" fn(result: LFRFIDWorkerReadRawResult, context: *mut core::ffi::c_void),
>;
pub type LFRFIDWorkerEmulateRawCallback = ::core::option::Option<
    unsafe extern "C" fn(result: LFRFIDWorkerEmulateRawResult, context: *mut core::ffi::c_void),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LFRFIDWorker {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate LF-RFID worker\n # Returns\n\nLFRFIDWorker*"]
    pub fn lfrfid_worker_alloc(dict: *mut ProtocolDict) -> *mut LFRFIDWorker;
}
extern "C" {
    #[doc = "Free LF-RFID worker\n\n # Arguments\n\n* `worker` - The worker"]
    pub fn lfrfid_worker_free(worker: *mut LFRFIDWorker);
}
extern "C" {
    #[doc = "Start LF-RFID worker thread\n\n # Arguments\n\n* `worker` - The worker"]
    pub fn lfrfid_worker_start_thread(worker: *mut LFRFIDWorker);
}
extern "C" {
    #[doc = "Stop LF-RFID worker thread\n\n # Arguments\n\n* `worker` - The worker"]
    pub fn lfrfid_worker_stop_thread(worker: *mut LFRFIDWorker);
}
extern "C" {
    #[doc = "Start read mode\n\n # Arguments\n\n* `worker` - The worker\n * `type` - The type\n * `callback` - The callback\n * `context` - The context"]
    pub fn lfrfid_worker_read_start(
        worker: *mut LFRFIDWorker,
        type_: LFRFIDWorkerReadType,
        callback: LFRFIDWorkerReadCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Start write mode\n\n # Arguments\n\n* `worker` - The worker\n * `protocol` - The protocol\n * `callback` - The callback\n * `context` - The context"]
    pub fn lfrfid_worker_write_start(
        worker: *mut LFRFIDWorker,
        protocol: LFRFIDProtocol,
        callback: LFRFIDWorkerWriteCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Start emulate mode\n\n # Arguments\n\n* `worker` - The worker\n * `protocol` (direction in) - The protocol"]
    pub fn lfrfid_worker_emulate_start(worker: *mut LFRFIDWorker, protocol: LFRFIDProtocol);
}
extern "C" {
    #[doc = "Start raw read mode\n\n # Arguments\n\n* `worker` - The worker\n * `filename` - The filename\n * `type` - The type\n * `callback` - The callback\n * `context` - The context"]
    pub fn lfrfid_worker_read_raw_start(
        worker: *mut LFRFIDWorker,
        filename: *const core::ffi::c_char,
        type_: LFRFIDWorkerReadType,
        callback: LFRFIDWorkerReadRawCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Emulate raw read mode\n\n # Arguments\n\n* `worker` - The worker\n * `filename` - The filename\n * `callback` - The callback\n * `context` - The context"]
    pub fn lfrfid_worker_emulate_raw_start(
        worker: *mut LFRFIDWorker,
        filename: *const core::ffi::c_char,
        callback: LFRFIDWorkerEmulateRawCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Stop all modes\n\n # Arguments\n\n* `worker` - The worker"]
    pub fn lfrfid_worker_stop(worker: *mut LFRFIDWorker);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LFRFIDRawWorker {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate a new LFRFIDRawWorker instance\n\n # Returns\n\nLFRFIDRawWorker*"]
    pub fn lfrfid_raw_worker_alloc() -> *mut LFRFIDRawWorker;
}
extern "C" {
    #[doc = "Free a LFRFIDRawWorker instance\n\n # Arguments\n\n* `worker` - LFRFIDRawWorker instance"]
    pub fn lfrfid_raw_worker_free(worker: *mut LFRFIDRawWorker);
}
extern "C" {
    #[doc = "Start reading\n\n # Arguments\n\n* `worker` - LFRFIDRawWorker instance\n * `file_path` - path where file will be saved\n * `frequency` - HW frequency\n * `duty_cycle` - HW duty cycle\n * `callback` - callback for read event\n * `context` - context for callback"]
    pub fn lfrfid_raw_worker_start_read(
        worker: *mut LFRFIDRawWorker,
        file_path: *const core::ffi::c_char,
        frequency: f32,
        duty_cycle: f32,
        callback: LFRFIDWorkerReadRawCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Start emulate\n\n # Arguments\n\n* `worker` - LFRFIDRawWorker instance\n * `file_path` - path to file that will be emulated\n * `callback` - callback for emulate event\n * `context` - context for callback"]
    pub fn lfrfid_raw_worker_start_emulate(
        worker: *mut LFRFIDRawWorker,
        file_path: *const core::ffi::c_char,
        callback: LFRFIDWorkerEmulateRawCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Stop worker\n\n # Arguments\n\n* `worker` -"]
    pub fn lfrfid_raw_worker_stop(worker: *mut LFRFIDRawWorker);
}
#[doc = "Line Coding Structure"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct usb_cdc_line_coding {
    #[doc = "<Data terminal rate, in bits per second."]
    pub dwDTERate: u32,
    #[doc = "<Stop bits."]
    pub bCharFormat: u8,
    #[doc = "<Parity."]
    pub bParityType: u8,
    #[doc = "<Data bits (5,6,7,8 or 16)."]
    pub bDataBits: u8,
}
#[test]
fn bindgen_test_layout_usb_cdc_line_coding() {
    const UNINIT: ::core::mem::MaybeUninit<usb_cdc_line_coding> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<usb_cdc_line_coding>(),
        7usize,
        concat!("Size of: ", stringify!(usb_cdc_line_coding))
    );
    assert_eq!(
        ::core::mem::align_of::<usb_cdc_line_coding>(),
        1usize,
        concat!("Alignment of ", stringify!(usb_cdc_line_coding))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).dwDTERate) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_cdc_line_coding),
            "::",
            stringify!(dwDTERate)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bCharFormat) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_cdc_line_coding),
            "::",
            stringify!(bCharFormat)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bParityType) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_cdc_line_coding),
            "::",
            stringify!(bParityType)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bDataBits) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(usb_cdc_line_coding),
            "::",
            stringify!(bDataBits)
        )
    );
}
#[doc = "Triple-DES context structure\n\n DES/3DES are considered weak ciphers and their use constitutes a\n security risk. We recommend considering stronger ciphers\n instead."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mbedtls_des3_context {
    #[doc = "< 3DES subkeys"]
    pub private_sk: [u32; 96usize],
}
#[test]
fn bindgen_test_layout_mbedtls_des3_context() {
    const UNINIT: ::core::mem::MaybeUninit<mbedtls_des3_context> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<mbedtls_des3_context>(),
        384usize,
        concat!("Size of: ", stringify!(mbedtls_des3_context))
    );
    assert_eq!(
        ::core::mem::align_of::<mbedtls_des3_context>(),
        4usize,
        concat!("Alignment of ", stringify!(mbedtls_des3_context))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).private_sk) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(mbedtls_des3_context),
            "::",
            stringify!(private_sk)
        )
    );
}
pub type mjs_val_t = u64;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mjs {
    _unused: [u8; 0],
}
pub const mjs_err_MJS_OK: mjs_err = 0;
pub const mjs_err_MJS_SYNTAX_ERROR: mjs_err = 1;
pub const mjs_err_MJS_REFERENCE_ERROR: mjs_err = 2;
pub const mjs_err_MJS_TYPE_ERROR: mjs_err = 3;
pub const mjs_err_MJS_OUT_OF_MEMORY: mjs_err = 4;
pub const mjs_err_MJS_INTERNAL_ERROR: mjs_err = 5;
pub const mjs_err_MJS_NOT_IMPLEMENTED_ERROR: mjs_err = 6;
pub const mjs_err_MJS_FILE_READ_ERROR: mjs_err = 7;
pub const mjs_err_MJS_BAD_ARGS_ERROR: mjs_err = 8;
pub const mjs_err_MJS_NEED_EXIT: mjs_err = 9;
pub const mjs_err_MJS_ERRS_CNT: mjs_err = 10;
pub type mjs_err = core::ffi::c_uchar;
pub use self::mjs_err as mjs_err_t;
pub type mjs_flags_poller_t = ::core::option::Option<unsafe extern "C" fn(mjs: *mut mjs)>;
extern "C" {
    pub fn mjs_create(context: *mut core::ffi::c_void) -> *mut mjs;
}
extern "C" {
    pub fn mjs_destroy(mjs: *mut mjs);
}
extern "C" {
    pub fn mjs_get_global(mjs: *mut mjs) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_own(mjs: *mut mjs, v: *mut mjs_val_t);
}
extern "C" {
    pub fn mjs_disown(mjs: *mut mjs, v: *mut mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_set_errorf(
        mjs: *mut mjs,
        err: mjs_err_t,
        fmt: *const core::ffi::c_char,
        ...
    ) -> mjs_err_t;
}
extern "C" {
    pub fn mjs_exit(mjs: *mut mjs);
}
extern "C" {
    pub fn mjs_set_exec_flags_poller(mjs: *mut mjs, poller: mjs_flags_poller_t);
}
extern "C" {
    pub fn mjs_get_context(mjs: *mut mjs) -> *mut core::ffi::c_void;
}
extern "C" {
    pub fn mjs_prepend_errorf(
        mjs: *mut mjs,
        err: mjs_err_t,
        fmt: *const core::ffi::c_char,
        ...
    ) -> mjs_err_t;
}
extern "C" {
    pub fn mjs_strerror(mjs: *mut mjs, err: mjs_err) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn mjs_get_stack_trace(mjs: *mut mjs) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn mjs_nargs(mjs: *mut mjs) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_arg(mjs: *mut mjs, n: core::ffi::c_int) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_return(mjs: *mut mjs, v: mjs_val_t);
}
extern "C" {
    pub fn mjs_is_array_buf(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_is_data_view(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_is_typed_array(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_mk_array_buf(
        mjs: *mut mjs,
        data: *mut core::ffi::c_char,
        buf_len: usize,
    ) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_array_buf_get_ptr(
        mjs: *mut mjs,
        buf: mjs_val_t,
        bytelen: *mut usize,
    ) -> *mut core::ffi::c_char;
}
extern "C" {
    pub fn mjs_dataview_get_buf(mjs: *mut mjs, obj: mjs_val_t) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_mk_array(mjs: *mut mjs) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_array_length(mjs: *mut mjs, arr: mjs_val_t) -> core::ffi::c_ulong;
}
extern "C" {
    pub fn mjs_array_push(mjs: *mut mjs, arr: mjs_val_t, v: mjs_val_t) -> mjs_err_t;
}
extern "C" {
    pub fn mjs_array_get(arg1: *mut mjs, arr: mjs_val_t, index: core::ffi::c_ulong) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_array_set(
        mjs: *mut mjs,
        arr: mjs_val_t,
        index: core::ffi::c_ulong,
        v: mjs_val_t,
    ) -> mjs_err_t;
}
extern "C" {
    pub fn mjs_is_array(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_array_del(mjs: *mut mjs, arr: mjs_val_t, index: core::ffi::c_ulong);
}
extern "C" {
    pub fn mjs_exec(
        arg1: *mut mjs,
        src: *const core::ffi::c_char,
        res: *mut mjs_val_t,
    ) -> mjs_err_t;
}
extern "C" {
    pub fn mjs_exec_file(
        mjs: *mut mjs,
        path: *const core::ffi::c_char,
        res: *mut mjs_val_t,
    ) -> mjs_err_t;
}
extern "C" {
    pub fn mjs_apply(
        mjs: *mut mjs,
        res: *mut mjs_val_t,
        func: mjs_val_t,
        this_val: mjs_val_t,
        nargs: core::ffi::c_int,
        args: *mut mjs_val_t,
    ) -> mjs_err_t;
}
extern "C" {
    pub fn mjs_call(
        mjs: *mut mjs,
        res: *mut mjs_val_t,
        func: mjs_val_t,
        this_val: mjs_val_t,
        nargs: core::ffi::c_int,
        ...
    ) -> mjs_err_t;
}
extern "C" {
    pub fn mjs_get_this(mjs: *mut mjs) -> mjs_val_t;
}
pub type mjs_ffi_resolver_t = ::core::option::Option<
    unsafe extern "C" fn(
        handle: *mut core::ffi::c_void,
        symbol: *const core::ffi::c_char,
    ) -> *mut core::ffi::c_void,
>;
extern "C" {
    pub fn mjs_set_ffi_resolver(
        mjs: *mut mjs,
        dlsym: mjs_ffi_resolver_t,
        handle: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn mjs_ffi_resolve(
        mjs: *mut mjs,
        symbol: *const core::ffi::c_char,
    ) -> *mut core::ffi::c_void;
}
extern "C" {
    pub fn mjs_is_object(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_is_object_based(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_mk_object(mjs: *mut mjs) -> mjs_val_t;
}
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_INVALID: mjs_struct_field_type = 0;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_STRUCT: mjs_struct_field_type = 1;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_STRUCT_PTR: mjs_struct_field_type = 2;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_INT: mjs_struct_field_type = 3;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_BOOL: mjs_struct_field_type = 4;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_DOUBLE: mjs_struct_field_type = 5;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_FLOAT: mjs_struct_field_type = 6;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_CHAR_PTR: mjs_struct_field_type = 7;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_VOID_PTR: mjs_struct_field_type = 8;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_MG_STR_PTR: mjs_struct_field_type = 9;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_MG_STR: mjs_struct_field_type = 10;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_DATA: mjs_struct_field_type = 11;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_INT8: mjs_struct_field_type = 12;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_INT16: mjs_struct_field_type = 13;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_UINT8: mjs_struct_field_type = 14;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_UINT16: mjs_struct_field_type = 15;
pub const mjs_struct_field_type_MJS_STRUCT_FIELD_TYPE_CUSTOM: mjs_struct_field_type = 16;
pub type mjs_struct_field_type = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mjs_c_struct_member {
    pub name: *const core::ffi::c_char,
    pub offset: core::ffi::c_int,
    pub type_: mjs_struct_field_type,
    pub arg: *const core::ffi::c_void,
}
#[test]
fn bindgen_test_layout_mjs_c_struct_member() {
    const UNINIT: ::core::mem::MaybeUninit<mjs_c_struct_member> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<mjs_c_struct_member>(),
        16usize,
        concat!("Size of: ", stringify!(mjs_c_struct_member))
    );
    assert_eq!(
        ::core::mem::align_of::<mjs_c_struct_member>(),
        4usize,
        concat!("Alignment of ", stringify!(mjs_c_struct_member))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(mjs_c_struct_member),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).offset) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(mjs_c_struct_member),
            "::",
            stringify!(offset)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(mjs_c_struct_member),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).arg) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(mjs_c_struct_member),
            "::",
            stringify!(arg)
        )
    );
}
extern "C" {
    pub fn mjs_struct_to_obj(
        mjs: *mut mjs,
        base: *const core::ffi::c_void,
        members: *const mjs_c_struct_member,
    ) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_get(
        mjs: *mut mjs,
        obj: mjs_val_t,
        name: *const core::ffi::c_char,
        name_len: usize,
    ) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_get_v(mjs: *mut mjs, obj: mjs_val_t, name: mjs_val_t) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_get_v_proto(mjs: *mut mjs, obj: mjs_val_t, key: mjs_val_t) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_set(
        mjs: *mut mjs,
        obj: mjs_val_t,
        name: *const core::ffi::c_char,
        len: usize,
        val: mjs_val_t,
    ) -> mjs_err_t;
}
extern "C" {
    pub fn mjs_set_v(mjs: *mut mjs, obj: mjs_val_t, name: mjs_val_t, val: mjs_val_t) -> mjs_err_t;
}
extern "C" {
    pub fn mjs_del(
        mjs: *mut mjs,
        obj: mjs_val_t,
        name: *const core::ffi::c_char,
        len: usize,
    ) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_next(mjs: *mut mjs, obj: mjs_val_t, iterator: *mut mjs_val_t) -> mjs_val_t;
}
pub type mjs_func_ptr_t = ::core::option::Option<unsafe extern "C" fn()>;
extern "C" {
    pub fn mjs_mk_null() -> mjs_val_t;
}
extern "C" {
    pub fn mjs_is_null(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_mk_undefined() -> mjs_val_t;
}
extern "C" {
    pub fn mjs_is_undefined(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_mk_number(mjs: *mut mjs, num: f64) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_get_double(mjs: *mut mjs, v: mjs_val_t) -> f64;
}
extern "C" {
    pub fn mjs_get_int(mjs: *mut mjs, v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_get_int32(mjs: *mut mjs, v: mjs_val_t) -> i32;
}
extern "C" {
    pub fn mjs_is_number(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_mk_foreign(mjs: *mut mjs, ptr: *mut core::ffi::c_void) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_mk_foreign_func(mjs: *mut mjs, fn_: mjs_func_ptr_t) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_get_ptr(mjs: *mut mjs, v: mjs_val_t) -> *mut core::ffi::c_void;
}
extern "C" {
    pub fn mjs_is_foreign(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_mk_boolean(mjs: *mut mjs, v: core::ffi::c_int) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_get_bool(mjs: *mut mjs, v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_is_boolean(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_mk_function(mjs: *mut mjs, off: usize) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_is_function(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_mk_string(
        mjs: *mut mjs,
        str_: *const core::ffi::c_char,
        len: usize,
        copy: core::ffi::c_int,
    ) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_is_string(v: mjs_val_t) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_get_string(
        mjs: *mut mjs,
        v: *mut mjs_val_t,
        len: *mut usize,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn mjs_get_cstring(mjs: *mut mjs, v: *mut mjs_val_t) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn mjs_strcmp(
        mjs: *mut mjs,
        a: *mut mjs_val_t,
        b: *const core::ffi::c_char,
        len: usize,
    ) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_typeof(v: mjs_val_t) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn mjs_sprintf(v: mjs_val_t, mjs: *mut mjs, buf: *mut core::ffi::c_char, buflen: usize);
}
extern "C" {
    pub fn mjs_get_lineno_by_offset(mjs: *mut mjs, offset: core::ffi::c_int) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_get_offset_by_call_frame_num(
        mjs: *mut mjs,
        cf_num: core::ffi::c_int,
    ) -> core::ffi::c_int;
}
extern "C" {
    pub fn mjs_to_string(
        mjs: *mut mjs,
        v: *mut mjs_val_t,
        p: *mut *mut core::ffi::c_char,
        sizep: *mut usize,
        need_free: *mut core::ffi::c_int,
    ) -> mjs_err_t;
}
extern "C" {
    pub fn mjs_to_boolean_v(mjs: *mut mjs, v: mjs_val_t) -> mjs_val_t;
}
extern "C" {
    pub fn mjs_is_truthy(mjs: *mut mjs, v: mjs_val_t) -> core::ffi::c_int;
}
pub type pb_type_t = uint_least8_t;
pub type pb_size_t = uint_least16_t;
pub type pb_byte_t = uint_least8_t;
pub type pb_istream_t = pb_istream_s;
pub type pb_ostream_t = pb_ostream_s;
pub type pb_field_iter_t = pb_field_iter_s;
pub type pb_msgdesc_t = pb_msgdesc_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pb_msgdesc_s {
    pub field_info: *const u32,
    pub submsg_info: *const *const pb_msgdesc_t,
    pub default_value: *const pb_byte_t,
    pub field_callback: ::core::option::Option<
        unsafe extern "C" fn(
            istream: *mut pb_istream_t,
            ostream: *mut pb_ostream_t,
            field: *const pb_field_iter_t,
        ) -> bool,
    >,
    pub field_count: pb_size_t,
    pub required_field_count: pb_size_t,
    pub largest_tag: pb_size_t,
}
#[test]
fn bindgen_test_layout_pb_msgdesc_s() {
    const UNINIT: ::core::mem::MaybeUninit<pb_msgdesc_s> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<pb_msgdesc_s>(),
        24usize,
        concat!("Size of: ", stringify!(pb_msgdesc_s))
    );
    assert_eq!(
        ::core::mem::align_of::<pb_msgdesc_s>(),
        4usize,
        concat!("Alignment of ", stringify!(pb_msgdesc_s))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).field_info) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_msgdesc_s),
            "::",
            stringify!(field_info)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).submsg_info) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_msgdesc_s),
            "::",
            stringify!(submsg_info)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).default_value) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_msgdesc_s),
            "::",
            stringify!(default_value)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).field_callback) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_msgdesc_s),
            "::",
            stringify!(field_callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).field_count) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_msgdesc_s),
            "::",
            stringify!(field_count)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).required_field_count) as usize - ptr as usize },
        18usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_msgdesc_s),
            "::",
            stringify!(required_field_count)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).largest_tag) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_msgdesc_s),
            "::",
            stringify!(largest_tag)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pb_field_iter_s {
    pub descriptor: *const pb_msgdesc_t,
    pub message: *mut core::ffi::c_void,
    pub index: pb_size_t,
    pub field_info_index: pb_size_t,
    pub required_field_index: pb_size_t,
    pub submessage_index: pb_size_t,
    pub tag: pb_size_t,
    pub data_size: pb_size_t,
    pub array_size: pb_size_t,
    pub type_: pb_type_t,
    pub pField: *mut core::ffi::c_void,
    pub pData: *mut core::ffi::c_void,
    pub pSize: *mut core::ffi::c_void,
    pub submsg_desc: *const pb_msgdesc_t,
}
#[test]
fn bindgen_test_layout_pb_field_iter_s() {
    const UNINIT: ::core::mem::MaybeUninit<pb_field_iter_s> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<pb_field_iter_s>(),
        40usize,
        concat!("Size of: ", stringify!(pb_field_iter_s))
    );
    assert_eq!(
        ::core::mem::align_of::<pb_field_iter_s>(),
        4usize,
        concat!("Alignment of ", stringify!(pb_field_iter_s))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).descriptor) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(descriptor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).message) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(message)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).index) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(index)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).field_info_index) as usize - ptr as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(field_info_index)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).required_field_index) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(required_field_index)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).submessage_index) as usize - ptr as usize },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(submessage_index)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).tag) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(tag)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data_size) as usize - ptr as usize },
        18usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(data_size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).array_size) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(array_size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        22usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pField) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(pField)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pData) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(pData)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pSize) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(pSize)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).submsg_desc) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_field_iter_s),
            "::",
            stringify!(submsg_desc)
        )
    );
}
pub type pb_field_t = pb_field_iter_t;
extern "C" {
    pub fn pb_default_field_callback(
        istream: *mut pb_istream_t,
        ostream: *mut pb_ostream_t,
        field: *const pb_field_t,
    ) -> bool;
}
pub const pb_wire_type_t_PB_WT_VARINT: pb_wire_type_t = 0;
pub const pb_wire_type_t_PB_WT_64BIT: pb_wire_type_t = 1;
pub const pb_wire_type_t_PB_WT_STRING: pb_wire_type_t = 2;
pub const pb_wire_type_t_PB_WT_32BIT: pb_wire_type_t = 5;
pub const pb_wire_type_t_PB_WT_PACKED: pb_wire_type_t = 255;
pub type pb_wire_type_t = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pb_istream_s {
    pub callback: ::core::option::Option<
        unsafe extern "C" fn(stream: *mut pb_istream_t, buf: *mut pb_byte_t, count: usize) -> bool,
    >,
    pub state: *mut core::ffi::c_void,
    pub bytes_left: usize,
    pub errmsg: *const core::ffi::c_char,
}
#[test]
fn bindgen_test_layout_pb_istream_s() {
    const UNINIT: ::core::mem::MaybeUninit<pb_istream_s> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<pb_istream_s>(),
        16usize,
        concat!("Size of: ", stringify!(pb_istream_s))
    );
    assert_eq!(
        ::core::mem::align_of::<pb_istream_s>(),
        4usize,
        concat!("Alignment of ", stringify!(pb_istream_s))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_istream_s),
            "::",
            stringify!(callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_istream_s),
            "::",
            stringify!(state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bytes_left) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_istream_s),
            "::",
            stringify!(bytes_left)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).errmsg) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_istream_s),
            "::",
            stringify!(errmsg)
        )
    );
}
extern "C" {
    pub fn pb_decode(
        stream: *mut pb_istream_t,
        fields: *const pb_msgdesc_t,
        dest_struct: *mut core::ffi::c_void,
    ) -> bool;
}
extern "C" {
    pub fn pb_decode_ex(
        stream: *mut pb_istream_t,
        fields: *const pb_msgdesc_t,
        dest_struct: *mut core::ffi::c_void,
        flags: core::ffi::c_uint,
    ) -> bool;
}
extern "C" {
    pub fn pb_release(fields: *const pb_msgdesc_t, dest_struct: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Functions for manipulating streams *"]
    pub fn pb_istream_from_buffer(buf: *const pb_byte_t, msglen: usize) -> pb_istream_t;
}
extern "C" {
    pub fn pb_read(stream: *mut pb_istream_t, buf: *mut pb_byte_t, count: usize) -> bool;
}
extern "C" {
    #[doc = "Helper functions for writing field callbacks *"]
    pub fn pb_decode_tag(
        stream: *mut pb_istream_t,
        wire_type: *mut pb_wire_type_t,
        tag: *mut u32,
        eof: *mut bool,
    ) -> bool;
}
extern "C" {
    pub fn pb_skip_field(stream: *mut pb_istream_t, wire_type: pb_wire_type_t) -> bool;
}
extern "C" {
    pub fn pb_decode_varint(stream: *mut pb_istream_t, dest: *mut u64) -> bool;
}
extern "C" {
    pub fn pb_decode_varint32(stream: *mut pb_istream_t, dest: *mut u32) -> bool;
}
extern "C" {
    pub fn pb_decode_bool(stream: *mut pb_istream_t, dest: *mut bool) -> bool;
}
extern "C" {
    pub fn pb_decode_svarint(stream: *mut pb_istream_t, dest: *mut i64) -> bool;
}
extern "C" {
    pub fn pb_decode_fixed32(stream: *mut pb_istream_t, dest: *mut core::ffi::c_void) -> bool;
}
extern "C" {
    pub fn pb_decode_fixed64(stream: *mut pb_istream_t, dest: *mut core::ffi::c_void) -> bool;
}
extern "C" {
    pub fn pb_make_string_substream(
        stream: *mut pb_istream_t,
        substream: *mut pb_istream_t,
    ) -> bool;
}
extern "C" {
    pub fn pb_close_string_substream(
        stream: *mut pb_istream_t,
        substream: *mut pb_istream_t,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pb_ostream_s {
    pub callback: ::core::option::Option<
        unsafe extern "C" fn(
            stream: *mut pb_ostream_t,
            buf: *const pb_byte_t,
            count: usize,
        ) -> bool,
    >,
    pub state: *mut core::ffi::c_void,
    pub max_size: usize,
    pub bytes_written: usize,
    pub errmsg: *const core::ffi::c_char,
}
#[test]
fn bindgen_test_layout_pb_ostream_s() {
    const UNINIT: ::core::mem::MaybeUninit<pb_ostream_s> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<pb_ostream_s>(),
        20usize,
        concat!("Size of: ", stringify!(pb_ostream_s))
    );
    assert_eq!(
        ::core::mem::align_of::<pb_ostream_s>(),
        4usize,
        concat!("Alignment of ", stringify!(pb_ostream_s))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_ostream_s),
            "::",
            stringify!(callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_ostream_s),
            "::",
            stringify!(state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).max_size) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_ostream_s),
            "::",
            stringify!(max_size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bytes_written) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_ostream_s),
            "::",
            stringify!(bytes_written)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).errmsg) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(pb_ostream_s),
            "::",
            stringify!(errmsg)
        )
    );
}
extern "C" {
    pub fn pb_encode(
        stream: *mut pb_ostream_t,
        fields: *const pb_msgdesc_t,
        src_struct: *const core::ffi::c_void,
    ) -> bool;
}
extern "C" {
    pub fn pb_encode_ex(
        stream: *mut pb_ostream_t,
        fields: *const pb_msgdesc_t,
        src_struct: *const core::ffi::c_void,
        flags: core::ffi::c_uint,
    ) -> bool;
}
extern "C" {
    pub fn pb_get_encoded_size(
        size: *mut usize,
        fields: *const pb_msgdesc_t,
        src_struct: *const core::ffi::c_void,
    ) -> bool;
}
extern "C" {
    #[doc = "Functions for manipulating streams *"]
    pub fn pb_ostream_from_buffer(buf: *mut pb_byte_t, bufsize: usize) -> pb_ostream_t;
}
extern "C" {
    pub fn pb_write(stream: *mut pb_ostream_t, buf: *const pb_byte_t, count: usize) -> bool;
}
extern "C" {
    #[doc = "Helper functions for writing field callbacks *"]
    pub fn pb_encode_tag_for_field(
        stream: *mut pb_ostream_t,
        field: *const pb_field_iter_t,
    ) -> bool;
}
extern "C" {
    pub fn pb_encode_tag(
        stream: *mut pb_ostream_t,
        wiretype: pb_wire_type_t,
        field_number: u32,
    ) -> bool;
}
extern "C" {
    pub fn pb_encode_varint(stream: *mut pb_ostream_t, value: u64) -> bool;
}
extern "C" {
    pub fn pb_encode_svarint(stream: *mut pb_ostream_t, value: i64) -> bool;
}
extern "C" {
    pub fn pb_encode_string(
        stream: *mut pb_ostream_t,
        buffer: *const pb_byte_t,
        size: usize,
    ) -> bool;
}
extern "C" {
    pub fn pb_encode_fixed32(stream: *mut pb_ostream_t, value: *const core::ffi::c_void) -> bool;
}
extern "C" {
    pub fn pb_encode_fixed64(stream: *mut pb_ostream_t, value: *const core::ffi::c_void) -> bool;
}
extern "C" {
    pub fn pb_encode_submessage(
        stream: *mut pb_ostream_t,
        fields: *const pb_msgdesc_t,
        src_struct: *const core::ffi::c_void,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BitBuffer {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate a BitBuffer instance.\n\n # Arguments\n\n* `[in]` - capacity_bytes maximum buffer capacity, in bytes\n # Returns\n\npointer to the allocated BitBuffer instance"]
    pub fn bit_buffer_alloc(capacity_bytes: usize) -> *mut BitBuffer;
}
extern "C" {
    #[doc = "Delete a BitBuffer instance.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance"]
    pub fn bit_buffer_free(buf: *mut BitBuffer);
}
extern "C" {
    #[doc = "Clear all data from a BitBuffer instance.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance"]
    pub fn bit_buffer_reset(buf: *mut BitBuffer);
}
extern "C" {
    #[doc = "Copy another BitBuffer instance's contents to this one, replacing\n all of the original data.\n The destination capacity must be no less than the source data size.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to copy into\n * `[in]` - other pointer to a BitBuffer instance to copy from\n > **Note:** "]
    pub fn bit_buffer_copy(buf: *mut BitBuffer, other: *const BitBuffer);
}
extern "C" {
    #[doc = "Copy all BitBuffer instance's contents to this one, starting from start_index,\n replacing all of the original data.\n The destination capacity must be no less than the source data size\n counting from start_index.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to copy into\n * `[in]` - other pointer to a BitBuffer instance to copy from\n * `[in]` - start_index index to begin copying source data from"]
    pub fn bit_buffer_copy_right(buf: *mut BitBuffer, other: *const BitBuffer, start_index: usize);
}
extern "C" {
    #[doc = "Copy all BitBuffer instance's contents to this one, ending with end_index,\n replacing all of the original data.\n The destination capacity must be no less than the source data size\n counting to end_index.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to copy into\n * `[in]` - other pointer to a BitBuffer instance to copy from\n * `[in]` - end_index index to end copying source data at"]
    pub fn bit_buffer_copy_left(buf: *mut BitBuffer, other: *const BitBuffer, end_index: usize);
}
extern "C" {
    #[doc = "Copy a byte array to a BitBuffer instance, replacing all of the original data.\n The destination capacity must be no less than the source data size.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to copy into\n * `[in]` - data pointer to the byte array to be copied\n * `[in]` - size_bytes size of the data to be copied, in bytes"]
    pub fn bit_buffer_copy_bytes(buf: *mut BitBuffer, data: *const u8, size_bytes: usize);
}
extern "C" {
    #[doc = "Copy a byte array to a BitBuffer instance, replacing all of the original data.\n The destination capacity must be no less than the source data size.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to copy into\n * `[in]` - data pointer to the byte array to be copied\n * `[in]` - size_bits size of the data to be copied, in bits"]
    pub fn bit_buffer_copy_bits(buf: *mut BitBuffer, data: *const u8, size_bits: usize);
}
extern "C" {
    #[doc = "Copy a byte with parity array to a BitBuffer instance, replacing all of the original data.\n The destination capacity must be no less than the source data size.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to copy into\n * `[in]` - data pointer to the byte array to be copied\n * `[in]` - size_bitss size of the data to be copied, in bits"]
    pub fn bit_buffer_copy_bytes_with_parity(
        buf: *mut BitBuffer,
        data: *const u8,
        size_bits: usize,
    );
}
extern "C" {
    #[doc = "Write a BitBuffer instance's entire contents to an arbitrary memory location.\n The destination memory must be allocated. Additionally, the destination\n capacity must be no less than the source data size.\n\n # Arguments\n\n* `[in]` - buf pointer to a BitBuffer instance to write from\n * `[out]` - dest pointer to the destination memory location\n * `[in]` - size_bytes maximum destination data size, in bytes"]
    pub fn bit_buffer_write_bytes(
        buf: *const BitBuffer,
        dest: *mut core::ffi::c_void,
        size_bytes: usize,
    );
}
extern "C" {
    #[doc = "Write a BitBuffer instance's entire contents to an arbitrary memory location.\n Additionally, place a parity bit after each byte.\n The destination memory must be allocated. Additionally, the destination\n capacity must be no less than the source data size plus parity.\n\n # Arguments\n\n* `[in]` - buf pointer to a BitBuffer instance to write from\n * `[out]` - dest pointer to the destination memory location\n * `[in]` - size_bytes maximum destination data size, in bytes\n * `[out]` - bits_written actual number of bits writen, in bits"]
    pub fn bit_buffer_write_bytes_with_parity(
        buf: *const BitBuffer,
        dest: *mut core::ffi::c_void,
        size_bytes: usize,
        bits_written: *mut usize,
    );
}
extern "C" {
    #[doc = "Write a slice of BitBuffer instance's contents to an arbitrary memory location.\n The destination memory must be allocated. Additionally, the destination\n capacity must be no less than the requested slice size.\n\n # Arguments\n\n* `[in]` - buf pointer to a BitBuffer instance to write from\n * `[out]` - dest pointer to the destination memory location\n * `[in]` - start_index index to begin copying source data from\n * `[in]` - size_bytes data slice size, in bytes"]
    pub fn bit_buffer_write_bytes_mid(
        buf: *const BitBuffer,
        dest: *mut core::ffi::c_void,
        start_index: usize,
        size_bytes: usize,
    );
}
extern "C" {
    #[doc = "Check whether a BitBuffer instance contains a partial byte (i.e. the bit count\n is not divisible by 8).\n\n # Arguments\n\n* `[in]` - buf pointer to a BitBuffer instance to be checked\n # Returns\n\ntrue if the instance contains a partial byte, false otherwise"]
    pub fn bit_buffer_has_partial_byte(buf: *const BitBuffer) -> bool;
}
extern "C" {
    #[doc = "Check whether a BitBuffer instance's contents start with the designated byte.\n\n # Arguments\n\n* `[in]` - buf pointer to a BitBuffer instance to be checked\n * `[in]` - byte byte value to be checked against\n # Returns\n\ntrue if data starts with designated byte, false otherwise"]
    pub fn bit_buffer_starts_with_byte(buf: *const BitBuffer, byte: u8) -> bool;
}
extern "C" {
    #[doc = "Get a BitBuffer instance's capacity (i.e. the maximum possible amount of data), in bytes.\n\n # Arguments\n\n* `[in]` - buf pointer to a BitBuffer instance to be queried\n # Returns\n\ncapacity, in bytes"]
    pub fn bit_buffer_get_capacity_bytes(buf: *const BitBuffer) -> usize;
}
extern "C" {
    #[doc = "Get a BitBuffer instance's data size (i.e. the amount of stored data), in bits.\n Might be not divisible by 8 (see bit_buffer_is_partial_byte).\n\n # Arguments\n\n* `[in]` - buf pointer to a BitBuffer instance to be queried\n # Returns\n\ndata size, in bits."]
    pub fn bit_buffer_get_size(buf: *const BitBuffer) -> usize;
}
extern "C" {
    #[doc = "Get a BitBuffer instance's data size (i.e. the amount of stored data), in bytes.\n If a partial byte is present, it is also counted.\n\n # Arguments\n\n* `[in]` - buf pointer to a BitBuffer instance to be queried\n # Returns\n\ndata size, in bytes."]
    pub fn bit_buffer_get_size_bytes(buf: *const BitBuffer) -> usize;
}
extern "C" {
    #[doc = "Get a byte value at a specified index in a BitBuffer instance.\n The index must be valid (i.e. less than the instance's data size in bytes).\n\n # Arguments\n\n* `[in]` - buf pointer to a BitBuffer instance to be queried\n * `[in]` - index index of the byte in question"]
    pub fn bit_buffer_get_byte(buf: *const BitBuffer, index: usize) -> u8;
}
extern "C" {
    #[doc = "Get a byte value starting from the specified bit index in a BitBuffer instance.\n The resulting byte might correspond to a single byte (if the index is a multiple\n of 8), or two overlapping bytes combined.\n The index must be valid (i.e. less than the instance's data size in bits).\n\n # Arguments\n\n* `[in]` - buf pointer to a BitBuffer instance to be queried\n * `[in]` - index bit index of the byte in question"]
    pub fn bit_buffer_get_byte_from_bit(buf: *const BitBuffer, index_bits: usize) -> u8;
}
extern "C" {
    #[doc = "Get the pointer to a BitBuffer instance's underlying data.\n\n # Arguments\n\n* `[in]` - buf pointer to a BitBuffer instance to be queried\n # Returns\n\npointer to the underlying data"]
    pub fn bit_buffer_get_data(buf: *const BitBuffer) -> *const u8;
}
extern "C" {
    #[doc = "Get the pointer to a BitBuffer instance's underlying data.\n\n # Arguments\n\n* `[in]` - buf pointer to a BitBuffer instance to be queried\n # Returns\n\npointer to the underlying data"]
    pub fn bit_buffer_get_parity(buf: *const BitBuffer) -> *const u8;
}
extern "C" {
    #[doc = "Set byte value at a specified index in a BitBuffer instance.\n The index must be valid (i.e. less than the instance's data size in bytes).\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to be modified\n * `[in]` - index index of the byte in question\n * `[in]` - byte byte value to be set at index"]
    pub fn bit_buffer_set_byte(buf: *mut BitBuffer, index: usize, byte: u8);
}
extern "C" {
    #[doc = "Set byte and parity bit value at a specified index in a BitBuffer instance.\n The index must be valid (i.e. less than the instance's data size in bytes).\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to be modified\n * `[in]` - index index of the byte in question\n * `[in]` - byte byte value to be set at index\n * `[in]` - parity parity bit value to be set at index"]
    pub fn bit_buffer_set_byte_with_parity(
        buff: *mut BitBuffer,
        index: usize,
        byte: u8,
        parity: bool,
    );
}
extern "C" {
    #[doc = "Resize a BitBuffer instance to a new size, in bits.\n May cause bugs. Use only if absolutely necessary.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to be resized\n * `[in]` - new_size the new size of the buffer, in bits"]
    pub fn bit_buffer_set_size(buf: *mut BitBuffer, new_size: usize);
}
extern "C" {
    #[doc = "Resize a BitBuffer instance to a new size, in bytes.\n May cause bugs. Use only if absolutely necessary.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to be resized\n * `[in]` - new_size_bytes the new size of the buffer, in bytes"]
    pub fn bit_buffer_set_size_bytes(buf: *mut BitBuffer, new_size_bytes: usize);
}
extern "C" {
    #[doc = "Append all BitBuffer's instance contents to this one. The destination capacity\n must be no less than its original data size plus source data size.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to be appended to\n * `[in]` - other pointer to a BitBuffer instance to be appended"]
    pub fn bit_buffer_append(buf: *mut BitBuffer, other: *const BitBuffer);
}
extern "C" {
    #[doc = "Append a BitBuffer's instance contents to this one, starting from start_index.\n The destination capacity must be no less than the source data size\n counting from start_index.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to be appended to\n * `[in]` - other pointer to a BitBuffer instance to be appended\n * `[in]` - start_index index to begin copying source data from"]
    pub fn bit_buffer_append_right(
        buf: *mut BitBuffer,
        other: *const BitBuffer,
        start_index: usize,
    );
}
extern "C" {
    #[doc = "Append a byte to a BitBuffer instance.\n The destination capacity must be no less its original data size plus one.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to be appended to\n * `[in]` - byte byte value to be appended"]
    pub fn bit_buffer_append_byte(buf: *mut BitBuffer, byte: u8);
}
extern "C" {
    #[doc = "Append a byte array to a BitBuffer instance.\n The destination capacity must be no less its original data size plus source data size.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to be appended to\n * `[in]` - data pointer to the byte array to be appended\n * `[in]` - size_bytes size of the data to be appended, in bytes"]
    pub fn bit_buffer_append_bytes(buf: *mut BitBuffer, data: *const u8, size_bytes: usize);
}
extern "C" {
    #[doc = "Append a bit to a BitBuffer instance.\n The destination capacity must be sufficient to accomodate the additional bit.\n\n # Arguments\n\n* `[in,out]` - buf pointer to a BitBuffer instance to be appended to\n * `[in]` - bit bit value to be appended"]
    pub fn bit_buffer_append_bit(buf: *mut BitBuffer, bit: bool);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Crypto1 {
    pub odd: u32,
    pub even: u32,
}
#[test]
fn bindgen_test_layout_Crypto1() {
    const UNINIT: ::core::mem::MaybeUninit<Crypto1> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<Crypto1>(),
        8usize,
        concat!("Size of: ", stringify!(Crypto1))
    );
    assert_eq!(
        ::core::mem::align_of::<Crypto1>(),
        4usize,
        concat!("Alignment of ", stringify!(Crypto1))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).odd) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Crypto1),
            "::",
            stringify!(odd)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).even) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(Crypto1),
            "::",
            stringify!(even)
        )
    );
}
extern "C" {
    pub fn crypto1_alloc() -> *mut Crypto1;
}
extern "C" {
    pub fn crypto1_free(instance: *mut Crypto1);
}
extern "C" {
    pub fn crypto1_reset(crypto1: *mut Crypto1);
}
extern "C" {
    pub fn crypto1_init(crypto1: *mut Crypto1, key: u64);
}
extern "C" {
    pub fn crypto1_bit(crypto1: *mut Crypto1, in_: u8, is_encrypted: core::ffi::c_int) -> u8;
}
extern "C" {
    pub fn crypto1_byte(crypto1: *mut Crypto1, in_: u8, is_encrypted: core::ffi::c_int) -> u8;
}
extern "C" {
    pub fn crypto1_word(crypto1: *mut Crypto1, in_: u32, is_encrypted: core::ffi::c_int) -> u32;
}
extern "C" {
    pub fn crypto1_decrypt(crypto: *mut Crypto1, buff: *const BitBuffer, out: *mut BitBuffer);
}
extern "C" {
    pub fn crypto1_encrypt(
        crypto: *mut Crypto1,
        keystream: *mut u8,
        buff: *const BitBuffer,
        out: *mut BitBuffer,
    );
}
extern "C" {
    pub fn crypto1_encrypt_reader_nonce(
        crypto: *mut Crypto1,
        key: u64,
        cuid: u32,
        nt: *mut u8,
        nr: *mut u8,
        out: *mut BitBuffer,
        is_nested: bool,
    );
}
extern "C" {
    pub fn prng_successor(x: u32, n: u32) -> u32;
}
pub const Iso13239CrcType_Iso13239CrcTypeDefault: Iso13239CrcType = 0;
pub const Iso13239CrcType_Iso13239CrcTypePicopass: Iso13239CrcType = 1;
pub type Iso13239CrcType = core::ffi::c_uchar;
extern "C" {
    pub fn iso13239_crc_append(type_: Iso13239CrcType, buf: *mut BitBuffer);
}
extern "C" {
    pub fn iso13239_crc_check(type_: Iso13239CrcType, buf: *const BitBuffer) -> bool;
}
extern "C" {
    pub fn iso13239_crc_trim(buf: *mut BitBuffer);
}
pub const Iso14443CrcType_Iso14443CrcTypeA: Iso14443CrcType = 0;
pub const Iso14443CrcType_Iso14443CrcTypeB: Iso14443CrcType = 1;
pub type Iso14443CrcType = core::ffi::c_uchar;
extern "C" {
    pub fn iso14443_crc_append(type_: Iso14443CrcType, buf: *mut BitBuffer);
}
extern "C" {
    pub fn iso14443_crc_check(type_: Iso14443CrcType, buf: *const BitBuffer) -> bool;
}
extern "C" {
    pub fn iso14443_crc_trim(buf: *mut BitBuffer);
}
#[doc = "< Display full(verbose) name."]
pub const NfcDeviceNameType_NfcDeviceNameTypeFull: NfcDeviceNameType = 0;
#[doc = "< Display shortened name."]
pub const NfcDeviceNameType_NfcDeviceNameTypeShort: NfcDeviceNameType = 1;
#[doc = "Verbosity level of the displayed NFC device name."]
pub type NfcDeviceNameType = core::ffi::c_uchar;
#[doc = "Generic opaque type for protocol-specific NFC device data."]
pub type NfcDeviceData = core::ffi::c_void;
pub const NfcProtocol_NfcProtocolIso14443_3a: NfcProtocol = 0;
pub const NfcProtocol_NfcProtocolIso14443_3b: NfcProtocol = 1;
pub const NfcProtocol_NfcProtocolIso14443_4a: NfcProtocol = 2;
pub const NfcProtocol_NfcProtocolIso14443_4b: NfcProtocol = 3;
pub const NfcProtocol_NfcProtocolIso15693_3: NfcProtocol = 4;
pub const NfcProtocol_NfcProtocolFelica: NfcProtocol = 5;
pub const NfcProtocol_NfcProtocolMfUltralight: NfcProtocol = 6;
pub const NfcProtocol_NfcProtocolMfClassic: NfcProtocol = 7;
pub const NfcProtocol_NfcProtocolMfPlus: NfcProtocol = 8;
pub const NfcProtocol_NfcProtocolMfDesfire: NfcProtocol = 9;
pub const NfcProtocol_NfcProtocolSlix: NfcProtocol = 10;
pub const NfcProtocol_NfcProtocolSt25tb: NfcProtocol = 11;
#[doc = "< Special value representing the number of available protocols."]
pub const NfcProtocol_NfcProtocolNum: NfcProtocol = 12;
#[doc = "< Special value representing an invalid state."]
pub const NfcProtocol_NfcProtocolInvalid: NfcProtocol = 13;
#[doc = "Enumeration of all available NFC protocols.\n\n When implementing a new protocol, add its identifier before the\n NfcProtocolNum entry."]
pub type NfcProtocol = core::ffi::c_uchar;
extern "C" {
    #[doc = "Get the immediate parent of a specific protocol.\n\n # Arguments\n\n* `protocol` (direction in) - identifier of the protocol in question.\n # Returns\n\nparent protocol identifier if it has one, or NfcProtocolInvalid otherwise."]
    pub fn nfc_protocol_get_parent(protocol: NfcProtocol) -> NfcProtocol;
}
extern "C" {
    #[doc = "Determine if a specific protocol has a parent on an arbitrary level.\n\n Unlike nfc_protocol_get_parent(), this function will traverse the full protocol hierarchy\n and check each parent node for the matching protocol type.\n\n # Arguments\n\n* `protocol` (direction in) - identifier of the protocol in question.\n * `parent_protocol` (direction in) - identifier of the parent protocol in question.\n # Returns\n\ntrue if the parent of given type exists, false otherwise."]
    pub fn nfc_protocol_has_parent(protocol: NfcProtocol, parent_protocol: NfcProtocol) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NfcDevice {
    _unused: [u8; 0],
}
#[doc = "Loading callback function signature.\n\n A function with such signature can be set as a callback to indicate\n the completion (or a failure) of nfc_device_load() and nfc_device_save() functions.\n\n This facility is commonly used to control GUI elements, such as progress dialogs.\n\n # Arguments\n\n* `context` (direction in) - user-defined context that was passed in nfc_device_set_loading_callback().\n * `state` (direction in) - true if the data was loaded successfully, false otherwise."]
pub type NfcLoadingCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void, state: bool)>;
extern "C" {
    #[doc = "Allocate an NfcDevice instance.\n\n A newly created instance does not hold any data and thus is considered invalid. The most common\n use case would be to set its data by calling nfc_device_set_data() right afterwards.\n\n # Returns\n\npointer to the allocated instance."]
    pub fn nfc_device_alloc() -> *mut NfcDevice;
}
extern "C" {
    #[doc = "Delete an NfcDevice instance.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be deleted."]
    pub fn nfc_device_free(instance: *mut NfcDevice);
}
extern "C" {
    #[doc = "Clear an NfcDevice instance.\n\n All data contained in the instance will be deleted and the instance itself will become invalid\n as if it was just allocated.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be cleared."]
    pub fn nfc_device_clear(instance: *mut NfcDevice);
}
extern "C" {
    #[doc = "Reset an NfcDevice instance.\n\n The data contained in the instance will be reset according to the protocol-defined procedure.\n Unlike the nfc_device_clear() function, the instance will remain valid.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be reset."]
    pub fn nfc_device_reset(instance: *mut NfcDevice);
}
extern "C" {
    #[doc = "Get the protocol identifier from an NfcDevice instance.\n\n If the instance is invalid, the return value will be NfcProtocolInvalid.\n\n # Arguments\n\n* `instance` (direction in) - pointer to the instance to be queried.\n # Returns\n\nprotocol identifier contained in the instance."]
    pub fn nfc_device_get_protocol(instance: *const NfcDevice) -> NfcProtocol;
}
extern "C" {
    #[doc = "Get the protocol-specific data from an NfcDevice instance.\n\n The protocol parameter's behaviour is a bit tricky. The function will check\n whether there is such a protocol somewhere in the protocol hierarchy and return\n the data exactly from that level.\n\n Example: Call nfc_device_get_data() on an instance with Mf DESFire protocol.\n The protocol hierarchy will look like the following:\n\n `Mf DESFire --> ISO14443-4A --> ISO14443-3A`\n\n Thus, the following values of the protocol parameter are valid:\n\n * NfcProtocolIso14443_3a\n * NfcProtocolIso14443_4a\n * NfcProtocolMfDesfire\n\n and passing them to the call would result in the respective data being returned.\n\n However, supplying a protocol identifier which is not in the hierarchy will\n result in a crash. This is to improve type safety.\n\n # Arguments\n\n* `instance` - pointer to the instance to be queried\n * `protocol` - protocol identifier of the data to be retrieved.\n # Returns\n\npointer to the instance's data."]
    pub fn nfc_device_get_data(
        instance: *const NfcDevice,
        protocol: NfcProtocol,
    ) -> *const NfcDeviceData;
}
extern "C" {
    #[doc = "Get the protocol name by its identifier.\n\n This function does not require an instance as its return result depends only\n the protocol identifier.\n\n # Arguments\n\n* `protocol` (direction in) - numeric identifier of the protocol in question.\n # Returns\n\npointer to a statically allocated string containing the protocol name."]
    pub fn nfc_device_get_protocol_name(protocol: NfcProtocol) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get the name of an NfcDevice instance.\n\n The return value may change depending on the instance's internal state and the name_type parameter.\n\n # Arguments\n\n* `instance` (direction in) - pointer to the instance to be queried.\n * `name_type` (direction in) - type of the name to be displayed.\n # Returns\n\npointer to a statically allocated string containing the device name."]
    pub fn nfc_device_get_name(
        instance: *const NfcDevice,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Get the unique identifier (UID) of an NfcDevice instance.\n\n The UID length is protocol-dependent. Additionally, a particular protocol might support\n several UID lengths.\n\n # Arguments\n\n* `instance` (direction in) - pointer to the instance to be queried.\n * `uid_len` (direction out) - pointer to the variable to contain the UID length.\n # Returns\n\npointer to the byte array containing the instance's UID."]
    pub fn nfc_device_get_uid(instance: *const NfcDevice, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    #[doc = "Set the unique identifier (UID) of an NfcDevice instance.\n\n The UID length must be supported by the instance's protocol.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be modified.\n * `uid` (direction in) - pointer to the byte array containing the new UID.\n * `uid_len` (direction in) - length of the UID.\n # Returns\n\ntrue if the UID was valid and set, false otherwise."]
    pub fn nfc_device_set_uid(instance: *mut NfcDevice, uid: *const u8, uid_len: usize) -> bool;
}
extern "C" {
    #[doc = "Set the data and protocol of an NfcDevice instance.\n\n Any data previously contained in the instance will be deleted.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be modified.\n * `protocol` (direction in) - numeric identifier of the data's protocol.\n * `protocol_data` (direction in) - pointer to the protocol-specific data."]
    pub fn nfc_device_set_data(
        instance: *mut NfcDevice,
        protocol: NfcProtocol,
        protocol_data: *const NfcDeviceData,
    );
}
extern "C" {
    #[doc = "Copy (export) the data contained in an NfcDevice instance to an outside NfcDeviceData instance.\n\n This function does the inverse of nfc_device_set_data().\n\n The protocol identifier passed as the protocol parameter MUST match the one\n stored in the instance, otherwise a crash will occur.\n This is to improve type safety.\n\n # Arguments\n\n* `instance` (direction in) - pointer to the instance to be copied from.\n * `protocol` (direction in) - numeric identifier of the instance's protocol.\n * `protocol_data` (direction out) - pointer to the destination data."]
    pub fn nfc_device_copy_data(
        instance: *const NfcDevice,
        protocol: NfcProtocol,
        protocol_data: *mut NfcDeviceData,
    );
}
extern "C" {
    #[doc = "Check whether an NfcDevice instance holds certain data.\n\n This function's behaviour is similar to nfc_device_is_equal(), with the difference\n that it takes NfcProtocol and NfcDeviceData* instead of the second NfcDevice*.\n\n The following code snippets [1] and [2] are equivalent:\n\n [1]\n ```c\n bool is_equal = nfc_device_is_equal(device1, device2);\n ```\n [2]\n ```c\n NfcProtocol protocol = nfc_device_get_protocol(device2);\n const NfcDeviceData* data = nfc_device_get_data(device2, protocol);\n bool is_equal = nfc_device_is_equal_data(device1, protocol, data);\n ```\n\n # Arguments\n\n* `instance` (direction in) - pointer to the instance to be compared.\n * `protocol` (direction in) - protocol identifier of the data to be compared.\n * `protocol_data` (direction in) - pointer to the NFC device data to be compared.\n # Returns\n\ntrue if the instance is of the right type and the data matches, false otherwise."]
    pub fn nfc_device_is_equal_data(
        instance: *const NfcDevice,
        protocol: NfcProtocol,
        protocol_data: *const NfcDeviceData,
    ) -> bool;
}
extern "C" {
    #[doc = "Compare two NfcDevice instances to determine whether they are equal.\n\n # Arguments\n\n* `instance` (direction in) - pointer to the first instance to be compared.\n * `other` (direction in) - pointer to the second instance to be compared.\n # Returns\n\ntrue if both instances are considered equal, false otherwise."]
    pub fn nfc_device_is_equal(instance: *const NfcDevice, other: *const NfcDevice) -> bool;
}
extern "C" {
    #[doc = "Set the loading callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be modified.\n * `callback` (direction in) - pointer to a function to be called when the load operation completes.\n * `context` (direction in) - pointer to a user-specific context (will be passed to the callback)."]
    pub fn nfc_device_set_loading_callback(
        instance: *mut NfcDevice,
        callback: NfcLoadingCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Save NFC device data form an NfcDevice instance to a file.\n\n # Arguments\n\n* `instance` (direction in) - pointer to the instance to be saved.\n * `path` (direction in) - pointer to a character string with a full file path.\n # Returns\n\ntrue if the data was successfully saved, false otherwise."]
    pub fn nfc_device_save(instance: *mut NfcDevice, path: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Load NFC device data to an NfcDevice instance from a file.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be loaded into.\n * `path` (direction in) - pointer to a character string with a full file path.\n # Returns\n\ntrue if the data was successfully loaded, false otherwise."]
    pub fn nfc_device_load(instance: *mut NfcDevice, path: *const core::ffi::c_char) -> bool;
}
pub const NfcDataGeneratorType_NfcDataGeneratorTypeMfUltralight: NfcDataGeneratorType = 0;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeMfUltralightEV1_11: NfcDataGeneratorType = 1;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeMfUltralightEV1_H11: NfcDataGeneratorType = 2;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeMfUltralightEV1_21: NfcDataGeneratorType = 3;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeMfUltralightEV1_H21: NfcDataGeneratorType = 4;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeNTAG203: NfcDataGeneratorType = 5;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeNTAG213: NfcDataGeneratorType = 6;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeNTAG215: NfcDataGeneratorType = 7;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeNTAG216: NfcDataGeneratorType = 8;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeNTAGI2C1k: NfcDataGeneratorType = 9;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeNTAGI2C2k: NfcDataGeneratorType = 10;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeNTAGI2CPlus1k: NfcDataGeneratorType = 11;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeNTAGI2CPlus2k: NfcDataGeneratorType = 12;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeMfClassicMini: NfcDataGeneratorType = 13;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeMfClassic1k_4b: NfcDataGeneratorType = 14;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeMfClassic1k_7b: NfcDataGeneratorType = 15;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeMfClassic4k_4b: NfcDataGeneratorType = 16;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeMfClassic4k_7b: NfcDataGeneratorType = 17;
pub const NfcDataGeneratorType_NfcDataGeneratorTypeNum: NfcDataGeneratorType = 18;
pub type NfcDataGeneratorType = core::ffi::c_uchar;
extern "C" {
    pub fn nfc_data_generator_get_name(type_: NfcDataGeneratorType) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn nfc_data_generator_fill_data(type_: NfcDataGeneratorType, nfc_device: *mut NfcDevice);
}
extern "C" {
    pub fn nfc_util_even_parity32(data: u32) -> u8;
}
extern "C" {
    pub fn nfc_util_odd_parity8(data: u8) -> u8;
}
extern "C" {
    pub fn nfc_util_odd_parity(src: *const u8, dst: *mut u8, len: u8);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Nfc {
    _unused: [u8; 0],
}
#[doc = "< User code explicitly aborted the current operation."]
pub const NfcEventType_NfcEventTypeUserAbort: NfcEventType = 0;
#[doc = "< Reader's field was detected by the NFC hardware."]
pub const NfcEventType_NfcEventTypeFieldOn: NfcEventType = 1;
#[doc = "< Reader's field was lost."]
pub const NfcEventType_NfcEventTypeFieldOff: NfcEventType = 2;
#[doc = "< Data transmission has started."]
pub const NfcEventType_NfcEventTypeTxStart: NfcEventType = 3;
#[doc = "< Data transmission has ended."]
pub const NfcEventType_NfcEventTypeTxEnd: NfcEventType = 4;
#[doc = "< Data reception has started."]
pub const NfcEventType_NfcEventTypeRxStart: NfcEventType = 5;
#[doc = "< Data reception has ended."]
pub const NfcEventType_NfcEventTypeRxEnd: NfcEventType = 6;
#[doc = "< The listener has been activated by the reader."]
pub const NfcEventType_NfcEventTypeListenerActivated: NfcEventType = 7;
#[doc = "< The card has been activated by the poller."]
pub const NfcEventType_NfcEventTypePollerReady: NfcEventType = 8;
#[doc = "Enumeration of possible Nfc event types.\n\n Not all technologies implement all events (this is due to hardware limitations)."]
pub type NfcEventType = core::ffi::c_uchar;
#[doc = "Nfc event data structure."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NfcEventData {
    #[doc = "< Pointer to the received data buffer."]
    pub buffer: *mut BitBuffer,
}
#[test]
fn bindgen_test_layout_NfcEventData() {
    const UNINIT: ::core::mem::MaybeUninit<NfcEventData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NfcEventData>(),
        4usize,
        concat!("Size of: ", stringify!(NfcEventData))
    );
    assert_eq!(
        ::core::mem::align_of::<NfcEventData>(),
        4usize,
        concat!("Alignment of ", stringify!(NfcEventData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NfcEventData),
            "::",
            stringify!(buffer)
        )
    );
}
#[doc = "Nfc event structure.\n\n Upon emission of an event, an instance of this struct will be passed to the callback."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NfcEvent {
    #[doc = "< Type of the emitted event."]
    pub type_: NfcEventType,
    #[doc = "< Event-specific data."]
    pub data: NfcEventData,
}
#[test]
fn bindgen_test_layout_NfcEvent() {
    const UNINIT: ::core::mem::MaybeUninit<NfcEvent> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NfcEvent>(),
        8usize,
        concat!("Size of: ", stringify!(NfcEvent))
    );
    assert_eq!(
        ::core::mem::align_of::<NfcEvent>(),
        4usize,
        concat!("Alignment of ", stringify!(NfcEvent))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NfcEvent),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(NfcEvent),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "< Continue operation normally."]
pub const NfcCommand_NfcCommandContinue: NfcCommand = 0;
#[doc = "< Reset the current state."]
pub const NfcCommand_NfcCommandReset: NfcCommand = 1;
#[doc = "< Stop the current operation."]
pub const NfcCommand_NfcCommandStop: NfcCommand = 2;
#[doc = "< Switch Nfc hardware to low-power mode."]
pub const NfcCommand_NfcCommandSleep: NfcCommand = 3;
#[doc = "Enumeration of possible Nfc commands.\n\n The event callback must return one of these to determine the next action."]
pub type NfcCommand = core::ffi::c_uchar;
#[doc = "Nfc event callback type.\n\n A function of this type must be passed as the callback parameter upon start of a an Nfc instance.\n\n # Arguments\n\n* `[in]` - event Nfc event, passed by value, complete with protocol type and data.\n * `[in,out]` - context pointer to the user-specific context (set when starting an Nfc instance).\n # Returns\n\ncommand which the event producer must execute."]
pub type NfcEventCallback = ::core::option::Option<
    unsafe extern "C" fn(event: NfcEvent, context: *mut core::ffi::c_void) -> NfcCommand,
>;
#[doc = "< Configure the Nfc instance as a poller."]
pub const NfcMode_NfcModePoller: NfcMode = 0;
#[doc = "< Configure the Nfc instance as a listener."]
pub const NfcMode_NfcModeListener: NfcMode = 1;
#[doc = "< Operating mode count. Internal use."]
pub const NfcMode_NfcModeNum: NfcMode = 2;
#[doc = "Enumeration of possible operating modes.\n\n Not all technologies implement the listener operating mode."]
pub type NfcMode = core::ffi::c_uchar;
#[doc = "< Configure the Nfc instance to use the ISO14443-3A technology."]
pub const NfcTech_NfcTechIso14443a: NfcTech = 0;
#[doc = "< Configure the Nfc instance to use the ISO14443-3B technology."]
pub const NfcTech_NfcTechIso14443b: NfcTech = 1;
#[doc = "< Configure the Nfc instance to use the ISO15693 technology."]
pub const NfcTech_NfcTechIso15693: NfcTech = 2;
#[doc = "< Configure the Nfc instance to use the FeliCa technology."]
pub const NfcTech_NfcTechFelica: NfcTech = 3;
#[doc = "< Technologies count. Internal use."]
pub const NfcTech_NfcTechNum: NfcTech = 4;
#[doc = "Enumeration of available technologies."]
pub type NfcTech = core::ffi::c_uchar;
#[doc = "< No error has occurred."]
pub const NfcError_NfcErrorNone: NfcError = 0;
#[doc = "< An unknown error has occured on the lower level."]
pub const NfcError_NfcErrorInternal: NfcError = 1;
#[doc = "< Operation is taking too long (e.g. card does not respond)."]
pub const NfcError_NfcErrorTimeout: NfcError = 2;
#[doc = "< An incomplete data frame has been received."]
pub const NfcError_NfcErrorIncompleteFrame: NfcError = 3;
#[doc = "< Data has not been parsed due to wrong/unknown format."]
pub const NfcError_NfcErrorDataFormat: NfcError = 4;
#[doc = "Enumeration of possible Nfc error codes."]
pub type NfcError = core::ffi::c_uchar;
extern "C" {
    #[doc = "Allocate an Nfc instance.\n\n Will exclusively take over the NFC HAL until deleted.\n\n # Returns\n\npointer to the allocated Nfc instance."]
    pub fn nfc_alloc() -> *mut Nfc;
}
extern "C" {
    #[doc = "Delete an Nfc instance.\n\n Will release the NFC HAL lock, making it available for use by others.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be deleted."]
    pub fn nfc_free(instance: *mut Nfc);
}
extern "C" {
    #[doc = "Configure the Nfc instance to work in a particular mode.\n\n Not all technologies implement the listener operating mode.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be configured.\n * `mode` (direction in) - required operating mode.\n * `tech` (direction in) - required technology configuration."]
    pub fn nfc_config(instance: *mut Nfc, mode: NfcMode, tech: NfcTech);
}
extern "C" {
    #[doc = "Set poller frame delay time.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be modified.\n * `fdt_poll_fc` (direction in) - frame delay time, in carrier cycles."]
    pub fn nfc_set_fdt_poll_fc(instance: *mut Nfc, fdt_poll_fc: u32);
}
extern "C" {
    #[doc = "Set listener frame delay time.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be modified.\n * `fdt_listen_fc` (direction in) - frame delay time, in carrier cycles."]
    pub fn nfc_set_fdt_listen_fc(instance: *mut Nfc, fdt_listen_fc: u32);
}
extern "C" {
    #[doc = "Set mask receive time.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be modified.\n * `mask_rx_time_fc` (direction in) - mask receive time, in carrier cycles."]
    pub fn nfc_set_mask_receive_time_fc(instance: *mut Nfc, mask_rx_time_fc: u32);
}
extern "C" {
    #[doc = "Set frame delay time.\n\n Frame delay time is the minimum time between two consecutive poll frames.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be modified.\n * `fdt_poll_poll_us` (direction in) - frame delay time, in microseconds."]
    pub fn nfc_set_fdt_poll_poll_us(instance: *mut Nfc, fdt_poll_poll_us: u32);
}
extern "C" {
    #[doc = "Set guard time.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be modified.\n * `guard_time_us` (direction in) - guard time, in microseconds."]
    pub fn nfc_set_guard_time_us(instance: *mut Nfc, guard_time_us: u32);
}
extern "C" {
    #[doc = "Start the Nfc instance.\n\n The instance must be configured to work with a specific technology\n in a specific operating mode with a nfc_config() call before starting.\n\n Once started, the user code will be receiving events through the provided\n callback which must handle them according to the logic required.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be started.\n * `callback` (direction in) - pointer to a user-defined callback function which will receive events.\n * `context` (direction in) - pointer to a user-specific context (will be passed to the callback)."]
    pub fn nfc_start(
        instance: *mut Nfc,
        callback: NfcEventCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Stop Nfc instance.\n\n The instance can only be stopped if it is running.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be stopped."]
    pub fn nfc_stop(instance: *mut Nfc);
}
extern "C" {
    #[doc = "Transmit and receive a data frame in poller mode.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer, with a timeout defined by the fwt parameter.\n\n The data being transmitted and received may be either bit- or byte-oriented.\n It shall not contain any technology-specific sequences as start or stop bits\n and/or other special symbols, as this is handled on the underlying HAL level.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nNfcErrorNone on success, any other error code on failure."]
    pub fn nfc_poller_trx(
        instance: *mut Nfc,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
        fwt: u32,
    ) -> NfcError;
}
extern "C" {
    #[doc = "Transmit a data frame in listener mode.\n\n Used to transmit a response to the reader request in listener mode.\n\n The data being transmitted may be either bit- or byte-oriented.\n It shall not contain any technology-specific sequences as start or stop bits\n and/or other special symbols, as this is handled on the underlying HAL level.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n # Returns\n\nNfcErrorNone on success, any other error code on failure."]
    pub fn nfc_listener_tx(instance: *mut Nfc, tx_buffer: *const BitBuffer) -> NfcError;
}
pub const NfcIso14443aShortFrame_NfcIso14443aShortFrameSensReq: NfcIso14443aShortFrame = 0;
pub const NfcIso14443aShortFrame_NfcIso14443aShortFrameAllReqa: NfcIso14443aShortFrame = 1;
#[doc = "Enumeration of possible ISO14443-3A short frame types."]
pub type NfcIso14443aShortFrame = core::ffi::c_uchar;
extern "C" {
    #[doc = "Transmit an ISO14443-3A short frame and receive the response in poller mode.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `frame` (direction in) - type of short frame to be sent.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nNfcErrorNone on success, any other error code on failure."]
    pub fn nfc_iso14443a_poller_trx_short_frame(
        instance: *mut Nfc,
        frame: NfcIso14443aShortFrame,
        rx_buffer: *mut BitBuffer,
        fwt: u32,
    ) -> NfcError;
}
extern "C" {
    #[doc = "Transmit an ISO14443-3A SDD frame and receive the response in poller mode.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nNfcErrorNone on success, any other error code on failure."]
    pub fn nfc_iso14443a_poller_trx_sdd_frame(
        instance: *mut Nfc,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
        fwt: u32,
    ) -> NfcError;
}
extern "C" {
    #[doc = "Transmit an ISO14443-3A data frame with custom parity bits and receive the response in poller mode.\n\n Same as nfc_poller_trx(), but uses the parity bits provided by the user code\n instead of calculating them automatically.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nNfcErrorNone on success, any other error code on failure."]
    pub fn nfc_iso14443a_poller_trx_custom_parity(
        instance: *mut Nfc,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
        fwt: u32,
    ) -> NfcError;
}
extern "C" {
    #[doc = "Transmit an ISO14443-3A frame with custom parity bits in listener mode.\n\n Same as nfc_listener_tx(), but uses the parity bits provided by the user code\n instead of calculating them automatically.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n # Returns\n\nNfcErrorNone on success, any other error code on failure."]
    pub fn nfc_iso14443a_listener_tx_custom_parity(
        instance: *mut Nfc,
        tx_buffer: *const BitBuffer,
    ) -> NfcError;
}
extern "C" {
    #[doc = "Set ISO14443-3A collision resolution parameters in listener mode.\n\n Configures the NFC hardware for automatic collision resolution.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be configured.\n * `uid` (direction in) - pointer to a byte array containing the UID.\n * `uid_len` (direction in) - UID length in bytes (must be supported by the protocol).\n * `atqa` (direction in) - ATQA byte value.\n * `sak` (direction in) - SAK byte value.\n # Returns\n\nNfcErrorNone on success, any other error code on failure."]
    pub fn nfc_iso14443a_listener_set_col_res_data(
        instance: *mut Nfc,
        uid: *mut u8,
        uid_len: u8,
        atqa: *mut u8,
        sak: u8,
    ) -> NfcError;
}
extern "C" {
    #[doc = "Set FeliCa collision resolution parameters in listener mode.\n\n Configures the NFC hardware for automatic collision resolution.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be configured.\n * `idm` (direction in) - pointer to a byte array containing the IDm.\n * `idm_len` (direction in) - IDm length in bytes.\n * `pmm` (direction in) - pointer to a byte array containing the PMm.\n * `pmm_len` (direction in) - PMm length in bytes.\n * `sys_code` (direction in) - System code from SYS_C block\n # Returns\n\nNfcErrorNone on success, any other error code on failure."]
    pub fn nfc_felica_listener_set_sensf_res_data(
        instance: *mut Nfc,
        idm: *const u8,
        idm_len: u8,
        pmm: *const u8,
        pmm_len: u8,
        sys_code: u16,
    ) -> NfcError;
}
extern "C" {
    #[doc = "Send ISO15693 Start of Frame pattern in listener mode\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be configured.\n # Returns\n\nNfcErrorNone on success, any other error code on failure."]
    pub fn nfc_iso15693_listener_tx_sof(instance: *mut Nfc) -> NfcError;
}
#[doc = "Generic Nfc instance type.\n\n Must be cast to a concrete type before use.\n Depending on the context, a pointer of this type\n may point to an object of the following types:\n - Nfc type,\n - Concrete poller type,\n - Concrete listener type."]
pub type NfcGenericInstance = core::ffi::c_void;
#[doc = "Generic Nfc event data type.\n\n Must be cast to a concrete type before use.\n Usually, it will be the protocol-specific event type."]
pub type NfcGenericEventData = core::ffi::c_void;
#[doc = "Generic Nfc event type.\n\n A generic Nfc event contains a protocol identifier, can be used to determine\n the remaing fields' type.\n\n If the value of the protocol field is NfcProtocolInvalid, then it means that\n the event was emitted from an Nfc instance, otherwise it originated from\n a concrete poller or listener instance.\n\n The event_data field is protocol-specific and should be cast to the appropriate type before use."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NfcGenericEvent {
    #[doc = "< Protocol identifier of the instance that produced the event."]
    pub protocol: NfcProtocol,
    #[doc = "< Pointer to the protocol-specific instance that produced the event."]
    pub instance: *mut NfcGenericInstance,
    #[doc = "< Pointer to the protocol-specific event."]
    pub event_data: *mut NfcGenericEventData,
}
#[test]
fn bindgen_test_layout_NfcGenericEvent() {
    const UNINIT: ::core::mem::MaybeUninit<NfcGenericEvent> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NfcGenericEvent>(),
        12usize,
        concat!("Size of: ", stringify!(NfcGenericEvent))
    );
    assert_eq!(
        ::core::mem::align_of::<NfcGenericEvent>(),
        4usize,
        concat!("Alignment of ", stringify!(NfcGenericEvent))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).protocol) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NfcGenericEvent),
            "::",
            stringify!(protocol)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).instance) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(NfcGenericEvent),
            "::",
            stringify!(instance)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).event_data) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(NfcGenericEvent),
            "::",
            stringify!(event_data)
        )
    );
}
#[doc = "Generic Nfc event callback type.\n\n A function of this type must be passed as the callback parameter upon start\n of a poller, listener or Nfc instance.\n\n # Arguments\n\n* `[in]` - event Nfc generic event, passed by value, complete with protocol type and data.\n * `[in,out]` - context pointer to the user-specific context (set when starting a poller/listener instance).\n # Returns\n\nthe command which the event producer must execute."]
pub type NfcGenericCallback = ::core::option::Option<
    unsafe extern "C" fn(event: NfcGenericEvent, context: *mut core::ffi::c_void) -> NfcCommand,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NfcListener {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate an NfcListener instance.\n\n # Arguments\n\n* `nfc` (direction in) - pointer to an Nfc instance.\n * `protocol` (direction in) - identifier of the protocol to be used.\n * `data` (direction in) - pointer to the data to use during emulation.\n # Returns\n\npointer to an allocated instance.\n\n [`nfc.h`]"]
    pub fn nfc_listener_alloc(
        nfc: *mut Nfc,
        protocol: NfcProtocol,
        data: *const NfcDeviceData,
    ) -> *mut NfcListener;
}
extern "C" {
    #[doc = "Delete an NfcListener instance.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be deleted."]
    pub fn nfc_listener_free(instance: *mut NfcListener);
}
extern "C" {
    #[doc = "Start an NfcListener instance.\n\n The callback logic is protocol-specific, so it cannot be described here in detail.\n However, the callback return value ALWAYS determines what the listener should do next:\n to continue whatever it was doing prior to the callback run or to stop.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be started.\n * `callback` (direction in) - pointer to a user-defined callback function which will receive events.\n * `context` (direction in) - pointer to a user-specific context (will be passed to the callback)."]
    pub fn nfc_listener_start(
        instance: *mut NfcListener,
        callback: NfcGenericCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Stop an NfcListener instance.\n\n The emulation process can be stopped explicitly (the other way is via the callback return value).\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be stopped."]
    pub fn nfc_listener_stop(instance: *mut NfcListener);
}
extern "C" {
    #[doc = "Get the protocol identifier an NfcListener instance was created with.\n\n # Arguments\n\n* `instance` (direction in) - pointer to the instance to be queried.\n # Returns\n\nidentifier of the protocol used by the instance."]
    pub fn nfc_listener_get_protocol(instance: *const NfcListener) -> NfcProtocol;
}
extern "C" {
    #[doc = "Get the data that was that was provided for emulation.\n\n The protocol identifier passed as the protocol parameter MUST match the one\n stored in the instance, otherwise a crash will occur.\n This is to improve type safety.\n\n # Arguments\n\n* `instance` (direction in) - pointer to the instance to be queried.\n * `protocol` (direction in) - assumed protocol identifier of the data to be retrieved.\n # Returns\n\npointer to the NFC device data."]
    pub fn nfc_listener_get_data(
        instance: *const NfcListener,
        protocol: NfcProtocol,
    ) -> *const NfcDeviceData;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NfcPoller {
    _unused: [u8; 0],
}
#[doc = "Extended generic Nfc event type.\n\n An extended generic Nfc event contains protocol poller and it's parent protocol event data.\n If protocol has no parent, then events are produced by Nfc instance.\n\n The parent_event_data field is protocol-specific and should be cast to the appropriate type before use."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NfcGenericEventEx {
    #[doc = "< Pointer to the protocol poller."]
    pub poller: *mut NfcGenericInstance,
    #[doc = "< Pointer to the protocol's parent poller event data."]
    pub parent_event_data: *mut NfcGenericEventData,
}
#[test]
fn bindgen_test_layout_NfcGenericEventEx() {
    const UNINIT: ::core::mem::MaybeUninit<NfcGenericEventEx> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NfcGenericEventEx>(),
        8usize,
        concat!("Size of: ", stringify!(NfcGenericEventEx))
    );
    assert_eq!(
        ::core::mem::align_of::<NfcGenericEventEx>(),
        4usize,
        concat!("Alignment of ", stringify!(NfcGenericEventEx))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).poller) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NfcGenericEventEx),
            "::",
            stringify!(poller)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).parent_event_data) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(NfcGenericEventEx),
            "::",
            stringify!(parent_event_data)
        )
    );
}
#[doc = "Extended generic Nfc event callback type.\n\n A function of this type must be passed as the callback parameter upon extended start of a poller.\n\n # Arguments\n\n* `[in]` - event Nfc extended generic event, passed by value, complete with protocol type and data.\n * `[in,out]` - context pointer to the user-specific context (set when starting a poller/listener instance).\n # Returns\n\nthe command which the event producer must execute."]
pub type NfcGenericCallbackEx = ::core::option::Option<
    unsafe extern "C" fn(event: NfcGenericEventEx, context: *mut core::ffi::c_void) -> NfcCommand,
>;
extern "C" {
    #[doc = "Allocate an NfcPoller instance.\n\n # Arguments\n\n* `nfc` (direction in) - pointer to an Nfc instance.\n * `protocol` (direction in) - identifier of the protocol to be used.\n # Returns\n\npointer to an allocated instance.\n\n [`nfc.h`]"]
    pub fn nfc_poller_alloc(nfc: *mut Nfc, protocol: NfcProtocol) -> *mut NfcPoller;
}
extern "C" {
    #[doc = "Delete an NfcPoller instance.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be deleted."]
    pub fn nfc_poller_free(instance: *mut NfcPoller);
}
extern "C" {
    #[doc = "Start an NfcPoller instance.\n\n The callback logic is protocol-specific, so it cannot be described here in detail.\n However, the callback return value ALWAYS determines what the poller should do next:\n to continue whatever it was doing prior to the callback run or to stop.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be started.\n * `callback` (direction in) - pointer to a user-defined callback function which will receive events.\n * `context` (direction in) - pointer to a user-specific context (will be passed to the callback)."]
    pub fn nfc_poller_start(
        instance: *mut NfcPoller,
        callback: NfcGenericCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Start an NfcPoller instance in extended mode.\n\n When nfc poller is started in extended mode, callback will be called with parent protocol events\n and protocol instance. This mode enables to make custom poller state machines.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be started.\n * `callback` (direction in) - pointer to a user-defined callback function which will receive events.\n * `context` (direction in) - pointer to a user-specific context (will be passed to the callback)."]
    pub fn nfc_poller_start_ex(
        instance: *mut NfcPoller,
        callback: NfcGenericCallbackEx,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Stop an NfcPoller instance.\n\n The reading process can be stopped explicitly (the other way is via the callback return value).\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be stopped."]
    pub fn nfc_poller_stop(instance: *mut NfcPoller);
}
extern "C" {
    #[doc = "Detect whether there is a card supporting a particular protocol in the vicinity.\n\n The behaviour of this function is protocol-defined, in general, it will do whatever is\n necessary to determine whether a card supporting the current protocol is in the vicinity\n and whether it is functioning normally.\n\n It is used automatically inside NfcScanner, so there is usually no need\n to call it explicitly.\n\n [`nfc_scanner.h`]\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to perform the detection with.\n # Returns\n\ntrue if a supported card was detected, false otherwise."]
    pub fn nfc_poller_detect(instance: *mut NfcPoller) -> bool;
}
extern "C" {
    #[doc = "Get the protocol identifier an NfcPoller instance was created with.\n\n # Arguments\n\n* `instance` (direction in) - pointer to the instance to be queried.\n # Returns\n\nidentifier of the protocol used by the instance."]
    pub fn nfc_poller_get_protocol(instance: *const NfcPoller) -> NfcProtocol;
}
extern "C" {
    #[doc = "Get the data that was that was gathered during the reading process.\n\n # Arguments\n\n* `instance` (direction in) - pointer to the instance to be queried.\n # Returns\n\npointer to the NFC device data."]
    pub fn nfc_poller_get_data(instance: *const NfcPoller) -> *const NfcDeviceData;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NfcScanner {
    _unused: [u8; 0],
}
#[doc = "< One or more protocols have been detected."]
pub const NfcScannerEventType_NfcScannerEventTypeDetected: NfcScannerEventType = 0;
#[doc = "Event type passed to the user callback."]
pub type NfcScannerEventType = core::ffi::c_uchar;
#[doc = "Event data passed to the user callback."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NfcScannerEventData {
    #[doc = "< Number of detected protocols (one or more)."]
    pub protocol_num: usize,
    #[doc = "< Pointer to the array of detected protocol identifiers."]
    pub protocols: *mut NfcProtocol,
}
#[test]
fn bindgen_test_layout_NfcScannerEventData() {
    const UNINIT: ::core::mem::MaybeUninit<NfcScannerEventData> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NfcScannerEventData>(),
        8usize,
        concat!("Size of: ", stringify!(NfcScannerEventData))
    );
    assert_eq!(
        ::core::mem::align_of::<NfcScannerEventData>(),
        4usize,
        concat!("Alignment of ", stringify!(NfcScannerEventData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).protocol_num) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NfcScannerEventData),
            "::",
            stringify!(protocol_num)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).protocols) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(NfcScannerEventData),
            "::",
            stringify!(protocols)
        )
    );
}
#[doc = "Event passed to the user callback."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NfcScannerEvent {
    #[doc = "< Type of event. Determines how the data must be handled."]
    pub type_: NfcScannerEventType,
    #[doc = "< Event-specific data. Handled accordingly to the even type."]
    pub data: NfcScannerEventData,
}
#[test]
fn bindgen_test_layout_NfcScannerEvent() {
    const UNINIT: ::core::mem::MaybeUninit<NfcScannerEvent> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<NfcScannerEvent>(),
        12usize,
        concat!("Size of: ", stringify!(NfcScannerEvent))
    );
    assert_eq!(
        ::core::mem::align_of::<NfcScannerEvent>(),
        4usize,
        concat!("Alignment of ", stringify!(NfcScannerEvent))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NfcScannerEvent),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(NfcScannerEvent),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "User callback function signature.\n\n A function with such signature must be provided by the user upon calling nfc_scanner_start().\n\n # Arguments\n\n* `event` (direction in) - occurred event, complete with type and data.\n * `context` (direction in) - pointer to the context data provided in nfc_scanner_start() call."]
pub type NfcScannerCallback = ::core::option::Option<
    unsafe extern "C" fn(event: NfcScannerEvent, context: *mut core::ffi::c_void),
>;
extern "C" {
    #[doc = "Allocate an NfcScanner instance.\n\n # Arguments\n\n* `nfc` (direction in) - pointer to an Nfc instance.\n # Returns\n\npointer to the allocated NfcScanner instance.\n\n [`nfc.h`]"]
    pub fn nfc_scanner_alloc(nfc: *mut Nfc) -> *mut NfcScanner;
}
extern "C" {
    #[doc = "Delete an NfcScanner instance.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be deleted."]
    pub fn nfc_scanner_free(instance: *mut NfcScanner);
}
extern "C" {
    #[doc = "Start an NfcScanner.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be started.\n * `callback` (direction in) - pointer to the callback function (will be called upon a detection event).\n * `context` (direction in) - pointer to the caller-specific context (will be passed to the callback)."]
    pub fn nfc_scanner_start(
        instance: *mut NfcScanner,
        callback: NfcScannerCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Stop an NfcScanner.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be stopped."]
    pub fn nfc_scanner_stop(instance: *mut NfcScanner);
}
pub const FelicaError_FelicaErrorNone: FelicaError = 0;
pub const FelicaError_FelicaErrorNotPresent: FelicaError = 1;
pub const FelicaError_FelicaErrorColResFailed: FelicaError = 2;
pub const FelicaError_FelicaErrorBufferOverflow: FelicaError = 3;
pub const FelicaError_FelicaErrorCommunication: FelicaError = 4;
pub const FelicaError_FelicaErrorFieldOff: FelicaError = 5;
pub const FelicaError_FelicaErrorWrongCrc: FelicaError = 6;
pub const FelicaError_FelicaErrorProtocol: FelicaError = 7;
pub const FelicaError_FelicaErrorTimeout: FelicaError = 8;
#[doc = "Type of possible Felica errors"]
pub type FelicaError = core::ffi::c_uchar;
#[doc = "Separate type for card key block. Used in authentication process"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FelicaCardKey {
    pub data: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_FelicaCardKey() {
    const UNINIT: ::core::mem::MaybeUninit<FelicaCardKey> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FelicaCardKey>(),
        16usize,
        concat!("Size of: ", stringify!(FelicaCardKey))
    );
    assert_eq!(
        ::core::mem::align_of::<FelicaCardKey>(),
        1usize,
        concat!("Alignment of ", stringify!(FelicaCardKey))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaCardKey),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "Felica ID block"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FelicaIDm {
    pub data: [u8; 8usize],
}
#[test]
fn bindgen_test_layout_FelicaIDm() {
    const UNINIT: ::core::mem::MaybeUninit<FelicaIDm> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FelicaIDm>(),
        8usize,
        concat!("Size of: ", stringify!(FelicaIDm))
    );
    assert_eq!(
        ::core::mem::align_of::<FelicaIDm>(),
        1usize,
        concat!("Alignment of ", stringify!(FelicaIDm))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaIDm),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "Felica PMm block"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FelicaPMm {
    pub data: [u8; 8usize],
}
#[test]
fn bindgen_test_layout_FelicaPMm() {
    const UNINIT: ::core::mem::MaybeUninit<FelicaPMm> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FelicaPMm>(),
        8usize,
        concat!("Size of: ", stringify!(FelicaPMm))
    );
    assert_eq!(
        ::core::mem::align_of::<FelicaPMm>(),
        1usize,
        concat!("Alignment of ", stringify!(FelicaPMm))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaPMm),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "Felica block with status flags indicating last operation with it.\n See Felica manual for more details on status codes."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FelicaBlock {
    #[doc = "< Status flag 1, equals to 0 when success"]
    pub SF1: u8,
    #[doc = "< Status flag 2, equals to 0 when success"]
    pub SF2: u8,
    #[doc = "< Block data"]
    pub data: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_FelicaBlock() {
    const UNINIT: ::core::mem::MaybeUninit<FelicaBlock> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FelicaBlock>(),
        18usize,
        concat!("Size of: ", stringify!(FelicaBlock))
    );
    assert_eq!(
        ::core::mem::align_of::<FelicaBlock>(),
        1usize,
        concat!("Alignment of ", stringify!(FelicaBlock))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).SF1) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaBlock),
            "::",
            stringify!(SF1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).SF2) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaBlock),
            "::",
            stringify!(SF2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaBlock),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "Felica filesystem structure"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FelicaFileSystem {
    pub spad: [FelicaBlock; 14usize],
    pub reg: FelicaBlock,
    pub rc: FelicaBlock,
    pub mac: FelicaBlock,
    pub id: FelicaBlock,
    pub d_id: FelicaBlock,
    pub ser_c: FelicaBlock,
    pub sys_c: FelicaBlock,
    pub ckv: FelicaBlock,
    pub ck: FelicaBlock,
    pub mc: FelicaBlock,
    pub wcnt: FelicaBlock,
    pub mac_a: FelicaBlock,
    pub state: FelicaBlock,
    pub crc_check: FelicaBlock,
}
#[test]
fn bindgen_test_layout_FelicaFileSystem() {
    const UNINIT: ::core::mem::MaybeUninit<FelicaFileSystem> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FelicaFileSystem>(),
        504usize,
        concat!("Size of: ", stringify!(FelicaFileSystem))
    );
    assert_eq!(
        ::core::mem::align_of::<FelicaFileSystem>(),
        1usize,
        concat!("Alignment of ", stringify!(FelicaFileSystem))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).spad) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(spad)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).reg) as usize - ptr as usize },
        252usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(reg)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).rc) as usize - ptr as usize },
        270usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(rc)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).mac) as usize - ptr as usize },
        288usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(mac)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
        306usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(id)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).d_id) as usize - ptr as usize },
        324usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(d_id)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ser_c) as usize - ptr as usize },
        342usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(ser_c)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sys_c) as usize - ptr as usize },
        360usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(sys_c)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ckv) as usize - ptr as usize },
        378usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(ckv)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ck) as usize - ptr as usize },
        396usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(ck)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).mc) as usize - ptr as usize },
        414usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(mc)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).wcnt) as usize - ptr as usize },
        432usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(wcnt)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).mac_a) as usize - ptr as usize },
        450usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(mac_a)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
        468usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(state)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).crc_check) as usize - ptr as usize },
        486usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFileSystem),
            "::",
            stringify!(crc_check)
        )
    );
}
#[doc = "Union which represents filesystem in junction with plain data dump"]
#[repr(C)]
#[derive(Copy, Clone)]
pub union FelicaFSUnion {
    pub fs: FelicaFileSystem,
    pub dump: [u8; 504usize],
}
#[test]
fn bindgen_test_layout_FelicaFSUnion() {
    const UNINIT: ::core::mem::MaybeUninit<FelicaFSUnion> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FelicaFSUnion>(),
        504usize,
        concat!("Size of: ", stringify!(FelicaFSUnion))
    );
    assert_eq!(
        ::core::mem::align_of::<FelicaFSUnion>(),
        1usize,
        concat!("Alignment of ", stringify!(FelicaFSUnion))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).fs) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFSUnion),
            "::",
            stringify!(fs)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).dump) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaFSUnion),
            "::",
            stringify!(dump)
        )
    );
}
#[doc = "Structure used to store Felica data and additional values about reading"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct FelicaData {
    pub idm: FelicaIDm,
    pub pmm: FelicaPMm,
    pub blocks_total: u8,
    pub blocks_read: u8,
    pub data: FelicaFSUnion,
}
#[test]
fn bindgen_test_layout_FelicaData() {
    const UNINIT: ::core::mem::MaybeUninit<FelicaData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<FelicaData>(),
        522usize,
        concat!("Size of: ", stringify!(FelicaData))
    );
    assert_eq!(
        ::core::mem::align_of::<FelicaData>(),
        1usize,
        concat!("Alignment of ", stringify!(FelicaData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).idm) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaData),
            "::",
            stringify!(idm)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pmm) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaData),
            "::",
            stringify!(pmm)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).blocks_total) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaData),
            "::",
            stringify!(blocks_total)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).blocks_read) as usize - ptr as usize },
        17usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaData),
            "::",
            stringify!(blocks_read)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        18usize,
        concat!(
            "Offset of field: ",
            stringify!(FelicaData),
            "::",
            stringify!(data)
        )
    );
}
extern "C" {
    pub fn felica_alloc() -> *mut FelicaData;
}
extern "C" {
    pub fn felica_free(data: *mut FelicaData);
}
extern "C" {
    pub fn felica_reset(data: *mut FelicaData);
}
extern "C" {
    pub fn felica_copy(data: *mut FelicaData, other: *const FelicaData);
}
extern "C" {
    pub fn felica_verify(data: *mut FelicaData, device_type: *const FuriString) -> bool;
}
extern "C" {
    pub fn felica_load(data: *mut FelicaData, ff: *mut FlipperFormat, version: u32) -> bool;
}
extern "C" {
    pub fn felica_save(data: *const FelicaData, ff: *mut FlipperFormat) -> bool;
}
extern "C" {
    pub fn felica_is_equal(data: *const FelicaData, other: *const FelicaData) -> bool;
}
extern "C" {
    pub fn felica_get_device_name(
        data: *const FelicaData,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn felica_get_uid(data: *const FelicaData, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    pub fn felica_set_uid(data: *mut FelicaData, uid: *const u8, uid_len: usize) -> bool;
}
extern "C" {
    pub fn felica_get_base_data(data: *const FelicaData) -> *mut FelicaData;
}
extern "C" {
    pub fn felica_calculate_session_key(
        ctx: *mut mbedtls_des3_context,
        ck: *const u8,
        rc: *const u8,
        out: *mut u8,
    );
}
extern "C" {
    pub fn felica_check_mac(
        ctx: *mut mbedtls_des3_context,
        session_key: *const u8,
        rc: *const u8,
        blocks: *const u8,
        block_count: u8,
        data: *mut u8,
    ) -> bool;
}
extern "C" {
    pub fn felica_calculate_mac_read(
        ctx: *mut mbedtls_des3_context,
        session_key: *const u8,
        rc: *const u8,
        blocks: *const u8,
        block_count: u8,
        data: *const u8,
        mac: *mut u8,
    );
}
extern "C" {
    pub fn felica_calculate_mac_write(
        ctx: *mut mbedtls_des3_context,
        session_key: *const u8,
        rc: *const u8,
        wcnt: *const u8,
        data: *const u8,
        mac: *mut u8,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FelicaPoller {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Perform collision resolution procedure.\n\n Must ONLY be used inside the callback function.\n\n Perfoms the collision resolution procedure as defined in FeliCa standars. The data\n field will be filled with Felica data on success.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the Felica data structure to be filled.\n # Returns\n\nFelicaErrorNone on success, an error code on failure."]
    pub fn felica_poller_activate(
        instance: *mut FelicaPoller,
        data: *mut FelicaData,
    ) -> FelicaError;
}
extern "C" {
    pub fn felica_poller_sync_read(
        nfc: *mut Nfc,
        data: *mut FelicaData,
        card_key: *const FelicaCardKey,
    ) -> FelicaError;
}
pub const Iso14443_3aError_Iso14443_3aErrorNone: Iso14443_3aError = 0;
pub const Iso14443_3aError_Iso14443_3aErrorNotPresent: Iso14443_3aError = 1;
pub const Iso14443_3aError_Iso14443_3aErrorColResFailed: Iso14443_3aError = 2;
pub const Iso14443_3aError_Iso14443_3aErrorBufferOverflow: Iso14443_3aError = 3;
pub const Iso14443_3aError_Iso14443_3aErrorCommunication: Iso14443_3aError = 4;
pub const Iso14443_3aError_Iso14443_3aErrorFieldOff: Iso14443_3aError = 5;
pub const Iso14443_3aError_Iso14443_3aErrorWrongCrc: Iso14443_3aError = 6;
pub const Iso14443_3aError_Iso14443_3aErrorTimeout: Iso14443_3aError = 7;
pub type Iso14443_3aError = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso14443_3aData {
    pub uid: [u8; 10usize],
    pub uid_len: u8,
    pub atqa: [u8; 2usize],
    pub sak: u8,
}
#[test]
fn bindgen_test_layout_Iso14443_3aData() {
    const UNINIT: ::core::mem::MaybeUninit<Iso14443_3aData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<Iso14443_3aData>(),
        14usize,
        concat!("Size of: ", stringify!(Iso14443_3aData))
    );
    assert_eq!(
        ::core::mem::align_of::<Iso14443_3aData>(),
        1usize,
        concat!("Alignment of ", stringify!(Iso14443_3aData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).uid) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso14443_3aData),
            "::",
            stringify!(uid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).uid_len) as usize - ptr as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso14443_3aData),
            "::",
            stringify!(uid_len)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).atqa) as usize - ptr as usize },
        11usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso14443_3aData),
            "::",
            stringify!(atqa)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sak) as usize - ptr as usize },
        13usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso14443_3aData),
            "::",
            stringify!(sak)
        )
    );
}
extern "C" {
    pub fn iso14443_3a_alloc() -> *mut Iso14443_3aData;
}
extern "C" {
    pub fn iso14443_3a_free(data: *mut Iso14443_3aData);
}
extern "C" {
    pub fn iso14443_3a_reset(data: *mut Iso14443_3aData);
}
extern "C" {
    pub fn iso14443_3a_copy(data: *mut Iso14443_3aData, other: *const Iso14443_3aData);
}
extern "C" {
    pub fn iso14443_3a_verify(data: *mut Iso14443_3aData, device_type: *const FuriString) -> bool;
}
extern "C" {
    pub fn iso14443_3a_load(
        data: *mut Iso14443_3aData,
        ff: *mut FlipperFormat,
        version: u32,
    ) -> bool;
}
extern "C" {
    pub fn iso14443_3a_save(data: *const Iso14443_3aData, ff: *mut FlipperFormat) -> bool;
}
extern "C" {
    pub fn iso14443_3a_is_equal(
        data: *const Iso14443_3aData,
        other: *const Iso14443_3aData,
    ) -> bool;
}
extern "C" {
    pub fn iso14443_3a_get_device_name(
        data: *const Iso14443_3aData,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn iso14443_3a_get_uid(data: *const Iso14443_3aData, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    pub fn iso14443_3a_set_uid(data: *mut Iso14443_3aData, uid: *const u8, uid_len: usize) -> bool;
}
extern "C" {
    pub fn iso14443_3a_get_base_data(data: *const Iso14443_3aData) -> *mut Iso14443_3aData;
}
extern "C" {
    pub fn iso14443_3a_get_cuid(data: *const Iso14443_3aData) -> u32;
}
extern "C" {
    pub fn iso14443_3a_supports_iso14443_4(data: *const Iso14443_3aData) -> bool;
}
extern "C" {
    pub fn iso14443_3a_get_sak(data: *const Iso14443_3aData) -> u8;
}
extern "C" {
    pub fn iso14443_3a_get_atqa(data: *const Iso14443_3aData, atqa: *mut u8);
}
extern "C" {
    pub fn iso14443_3a_set_sak(data: *mut Iso14443_3aData, sak: u8);
}
extern "C" {
    pub fn iso14443_3a_set_atqa(data: *mut Iso14443_3aData, atqa: *const u8);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso14443_3aPoller {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Transmit and receive Iso14443_3a frames in poller mode.\n\n Must ONLY be used inside the callback function.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer, with a timeout defined by the fwt parameter.\n\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nIso14443_3aErrorNone on success, an error code on failure."]
    pub fn iso14443_3a_poller_txrx(
        instance: *mut Iso14443_3aPoller,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
        fwt: u32,
    ) -> Iso14443_3aError;
}
extern "C" {
    #[doc = "Transmit and receive Iso14443_3a standard frames in poller mode.\n\n Must ONLY be used inside the callback function.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer, with a timeout defined by the fwt parameter.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nIso14443_3aErrorNone on success, an error code on failure."]
    pub fn iso14443_3a_poller_send_standard_frame(
        instance: *mut Iso14443_3aPoller,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
        fwt: u32,
    ) -> Iso14443_3aError;
}
extern "C" {
    #[doc = "Transmit and receive Iso14443_3a frames with custom parity bits in poller mode.\n\n Must ONLY be used inside the callback function.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer, with a timeout defined by the fwt parameter.\n\n Custom parity bits must be set in the tx_buffer. The rx_buffer will contain\n the received data with the parity bits.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nIso14443_3aErrorNone on success, an error code on failure."]
    pub fn iso14443_3a_poller_txrx_custom_parity(
        instance: *mut Iso14443_3aPoller,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
        fwt: u32,
    ) -> Iso14443_3aError;
}
extern "C" {
    #[doc = "Checks presence of Iso14443_3a complient card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n # Returns\n\nIso14443_3aErrorNone if card is present, an error code otherwise."]
    pub fn iso14443_3a_poller_check_presence(instance: *mut Iso14443_3aPoller) -> Iso14443_3aError;
}
extern "C" {
    #[doc = "Perform collision resolution procedure.\n\n Must ONLY be used inside the callback function.\n\n Perfoms the collision resolution procedure as defined in Iso14443-3a. The iso14443_3a_data\n field will be filled with Iso14443-3a data on success.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `iso14443_3a_data` (direction out) - pointer to the Iso14443_3a data structure to be filled.\n # Returns\n\nIso14443_3aErrorNone on success, an error code on failure."]
    pub fn iso14443_3a_poller_activate(
        instance: *mut Iso14443_3aPoller,
        iso14443_3a_data: *mut Iso14443_3aData,
    ) -> Iso14443_3aError;
}
extern "C" {
    #[doc = "Send HALT command to the card.\n\n Must ONLY be used inside the callback function.\n\n Halts card and changes internal Iso14443_3aPoller state to Idle.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n # Returns\n\nIso14443_3aErrorNone on success, an error code on failure."]
    pub fn iso14443_3a_poller_halt(instance: *mut Iso14443_3aPoller) -> Iso14443_3aError;
}
extern "C" {
    pub fn iso14443_3a_poller_sync_read(
        nfc: *mut Nfc,
        iso14443_3a_data: *mut Iso14443_3aData,
    ) -> Iso14443_3aError;
}
pub const Iso14443_3bError_Iso14443_3bErrorNone: Iso14443_3bError = 0;
pub const Iso14443_3bError_Iso14443_3bErrorNotPresent: Iso14443_3bError = 1;
pub const Iso14443_3bError_Iso14443_3bErrorColResFailed: Iso14443_3bError = 2;
pub const Iso14443_3bError_Iso14443_3bErrorBufferOverflow: Iso14443_3bError = 3;
pub const Iso14443_3bError_Iso14443_3bErrorCommunication: Iso14443_3bError = 4;
pub const Iso14443_3bError_Iso14443_3bErrorFieldOff: Iso14443_3bError = 5;
pub const Iso14443_3bError_Iso14443_3bErrorWrongCrc: Iso14443_3bError = 6;
pub const Iso14443_3bError_Iso14443_3bErrorTimeout: Iso14443_3bError = 7;
pub type Iso14443_3bError = core::ffi::c_uchar;
pub const Iso14443_3bBitRate_Iso14443_3bBitRateBoth106Kbit: Iso14443_3bBitRate = 0;
pub const Iso14443_3bBitRate_Iso14443_3bBitRatePiccToPcd212Kbit: Iso14443_3bBitRate = 1;
pub const Iso14443_3bBitRate_Iso14443_3bBitRatePiccToPcd424Kbit: Iso14443_3bBitRate = 2;
pub const Iso14443_3bBitRate_Iso14443_3bBitRatePiccToPcd848Kbit: Iso14443_3bBitRate = 3;
pub const Iso14443_3bBitRate_Iso14443_3bBitRatePcdToPicc212Kbit: Iso14443_3bBitRate = 4;
pub const Iso14443_3bBitRate_Iso14443_3bBitRatePcdToPicc424Kbit: Iso14443_3bBitRate = 5;
pub const Iso14443_3bBitRate_Iso14443_3bBitRatePcdToPicc848Kbit: Iso14443_3bBitRate = 6;
pub type Iso14443_3bBitRate = core::ffi::c_uchar;
pub const Iso14443_3bFrameOption_Iso14443_3bFrameOptionNad: Iso14443_3bFrameOption = 0;
pub const Iso14443_3bFrameOption_Iso14443_3bFrameOptionCid: Iso14443_3bFrameOption = 1;
pub type Iso14443_3bFrameOption = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso14443_3bData {
    _unused: [u8; 0],
}
extern "C" {
    pub fn iso14443_3b_alloc() -> *mut Iso14443_3bData;
}
extern "C" {
    pub fn iso14443_3b_free(data: *mut Iso14443_3bData);
}
extern "C" {
    pub fn iso14443_3b_reset(data: *mut Iso14443_3bData);
}
extern "C" {
    pub fn iso14443_3b_copy(data: *mut Iso14443_3bData, other: *const Iso14443_3bData);
}
extern "C" {
    pub fn iso14443_3b_verify(data: *mut Iso14443_3bData, device_type: *const FuriString) -> bool;
}
extern "C" {
    pub fn iso14443_3b_load(
        data: *mut Iso14443_3bData,
        ff: *mut FlipperFormat,
        version: u32,
    ) -> bool;
}
extern "C" {
    pub fn iso14443_3b_save(data: *const Iso14443_3bData, ff: *mut FlipperFormat) -> bool;
}
extern "C" {
    pub fn iso14443_3b_is_equal(
        data: *const Iso14443_3bData,
        other: *const Iso14443_3bData,
    ) -> bool;
}
extern "C" {
    pub fn iso14443_3b_get_device_name(
        data: *const Iso14443_3bData,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn iso14443_3b_get_uid(data: *const Iso14443_3bData, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    pub fn iso14443_3b_set_uid(data: *mut Iso14443_3bData, uid: *const u8, uid_len: usize) -> bool;
}
extern "C" {
    pub fn iso14443_3b_get_base_data(data: *const Iso14443_3bData) -> *mut Iso14443_3bData;
}
extern "C" {
    pub fn iso14443_3b_supports_iso14443_4(data: *const Iso14443_3bData) -> bool;
}
extern "C" {
    pub fn iso14443_3b_supports_bit_rate(
        data: *const Iso14443_3bData,
        bit_rate: Iso14443_3bBitRate,
    ) -> bool;
}
extern "C" {
    pub fn iso14443_3b_supports_frame_option(
        data: *const Iso14443_3bData,
        option: Iso14443_3bFrameOption,
    ) -> bool;
}
extern "C" {
    pub fn iso14443_3b_get_application_data(
        data: *const Iso14443_3bData,
        data_size: *mut usize,
    ) -> *const u8;
}
extern "C" {
    pub fn iso14443_3b_get_frame_size_max(data: *const Iso14443_3bData) -> u16;
}
extern "C" {
    pub fn iso14443_3b_get_fwt_fc_max(data: *const Iso14443_3bData) -> u32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso14443_3bPoller {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Transmit and receive Iso14443_3b frames in poller mode.\n\n Must ONLY be used inside the callback function.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer, with a timeout defined by the fwt parameter.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nIso14443_3bErrorNone on success, an error code on failure."]
    pub fn iso14443_3b_poller_send_frame(
        instance: *mut Iso14443_3bPoller,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
    ) -> Iso14443_3bError;
}
extern "C" {
    #[doc = "Perform collision resolution procedure.\n\n Must ONLY be used inside the callback function.\n\n Perfoms the collision resolution procedure as defined in Iso14443-3b. The data\n field will be filled with Iso14443-3b data on success.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the Iso14443_3b data structure to be filled.\n # Returns\n\nIso14443_3bErrorNone on success, an error code on failure."]
    pub fn iso14443_3b_poller_activate(
        instance: *mut Iso14443_3bPoller,
        data: *mut Iso14443_3bData,
    ) -> Iso14443_3bError;
}
extern "C" {
    #[doc = "Send HALT command to the card.\n\n Must ONLY be used inside the callback function.\n\n Halts card and changes internal Iso14443_3bPoller state to Idle.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n # Returns\n\nIso14443_3bErrorNone on success, an error code on failure."]
    pub fn iso14443_3b_poller_halt(instance: *mut Iso14443_3bPoller) -> Iso14443_3bError;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SimpleArray {
    _unused: [u8; 0],
}
pub type SimpleArrayData = core::ffi::c_void;
pub type SimpleArrayElement = core::ffi::c_void;
pub type SimpleArrayInit =
    ::core::option::Option<unsafe extern "C" fn(elem: *mut SimpleArrayElement)>;
pub type SimpleArrayReset =
    ::core::option::Option<unsafe extern "C" fn(elem: *mut SimpleArrayElement)>;
pub type SimpleArrayCopy = ::core::option::Option<
    unsafe extern "C" fn(elem: *mut SimpleArrayElement, other: *const SimpleArrayElement),
>;
#[doc = "Simple Array configuration structure. Defined per type."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SimpleArrayConfig {
    #[doc = "< Initialisation (in-place constructor) method."]
    pub init: SimpleArrayInit,
    #[doc = "< Reset (custom destructor) method."]
    pub reset: SimpleArrayReset,
    #[doc = "< Copy (custom copy-constructor) method."]
    pub copy: SimpleArrayCopy,
    pub type_size: usize,
}
#[test]
fn bindgen_test_layout_SimpleArrayConfig() {
    const UNINIT: ::core::mem::MaybeUninit<SimpleArrayConfig> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SimpleArrayConfig>(),
        16usize,
        concat!("Size of: ", stringify!(SimpleArrayConfig))
    );
    assert_eq!(
        ::core::mem::align_of::<SimpleArrayConfig>(),
        4usize,
        concat!("Alignment of ", stringify!(SimpleArrayConfig))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).init) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SimpleArrayConfig),
            "::",
            stringify!(init)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).reset) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SimpleArrayConfig),
            "::",
            stringify!(reset)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).copy) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SimpleArrayConfig),
            "::",
            stringify!(copy)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_size) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(SimpleArrayConfig),
            "::",
            stringify!(type_size)
        )
    );
}
extern "C" {
    #[doc = "Allocate a SimpleArray instance with the given configuration.\n\n # Arguments\n\n* `[in]` - config Pointer to the type-specific configuration\n # Returns\n\nPointer to the allocated SimpleArray instance"]
    pub fn simple_array_alloc(config: *const SimpleArrayConfig) -> *mut SimpleArray;
}
extern "C" {
    #[doc = "Free a SimpleArray instance and release its contents.\n\n # Arguments\n\n* `[in]` - instance Pointer to the SimpleArray instance to be freed"]
    pub fn simple_array_free(instance: *mut SimpleArray);
}
extern "C" {
    #[doc = "Initialise a SimpleArray instance by allocating additional space to contain\n the requested number of elements.\n If init() is specified in the config, then it is called for each element,\n otherwise the data is filled with zeroes.\n\n # Arguments\n\n* `[in]` - instance Pointer to the SimpleArray instance to be init'd\n * `[in]` - count Number of elements to be allocated and init'd"]
    pub fn simple_array_init(instance: *mut SimpleArray, count: u32);
}
extern "C" {
    #[doc = "Reset a SimpleArray instance and delete all of its elements.\n If reset() is specified in the config, then it is called for each element,\n otherwise the data is simply free()'d.\n\n # Arguments\n\n* `[in]` - instance Pointer to the SimpleArray instance to be reset"]
    pub fn simple_array_reset(instance: *mut SimpleArray);
}
extern "C" {
    #[doc = "Copy (duplicate) another SimpleArray instance to this one.\n If copy() is specified in the config, then it is called for each element,\n otherwise the data is simply memcpy()'d.\n\n # Arguments\n\n* `[in]` - instance Pointer to the SimpleArray instance to copy to\n * `[in]` - other Pointer to the SimpleArray instance to copy from"]
    pub fn simple_array_copy(instance: *mut SimpleArray, other: *const SimpleArray);
}
extern "C" {
    #[doc = "Check if another SimpleArray instance is equal (the same object or holds the\n same data) to this one.\n\n # Arguments\n\n* `[in]` - instance Pointer to the SimpleArray instance to be compared\n * `[in]` - other Pointer to the SimpleArray instance to be compared\n # Returns\n\nTrue if instances are considered equal, false otherwise"]
    pub fn simple_array_is_equal(instance: *const SimpleArray, other: *const SimpleArray) -> bool;
}
extern "C" {
    #[doc = "Get the count of elements currently contained in a SimpleArray instance.\n\n # Arguments\n\n* `[in]` - instance Pointer to the SimpleArray instance to query the count from\n # Returns\n\nCount of elements contained in the instance"]
    pub fn simple_array_get_count(instance: *const SimpleArray) -> u32;
}
extern "C" {
    #[doc = "Get a pointer to an element contained in a SimpleArray instance.\n\n # Arguments\n\n* `[in]` - instance Pointer to the SimpleArray instance to get an element from\n * `[in]` - index Index of the element in question. MUST be less than total element count\n # Returns\n\nPointer to the element specified by index"]
    pub fn simple_array_get(instance: *mut SimpleArray, index: u32) -> *mut SimpleArrayElement;
}
extern "C" {
    #[doc = "Get a const pointer to an element contained in a SimpleArray instance.\n\n # Arguments\n\n* `[in]` - instance Pointer to the SimpleArray instance to get an element from\n * `[in]` - index Index of the element in question. MUST be less than total element count\n # Returns\n\nConst pointer to the element specified by index"]
    pub fn simple_array_cget(instance: *const SimpleArray, index: u32)
        -> *const SimpleArrayElement;
}
extern "C" {
    #[doc = "Get a pointer to the internal data of a SimpleArray instance.\n\n # Arguments\n\n* `[in]` - instance Pointer to the SimpleArray instance to get the data of\n # Returns\n\nPointer to the instance's internal data"]
    pub fn simple_array_get_data(instance: *mut SimpleArray) -> *mut SimpleArrayData;
}
extern "C" {
    #[doc = "Get a constant pointer to the internal data of a SimpleArray instance.\n\n # Arguments\n\n* `[in]` - instance Pointer to the SimpleArray instance to get the data of\n # Returns\n\nConstant pointer to the instance's internal data"]
    pub fn simple_array_cget_data(instance: *const SimpleArray) -> *const SimpleArrayData;
}
extern "C" {
    pub static simple_array_config_uint8_t: SimpleArrayConfig;
}
pub const Iso14443_4aError_Iso14443_4aErrorNone: Iso14443_4aError = 0;
pub const Iso14443_4aError_Iso14443_4aErrorNotPresent: Iso14443_4aError = 1;
pub const Iso14443_4aError_Iso14443_4aErrorProtocol: Iso14443_4aError = 2;
pub const Iso14443_4aError_Iso14443_4aErrorTimeout: Iso14443_4aError = 3;
pub type Iso14443_4aError = core::ffi::c_uchar;
pub const Iso14443_4aBitRate_Iso14443_4aBitRateBoth106Kbit: Iso14443_4aBitRate = 0;
pub const Iso14443_4aBitRate_Iso14443_4aBitRatePiccToPcd212Kbit: Iso14443_4aBitRate = 1;
pub const Iso14443_4aBitRate_Iso14443_4aBitRatePiccToPcd424Kbit: Iso14443_4aBitRate = 2;
pub const Iso14443_4aBitRate_Iso14443_4aBitRatePiccToPcd848Kbit: Iso14443_4aBitRate = 3;
pub const Iso14443_4aBitRate_Iso14443_4aBitRatePcdToPicc212Kbit: Iso14443_4aBitRate = 4;
pub const Iso14443_4aBitRate_Iso14443_4aBitRatePcdToPicc424Kbit: Iso14443_4aBitRate = 5;
pub const Iso14443_4aBitRate_Iso14443_4aBitRatePcdToPicc848Kbit: Iso14443_4aBitRate = 6;
pub type Iso14443_4aBitRate = core::ffi::c_uchar;
pub const Iso14443_4aFrameOption_Iso14443_4aFrameOptionNad: Iso14443_4aFrameOption = 0;
pub const Iso14443_4aFrameOption_Iso14443_4aFrameOptionCid: Iso14443_4aFrameOption = 1;
pub type Iso14443_4aFrameOption = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso14443_4aAtsData {
    pub tl: u8,
    pub t0: u8,
    pub ta_1: u8,
    pub tb_1: u8,
    pub tc_1: u8,
    pub t1_tk: *mut SimpleArray,
}
#[test]
fn bindgen_test_layout_Iso14443_4aAtsData() {
    const UNINIT: ::core::mem::MaybeUninit<Iso14443_4aAtsData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<Iso14443_4aAtsData>(),
        12usize,
        concat!("Size of: ", stringify!(Iso14443_4aAtsData))
    );
    assert_eq!(
        ::core::mem::align_of::<Iso14443_4aAtsData>(),
        4usize,
        concat!("Alignment of ", stringify!(Iso14443_4aAtsData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).tl) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso14443_4aAtsData),
            "::",
            stringify!(tl)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).t0) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso14443_4aAtsData),
            "::",
            stringify!(t0)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ta_1) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso14443_4aAtsData),
            "::",
            stringify!(ta_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).tb_1) as usize - ptr as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso14443_4aAtsData),
            "::",
            stringify!(tb_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).tc_1) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso14443_4aAtsData),
            "::",
            stringify!(tc_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).t1_tk) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso14443_4aAtsData),
            "::",
            stringify!(t1_tk)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso14443_4aData {
    pub iso14443_3a_data: *mut Iso14443_3aData,
    pub ats_data: Iso14443_4aAtsData,
}
#[test]
fn bindgen_test_layout_Iso14443_4aData() {
    const UNINIT: ::core::mem::MaybeUninit<Iso14443_4aData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<Iso14443_4aData>(),
        16usize,
        concat!("Size of: ", stringify!(Iso14443_4aData))
    );
    assert_eq!(
        ::core::mem::align_of::<Iso14443_4aData>(),
        4usize,
        concat!("Alignment of ", stringify!(Iso14443_4aData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).iso14443_3a_data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso14443_4aData),
            "::",
            stringify!(iso14443_3a_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ats_data) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso14443_4aData),
            "::",
            stringify!(ats_data)
        )
    );
}
extern "C" {
    pub fn iso14443_4a_alloc() -> *mut Iso14443_4aData;
}
extern "C" {
    pub fn iso14443_4a_free(data: *mut Iso14443_4aData);
}
extern "C" {
    pub fn iso14443_4a_reset(data: *mut Iso14443_4aData);
}
extern "C" {
    pub fn iso14443_4a_copy(data: *mut Iso14443_4aData, other: *const Iso14443_4aData);
}
extern "C" {
    pub fn iso14443_4a_verify(data: *mut Iso14443_4aData, device_type: *const FuriString) -> bool;
}
extern "C" {
    pub fn iso14443_4a_load(
        data: *mut Iso14443_4aData,
        ff: *mut FlipperFormat,
        version: u32,
    ) -> bool;
}
extern "C" {
    pub fn iso14443_4a_save(data: *const Iso14443_4aData, ff: *mut FlipperFormat) -> bool;
}
extern "C" {
    pub fn iso14443_4a_is_equal(
        data: *const Iso14443_4aData,
        other: *const Iso14443_4aData,
    ) -> bool;
}
extern "C" {
    pub fn iso14443_4a_get_device_name(
        data: *const Iso14443_4aData,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn iso14443_4a_get_uid(data: *const Iso14443_4aData, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    pub fn iso14443_4a_set_uid(data: *mut Iso14443_4aData, uid: *const u8, uid_len: usize) -> bool;
}
extern "C" {
    pub fn iso14443_4a_get_base_data(data: *const Iso14443_4aData) -> *mut Iso14443_3aData;
}
extern "C" {
    pub fn iso14443_4a_get_frame_size_max(data: *const Iso14443_4aData) -> u16;
}
extern "C" {
    pub fn iso14443_4a_get_fwt_fc_max(data: *const Iso14443_4aData) -> u32;
}
extern "C" {
    pub fn iso14443_4a_get_historical_bytes(
        data: *const Iso14443_4aData,
        count: *mut u32,
    ) -> *const u8;
}
extern "C" {
    pub fn iso14443_4a_supports_bit_rate(
        data: *const Iso14443_4aData,
        bit_rate: Iso14443_4aBitRate,
    ) -> bool;
}
extern "C" {
    pub fn iso14443_4a_supports_frame_option(
        data: *const Iso14443_4aData,
        option: Iso14443_4aFrameOption,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso14443_4aPoller {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Transmit and receive Iso14443_4a blocks in poller mode.\n\n Must ONLY be used inside the callback function.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer. The fwt parameter is calculated during activation procedure.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n # Returns\n\nIso14443_4aErrorNone on success, an error code on failure."]
    pub fn iso14443_4a_poller_send_block(
        instance: *mut Iso14443_4aPoller,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
    ) -> Iso14443_4aError;
}
extern "C" {
    #[doc = "Send HALT command to the card.\n\n Must ONLY be used inside the callback function.\n\n Halts card and changes internal Iso14443_4aPoller state to Idle.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n # Returns\n\nIso14443_4aErrorNone on success, an error code on failure."]
    pub fn iso14443_4a_poller_halt(instance: *mut Iso14443_4aPoller) -> Iso14443_4aError;
}
extern "C" {
    #[doc = "Read Answer To Select (ATS) from the card.\n\n Must ONLY be used inside the callback function.\n\n Send Request Answer To Select (RATS) command to the card and parse the response.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the buffer to be filled with ATS data.\n # Returns\n\nIso14443_4aErrorNone on success, an error code on failure."]
    pub fn iso14443_4a_poller_read_ats(
        instance: *mut Iso14443_4aPoller,
        data: *mut Iso14443_4aAtsData,
    ) -> Iso14443_4aError;
}
pub const Iso14443_4bError_Iso14443_4bErrorNone: Iso14443_4bError = 0;
pub const Iso14443_4bError_Iso14443_4bErrorNotPresent: Iso14443_4bError = 1;
pub const Iso14443_4bError_Iso14443_4bErrorProtocol: Iso14443_4bError = 2;
pub const Iso14443_4bError_Iso14443_4bErrorTimeout: Iso14443_4bError = 3;
pub type Iso14443_4bError = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso14443_4bData {
    _unused: [u8; 0],
}
extern "C" {
    pub fn iso14443_4b_alloc() -> *mut Iso14443_4bData;
}
extern "C" {
    pub fn iso14443_4b_free(data: *mut Iso14443_4bData);
}
extern "C" {
    pub fn iso14443_4b_reset(data: *mut Iso14443_4bData);
}
extern "C" {
    pub fn iso14443_4b_copy(data: *mut Iso14443_4bData, other: *const Iso14443_4bData);
}
extern "C" {
    pub fn iso14443_4b_verify(data: *mut Iso14443_4bData, device_type: *const FuriString) -> bool;
}
extern "C" {
    pub fn iso14443_4b_load(
        data: *mut Iso14443_4bData,
        ff: *mut FlipperFormat,
        version: u32,
    ) -> bool;
}
extern "C" {
    pub fn iso14443_4b_save(data: *const Iso14443_4bData, ff: *mut FlipperFormat) -> bool;
}
extern "C" {
    pub fn iso14443_4b_is_equal(
        data: *const Iso14443_4bData,
        other: *const Iso14443_4bData,
    ) -> bool;
}
extern "C" {
    pub fn iso14443_4b_get_device_name(
        data: *const Iso14443_4bData,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn iso14443_4b_get_uid(data: *const Iso14443_4bData, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    pub fn iso14443_4b_set_uid(data: *mut Iso14443_4bData, uid: *const u8, uid_len: usize) -> bool;
}
extern "C" {
    pub fn iso14443_4b_get_base_data(data: *const Iso14443_4bData) -> *mut Iso14443_3bData;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso14443_4bPoller {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Transmit and receive Iso14443_4b blocks in poller mode.\n\n Must ONLY be used inside the callback function.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer. The fwt parameter is calculated during activation procedure.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n # Returns\n\nIso14443_4bErrorNone on success, an error code on failure."]
    pub fn iso14443_4b_poller_send_block(
        instance: *mut Iso14443_4bPoller,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
    ) -> Iso14443_4bError;
}
extern "C" {
    #[doc = "Send HALT command to the card.\n\n Must ONLY be used inside the callback function.\n\n Halts card and changes internal Iso14443_4aPoller state to Idle.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n # Returns\n\nIso14443_4bErrorNone on success, an error code on failure."]
    pub fn iso14443_4b_poller_halt(instance: *mut Iso14443_4bPoller) -> Iso14443_4bError;
}
pub const MfClassicError_MfClassicErrorNone: MfClassicError = 0;
pub const MfClassicError_MfClassicErrorNotPresent: MfClassicError = 1;
pub const MfClassicError_MfClassicErrorProtocol: MfClassicError = 2;
pub const MfClassicError_MfClassicErrorAuth: MfClassicError = 3;
pub const MfClassicError_MfClassicErrorPartialRead: MfClassicError = 4;
pub const MfClassicError_MfClassicErrorTimeout: MfClassicError = 5;
pub type MfClassicError = core::ffi::c_uchar;
pub const MfClassicType_MfClassicTypeMini: MfClassicType = 0;
pub const MfClassicType_MfClassicType1k: MfClassicType = 1;
pub const MfClassicType_MfClassicType4k: MfClassicType = 2;
pub const MfClassicType_MfClassicTypeNum: MfClassicType = 3;
pub type MfClassicType = core::ffi::c_uchar;
pub const MfClassicAction_MfClassicActionDataRead: MfClassicAction = 0;
pub const MfClassicAction_MfClassicActionDataWrite: MfClassicAction = 1;
pub const MfClassicAction_MfClassicActionDataInc: MfClassicAction = 2;
pub const MfClassicAction_MfClassicActionDataDec: MfClassicAction = 3;
pub const MfClassicAction_MfClassicActionKeyARead: MfClassicAction = 4;
pub const MfClassicAction_MfClassicActionKeyAWrite: MfClassicAction = 5;
pub const MfClassicAction_MfClassicActionKeyBRead: MfClassicAction = 6;
pub const MfClassicAction_MfClassicActionKeyBWrite: MfClassicAction = 7;
pub const MfClassicAction_MfClassicActionACRead: MfClassicAction = 8;
pub const MfClassicAction_MfClassicActionACWrite: MfClassicAction = 9;
pub type MfClassicAction = core::ffi::c_uchar;
pub const MfClassicValueCommand_MfClassicValueCommandIncrement: MfClassicValueCommand = 0;
pub const MfClassicValueCommand_MfClassicValueCommandDecrement: MfClassicValueCommand = 1;
pub const MfClassicValueCommand_MfClassicValueCommandRestore: MfClassicValueCommand = 2;
pub const MfClassicValueCommand_MfClassicValueCommandInvalid: MfClassicValueCommand = 3;
pub type MfClassicValueCommand = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfClassicBlock {
    pub data: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_MfClassicBlock() {
    const UNINIT: ::core::mem::MaybeUninit<MfClassicBlock> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfClassicBlock>(),
        16usize,
        concat!("Size of: ", stringify!(MfClassicBlock))
    );
    assert_eq!(
        ::core::mem::align_of::<MfClassicBlock>(),
        1usize,
        concat!("Alignment of ", stringify!(MfClassicBlock))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicBlock),
            "::",
            stringify!(data)
        )
    );
}
pub const MfClassicKeyType_MfClassicKeyTypeA: MfClassicKeyType = 0;
pub const MfClassicKeyType_MfClassicKeyTypeB: MfClassicKeyType = 1;
pub type MfClassicKeyType = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfClassicKey {
    pub data: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_MfClassicKey() {
    const UNINIT: ::core::mem::MaybeUninit<MfClassicKey> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfClassicKey>(),
        6usize,
        concat!("Size of: ", stringify!(MfClassicKey))
    );
    assert_eq!(
        ::core::mem::align_of::<MfClassicKey>(),
        1usize,
        concat!("Alignment of ", stringify!(MfClassicKey))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicKey),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfClassicAccessBits {
    pub data: [u8; 4usize],
}
#[test]
fn bindgen_test_layout_MfClassicAccessBits() {
    const UNINIT: ::core::mem::MaybeUninit<MfClassicAccessBits> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfClassicAccessBits>(),
        4usize,
        concat!("Size of: ", stringify!(MfClassicAccessBits))
    );
    assert_eq!(
        ::core::mem::align_of::<MfClassicAccessBits>(),
        1usize,
        concat!("Alignment of ", stringify!(MfClassicAccessBits))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicAccessBits),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfClassicNt {
    pub data: [u8; 4usize],
}
#[test]
fn bindgen_test_layout_MfClassicNt() {
    const UNINIT: ::core::mem::MaybeUninit<MfClassicNt> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfClassicNt>(),
        4usize,
        concat!("Size of: ", stringify!(MfClassicNt))
    );
    assert_eq!(
        ::core::mem::align_of::<MfClassicNt>(),
        1usize,
        concat!("Alignment of ", stringify!(MfClassicNt))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicNt),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfClassicAt {
    pub data: [u8; 4usize],
}
#[test]
fn bindgen_test_layout_MfClassicAt() {
    const UNINIT: ::core::mem::MaybeUninit<MfClassicAt> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfClassicAt>(),
        4usize,
        concat!("Size of: ", stringify!(MfClassicAt))
    );
    assert_eq!(
        ::core::mem::align_of::<MfClassicAt>(),
        1usize,
        concat!("Alignment of ", stringify!(MfClassicAt))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicAt),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfClassicNr {
    pub data: [u8; 4usize],
}
#[test]
fn bindgen_test_layout_MfClassicNr() {
    const UNINIT: ::core::mem::MaybeUninit<MfClassicNr> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfClassicNr>(),
        4usize,
        concat!("Size of: ", stringify!(MfClassicNr))
    );
    assert_eq!(
        ::core::mem::align_of::<MfClassicNr>(),
        1usize,
        concat!("Alignment of ", stringify!(MfClassicNr))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicNr),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfClassicAr {
    pub data: [u8; 4usize],
}
#[test]
fn bindgen_test_layout_MfClassicAr() {
    const UNINIT: ::core::mem::MaybeUninit<MfClassicAr> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfClassicAr>(),
        4usize,
        concat!("Size of: ", stringify!(MfClassicAr))
    );
    assert_eq!(
        ::core::mem::align_of::<MfClassicAr>(),
        1usize,
        concat!("Alignment of ", stringify!(MfClassicAr))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicAr),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfClassicAuthContext {
    pub block_num: u8,
    pub key: MfClassicKey,
    pub key_type: MfClassicKeyType,
    pub nt: MfClassicNt,
    pub nr: MfClassicNr,
    pub ar: MfClassicAr,
    pub at: MfClassicAt,
}
#[test]
fn bindgen_test_layout_MfClassicAuthContext() {
    const UNINIT: ::core::mem::MaybeUninit<MfClassicAuthContext> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfClassicAuthContext>(),
        24usize,
        concat!("Size of: ", stringify!(MfClassicAuthContext))
    );
    assert_eq!(
        ::core::mem::align_of::<MfClassicAuthContext>(),
        1usize,
        concat!("Alignment of ", stringify!(MfClassicAuthContext))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).block_num) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicAuthContext),
            "::",
            stringify!(block_num)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicAuthContext),
            "::",
            stringify!(key)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key_type) as usize - ptr as usize },
        7usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicAuthContext),
            "::",
            stringify!(key_type)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).nt) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicAuthContext),
            "::",
            stringify!(nt)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).nr) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicAuthContext),
            "::",
            stringify!(nr)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ar) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicAuthContext),
            "::",
            stringify!(ar)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).at) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicAuthContext),
            "::",
            stringify!(at)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union MfClassicSectorTrailer {
    pub block: MfClassicBlock,
    pub __bindgen_anon_1: MfClassicSectorTrailer__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfClassicSectorTrailer__bindgen_ty_1 {
    pub key_a: MfClassicKey,
    pub access_bits: MfClassicAccessBits,
    pub key_b: MfClassicKey,
}
#[test]
fn bindgen_test_layout_MfClassicSectorTrailer__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<MfClassicSectorTrailer__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfClassicSectorTrailer__bindgen_ty_1>(),
        16usize,
        concat!(
            "Size of: ",
            stringify!(MfClassicSectorTrailer__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<MfClassicSectorTrailer__bindgen_ty_1>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(MfClassicSectorTrailer__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key_a) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicSectorTrailer__bindgen_ty_1),
            "::",
            stringify!(key_a)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).access_bits) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicSectorTrailer__bindgen_ty_1),
            "::",
            stringify!(access_bits)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key_b) as usize - ptr as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicSectorTrailer__bindgen_ty_1),
            "::",
            stringify!(key_b)
        )
    );
}
#[test]
fn bindgen_test_layout_MfClassicSectorTrailer() {
    const UNINIT: ::core::mem::MaybeUninit<MfClassicSectorTrailer> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfClassicSectorTrailer>(),
        16usize,
        concat!("Size of: ", stringify!(MfClassicSectorTrailer))
    );
    assert_eq!(
        ::core::mem::align_of::<MfClassicSectorTrailer>(),
        1usize,
        concat!("Alignment of ", stringify!(MfClassicSectorTrailer))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).block) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicSectorTrailer),
            "::",
            stringify!(block)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfClassicDeviceKeys {
    pub key_a_mask: u64,
    pub key_a: [MfClassicKey; 40usize],
    pub key_b_mask: u64,
    pub key_b: [MfClassicKey; 40usize],
}
#[test]
fn bindgen_test_layout_MfClassicDeviceKeys() {
    const UNINIT: ::core::mem::MaybeUninit<MfClassicDeviceKeys> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfClassicDeviceKeys>(),
        496usize,
        concat!("Size of: ", stringify!(MfClassicDeviceKeys))
    );
    assert_eq!(
        ::core::mem::align_of::<MfClassicDeviceKeys>(),
        8usize,
        concat!("Alignment of ", stringify!(MfClassicDeviceKeys))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key_a_mask) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicDeviceKeys),
            "::",
            stringify!(key_a_mask)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key_a) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicDeviceKeys),
            "::",
            stringify!(key_a)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key_b_mask) as usize - ptr as usize },
        248usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicDeviceKeys),
            "::",
            stringify!(key_b_mask)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key_b) as usize - ptr as usize },
        256usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicDeviceKeys),
            "::",
            stringify!(key_b)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfClassicData {
    pub iso14443_3a_data: *mut Iso14443_3aData,
    pub type_: MfClassicType,
    pub block_read_mask: [u32; 8usize],
    pub key_a_mask: u64,
    pub key_b_mask: u64,
    pub block: [MfClassicBlock; 256usize],
}
#[test]
fn bindgen_test_layout_MfClassicData() {
    const UNINIT: ::core::mem::MaybeUninit<MfClassicData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfClassicData>(),
        4152usize,
        concat!("Size of: ", stringify!(MfClassicData))
    );
    assert_eq!(
        ::core::mem::align_of::<MfClassicData>(),
        8usize,
        concat!("Alignment of ", stringify!(MfClassicData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).iso14443_3a_data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicData),
            "::",
            stringify!(iso14443_3a_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicData),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).block_read_mask) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicData),
            "::",
            stringify!(block_read_mask)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key_a_mask) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicData),
            "::",
            stringify!(key_a_mask)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key_b_mask) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicData),
            "::",
            stringify!(key_b_mask)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).block) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(MfClassicData),
            "::",
            stringify!(block)
        )
    );
}
extern "C" {
    pub fn mf_classic_alloc() -> *mut MfClassicData;
}
extern "C" {
    pub fn mf_classic_free(data: *mut MfClassicData);
}
extern "C" {
    pub fn mf_classic_reset(data: *mut MfClassicData);
}
extern "C" {
    pub fn mf_classic_copy(data: *mut MfClassicData, other: *const MfClassicData);
}
extern "C" {
    pub fn mf_classic_verify(data: *mut MfClassicData, device_type: *const FuriString) -> bool;
}
extern "C" {
    pub fn mf_classic_load(data: *mut MfClassicData, ff: *mut FlipperFormat, version: u32) -> bool;
}
extern "C" {
    pub fn mf_classic_save(data: *const MfClassicData, ff: *mut FlipperFormat) -> bool;
}
extern "C" {
    pub fn mf_classic_is_equal(data: *const MfClassicData, other: *const MfClassicData) -> bool;
}
extern "C" {
    pub fn mf_classic_get_device_name(
        data: *const MfClassicData,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn mf_classic_get_uid(data: *const MfClassicData, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    pub fn mf_classic_set_uid(data: *mut MfClassicData, uid: *const u8, uid_len: usize) -> bool;
}
extern "C" {
    pub fn mf_classic_get_base_data(data: *const MfClassicData) -> *mut Iso14443_3aData;
}
extern "C" {
    pub fn mf_classic_get_total_sectors_num(type_: MfClassicType) -> u8;
}
extern "C" {
    pub fn mf_classic_get_total_block_num(type_: MfClassicType) -> u16;
}
extern "C" {
    pub fn mf_classic_get_first_block_num_of_sector(sector: u8) -> u8;
}
extern "C" {
    pub fn mf_classic_get_blocks_num_in_sector(sector: u8) -> u8;
}
extern "C" {
    pub fn mf_classic_get_sector_trailer_num_by_sector(sector: u8) -> u8;
}
extern "C" {
    pub fn mf_classic_get_sector_trailer_num_by_block(block: u8) -> u8;
}
extern "C" {
    pub fn mf_classic_get_sector_trailer_by_sector(
        data: *const MfClassicData,
        sector_num: u8,
    ) -> *mut MfClassicSectorTrailer;
}
extern "C" {
    pub fn mf_classic_is_sector_trailer(block: u8) -> bool;
}
extern "C" {
    pub fn mf_classic_set_sector_trailer_read(
        data: *mut MfClassicData,
        block_num: u8,
        sec_tr: *mut MfClassicSectorTrailer,
    );
}
extern "C" {
    pub fn mf_classic_get_sector_by_block(block: u8) -> u8;
}
extern "C" {
    pub fn mf_classic_block_to_value(
        block: *const MfClassicBlock,
        value: *mut i32,
        addr: *mut u8,
    ) -> bool;
}
extern "C" {
    pub fn mf_classic_value_to_block(value: i32, addr: u8, block: *mut MfClassicBlock);
}
extern "C" {
    pub fn mf_classic_is_key_found(
        data: *const MfClassicData,
        sector_num: u8,
        key_type: MfClassicKeyType,
    ) -> bool;
}
extern "C" {
    pub fn mf_classic_set_key_found(
        data: *mut MfClassicData,
        sector_num: u8,
        key_type: MfClassicKeyType,
        key: u64,
    );
}
extern "C" {
    pub fn mf_classic_set_key_not_found(
        data: *mut MfClassicData,
        sector_num: u8,
        key_type: MfClassicKeyType,
    );
}
extern "C" {
    pub fn mf_classic_is_block_read(data: *const MfClassicData, block_num: u8) -> bool;
}
extern "C" {
    pub fn mf_classic_set_block_read(
        data: *mut MfClassicData,
        block_num: u8,
        block_data: *mut MfClassicBlock,
    );
}
extern "C" {
    pub fn mf_classic_is_sector_read(data: *const MfClassicData, sector_num: u8) -> bool;
}
extern "C" {
    pub fn mf_classic_get_read_sectors_and_keys(
        data: *const MfClassicData,
        sectors_read: *mut u8,
        keys_found: *mut u8,
    );
}
extern "C" {
    pub fn mf_classic_is_card_read(data: *const MfClassicData) -> bool;
}
extern "C" {
    pub fn mf_classic_is_value_block(sec_tr: *mut MfClassicSectorTrailer, block_num: u8) -> bool;
}
extern "C" {
    pub fn mf_classic_is_allowed_access_data_block(
        sec_tr: *mut MfClassicSectorTrailer,
        block_num: u8,
        key_type: MfClassicKeyType,
        action: MfClassicAction,
    ) -> bool;
}
extern "C" {
    pub fn mf_classic_is_allowed_access(
        data: *mut MfClassicData,
        block_num: u8,
        key_type: MfClassicKeyType,
        action: MfClassicAction,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfClassicPoller {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Collect tag nonce during authentication.\n\n Must ONLY be used inside the callback function.\n\n Starts authentication procedure and collects tag nonce.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `block_num` (direction in) - block number for authentication.\n * `key_type` (direction in) - key type to be used for authentication.\n * `nt` (direction out) - pointer to the MfClassicNt structure to be filled with nonce data.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_get_nt(
        instance: *mut MfClassicPoller,
        block_num: u8,
        key_type: MfClassicKeyType,
        nt: *mut MfClassicNt,
    ) -> MfClassicError;
}
extern "C" {
    #[doc = "Collect tag nonce during nested authentication.\n\n Must ONLY be used inside the callback function.\n\n Starts nested authentication procedure and collects tag nonce.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `block_num` (direction in) - block number for authentication.\n * `key_type` (direction in) - key type to be used for authentication.\n * `nt` (direction out) - pointer to the MfClassicNt structure to be filled with nonce data.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_get_nt_nested(
        instance: *mut MfClassicPoller,
        block_num: u8,
        key_type: MfClassicKeyType,
        nt: *mut MfClassicNt,
    ) -> MfClassicError;
}
extern "C" {
    #[doc = "Perform authentication.\n\n Must ONLY be used inside the callback function.\n\n Perform authentication as specified in Mf Classic protocol. Initialize crypto state for futher\n communication with the tag.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `block_num` (direction in) - block number for authentication.\n * `key` (direction in) - key to be used for authentication.\n * `key_type` (direction in) - key type to be used for authentication.\n * `data` (direction out) - pointer to MfClassicAuthContext structure to be filled with authentication data.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_auth(
        instance: *mut MfClassicPoller,
        block_num: u8,
        key: *mut MfClassicKey,
        key_type: MfClassicKeyType,
        data: *mut MfClassicAuthContext,
    ) -> MfClassicError;
}
extern "C" {
    #[doc = "Perform nested authentication.\n\n Must ONLY be used inside the callback function.\n\n Perform nested authentication as specified in Mf Classic protocol.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `block_num` (direction in) - block number for authentication.\n * `key` (direction in) - key to be used for authentication.\n * `key_type` (direction in) - key type to be used for authentication.\n * `data` (direction out) - pointer to MfClassicAuthContext structure to be filled with authentication data.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_auth_nested(
        instance: *mut MfClassicPoller,
        block_num: u8,
        key: *mut MfClassicKey,
        key_type: MfClassicKeyType,
        data: *mut MfClassicAuthContext,
    ) -> MfClassicError;
}
extern "C" {
    #[doc = "Halt the tag.\n\n Must ONLY be used inside the callback function.\n\n Halt the tag and reset crypto state of the poller.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_halt(instance: *mut MfClassicPoller) -> MfClassicError;
}
extern "C" {
    #[doc = "Read block from tag.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `block_num` (direction in) - block number to be read.\n * `data` (direction out) - pointer to the MfClassicBlock structure to be filled with block data.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_read_block(
        instance: *mut MfClassicPoller,
        block_num: u8,
        data: *mut MfClassicBlock,
    ) -> MfClassicError;
}
extern "C" {
    #[doc = "Write block to tag.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `block_num` (direction in) - block number to be written.\n * `data` (direction in) - pointer to the MfClassicBlock structure to be written.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_write_block(
        instance: *mut MfClassicPoller,
        block_num: u8,
        data: *mut MfClassicBlock,
    ) -> MfClassicError;
}
extern "C" {
    #[doc = "Perform value command on tag.\n\n Must ONLY be used inside the callback function.\n\n Perform Increment, Decrement or Restore command on tag. The result is stored in internal transfer\n block of the tag. Use mf_classic_poller_value_transfer to transfer the result to the tag.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `block_num` (direction in) - block number to be used for value command.\n * `cmd` (direction in) - value command to be performed.\n * `data` (direction in) - value to be used for value command.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_value_cmd(
        instance: *mut MfClassicPoller,
        block_num: u8,
        cmd: MfClassicValueCommand,
        data: i32,
    ) -> MfClassicError;
}
extern "C" {
    #[doc = "Transfer internal transfer block to tag.\n\n Must ONLY be used inside the callback function.\n\n Transfer internal transfer block to tag. The block is filled by mf_classic_poller_value_cmd.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `block_num` (direction in) - block number to be used for value command.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_value_transfer(
        instance: *mut MfClassicPoller,
        block_num: u8,
    ) -> MfClassicError;
}
extern "C" {
    #[doc = "Transmit and receive Iso14443_3a standard frames in poller mode.\n\n Must ONLY be used inside the callback function.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer, with a timeout defined by the fwt parameter.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_send_standard_frame(
        instance: *mut MfClassicPoller,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
        fwt_fc: u32,
    ) -> MfClassicError;
}
extern "C" {
    #[doc = "Transmit and receive Iso14443_3a frames in poller mode.\n\n Must ONLY be used inside the callback function.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer, with a timeout defined by the fwt parameter.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_send_frame(
        instance: *mut MfClassicPoller,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
        fwt_fc: u32,
    ) -> MfClassicError;
}
extern "C" {
    #[doc = "Transmit and receive Iso14443_3a frames with custom parity bits in poller mode.\n\n Must ONLY be used inside the callback function.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer, with a timeout defined by the fwt parameter.\n\n Custom parity bits must be set in the tx_buffer. The rx_buffer will contain\n the received data with the parity bits.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_send_custom_parity_frame(
        instance: *mut MfClassicPoller,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
        fwt_fc: u32,
    ) -> MfClassicError;
}
extern "C" {
    #[doc = "Transmit and receive Mifare Classic encrypted frames with custom parity bits in poller mode.\n\n Must ONLY be used inside the callback function.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer, with a timeout defined by the fwt parameter.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the plain data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with decyphered received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nMfClassicErrorNone on success, an error code on failure."]
    pub fn mf_classic_poller_send_encrypted_frame(
        instance: *mut MfClassicPoller,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
        fwt_fc: u32,
    ) -> MfClassicError;
}
extern "C" {
    pub fn mf_classic_poller_sync_collect_nt(
        nfc: *mut Nfc,
        block_num: u8,
        key_type: MfClassicKeyType,
        nt: *mut MfClassicNt,
    ) -> MfClassicError;
}
extern "C" {
    pub fn mf_classic_poller_sync_auth(
        nfc: *mut Nfc,
        block_num: u8,
        key: *mut MfClassicKey,
        key_type: MfClassicKeyType,
        data: *mut MfClassicAuthContext,
    ) -> MfClassicError;
}
extern "C" {
    pub fn mf_classic_poller_sync_read_block(
        nfc: *mut Nfc,
        block_num: u8,
        key: *mut MfClassicKey,
        key_type: MfClassicKeyType,
        data: *mut MfClassicBlock,
    ) -> MfClassicError;
}
extern "C" {
    pub fn mf_classic_poller_sync_write_block(
        nfc: *mut Nfc,
        block_num: u8,
        key: *mut MfClassicKey,
        key_type: MfClassicKeyType,
        data: *mut MfClassicBlock,
    ) -> MfClassicError;
}
extern "C" {
    pub fn mf_classic_poller_sync_read_value(
        nfc: *mut Nfc,
        block_num: u8,
        key: *mut MfClassicKey,
        key_type: MfClassicKeyType,
        value: *mut i32,
    ) -> MfClassicError;
}
extern "C" {
    pub fn mf_classic_poller_sync_change_value(
        nfc: *mut Nfc,
        block_num: u8,
        key: *mut MfClassicKey,
        key_type: MfClassicKeyType,
        data: i32,
        new_value: *mut i32,
    ) -> MfClassicError;
}
extern "C" {
    pub fn mf_classic_poller_sync_detect_type(
        nfc: *mut Nfc,
        type_: *mut MfClassicType,
    ) -> MfClassicError;
}
extern "C" {
    pub fn mf_classic_poller_sync_read(
        nfc: *mut Nfc,
        keys: *const MfClassicDeviceKeys,
        data: *mut MfClassicData,
    ) -> MfClassicError;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfDesfireVersion {
    pub hw_vendor: u8,
    pub hw_type: u8,
    pub hw_subtype: u8,
    pub hw_major: u8,
    pub hw_minor: u8,
    pub hw_storage: u8,
    pub hw_proto: u8,
    pub sw_vendor: u8,
    pub sw_type: u8,
    pub sw_subtype: u8,
    pub sw_major: u8,
    pub sw_minor: u8,
    pub sw_storage: u8,
    pub sw_proto: u8,
    pub uid: [u8; 7usize],
    pub batch: [u8; 5usize],
    pub prod_week: u8,
    pub prod_year: u8,
}
#[test]
fn bindgen_test_layout_MfDesfireVersion() {
    const UNINIT: ::core::mem::MaybeUninit<MfDesfireVersion> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfDesfireVersion>(),
        28usize,
        concat!("Size of: ", stringify!(MfDesfireVersion))
    );
    assert_eq!(
        ::core::mem::align_of::<MfDesfireVersion>(),
        1usize,
        concat!("Alignment of ", stringify!(MfDesfireVersion))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_vendor) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(hw_vendor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_type) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(hw_type)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_subtype) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(hw_subtype)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_major) as usize - ptr as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(hw_major)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_minor) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(hw_minor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_storage) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(hw_storage)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_proto) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(hw_proto)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_vendor) as usize - ptr as usize },
        7usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(sw_vendor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_type) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(sw_type)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_subtype) as usize - ptr as usize },
        9usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(sw_subtype)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_major) as usize - ptr as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(sw_major)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_minor) as usize - ptr as usize },
        11usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(sw_minor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_storage) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(sw_storage)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_proto) as usize - ptr as usize },
        13usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(sw_proto)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).uid) as usize - ptr as usize },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(uid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).batch) as usize - ptr as usize },
        21usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(batch)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).prod_week) as usize - ptr as usize },
        26usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(prod_week)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).prod_year) as usize - ptr as usize },
        27usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireVersion),
            "::",
            stringify!(prod_year)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfDesfireFreeMemory {
    pub bytes_free: u32,
    pub is_present: bool,
}
#[test]
fn bindgen_test_layout_MfDesfireFreeMemory() {
    const UNINIT: ::core::mem::MaybeUninit<MfDesfireFreeMemory> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfDesfireFreeMemory>(),
        8usize,
        concat!("Size of: ", stringify!(MfDesfireFreeMemory))
    );
    assert_eq!(
        ::core::mem::align_of::<MfDesfireFreeMemory>(),
        4usize,
        concat!("Alignment of ", stringify!(MfDesfireFreeMemory))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).bytes_free) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFreeMemory),
            "::",
            stringify!(bytes_free)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).is_present) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFreeMemory),
            "::",
            stringify!(is_present)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfDesfireKeySettings {
    pub is_master_key_changeable: bool,
    pub is_free_directory_list: bool,
    pub is_free_create_delete: bool,
    pub is_config_changeable: bool,
    pub change_key_id: u8,
    pub max_keys: u8,
    pub flags: u8,
}
#[test]
fn bindgen_test_layout_MfDesfireKeySettings() {
    const UNINIT: ::core::mem::MaybeUninit<MfDesfireKeySettings> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfDesfireKeySettings>(),
        7usize,
        concat!("Size of: ", stringify!(MfDesfireKeySettings))
    );
    assert_eq!(
        ::core::mem::align_of::<MfDesfireKeySettings>(),
        1usize,
        concat!("Alignment of ", stringify!(MfDesfireKeySettings))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).is_master_key_changeable) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireKeySettings),
            "::",
            stringify!(is_master_key_changeable)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).is_free_directory_list) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireKeySettings),
            "::",
            stringify!(is_free_directory_list)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).is_free_create_delete) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireKeySettings),
            "::",
            stringify!(is_free_create_delete)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).is_config_changeable) as usize - ptr as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireKeySettings),
            "::",
            stringify!(is_config_changeable)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).change_key_id) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireKeySettings),
            "::",
            stringify!(change_key_id)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).max_keys) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireKeySettings),
            "::",
            stringify!(max_keys)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireKeySettings),
            "::",
            stringify!(flags)
        )
    );
}
pub type MfDesfireKeyVersion = u8;
pub const MfDesfireFileType_MfDesfireFileTypeStandard: MfDesfireFileType = 0;
pub const MfDesfireFileType_MfDesfireFileTypeBackup: MfDesfireFileType = 1;
pub const MfDesfireFileType_MfDesfireFileTypeValue: MfDesfireFileType = 2;
pub const MfDesfireFileType_MfDesfireFileTypeLinearRecord: MfDesfireFileType = 3;
pub const MfDesfireFileType_MfDesfireFileTypeCyclicRecord: MfDesfireFileType = 4;
pub type MfDesfireFileType = core::ffi::c_uchar;
pub const MfDesfireFileCommunicationSettings_MfDesfireFileCommunicationSettingsPlaintext:
    MfDesfireFileCommunicationSettings = 0;
pub const MfDesfireFileCommunicationSettings_MfDesfireFileCommunicationSettingsAuthenticated:
    MfDesfireFileCommunicationSettings = 1;
pub const MfDesfireFileCommunicationSettings_MfDesfireFileCommunicationSettingsEnciphered:
    MfDesfireFileCommunicationSettings = 3;
pub type MfDesfireFileCommunicationSettings = core::ffi::c_uchar;
pub type MfDesfireFileId = u8;
pub type MfDesfireFileAccessRights = u16;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MfDesfireFileSettings {
    pub type_: MfDesfireFileType,
    pub comm: MfDesfireFileCommunicationSettings,
    pub access_rights: [MfDesfireFileAccessRights; 14usize],
    pub access_rights_len: u8,
    pub __bindgen_anon_1: MfDesfireFileSettings__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union MfDesfireFileSettings__bindgen_ty_1 {
    pub data: MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_1,
    pub value: MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_2,
    pub record: MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_3,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_1 {
    pub size: u32,
}
#[test]
fn bindgen_test_layout_MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_1>(),
        4usize,
        concat!(
            "Size of: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_1>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(size)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_2 {
    pub lo_limit: u32,
    pub hi_limit: u32,
    pub limited_credit_value: u32,
    pub limited_credit_enabled: bool,
}
#[test]
fn bindgen_test_layout_MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_2() {
    const UNINIT: ::core::mem::MaybeUninit<MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_2> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_2>(),
        16usize,
        concat!(
            "Size of: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_2)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_2>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).lo_limit) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(lo_limit)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hi_limit) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(hi_limit)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).limited_credit_value) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(limited_credit_value)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).limited_credit_enabled) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(limited_credit_enabled)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_3 {
    pub size: u32,
    pub max: u32,
    pub cur: u32,
}
#[test]
fn bindgen_test_layout_MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_3() {
    const UNINIT: ::core::mem::MaybeUninit<MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_3> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_3>(),
        12usize,
        concat!(
            "Size of: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_3)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_3>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_3)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_3),
            "::",
            stringify!(size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).max) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_3),
            "::",
            stringify!(max)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).cur) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1__bindgen_ty_3),
            "::",
            stringify!(cur)
        )
    );
}
#[test]
fn bindgen_test_layout_MfDesfireFileSettings__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<MfDesfireFileSettings__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfDesfireFileSettings__bindgen_ty_1>(),
        16usize,
        concat!("Size of: ", stringify!(MfDesfireFileSettings__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<MfDesfireFileSettings__bindgen_ty_1>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1),
            "::",
            stringify!(value)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).record) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings__bindgen_ty_1),
            "::",
            stringify!(record)
        )
    );
}
#[test]
fn bindgen_test_layout_MfDesfireFileSettings() {
    const UNINIT: ::core::mem::MaybeUninit<MfDesfireFileSettings> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfDesfireFileSettings>(),
        48usize,
        concat!("Size of: ", stringify!(MfDesfireFileSettings))
    );
    assert_eq!(
        ::core::mem::align_of::<MfDesfireFileSettings>(),
        4usize,
        concat!("Alignment of ", stringify!(MfDesfireFileSettings))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).comm) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings),
            "::",
            stringify!(comm)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).access_rights) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings),
            "::",
            stringify!(access_rights)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).access_rights_len) as usize - ptr as usize },
        30usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileSettings),
            "::",
            stringify!(access_rights_len)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfDesfireFileData {
    pub data: *mut SimpleArray,
}
#[test]
fn bindgen_test_layout_MfDesfireFileData() {
    const UNINIT: ::core::mem::MaybeUninit<MfDesfireFileData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfDesfireFileData>(),
        4usize,
        concat!("Size of: ", stringify!(MfDesfireFileData))
    );
    assert_eq!(
        ::core::mem::align_of::<MfDesfireFileData>(),
        4usize,
        concat!("Alignment of ", stringify!(MfDesfireFileData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireFileData),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfDesfireApplicationId {
    pub data: [u8; 3usize],
}
#[test]
fn bindgen_test_layout_MfDesfireApplicationId() {
    const UNINIT: ::core::mem::MaybeUninit<MfDesfireApplicationId> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfDesfireApplicationId>(),
        3usize,
        concat!("Size of: ", stringify!(MfDesfireApplicationId))
    );
    assert_eq!(
        ::core::mem::align_of::<MfDesfireApplicationId>(),
        1usize,
        concat!("Alignment of ", stringify!(MfDesfireApplicationId))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireApplicationId),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfDesfireApplication {
    pub key_settings: MfDesfireKeySettings,
    pub key_versions: *mut SimpleArray,
    pub file_ids: *mut SimpleArray,
    pub file_settings: *mut SimpleArray,
    pub file_data: *mut SimpleArray,
}
#[test]
fn bindgen_test_layout_MfDesfireApplication() {
    const UNINIT: ::core::mem::MaybeUninit<MfDesfireApplication> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfDesfireApplication>(),
        24usize,
        concat!("Size of: ", stringify!(MfDesfireApplication))
    );
    assert_eq!(
        ::core::mem::align_of::<MfDesfireApplication>(),
        4usize,
        concat!("Alignment of ", stringify!(MfDesfireApplication))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key_settings) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireApplication),
            "::",
            stringify!(key_settings)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).key_versions) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireApplication),
            "::",
            stringify!(key_versions)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).file_ids) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireApplication),
            "::",
            stringify!(file_ids)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).file_settings) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireApplication),
            "::",
            stringify!(file_settings)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).file_data) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireApplication),
            "::",
            stringify!(file_data)
        )
    );
}
pub const MfDesfireError_MfDesfireErrorNone: MfDesfireError = 0;
pub const MfDesfireError_MfDesfireErrorNotPresent: MfDesfireError = 1;
pub const MfDesfireError_MfDesfireErrorProtocol: MfDesfireError = 2;
pub const MfDesfireError_MfDesfireErrorTimeout: MfDesfireError = 3;
pub const MfDesfireError_MfDesfireErrorAuthentication: MfDesfireError = 4;
pub type MfDesfireError = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfDesfireData {
    pub iso14443_4a_data: *mut Iso14443_4aData,
    pub version: MfDesfireVersion,
    pub free_memory: MfDesfireFreeMemory,
    pub master_key_settings: MfDesfireKeySettings,
    pub master_key_versions: *mut SimpleArray,
    pub application_ids: *mut SimpleArray,
    pub applications: *mut SimpleArray,
}
#[test]
fn bindgen_test_layout_MfDesfireData() {
    const UNINIT: ::core::mem::MaybeUninit<MfDesfireData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfDesfireData>(),
        60usize,
        concat!("Size of: ", stringify!(MfDesfireData))
    );
    assert_eq!(
        ::core::mem::align_of::<MfDesfireData>(),
        4usize,
        concat!("Alignment of ", stringify!(MfDesfireData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).iso14443_4a_data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireData),
            "::",
            stringify!(iso14443_4a_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).version) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireData),
            "::",
            stringify!(version)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).free_memory) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireData),
            "::",
            stringify!(free_memory)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).master_key_settings) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireData),
            "::",
            stringify!(master_key_settings)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).master_key_versions) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireData),
            "::",
            stringify!(master_key_versions)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).application_ids) as usize - ptr as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireData),
            "::",
            stringify!(application_ids)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).applications) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(MfDesfireData),
            "::",
            stringify!(applications)
        )
    );
}
extern "C" {
    pub fn mf_desfire_alloc() -> *mut MfDesfireData;
}
extern "C" {
    pub fn mf_desfire_free(data: *mut MfDesfireData);
}
extern "C" {
    pub fn mf_desfire_reset(data: *mut MfDesfireData);
}
extern "C" {
    pub fn mf_desfire_copy(data: *mut MfDesfireData, other: *const MfDesfireData);
}
extern "C" {
    pub fn mf_desfire_verify(data: *mut MfDesfireData, device_type: *const FuriString) -> bool;
}
extern "C" {
    pub fn mf_desfire_load(data: *mut MfDesfireData, ff: *mut FlipperFormat, version: u32) -> bool;
}
extern "C" {
    pub fn mf_desfire_save(data: *const MfDesfireData, ff: *mut FlipperFormat) -> bool;
}
extern "C" {
    pub fn mf_desfire_is_equal(data: *const MfDesfireData, other: *const MfDesfireData) -> bool;
}
extern "C" {
    pub fn mf_desfire_get_device_name(
        data: *const MfDesfireData,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn mf_desfire_get_uid(data: *const MfDesfireData, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    pub fn mf_desfire_set_uid(data: *mut MfDesfireData, uid: *const u8, uid_len: usize) -> bool;
}
extern "C" {
    pub fn mf_desfire_get_base_data(data: *const MfDesfireData) -> *mut Iso14443_4aData;
}
extern "C" {
    pub fn mf_desfire_get_application(
        data: *const MfDesfireData,
        app_id: *const MfDesfireApplicationId,
    ) -> *const MfDesfireApplication;
}
extern "C" {
    pub fn mf_desfire_get_file_settings(
        data: *const MfDesfireApplication,
        file_id: *const MfDesfireFileId,
    ) -> *const MfDesfireFileSettings;
}
extern "C" {
    pub fn mf_desfire_get_file_data(
        data: *const MfDesfireApplication,
        file_id: *const MfDesfireFileId,
    ) -> *const MfDesfireFileData;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfDesfirePoller {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Transmit and receive MfDesfire chunks in poller mode.\n\n Must ONLY be used inside the callback function.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer, with a timeout defined by the fwt parameter.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_send_chunks(
        instance: *mut MfDesfirePoller,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read MfDesfire card version.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the MfDesfireVersion structure to be filled with version data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_version(
        instance: *mut MfDesfirePoller,
        data: *mut MfDesfireVersion,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read free memory available on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the MfDesfireFreeMemory structure to be filled with free memory data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_free_memory(
        instance: *mut MfDesfirePoller,
        data: *mut MfDesfireFreeMemory,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read key settings on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the MfDesfireKeySettings structure to be filled with key settings data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_key_settings(
        instance: *mut MfDesfirePoller,
        data: *mut MfDesfireKeySettings,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read key version on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `key_num` (direction out) - key number.\n * `data` (direction in) - pointer to the MfDesfireKeyVersion structure to be filled with key version data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_key_version(
        instance: *mut MfDesfirePoller,
        key_num: u8,
        data: *mut MfDesfireKeyVersion,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read key versions on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the SimpleArray structure to be filled with key versions data.\n * `count` (direction in) - number of key versions to read.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_key_versions(
        instance: *mut MfDesfirePoller,
        data: *mut SimpleArray,
        count: u32,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read applications IDs on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the SimpleArray structure to be filled with application ids data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_application_ids(
        instance: *mut MfDesfirePoller,
        data: *mut SimpleArray,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Select application on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `id` (direction in) - pointer to the MfDesfireApplicationId structure with application id to select.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_select_application(
        instance: *mut MfDesfirePoller,
        id: *const MfDesfireApplicationId,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read file IDs for selected application on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the SimpleArray structure to be filled with file ids data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_file_ids(
        instance: *mut MfDesfirePoller,
        data: *mut SimpleArray,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read file settings on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `id` (direction in) - file id to read settings for.\n * `data` (direction out) - pointer to the MfDesfireFileSettings structure to be filled with file settings data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_file_settings(
        instance: *mut MfDesfirePoller,
        id: MfDesfireFileId,
        data: *mut MfDesfireFileSettings,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read multiple file settings on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `file_ids` (direction in) - pointer to the SimpleArray structure array with file ids to read settings for.\n * `data` (direction out) - pointer to the SimpleArray structure array to be filled with file settings data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_file_settings_multi(
        instance: *mut MfDesfirePoller,
        file_ids: *const SimpleArray,
        data: *mut SimpleArray,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read file data on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `id` (direction in) - file id to read data from.\n * `offset` (direction in) - offset in bytes to start reading from.\n * `size` (direction in) - number of bytes to read.\n * `data` (direction out) - pointer to the MfDesfireFileData structure to be filled with file data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_file_data(
        instance: *mut MfDesfirePoller,
        id: MfDesfireFileId,
        offset: u32,
        size: usize,
        data: *mut MfDesfireFileData,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read file value on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `id` (direction in) - file id to read value from.\n * `data` (direction out) - pointer to the MfDesfireFileData structure to be filled with file value.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_file_value(
        instance: *mut MfDesfirePoller,
        id: MfDesfireFileId,
        data: *mut MfDesfireFileData,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read file records on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `id` (direction in) - file id to read data from.\n * `offset` (direction in) - offset in bytes to start reading from.\n * `size` (direction in) - number of bytes to read.\n * `data` (direction out) - pointer to the MfDesfireFileData structure to be filled with file records data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_file_records(
        instance: *mut MfDesfirePoller,
        id: MfDesfireFileId,
        offset: u32,
        size: usize,
        data: *mut MfDesfireFileData,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read data from multiple files on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `file_ids` (direction in) - pointer to the SimpleArray structure array with files ids to read data from.\n * `file_settings` (direction in) - pointer to the SimpleArray structure array with files settings to read data from.\n * `data` (direction out) - pointer to the SimpleArray structure array to be filled with files data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_file_data_multi(
        instance: *mut MfDesfirePoller,
        file_ids: *const SimpleArray,
        file_settings: *const SimpleArray,
        data: *mut SimpleArray,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read application data for selected application on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the MfDesfireApplication structure to be filled with application data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_application(
        instance: *mut MfDesfirePoller,
        data: *mut MfDesfireApplication,
    ) -> MfDesfireError;
}
extern "C" {
    #[doc = "Read multiple applications data on MfDesfire card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `app_ids` (direction in) - pointer to the SimpleArray structure array with application ids to read data from.\n * `data` (direction out) - pointer to the SimpleArray structure array to be filled with applications data.\n # Returns\n\nMfDesfireErrorNone on success, an error code on failure."]
    pub fn mf_desfire_poller_read_applications(
        instance: *mut MfDesfirePoller,
        app_ids: *const SimpleArray,
        data: *mut SimpleArray,
    ) -> MfDesfireError;
}
pub const MfPlusError_MfPlusErrorNone: MfPlusError = 0;
pub const MfPlusError_MfPlusErrorUnknown: MfPlusError = 1;
pub const MfPlusError_MfPlusErrorNotPresent: MfPlusError = 2;
pub const MfPlusError_MfPlusErrorProtocol: MfPlusError = 3;
pub const MfPlusError_MfPlusErrorAuth: MfPlusError = 4;
pub const MfPlusError_MfPlusErrorPartialRead: MfPlusError = 5;
pub const MfPlusError_MfPlusErrorTimeout: MfPlusError = 6;
pub type MfPlusError = core::ffi::c_uchar;
pub const MfPlusType_MfPlusTypePlus: MfPlusType = 0;
pub const MfPlusType_MfPlusTypeEV1: MfPlusType = 1;
pub const MfPlusType_MfPlusTypeEV2: MfPlusType = 2;
pub const MfPlusType_MfPlusTypeS: MfPlusType = 3;
pub const MfPlusType_MfPlusTypeSE: MfPlusType = 4;
pub const MfPlusType_MfPlusTypeX: MfPlusType = 5;
pub const MfPlusType_MfPlusTypeUnknown: MfPlusType = 6;
pub const MfPlusType_MfPlusTypeNum: MfPlusType = 7;
pub type MfPlusType = core::ffi::c_uchar;
pub const MfPlusSize_MfPlusSize1K: MfPlusSize = 0;
pub const MfPlusSize_MfPlusSize2K: MfPlusSize = 1;
pub const MfPlusSize_MfPlusSize4K: MfPlusSize = 2;
pub const MfPlusSize_MfPlusSizeUnknown: MfPlusSize = 3;
pub const MfPlusSize_MfPlusSizeNum: MfPlusSize = 4;
pub type MfPlusSize = core::ffi::c_uchar;
pub const MfPlusSecurityLevel_MfPlusSecurityLevel0: MfPlusSecurityLevel = 0;
pub const MfPlusSecurityLevel_MfPlusSecurityLevel1: MfPlusSecurityLevel = 1;
pub const MfPlusSecurityLevel_MfPlusSecurityLevel2: MfPlusSecurityLevel = 2;
pub const MfPlusSecurityLevel_MfPlusSecurityLevel3: MfPlusSecurityLevel = 3;
pub const MfPlusSecurityLevel_MfPlusSecurityLevelUnknown: MfPlusSecurityLevel = 4;
pub const MfPlusSecurityLevel_MfPlusSecurityLevelNum: MfPlusSecurityLevel = 5;
pub type MfPlusSecurityLevel = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfPlusVersion {
    pub hw_vendor: u8,
    pub hw_type: u8,
    pub hw_subtype: u8,
    pub hw_major: u8,
    pub hw_minor: u8,
    pub hw_storage: u8,
    pub hw_proto: u8,
    pub sw_vendor: u8,
    pub sw_type: u8,
    pub sw_subtype: u8,
    pub sw_major: u8,
    pub sw_minor: u8,
    pub sw_storage: u8,
    pub sw_proto: u8,
    pub uid: [u8; 7usize],
    pub batch: [u8; 5usize],
    pub prod_week: u8,
    pub prod_year: u8,
}
#[test]
fn bindgen_test_layout_MfPlusVersion() {
    const UNINIT: ::core::mem::MaybeUninit<MfPlusVersion> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfPlusVersion>(),
        28usize,
        concat!("Size of: ", stringify!(MfPlusVersion))
    );
    assert_eq!(
        ::core::mem::align_of::<MfPlusVersion>(),
        1usize,
        concat!("Alignment of ", stringify!(MfPlusVersion))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_vendor) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(hw_vendor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_type) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(hw_type)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_subtype) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(hw_subtype)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_major) as usize - ptr as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(hw_major)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_minor) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(hw_minor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_storage) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(hw_storage)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).hw_proto) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(hw_proto)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_vendor) as usize - ptr as usize },
        7usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(sw_vendor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_type) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(sw_type)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_subtype) as usize - ptr as usize },
        9usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(sw_subtype)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_major) as usize - ptr as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(sw_major)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_minor) as usize - ptr as usize },
        11usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(sw_minor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_storage) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(sw_storage)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sw_proto) as usize - ptr as usize },
        13usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(sw_proto)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).uid) as usize - ptr as usize },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(uid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).batch) as usize - ptr as usize },
        21usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(batch)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).prod_week) as usize - ptr as usize },
        26usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(prod_week)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).prod_year) as usize - ptr as usize },
        27usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusVersion),
            "::",
            stringify!(prod_year)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfPlusData {
    pub iso14443_4a_data: *mut Iso14443_4aData,
    pub version: MfPlusVersion,
    pub type_: MfPlusType,
    pub size: MfPlusSize,
    pub security_level: MfPlusSecurityLevel,
    pub device_name: *mut FuriString,
}
#[test]
fn bindgen_test_layout_MfPlusData() {
    const UNINIT: ::core::mem::MaybeUninit<MfPlusData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfPlusData>(),
        40usize,
        concat!("Size of: ", stringify!(MfPlusData))
    );
    assert_eq!(
        ::core::mem::align_of::<MfPlusData>(),
        4usize,
        concat!("Alignment of ", stringify!(MfPlusData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).iso14443_4a_data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusData),
            "::",
            stringify!(iso14443_4a_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).version) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusData),
            "::",
            stringify!(version)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusData),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        33usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusData),
            "::",
            stringify!(size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).security_level) as usize - ptr as usize },
        34usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusData),
            "::",
            stringify!(security_level)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).device_name) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(MfPlusData),
            "::",
            stringify!(device_name)
        )
    );
}
extern "C" {
    pub fn mf_plus_alloc() -> *mut MfPlusData;
}
extern "C" {
    pub fn mf_plus_free(data: *mut MfPlusData);
}
extern "C" {
    pub fn mf_plus_reset(data: *mut MfPlusData);
}
extern "C" {
    pub fn mf_plus_copy(data: *mut MfPlusData, other: *const MfPlusData);
}
extern "C" {
    pub fn mf_plus_verify(data: *mut MfPlusData, device_type: *const FuriString) -> bool;
}
extern "C" {
    pub fn mf_plus_load(data: *mut MfPlusData, ff: *mut FlipperFormat, version: u32) -> bool;
}
extern "C" {
    pub fn mf_plus_save(data: *const MfPlusData, ff: *mut FlipperFormat) -> bool;
}
extern "C" {
    pub fn mf_plus_is_equal(data: *const MfPlusData, other: *const MfPlusData) -> bool;
}
extern "C" {
    pub fn mf_plus_get_device_name(
        data: *const MfPlusData,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn mf_plus_get_uid(data: *const MfPlusData, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    pub fn mf_plus_set_uid(data: *mut MfPlusData, uid: *const u8, uid_len: usize) -> bool;
}
extern "C" {
    pub fn mf_plus_get_base_data(data: *const MfPlusData) -> *mut Iso14443_4aData;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfPlusPoller {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Read MfPlus card version.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the MfPlusVersion structure to be filled with version data.\n # Returns\n\nMfPlusErrorNone on success, an error code on failure."]
    pub fn mf_plus_poller_read_version(
        instance: *mut MfPlusPoller,
        data: *mut MfPlusVersion,
    ) -> MfPlusError;
}
pub const MfUltralightError_MfUltralightErrorNone: MfUltralightError = 0;
pub const MfUltralightError_MfUltralightErrorNotPresent: MfUltralightError = 1;
pub const MfUltralightError_MfUltralightErrorProtocol: MfUltralightError = 2;
pub const MfUltralightError_MfUltralightErrorAuth: MfUltralightError = 3;
pub const MfUltralightError_MfUltralightErrorTimeout: MfUltralightError = 4;
pub type MfUltralightError = core::ffi::c_uchar;
pub const MfUltralightType_MfUltralightTypeOrigin: MfUltralightType = 0;
pub const MfUltralightType_MfUltralightTypeNTAG203: MfUltralightType = 1;
pub const MfUltralightType_MfUltralightTypeMfulC: MfUltralightType = 2;
pub const MfUltralightType_MfUltralightTypeUL11: MfUltralightType = 3;
pub const MfUltralightType_MfUltralightTypeUL21: MfUltralightType = 4;
pub const MfUltralightType_MfUltralightTypeNTAG213: MfUltralightType = 5;
pub const MfUltralightType_MfUltralightTypeNTAG215: MfUltralightType = 6;
pub const MfUltralightType_MfUltralightTypeNTAG216: MfUltralightType = 7;
pub const MfUltralightType_MfUltralightTypeNTAGI2C1K: MfUltralightType = 8;
pub const MfUltralightType_MfUltralightTypeNTAGI2C2K: MfUltralightType = 9;
pub const MfUltralightType_MfUltralightTypeNTAGI2CPlus1K: MfUltralightType = 10;
pub const MfUltralightType_MfUltralightTypeNTAGI2CPlus2K: MfUltralightType = 11;
pub const MfUltralightType_MfUltralightTypeNum: MfUltralightType = 12;
pub type MfUltralightType = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfUltralightPage {
    pub data: [u8; 4usize],
}
#[test]
fn bindgen_test_layout_MfUltralightPage() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightPage> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightPage>(),
        4usize,
        concat!("Size of: ", stringify!(MfUltralightPage))
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightPage>(),
        1usize,
        concat!("Alignment of ", stringify!(MfUltralightPage))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightPage),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfUltralightPageReadCommandData {
    pub page: [MfUltralightPage; 4usize],
}
#[test]
fn bindgen_test_layout_MfUltralightPageReadCommandData() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightPageReadCommandData> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightPageReadCommandData>(),
        16usize,
        concat!("Size of: ", stringify!(MfUltralightPageReadCommandData))
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightPageReadCommandData>(),
        1usize,
        concat!("Alignment of ", stringify!(MfUltralightPageReadCommandData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).page) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightPageReadCommandData),
            "::",
            stringify!(page)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfUltralightVersion {
    pub header: u8,
    pub vendor_id: u8,
    pub prod_type: u8,
    pub prod_subtype: u8,
    pub prod_ver_major: u8,
    pub prod_ver_minor: u8,
    pub storage_size: u8,
    pub protocol_type: u8,
}
#[test]
fn bindgen_test_layout_MfUltralightVersion() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightVersion> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightVersion>(),
        8usize,
        concat!("Size of: ", stringify!(MfUltralightVersion))
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightVersion>(),
        1usize,
        concat!("Alignment of ", stringify!(MfUltralightVersion))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightVersion),
            "::",
            stringify!(header)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).vendor_id) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightVersion),
            "::",
            stringify!(vendor_id)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).prod_type) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightVersion),
            "::",
            stringify!(prod_type)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).prod_subtype) as usize - ptr as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightVersion),
            "::",
            stringify!(prod_subtype)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).prod_ver_major) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightVersion),
            "::",
            stringify!(prod_ver_major)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).prod_ver_minor) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightVersion),
            "::",
            stringify!(prod_ver_minor)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).storage_size) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightVersion),
            "::",
            stringify!(storage_size)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).protocol_type) as usize - ptr as usize },
        7usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightVersion),
            "::",
            stringify!(protocol_type)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfUltralightSignature {
    pub data: [u8; 32usize],
}
#[test]
fn bindgen_test_layout_MfUltralightSignature() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightSignature> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightSignature>(),
        32usize,
        concat!("Size of: ", stringify!(MfUltralightSignature))
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightSignature>(),
        1usize,
        concat!("Alignment of ", stringify!(MfUltralightSignature))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightSignature),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union MfUltralightCounter {
    pub counter: u32,
    pub data: [u8; 3usize],
}
#[test]
fn bindgen_test_layout_MfUltralightCounter() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightCounter> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightCounter>(),
        4usize,
        concat!("Size of: ", stringify!(MfUltralightCounter))
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightCounter>(),
        4usize,
        concat!("Alignment of ", stringify!(MfUltralightCounter))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).counter) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightCounter),
            "::",
            stringify!(counter)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightCounter),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfUltralightTearingFlag {
    pub data: u8,
}
#[test]
fn bindgen_test_layout_MfUltralightTearingFlag() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightTearingFlag> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightTearingFlag>(),
        1usize,
        concat!("Size of: ", stringify!(MfUltralightTearingFlag))
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightTearingFlag>(),
        1usize,
        concat!("Alignment of ", stringify!(MfUltralightTearingFlag))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightTearingFlag),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfUltralightAuthPassword {
    pub data: [u8; 4usize],
}
#[test]
fn bindgen_test_layout_MfUltralightAuthPassword() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightAuthPassword> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightAuthPassword>(),
        4usize,
        concat!("Size of: ", stringify!(MfUltralightAuthPassword))
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightAuthPassword>(),
        1usize,
        concat!("Alignment of ", stringify!(MfUltralightAuthPassword))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightAuthPassword),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfUltralightC3DesAuthKey {
    pub data: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_MfUltralightC3DesAuthKey() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightC3DesAuthKey> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightC3DesAuthKey>(),
        16usize,
        concat!("Size of: ", stringify!(MfUltralightC3DesAuthKey))
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightC3DesAuthKey>(),
        1usize,
        concat!("Alignment of ", stringify!(MfUltralightC3DesAuthKey))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightC3DesAuthKey),
            "::",
            stringify!(data)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfUltralightAuthPack {
    pub data: [u8; 2usize],
}
#[test]
fn bindgen_test_layout_MfUltralightAuthPack() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightAuthPack> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightAuthPack>(),
        2usize,
        concat!("Size of: ", stringify!(MfUltralightAuthPack))
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightAuthPack>(),
        1usize,
        concat!("Alignment of ", stringify!(MfUltralightAuthPack))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightAuthPack),
            "::",
            stringify!(data)
        )
    );
}
pub const MfUltralightMirrorConf_MfUltralightMirrorNone: MfUltralightMirrorConf = 0;
pub const MfUltralightMirrorConf_MfUltralightMirrorUid: MfUltralightMirrorConf = 1;
pub const MfUltralightMirrorConf_MfUltralightMirrorCounter: MfUltralightMirrorConf = 2;
pub const MfUltralightMirrorConf_MfUltralightMirrorUidCounter: MfUltralightMirrorConf = 3;
pub type MfUltralightMirrorConf = core::ffi::c_uchar;
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct MfUltralightConfigPages {
    pub mirror: MfUltralightConfigPages__bindgen_ty_1,
    pub rfui1: u8,
    pub mirror_page: u8,
    pub auth0: u8,
    pub access: MfUltralightConfigPages__bindgen_ty_2,
    pub vctid: u8,
    pub rfui2: [u8; 2usize],
    pub password: MfUltralightAuthPassword,
    pub pack: MfUltralightAuthPack,
    pub rfui3: [u8; 2usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union MfUltralightConfigPages__bindgen_ty_1 {
    pub value: u8,
    pub __bindgen_anon_1: MfUltralightConfigPages__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfUltralightConfigPages__bindgen_ty_1__bindgen_ty_1 {
    pub _bitfield_align_1: [u8; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
#[test]
fn bindgen_test_layout_MfUltralightConfigPages__bindgen_ty_1__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<MfUltralightConfigPages__bindgen_ty_1__bindgen_ty_1>(),
        1usize,
        concat!(
            "Size of: ",
            stringify!(MfUltralightConfigPages__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightConfigPages__bindgen_ty_1__bindgen_ty_1>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(MfUltralightConfigPages__bindgen_ty_1__bindgen_ty_1)
        )
    );
}
impl MfUltralightConfigPages__bindgen_ty_1__bindgen_ty_1 {
    #[inline]
    pub fn rfui1(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u8) }
    }
    #[inline]
    pub fn set_rfui1(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 2u8, val as u64)
        }
    }
    #[inline]
    pub fn strg_mod_en(&self) -> bool {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_strg_mod_en(&mut self, val: bool) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(2usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn rfui2(&self) -> bool {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_rfui2(&mut self, val: bool) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn mirror_byte(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u8) }
    }
    #[inline]
    pub fn set_mirror_byte(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(4usize, 2u8, val as u64)
        }
    }
    #[inline]
    pub fn mirror_conf(&self) -> MfUltralightMirrorConf {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u8) }
    }
    #[inline]
    pub fn set_mirror_conf(&mut self, val: MfUltralightMirrorConf) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(6usize, 2u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        rfui1: u8,
        strg_mod_en: bool,
        rfui2: bool,
        mirror_byte: u8,
        mirror_conf: MfUltralightMirrorConf,
    ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 2u8, {
            let rfui1: u8 = unsafe { ::core::mem::transmute(rfui1) };
            rfui1 as u64
        });
        __bindgen_bitfield_unit.set(2usize, 1u8, {
            let strg_mod_en: u8 = unsafe { ::core::mem::transmute(strg_mod_en) };
            strg_mod_en as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let rfui2: u8 = unsafe { ::core::mem::transmute(rfui2) };
            rfui2 as u64
        });
        __bindgen_bitfield_unit.set(4usize, 2u8, {
            let mirror_byte: u8 = unsafe { ::core::mem::transmute(mirror_byte) };
            mirror_byte as u64
        });
        __bindgen_bitfield_unit.set(6usize, 2u8, {
            let mirror_conf: u8 = unsafe { ::core::mem::transmute(mirror_conf) };
            mirror_conf as u64
        });
        __bindgen_bitfield_unit
    }
}
#[test]
fn bindgen_test_layout_MfUltralightConfigPages__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightConfigPages__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightConfigPages__bindgen_ty_1>(),
        1usize,
        concat!(
            "Size of: ",
            stringify!(MfUltralightConfigPages__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightConfigPages__bindgen_ty_1>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(MfUltralightConfigPages__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightConfigPages__bindgen_ty_1),
            "::",
            stringify!(value)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union MfUltralightConfigPages__bindgen_ty_2 {
    pub value: u8,
    pub __bindgen_anon_1: MfUltralightConfigPages__bindgen_ty_2__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfUltralightConfigPages__bindgen_ty_2__bindgen_ty_1 {
    pub _bitfield_align_1: [u8; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
#[test]
fn bindgen_test_layout_MfUltralightConfigPages__bindgen_ty_2__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<MfUltralightConfigPages__bindgen_ty_2__bindgen_ty_1>(),
        1usize,
        concat!(
            "Size of: ",
            stringify!(MfUltralightConfigPages__bindgen_ty_2__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightConfigPages__bindgen_ty_2__bindgen_ty_1>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(MfUltralightConfigPages__bindgen_ty_2__bindgen_ty_1)
        )
    );
}
impl MfUltralightConfigPages__bindgen_ty_2__bindgen_ty_1 {
    #[inline]
    pub fn authlim(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u8) }
    }
    #[inline]
    pub fn set_authlim(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 3u8, val as u64)
        }
    }
    #[inline]
    pub fn nfc_cnt_pwd_prot(&self) -> bool {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_nfc_cnt_pwd_prot(&mut self, val: bool) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn nfc_cnt_en(&self) -> bool {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_nfc_cnt_en(&mut self, val: bool) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(4usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn nfc_dis_sec1(&self) -> bool {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_nfc_dis_sec1(&mut self, val: bool) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(5usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn cfglck(&self) -> bool {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_cfglck(&mut self, val: bool) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(6usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn prot(&self) -> bool {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_prot(&mut self, val: bool) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(7usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        authlim: u8,
        nfc_cnt_pwd_prot: bool,
        nfc_cnt_en: bool,
        nfc_dis_sec1: bool,
        cfglck: bool,
        prot: bool,
    ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 3u8, {
            let authlim: u8 = unsafe { ::core::mem::transmute(authlim) };
            authlim as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let nfc_cnt_pwd_prot: u8 = unsafe { ::core::mem::transmute(nfc_cnt_pwd_prot) };
            nfc_cnt_pwd_prot as u64
        });
        __bindgen_bitfield_unit.set(4usize, 1u8, {
            let nfc_cnt_en: u8 = unsafe { ::core::mem::transmute(nfc_cnt_en) };
            nfc_cnt_en as u64
        });
        __bindgen_bitfield_unit.set(5usize, 1u8, {
            let nfc_dis_sec1: u8 = unsafe { ::core::mem::transmute(nfc_dis_sec1) };
            nfc_dis_sec1 as u64
        });
        __bindgen_bitfield_unit.set(6usize, 1u8, {
            let cfglck: u8 = unsafe { ::core::mem::transmute(cfglck) };
            cfglck as u64
        });
        __bindgen_bitfield_unit.set(7usize, 1u8, {
            let prot: u8 = unsafe { ::core::mem::transmute(prot) };
            prot as u64
        });
        __bindgen_bitfield_unit
    }
}
#[test]
fn bindgen_test_layout_MfUltralightConfigPages__bindgen_ty_2() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightConfigPages__bindgen_ty_2> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightConfigPages__bindgen_ty_2>(),
        1usize,
        concat!(
            "Size of: ",
            stringify!(MfUltralightConfigPages__bindgen_ty_2)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightConfigPages__bindgen_ty_2>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(MfUltralightConfigPages__bindgen_ty_2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightConfigPages__bindgen_ty_2),
            "::",
            stringify!(value)
        )
    );
}
#[test]
fn bindgen_test_layout_MfUltralightConfigPages() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightConfigPages> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightConfigPages>(),
        16usize,
        concat!("Size of: ", stringify!(MfUltralightConfigPages))
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightConfigPages>(),
        1usize,
        concat!("Alignment of ", stringify!(MfUltralightConfigPages))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).mirror) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightConfigPages),
            "::",
            stringify!(mirror)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).rfui1) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightConfigPages),
            "::",
            stringify!(rfui1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).mirror_page) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightConfigPages),
            "::",
            stringify!(mirror_page)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).auth0) as usize - ptr as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightConfigPages),
            "::",
            stringify!(auth0)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).access) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightConfigPages),
            "::",
            stringify!(access)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).vctid) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightConfigPages),
            "::",
            stringify!(vctid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).rfui2) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightConfigPages),
            "::",
            stringify!(rfui2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).password) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightConfigPages),
            "::",
            stringify!(password)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pack) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightConfigPages),
            "::",
            stringify!(pack)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).rfui3) as usize - ptr as usize },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightConfigPages),
            "::",
            stringify!(rfui3)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MfUltralightData {
    pub iso14443_3a_data: *mut Iso14443_3aData,
    pub type_: MfUltralightType,
    pub version: MfUltralightVersion,
    pub signature: MfUltralightSignature,
    pub counter: [MfUltralightCounter; 3usize],
    pub tearing_flag: [MfUltralightTearingFlag; 3usize],
    pub page: [MfUltralightPage; 510usize],
    pub pages_read: u16,
    pub pages_total: u16,
    pub auth_attempts: u32,
}
#[test]
fn bindgen_test_layout_MfUltralightData() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightData>(),
        2112usize,
        concat!("Size of: ", stringify!(MfUltralightData))
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightData>(),
        4usize,
        concat!("Alignment of ", stringify!(MfUltralightData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).iso14443_3a_data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightData),
            "::",
            stringify!(iso14443_3a_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightData),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).version) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightData),
            "::",
            stringify!(version)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).signature) as usize - ptr as usize },
        13usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightData),
            "::",
            stringify!(signature)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).counter) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightData),
            "::",
            stringify!(counter)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).tearing_flag) as usize - ptr as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightData),
            "::",
            stringify!(tearing_flag)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).page) as usize - ptr as usize },
        63usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightData),
            "::",
            stringify!(page)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pages_read) as usize - ptr as usize },
        2104usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightData),
            "::",
            stringify!(pages_read)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pages_total) as usize - ptr as usize },
        2106usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightData),
            "::",
            stringify!(pages_total)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).auth_attempts) as usize - ptr as usize },
        2108usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightData),
            "::",
            stringify!(auth_attempts)
        )
    );
}
extern "C" {
    pub fn mf_ultralight_alloc() -> *mut MfUltralightData;
}
extern "C" {
    pub fn mf_ultralight_free(data: *mut MfUltralightData);
}
extern "C" {
    pub fn mf_ultralight_reset(data: *mut MfUltralightData);
}
extern "C" {
    pub fn mf_ultralight_copy(data: *mut MfUltralightData, other: *const MfUltralightData);
}
extern "C" {
    pub fn mf_ultralight_verify(
        data: *mut MfUltralightData,
        device_type: *const FuriString,
    ) -> bool;
}
extern "C" {
    pub fn mf_ultralight_load(
        data: *mut MfUltralightData,
        ff: *mut FlipperFormat,
        version: u32,
    ) -> bool;
}
extern "C" {
    pub fn mf_ultralight_save(data: *const MfUltralightData, ff: *mut FlipperFormat) -> bool;
}
extern "C" {
    pub fn mf_ultralight_is_equal(
        data: *const MfUltralightData,
        other: *const MfUltralightData,
    ) -> bool;
}
extern "C" {
    pub fn mf_ultralight_get_device_name(
        data: *const MfUltralightData,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn mf_ultralight_get_uid(data: *const MfUltralightData, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    pub fn mf_ultralight_set_uid(
        data: *mut MfUltralightData,
        uid: *const u8,
        uid_len: usize,
    ) -> bool;
}
extern "C" {
    pub fn mf_ultralight_get_base_data(data: *const MfUltralightData) -> *mut Iso14443_3aData;
}
extern "C" {
    pub fn mf_ultralight_get_type_by_version(version: *mut MfUltralightVersion)
        -> MfUltralightType;
}
extern "C" {
    pub fn mf_ultralight_get_pages_total(type_: MfUltralightType) -> u16;
}
extern "C" {
    pub fn mf_ultralight_get_feature_support_set(type_: MfUltralightType) -> u32;
}
extern "C" {
    pub fn mf_ultralight_get_config_page_num(type_: MfUltralightType) -> u16;
}
extern "C" {
    pub fn mf_ultralight_get_write_end_page(type_: MfUltralightType) -> u8;
}
extern "C" {
    pub fn mf_ultralight_get_pwd_page_num(type_: MfUltralightType) -> u8;
}
extern "C" {
    pub fn mf_ultralight_is_page_pwd_or_pack(type_: MfUltralightType, page_num: u16) -> bool;
}
extern "C" {
    pub fn mf_ultralight_support_feature(feature_set: u32, features_to_check: u32) -> bool;
}
extern "C" {
    pub fn mf_ultralight_get_config_page(
        data: *const MfUltralightData,
        config: *mut *mut MfUltralightConfigPages,
    ) -> bool;
}
extern "C" {
    pub fn mf_ultralight_is_all_data_read(data: *const MfUltralightData) -> bool;
}
extern "C" {
    pub fn mf_ultralight_detect_protocol(iso14443_3a_data: *const Iso14443_3aData) -> bool;
}
extern "C" {
    pub fn mf_ultralight_is_counter_configured(data: *const MfUltralightData) -> bool;
}
extern "C" {
    pub fn mf_ultralight_3des_shift_data(arr: *mut u8);
}
extern "C" {
    pub fn mf_ultralight_3des_key_valid(data: *const MfUltralightData) -> bool;
}
extern "C" {
    pub fn mf_ultralight_3des_get_key(data: *const MfUltralightData) -> *const u8;
}
extern "C" {
    pub fn mf_ultralight_3des_encrypt(
        ctx: *mut mbedtls_des3_context,
        ck: *const u8,
        iv: *const u8,
        input: *const u8,
        length: u8,
        out: *mut u8,
    );
}
extern "C" {
    pub fn mf_ultralight_3des_decrypt(
        ctx: *mut mbedtls_des3_context,
        ck: *const u8,
        iv: *const u8,
        input: *const u8,
        length: u8,
        out: *mut u8,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfUltralightPoller {
    _unused: [u8; 0],
}
#[doc = "MfUltralight poller authentication context."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MfUltralightPollerAuthContext {
    #[doc = "< Password to be used for authentication."]
    pub password: MfUltralightAuthPassword,
    pub tdes_key: MfUltralightC3DesAuthKey,
    #[doc = "< Pack received on successfull authentication."]
    pub pack: MfUltralightAuthPack,
    #[doc = "< Set to true if authentication succeeded, false otherwise."]
    pub auth_success: bool,
    #[doc = "< Set to true if authentication should be skipped, false otherwise."]
    pub skip_auth: bool,
}
#[test]
fn bindgen_test_layout_MfUltralightPollerAuthContext() {
    const UNINIT: ::core::mem::MaybeUninit<MfUltralightPollerAuthContext> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<MfUltralightPollerAuthContext>(),
        24usize,
        concat!("Size of: ", stringify!(MfUltralightPollerAuthContext))
    );
    assert_eq!(
        ::core::mem::align_of::<MfUltralightPollerAuthContext>(),
        1usize,
        concat!("Alignment of ", stringify!(MfUltralightPollerAuthContext))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).password) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightPollerAuthContext),
            "::",
            stringify!(password)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).tdes_key) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightPollerAuthContext),
            "::",
            stringify!(tdes_key)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pack) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightPollerAuthContext),
            "::",
            stringify!(pack)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).auth_success) as usize - ptr as usize },
        22usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightPollerAuthContext),
            "::",
            stringify!(auth_success)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).skip_auth) as usize - ptr as usize },
        23usize,
        concat!(
            "Offset of field: ",
            stringify!(MfUltralightPollerAuthContext),
            "::",
            stringify!(skip_auth)
        )
    );
}
extern "C" {
    #[doc = "Perform authentication with password.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction in, out) - pointer to the authentication context.\n # Returns\n\nMfUltralightErrorNone on success, an error code on failure."]
    pub fn mf_ultralight_poller_auth_pwd(
        instance: *mut MfUltralightPoller,
        data: *mut MfUltralightPollerAuthContext,
    ) -> MfUltralightError;
}
extern "C" {
    #[doc = "Start authentication procedure.\n\n Must ONLY be used inside the callback function.\n\n This function is used to start authentication process for Ultralight C cards.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `RndA` (direction in) - Randomly generated block which is required for authentication process.\n * `output` (direction out) - Authentication encryption result.\n # Returns\n\nMfUltralightErrorNone if card supports authentication command, an error code on otherwise."]
    pub fn mf_ultralight_poller_authenticate_start(
        instance: *mut MfUltralightPoller,
        RndA: *const u8,
        output: *mut u8,
    ) -> MfUltralightError;
}
extern "C" {
    #[doc = "End authentication procedure\n\n This function is used to end authentication process for Ultralight C cards.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `RndB` (direction in) - Block received from the card (card generates it randomly) which is required for authentication process.\n * `request` (direction in) - Contains data of RndA + RndB', where RndB' is decoded and shifted RndB received from the card on previous step.\n * `response` (direction out) - Must return RndA' which an encrypted shifted RndA value received from the card and decrypted by this function."]
    pub fn mf_ultralight_poller_authenticate_end(
        instance: *mut MfUltralightPoller,
        RndB: *const u8,
        request: *const u8,
        response: *mut u8,
    ) -> MfUltralightError;
}
extern "C" {
    #[doc = "Read page from card.\n\n Must ONLY be used inside the callback function.\n\n Send read command and parse response. The response on this command is data of 4 pages starting\n from the page specified in the command.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `start_page` (direction in) - page number to be read.\n * `data` (direction out) - pointer to the MfUltralightPageReadCommandData structure to be filled with page data.\n # Returns\n\nMfUltralightErrorNone on success, an error code on failure."]
    pub fn mf_ultralight_poller_read_page(
        instance: *mut MfUltralightPoller,
        start_page: u8,
        data: *mut MfUltralightPageReadCommandData,
    ) -> MfUltralightError;
}
extern "C" {
    #[doc = "Read page from sector.\n\n Must ONLY be used inside the callback function.\n\n This command should be used for NTAGI2C tags.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `sector` (direction in) - sector number to be read.\n * `tag` (direction in) - tag number to be read.\n * `data` (direction out) - pointer to the MfUltralightPageReadCommandData structure to be filled with page data.\n # Returns\n\nMfUltralightErrorNone on success, an error code on failure."]
    pub fn mf_ultralight_poller_read_page_from_sector(
        instance: *mut MfUltralightPoller,
        sector: u8,
        tag: u8,
        data: *mut MfUltralightPageReadCommandData,
    ) -> MfUltralightError;
}
extern "C" {
    #[doc = "Write page to card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `page` (direction in) - page number to be written.\n * `data` (direction in) - pointer to the MfUltralightPage structure to be written.\n # Returns\n\nMfUltralightErrorNone on success, an error code on failure."]
    pub fn mf_ultralight_poller_write_page(
        instance: *mut MfUltralightPoller,
        page: u8,
        data: *const MfUltralightPage,
    ) -> MfUltralightError;
}
extern "C" {
    #[doc = "Read version from card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the MfUltralightVersion structure to be filled.\n # Returns\n\nMfUltralightErrorNone on success, an error code on failure."]
    pub fn mf_ultralight_poller_read_version(
        instance: *mut MfUltralightPoller,
        data: *mut MfUltralightVersion,
    ) -> MfUltralightError;
}
extern "C" {
    #[doc = "Read signature from card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the MfUltralightSignature structure to be filled.\n # Returns\n\nMfUltralightErrorNone on success, an error code on failure."]
    pub fn mf_ultralight_poller_read_signature(
        instance: *mut MfUltralightPoller,
        data: *mut MfUltralightSignature,
    ) -> MfUltralightError;
}
extern "C" {
    #[doc = "Read counter from card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `counter_num` (direction in) - counter number to be read.\n * `data` (direction out) - pointer to the MfUltralightCounter structure to be filled.\n # Returns\n\nMfUltralightErrorNone on success, an error code on failure."]
    pub fn mf_ultralight_poller_read_counter(
        instance: *mut MfUltralightPoller,
        counter_num: u8,
        data: *mut MfUltralightCounter,
    ) -> MfUltralightError;
}
extern "C" {
    #[doc = "Read tearing flag from card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tearing_falg_num` (direction in) - tearing flag number to be read.\n * `data` (direction out) - pointer to the MfUltralightTearingFlag structure to be filled.\n # Returns\n\nMfUltralightErrorNone on success, an error code on failure."]
    pub fn mf_ultralight_poller_read_tearing_flag(
        instance: *mut MfUltralightPoller,
        tearing_falg_num: u8,
        data: *mut MfUltralightTearingFlag,
    ) -> MfUltralightError;
}
extern "C" {
    pub fn mf_ultralight_poller_sync_read_page(
        nfc: *mut Nfc,
        page: u16,
        data: *mut MfUltralightPage,
    ) -> MfUltralightError;
}
extern "C" {
    pub fn mf_ultralight_poller_sync_write_page(
        nfc: *mut Nfc,
        page: u16,
        data: *mut MfUltralightPage,
    ) -> MfUltralightError;
}
extern "C" {
    pub fn mf_ultralight_poller_sync_read_version(
        nfc: *mut Nfc,
        data: *mut MfUltralightVersion,
    ) -> MfUltralightError;
}
extern "C" {
    pub fn mf_ultralight_poller_sync_read_signature(
        nfc: *mut Nfc,
        data: *mut MfUltralightSignature,
    ) -> MfUltralightError;
}
extern "C" {
    pub fn mf_ultralight_poller_sync_read_counter(
        nfc: *mut Nfc,
        counter_num: u8,
        data: *mut MfUltralightCounter,
    ) -> MfUltralightError;
}
extern "C" {
    pub fn mf_ultralight_poller_sync_read_tearing_flag(
        nfc: *mut Nfc,
        flag_num: u8,
        data: *mut MfUltralightTearingFlag,
    ) -> MfUltralightError;
}
extern "C" {
    pub fn mf_ultralight_poller_sync_read_card(
        nfc: *mut Nfc,
        data: *mut MfUltralightData,
    ) -> MfUltralightError;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso15693_3SystemInfo {
    pub flags: u8,
    pub dsfid: u8,
    pub afi: u8,
    pub ic_ref: u8,
    pub block_count: u16,
    pub block_size: u8,
}
#[test]
fn bindgen_test_layout_Iso15693_3SystemInfo() {
    const UNINIT: ::core::mem::MaybeUninit<Iso15693_3SystemInfo> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<Iso15693_3SystemInfo>(),
        8usize,
        concat!("Size of: ", stringify!(Iso15693_3SystemInfo))
    );
    assert_eq!(
        ::core::mem::align_of::<Iso15693_3SystemInfo>(),
        2usize,
        concat!("Alignment of ", stringify!(Iso15693_3SystemInfo))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3SystemInfo),
            "::",
            stringify!(flags)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).dsfid) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3SystemInfo),
            "::",
            stringify!(dsfid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).afi) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3SystemInfo),
            "::",
            stringify!(afi)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ic_ref) as usize - ptr as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3SystemInfo),
            "::",
            stringify!(ic_ref)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).block_count) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3SystemInfo),
            "::",
            stringify!(block_count)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).block_size) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3SystemInfo),
            "::",
            stringify!(block_size)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso15693_3LockBits {
    pub dsfid: bool,
    pub afi: bool,
}
#[test]
fn bindgen_test_layout_Iso15693_3LockBits() {
    const UNINIT: ::core::mem::MaybeUninit<Iso15693_3LockBits> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<Iso15693_3LockBits>(),
        2usize,
        concat!("Size of: ", stringify!(Iso15693_3LockBits))
    );
    assert_eq!(
        ::core::mem::align_of::<Iso15693_3LockBits>(),
        1usize,
        concat!("Alignment of ", stringify!(Iso15693_3LockBits))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).dsfid) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3LockBits),
            "::",
            stringify!(dsfid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).afi) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3LockBits),
            "::",
            stringify!(afi)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso15693_3Settings {
    pub lock_bits: Iso15693_3LockBits,
}
#[test]
fn bindgen_test_layout_Iso15693_3Settings() {
    const UNINIT: ::core::mem::MaybeUninit<Iso15693_3Settings> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<Iso15693_3Settings>(),
        2usize,
        concat!("Size of: ", stringify!(Iso15693_3Settings))
    );
    assert_eq!(
        ::core::mem::align_of::<Iso15693_3Settings>(),
        1usize,
        concat!("Alignment of ", stringify!(Iso15693_3Settings))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).lock_bits) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3Settings),
            "::",
            stringify!(lock_bits)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Iso15693_3Data {
    pub uid: [u8; 8usize],
    pub system_info: Iso15693_3SystemInfo,
    pub settings: Iso15693_3Settings,
    pub block_data: *mut SimpleArray,
    pub block_security: *mut SimpleArray,
}
#[test]
fn bindgen_test_layout_Iso15693_3Data() {
    const UNINIT: ::core::mem::MaybeUninit<Iso15693_3Data> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<Iso15693_3Data>(),
        28usize,
        concat!("Size of: ", stringify!(Iso15693_3Data))
    );
    assert_eq!(
        ::core::mem::align_of::<Iso15693_3Data>(),
        4usize,
        concat!("Alignment of ", stringify!(Iso15693_3Data))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).uid) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3Data),
            "::",
            stringify!(uid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).system_info) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3Data),
            "::",
            stringify!(system_info)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).settings) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3Data),
            "::",
            stringify!(settings)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).block_data) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3Data),
            "::",
            stringify!(block_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).block_security) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(Iso15693_3Data),
            "::",
            stringify!(block_security)
        )
    );
}
extern "C" {
    pub fn iso15693_3_alloc() -> *mut Iso15693_3Data;
}
extern "C" {
    pub fn iso15693_3_free(data: *mut Iso15693_3Data);
}
extern "C" {
    pub fn iso15693_3_reset(data: *mut Iso15693_3Data);
}
extern "C" {
    pub fn iso15693_3_copy(data: *mut Iso15693_3Data, other: *const Iso15693_3Data);
}
extern "C" {
    pub fn iso15693_3_verify(data: *mut Iso15693_3Data, device_type: *const FuriString) -> bool;
}
extern "C" {
    pub fn iso15693_3_load(data: *mut Iso15693_3Data, ff: *mut FlipperFormat, version: u32)
        -> bool;
}
extern "C" {
    pub fn iso15693_3_save(data: *const Iso15693_3Data, ff: *mut FlipperFormat) -> bool;
}
extern "C" {
    pub fn iso15693_3_is_equal(data: *const Iso15693_3Data, other: *const Iso15693_3Data) -> bool;
}
extern "C" {
    pub fn iso15693_3_get_device_name(
        data: *const Iso15693_3Data,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn iso15693_3_get_uid(data: *const Iso15693_3Data, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    pub fn iso15693_3_set_uid(data: *mut Iso15693_3Data, uid: *const u8, uid_len: usize) -> bool;
}
extern "C" {
    pub fn iso15693_3_get_base_data(data: *const Iso15693_3Data) -> *mut Iso15693_3Data;
}
extern "C" {
    pub fn iso15693_3_is_block_locked(data: *const Iso15693_3Data, block_index: u8) -> bool;
}
extern "C" {
    pub fn iso15693_3_get_manufacturer_id(data: *const Iso15693_3Data) -> u8;
}
extern "C" {
    pub fn iso15693_3_get_block_count(data: *const Iso15693_3Data) -> u16;
}
extern "C" {
    pub fn iso15693_3_get_block_size(data: *const Iso15693_3Data) -> u8;
}
extern "C" {
    pub fn iso15693_3_get_block_data(data: *const Iso15693_3Data, block_index: u8) -> *const u8;
}
pub type SlixTypeFeatures = u32;
pub const SlixError_SlixErrorNone: SlixError = 0;
pub const SlixError_SlixErrorTimeout: SlixError = 1;
pub const SlixError_SlixErrorFormat: SlixError = 2;
pub const SlixError_SlixErrorNotSupported: SlixError = 3;
pub const SlixError_SlixErrorInternal: SlixError = 4;
pub const SlixError_SlixErrorWrongPassword: SlixError = 5;
pub const SlixError_SlixErrorUidMismatch: SlixError = 6;
pub const SlixError_SlixErrorUnknown: SlixError = 7;
pub type SlixError = core::ffi::c_uchar;
pub const SlixType_SlixTypeSlix: SlixType = 0;
pub const SlixType_SlixTypeSlixS: SlixType = 1;
pub const SlixType_SlixTypeSlixL: SlixType = 2;
pub const SlixType_SlixTypeSlix2: SlixType = 3;
pub const SlixType_SlixTypeCount: SlixType = 4;
pub const SlixType_SlixTypeUnknown: SlixType = 5;
pub type SlixType = core::ffi::c_uchar;
pub const SlixPasswordType_SlixPasswordTypeRead: SlixPasswordType = 0;
pub const SlixPasswordType_SlixPasswordTypeWrite: SlixPasswordType = 1;
pub const SlixPasswordType_SlixPasswordTypePrivacy: SlixPasswordType = 2;
pub const SlixPasswordType_SlixPasswordTypeDestroy: SlixPasswordType = 3;
pub const SlixPasswordType_SlixPasswordTypeEasAfi: SlixPasswordType = 4;
pub const SlixPasswordType_SlixPasswordTypeCount: SlixPasswordType = 5;
pub type SlixPasswordType = core::ffi::c_uchar;
pub type SlixPassword = u32;
pub type SlixSignature = [u8; 32usize];
pub type SlixPrivacy = bool;
pub type SlixRandomNumber = u16;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SlixProtection {
    pub pointer: u8,
    pub condition: u8,
}
#[test]
fn bindgen_test_layout_SlixProtection() {
    const UNINIT: ::core::mem::MaybeUninit<SlixProtection> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SlixProtection>(),
        2usize,
        concat!("Size of: ", stringify!(SlixProtection))
    );
    assert_eq!(
        ::core::mem::align_of::<SlixProtection>(),
        1usize,
        concat!("Alignment of ", stringify!(SlixProtection))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).pointer) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SlixProtection),
            "::",
            stringify!(pointer)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).condition) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(SlixProtection),
            "::",
            stringify!(condition)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SlixLockBits {
    pub eas: bool,
    pub ppl: bool,
}
#[test]
fn bindgen_test_layout_SlixLockBits() {
    const UNINIT: ::core::mem::MaybeUninit<SlixLockBits> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SlixLockBits>(),
        2usize,
        concat!("Size of: ", stringify!(SlixLockBits))
    );
    assert_eq!(
        ::core::mem::align_of::<SlixLockBits>(),
        1usize,
        concat!("Alignment of ", stringify!(SlixLockBits))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).eas) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SlixLockBits),
            "::",
            stringify!(eas)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ppl) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(SlixLockBits),
            "::",
            stringify!(ppl)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SlixSystemInfo {
    pub protection: SlixProtection,
    pub lock_bits: SlixLockBits,
}
#[test]
fn bindgen_test_layout_SlixSystemInfo() {
    const UNINIT: ::core::mem::MaybeUninit<SlixSystemInfo> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SlixSystemInfo>(),
        4usize,
        concat!("Size of: ", stringify!(SlixSystemInfo))
    );
    assert_eq!(
        ::core::mem::align_of::<SlixSystemInfo>(),
        1usize,
        concat!("Alignment of ", stringify!(SlixSystemInfo))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).protection) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SlixSystemInfo),
            "::",
            stringify!(protection)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).lock_bits) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(SlixSystemInfo),
            "::",
            stringify!(lock_bits)
        )
    );
}
pub const SlixCapabilities_SlixCapabilitiesDefault: SlixCapabilities = 0;
pub const SlixCapabilities_SlixCapabilitiesAcceptAllPasswords: SlixCapabilities = 1;
pub const SlixCapabilities_SlixCapabilitiesCount: SlixCapabilities = 2;
pub type SlixCapabilities = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SlixData {
    pub iso15693_3_data: *mut Iso15693_3Data,
    pub system_info: SlixSystemInfo,
    pub signature: SlixSignature,
    pub passwords: [SlixPassword; 5usize],
    pub privacy: SlixPrivacy,
    pub capabilities: SlixCapabilities,
}
#[test]
fn bindgen_test_layout_SlixData() {
    const UNINIT: ::core::mem::MaybeUninit<SlixData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SlixData>(),
        64usize,
        concat!("Size of: ", stringify!(SlixData))
    );
    assert_eq!(
        ::core::mem::align_of::<SlixData>(),
        4usize,
        concat!("Alignment of ", stringify!(SlixData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).iso15693_3_data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SlixData),
            "::",
            stringify!(iso15693_3_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).system_info) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SlixData),
            "::",
            stringify!(system_info)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).signature) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SlixData),
            "::",
            stringify!(signature)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).passwords) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(SlixData),
            "::",
            stringify!(passwords)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).privacy) as usize - ptr as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(SlixData),
            "::",
            stringify!(privacy)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize },
        61usize,
        concat!(
            "Offset of field: ",
            stringify!(SlixData),
            "::",
            stringify!(capabilities)
        )
    );
}
extern "C" {
    pub fn slix_alloc() -> *mut SlixData;
}
extern "C" {
    pub fn slix_free(data: *mut SlixData);
}
extern "C" {
    pub fn slix_reset(data: *mut SlixData);
}
extern "C" {
    pub fn slix_copy(data: *mut SlixData, other: *const SlixData);
}
extern "C" {
    pub fn slix_verify(data: *mut SlixData, device_type: *const FuriString) -> bool;
}
extern "C" {
    pub fn slix_load(data: *mut SlixData, ff: *mut FlipperFormat, version: u32) -> bool;
}
extern "C" {
    pub fn slix_save(data: *const SlixData, ff: *mut FlipperFormat) -> bool;
}
extern "C" {
    pub fn slix_is_equal(data: *const SlixData, other: *const SlixData) -> bool;
}
extern "C" {
    pub fn slix_get_device_name(
        data: *const SlixData,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn slix_get_uid(data: *const SlixData, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    pub fn slix_set_uid(data: *mut SlixData, uid: *const u8, uid_len: usize) -> bool;
}
extern "C" {
    pub fn slix_get_base_data(data: *const SlixData) -> *const Iso15693_3Data;
}
extern "C" {
    pub fn slix_get_type(data: *const SlixData) -> SlixType;
}
extern "C" {
    pub fn slix_get_password(
        data: *const SlixData,
        password_type: SlixPasswordType,
    ) -> SlixPassword;
}
extern "C" {
    pub fn slix_get_counter(data: *const SlixData) -> u16;
}
extern "C" {
    pub fn slix_is_privacy_mode(data: *const SlixData) -> bool;
}
extern "C" {
    pub fn slix_is_block_protected(
        data: *const SlixData,
        password_type: SlixPasswordType,
        block_num: u8,
    ) -> bool;
}
extern "C" {
    pub fn slix_is_counter_increment_protected(data: *const SlixData) -> bool;
}
extern "C" {
    pub fn slix_type_has_features(slix_type: SlixType, features: SlixTypeFeatures) -> bool;
}
extern "C" {
    pub fn slix_type_supports_password(
        slix_type: SlixType,
        password_type: SlixPasswordType,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SlixPoller {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Transmit and receive Slix frames in poller mode.\n\n Must ONLY be used inside the callback function.\n\n The rx_buffer will be filled with any data received as a response to data\n sent from tx_buffer, with a timeout defined by the fwt parameter.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `tx_buffer` (direction in) - pointer to the buffer containing the data to be transmitted.\n * `rx_buffer` (direction out) - pointer to the buffer to be filled with received data.\n * `fwt` (direction in) - frame wait time (response timeout), in carrier cycles.\n # Returns\n\nSlixErrorNone on success, an error code on failure."]
    pub fn slix_poller_send_frame(
        instance: *mut SlixPoller,
        tx_data: *const BitBuffer,
        rx_data: *mut BitBuffer,
        fwt: u32,
    ) -> SlixError;
}
extern "C" {
    #[doc = "Send get nxp system info command and parse response.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the SlixSystemInfo structure to be filled.\n # Returns\n\nSlixErrorNone on success, an error code on failure."]
    pub fn slix_poller_get_nxp_system_info(
        instance: *mut SlixPoller,
        data: *mut SlixSystemInfo,
    ) -> SlixError;
}
extern "C" {
    #[doc = "Read signature from card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the SlixSignature structure to be filled.\n # Returns\n\nSlixErrorNone on success, an error code on failure."]
    pub fn slix_poller_read_signature(
        instance: *mut SlixPoller,
        data: *mut SlixSignature,
    ) -> SlixError;
}
extern "C" {
    #[doc = "Get random number from card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `data` (direction out) - pointer to the SlixRandomNumber structure to be filled.\n # Returns\n\nSlixErrorNone on success, an error code on failure."]
    pub fn slix_poller_get_random_number(
        instance: *mut SlixPoller,
        data: *mut SlixRandomNumber,
    ) -> SlixError;
}
extern "C" {
    #[doc = "Set password to card.\n\n Must ONLY be used inside the callback function.\n\n # Arguments\n\n* `instance` (direction in, out) - pointer to the instance to be used in the transaction.\n * `type` (direction in) - SlixPasswordType instance.\n * `password` (direction in) - SlixPassword instance.\n * `random_number` (direction in) - SlixRandomNumber instance.\n # Returns\n\nSlixErrorNone on success, an error code on failure."]
    pub fn slix_poller_set_password(
        instance: *mut SlixPoller,
        type_: SlixPasswordType,
        password: SlixPassword,
        random_number: SlixRandomNumber,
    ) -> SlixError;
}
pub const St25tbError_St25tbErrorNone: St25tbError = 0;
pub const St25tbError_St25tbErrorNotPresent: St25tbError = 1;
pub const St25tbError_St25tbErrorColResFailed: St25tbError = 2;
pub const St25tbError_St25tbErrorBufferOverflow: St25tbError = 3;
pub const St25tbError_St25tbErrorCommunication: St25tbError = 4;
pub const St25tbError_St25tbErrorFieldOff: St25tbError = 5;
pub const St25tbError_St25tbErrorWrongCrc: St25tbError = 6;
pub const St25tbError_St25tbErrorTimeout: St25tbError = 7;
pub const St25tbError_St25tbErrorWriteFailed: St25tbError = 8;
pub type St25tbError = core::ffi::c_uchar;
pub const St25tbType_St25tbType512At: St25tbType = 0;
pub const St25tbType_St25tbType512Ac: St25tbType = 1;
pub const St25tbType_St25tbTypeX512: St25tbType = 2;
pub const St25tbType_St25tbType02k: St25tbType = 3;
pub const St25tbType_St25tbType04k: St25tbType = 4;
pub const St25tbType_St25tbTypeX4k: St25tbType = 5;
pub const St25tbType_St25tbTypeNum: St25tbType = 6;
pub type St25tbType = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct St25tbData {
    pub uid: [u8; 8usize],
    pub type_: St25tbType,
    pub blocks: [u32; 128usize],
    pub system_otp_block: u32,
}
#[test]
fn bindgen_test_layout_St25tbData() {
    const UNINIT: ::core::mem::MaybeUninit<St25tbData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<St25tbData>(),
        528usize,
        concat!("Size of: ", stringify!(St25tbData))
    );
    assert_eq!(
        ::core::mem::align_of::<St25tbData>(),
        4usize,
        concat!("Alignment of ", stringify!(St25tbData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).uid) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(St25tbData),
            "::",
            stringify!(uid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(St25tbData),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).blocks) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(St25tbData),
            "::",
            stringify!(blocks)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).system_otp_block) as usize - ptr as usize },
        524usize,
        concat!(
            "Offset of field: ",
            stringify!(St25tbData),
            "::",
            stringify!(system_otp_block)
        )
    );
}
extern "C" {
    pub fn st25tb_alloc() -> *mut St25tbData;
}
extern "C" {
    pub fn st25tb_free(data: *mut St25tbData);
}
extern "C" {
    pub fn st25tb_reset(data: *mut St25tbData);
}
extern "C" {
    pub fn st25tb_copy(data: *mut St25tbData, other: *const St25tbData);
}
extern "C" {
    pub fn st25tb_verify(data: *mut St25tbData, device_type: *const FuriString) -> bool;
}
extern "C" {
    pub fn st25tb_load(data: *mut St25tbData, ff: *mut FlipperFormat, version: u32) -> bool;
}
extern "C" {
    pub fn st25tb_save(data: *const St25tbData, ff: *mut FlipperFormat) -> bool;
}
extern "C" {
    pub fn st25tb_is_equal(data: *const St25tbData, other: *const St25tbData) -> bool;
}
extern "C" {
    pub fn st25tb_get_block_count(type_: St25tbType) -> u8;
}
extern "C" {
    pub fn st25tb_get_device_name(
        data: *const St25tbData,
        name_type: NfcDeviceNameType,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn st25tb_get_uid(data: *const St25tbData, uid_len: *mut usize) -> *const u8;
}
extern "C" {
    pub fn st25tb_set_uid(data: *mut St25tbData, uid: *const u8, uid_len: usize) -> bool;
}
extern "C" {
    pub fn st25tb_get_base_data(data: *const St25tbData) -> *mut St25tbData;
}
extern "C" {
    pub fn st25tb_get_type_from_uid(uid: *const u8) -> St25tbType;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct St25tbPoller {
    _unused: [u8; 0],
}
extern "C" {
    pub fn st25tb_poller_send_frame(
        instance: *mut St25tbPoller,
        tx_buffer: *const BitBuffer,
        rx_buffer: *mut BitBuffer,
        fwt: u32,
    ) -> St25tbError;
}
extern "C" {
    pub fn st25tb_poller_initiate(instance: *mut St25tbPoller, chip_id_ptr: *mut u8)
        -> St25tbError;
}
extern "C" {
    pub fn st25tb_poller_select(instance: *mut St25tbPoller, chip_id_ptr: *mut u8) -> St25tbError;
}
extern "C" {
    pub fn st25tb_poller_get_uid(instance: *mut St25tbPoller, uid: *mut u8) -> St25tbError;
}
extern "C" {
    pub fn st25tb_poller_read_block(
        instance: *mut St25tbPoller,
        block: *mut u32,
        block_number: u8,
    ) -> St25tbError;
}
extern "C" {
    pub fn st25tb_poller_write_block(
        instance: *mut St25tbPoller,
        block: u32,
        block_number: u8,
    ) -> St25tbError;
}
extern "C" {
    pub fn st25tb_poller_halt(instance: *mut St25tbPoller) -> St25tbError;
}
extern "C" {
    pub fn st25tb_poller_sync_read_block(
        nfc: *mut Nfc,
        block_num: u8,
        block: *mut u32,
    ) -> St25tbError;
}
extern "C" {
    pub fn st25tb_poller_sync_write_block(nfc: *mut Nfc, block_num: u8, block: u32) -> St25tbError;
}
extern "C" {
    pub fn st25tb_poller_sync_detect_type(nfc: *mut Nfc, type_: *mut St25tbType) -> St25tbError;
}
extern "C" {
    pub fn st25tb_poller_sync_read(nfc: *mut Nfc, data: *mut St25tbData) -> St25tbError;
}
extern "C" {
    pub fn maxim_crc8(data: *const u8, data_size: u8, crc_init: u8) -> u8;
}
#[doc = "< Search for alarmed device"]
pub const OneWireHostSearchMode_OneWireHostSearchModeConditional: OneWireHostSearchMode = 0;
#[doc = "< Search for all devices"]
pub const OneWireHostSearchMode_OneWireHostSearchModeNormal: OneWireHostSearchMode = 1;
pub type OneWireHostSearchMode = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OneWireHost {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate OneWireHost instance\n # Arguments\n\n* `[in]` - gpio_pin connection pin\n # Returns\n\npointer to OneWireHost instance"]
    pub fn onewire_host_alloc(gpio_pin: *const GpioPin) -> *mut OneWireHost;
}
extern "C" {
    #[doc = "Destroy OneWireHost instance, free resources\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance"]
    pub fn onewire_host_free(host: *mut OneWireHost);
}
extern "C" {
    #[doc = "Reset the 1-Wire bus\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance\n # Returns\n\ntrue if presence was detected, false otherwise"]
    pub fn onewire_host_reset(host: *mut OneWireHost) -> bool;
}
extern "C" {
    #[doc = "Read one bit\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance\n # Returns\n\nreceived bit value"]
    pub fn onewire_host_read_bit(host: *mut OneWireHost) -> bool;
}
extern "C" {
    #[doc = "Read one byte\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance\n # Returns\n\nreceived byte value"]
    pub fn onewire_host_read(host: *mut OneWireHost) -> u8;
}
extern "C" {
    #[doc = "Read one or more bytes\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance\n * `[out]` - buffer received data buffer\n * `[in]` - count number of bytes to read"]
    pub fn onewire_host_read_bytes(host: *mut OneWireHost, buffer: *mut u8, count: u16);
}
extern "C" {
    #[doc = "Write one bit\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance\n * `value` - bit value to write"]
    pub fn onewire_host_write_bit(host: *mut OneWireHost, value: bool);
}
extern "C" {
    #[doc = "Write one byte\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance\n * `value` - byte value to write"]
    pub fn onewire_host_write(host: *mut OneWireHost, value: u8);
}
extern "C" {
    #[doc = "Write one or more bytes\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance\n * `[in]` - buffer pointer to the data to write\n * `[in]` - count size of the data to write"]
    pub fn onewire_host_write_bytes(host: *mut OneWireHost, buffer: *const u8, count: u16);
}
extern "C" {
    #[doc = "Start working with the bus\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance"]
    pub fn onewire_host_start(host: *mut OneWireHost);
}
extern "C" {
    #[doc = "Stop working with the bus\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance"]
    pub fn onewire_host_stop(host: *mut OneWireHost);
}
extern "C" {
    #[doc = "Reset previous search results\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance"]
    pub fn onewire_host_reset_search(host: *mut OneWireHost);
}
extern "C" {
    #[doc = "Set the family code to search for\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance\n * `[in]` - family_code device family code"]
    pub fn onewire_host_target_search(host: *mut OneWireHost, family_code: u8);
}
extern "C" {
    #[doc = "Search for devices on the 1-Wire bus\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance\n * `[out]` - new_addr pointer to the buffer to contain the unique ROM of the found device\n * `[in]` - mode search mode\n # Returns\n\ntrue on success, false otherwise"]
    pub fn onewire_host_search(
        host: *mut OneWireHost,
        new_addr: *mut u8,
        mode: OneWireHostSearchMode,
    ) -> bool;
}
extern "C" {
    #[doc = "Enable overdrive mode\n # Arguments\n\n* `[in]` - host pointer to OneWireHost instance\n * `[in]` - set true to turn overdrive on, false to turn it off"]
    pub fn onewire_host_set_overdrive(host: *mut OneWireHost, set: bool);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OneWireSlave {
    _unused: [u8; 0],
}
pub type OneWireSlaveResetCallback = ::core::option::Option<
    unsafe extern "C" fn(is_short: bool, context: *mut core::ffi::c_void) -> bool,
>;
pub type OneWireSlaveCommandCallback = ::core::option::Option<
    unsafe extern "C" fn(command: u8, context: *mut core::ffi::c_void) -> bool,
>;
pub type OneWireSlaveResultCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Allocate OneWireSlave instance\n # Arguments\n\n* `[in]` - gpio_pin connection pin\n # Returns\n\npointer to OneWireSlave instance"]
    pub fn onewire_slave_alloc(gpio_pin: *const GpioPin) -> *mut OneWireSlave;
}
extern "C" {
    #[doc = "Destroy OneWireSlave instance, free resources\n # Arguments\n\n* `[in]` - bus pointer to OneWireSlave instance"]
    pub fn onewire_slave_free(bus: *mut OneWireSlave);
}
extern "C" {
    #[doc = "Start working with the bus\n # Arguments\n\n* `[in]` - bus pointer to OneWireSlave instance"]
    pub fn onewire_slave_start(bus: *mut OneWireSlave);
}
extern "C" {
    #[doc = "Stop working with the bus\n # Arguments\n\n* `[in]` - bus pointer to OneWireSlave instance"]
    pub fn onewire_slave_stop(bus: *mut OneWireSlave);
}
extern "C" {
    #[doc = "Receive one bit\n # Arguments\n\n* `[in]` - bus pointer to OneWireSlave instance\n # Returns\n\nreceived bit value"]
    pub fn onewire_slave_receive_bit(bus: *mut OneWireSlave) -> bool;
}
extern "C" {
    #[doc = "Send one bit\n # Arguments\n\n* `[in]` - bus pointer to OneWireSlave instance\n * `[in]` - value bit value to send\n # Returns\n\ntrue on success, false on failure"]
    pub fn onewire_slave_send_bit(bus: *mut OneWireSlave, value: bool) -> bool;
}
extern "C" {
    #[doc = "Send one or more bytes of data\n # Arguments\n\n* `[in]` - bus pointer to OneWireSlave instance\n * `[in]` - data pointer to the data to send\n * `[in]` - data_size size of the data to send\n # Returns\n\ntrue on success, false on failure"]
    pub fn onewire_slave_send(bus: *mut OneWireSlave, data: *const u8, data_size: usize) -> bool;
}
extern "C" {
    #[doc = "Receive one or more bytes of data\n # Arguments\n\n* `[in]` - bus pointer to OneWireSlave instance\n * `[out]` - data pointer to the receive buffer\n * `[in]` - data_size number of bytes to receive\n # Returns\n\ntrue on success, false on failure"]
    pub fn onewire_slave_receive(bus: *mut OneWireSlave, data: *mut u8, data_size: usize) -> bool;
}
extern "C" {
    #[doc = "Enable overdrive mode\n # Arguments\n\n* `[in]` - bus pointer to OneWireSlave instance\n * `[in]` - set true to turn overdrive on, false to turn it off"]
    pub fn onewire_slave_set_overdrive(bus: *mut OneWireSlave, set: bool);
}
extern "C" {
    #[doc = "Set a callback function to be called on each reset.\n The return value of the callback determines whether the emulated device\n supports the short reset (passed as the is_short parameter).\n In most applications, it should also call onewire_slave_set_overdrive()\n to set the appropriate speed mode.\n\n # Arguments\n\n* `[in]` - bus pointer to OneWireSlave instance\n * `[in]` - callback pointer to a callback function\n * `[in]` - context additional parameter to be passed to the callback"]
    pub fn onewire_slave_set_reset_callback(
        bus: *mut OneWireSlave,
        callback: OneWireSlaveResetCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Set a callback function to be called on each command.\n The return value of the callback determines whether further operation\n is possible. As a rule of thumb, return true unless a critical error happened.\n\n # Arguments\n\n* `[in]` - bus pointer to OneWireSlave instance\n * `[in]` - callback pointer to a callback function\n * `[in]` - context additional parameter to be passed to the callback"]
    pub fn onewire_slave_set_command_callback(
        bus: *mut OneWireSlave,
        callback: OneWireSlaveCommandCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Set a callback to report emulation success\n # Arguments\n\n* `[in]` - bus pointer to OneWireSlave instance\n * `[in]` - result_cb pointer to a callback function\n * `[in]` - context additional parameter to be passed to the callback"]
    pub fn onewire_slave_set_result_callback(
        bus: *mut OneWireSlave,
        result_cb: OneWireSlaveResultCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn __wrap_printf(format: *const core::ffi::c_char, ...) -> core::ffi::c_int;
}
extern "C" {
    pub fn __wrap_vsnprintf(
        str_: *mut core::ffi::c_char,
        size: usize,
        format: *const core::ffi::c_char,
        args: va_list,
    ) -> core::ffi::c_int;
}
extern "C" {
    pub fn __wrap_puts(str_: *const core::ffi::c_char) -> core::ffi::c_int;
}
extern "C" {
    pub fn __wrap_putchar(ch: core::ffi::c_int) -> core::ffi::c_int;
}
extern "C" {
    pub fn __wrap_putc(ch: core::ffi::c_int, stream: *mut FILE) -> core::ffi::c_int;
}
extern "C" {
    pub fn __wrap_snprintf(
        str_: *mut core::ffi::c_char,
        size: usize,
        format: *const core::ffi::c_char,
        ...
    ) -> core::ffi::c_int;
}
extern "C" {
    pub fn __wrap_fflush(stream: *mut FILE) -> core::ffi::c_int;
}
extern "C" {
    pub fn __wrap___assert(
        file: *const core::ffi::c_char,
        line: core::ffi::c_int,
        e: *const core::ffi::c_char,
    ) -> !;
}
extern "C" {
    pub fn __wrap___assert_func(
        file: *const core::ffi::c_char,
        line: core::ffi::c_int,
        func: *const core::ffi::c_char,
        e: *const core::ffi::c_char,
    ) -> !;
}
pub const SignalReaderEventType_SignalReaderEventTypeHalfBufferFilled: SignalReaderEventType = 0;
pub const SignalReaderEventType_SignalReaderEventTypeFullBufferFilled: SignalReaderEventType = 1;
pub type SignalReaderEventType = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SignalReaderEventData {
    pub data: *mut u8,
    pub len: usize,
}
#[test]
fn bindgen_test_layout_SignalReaderEventData() {
    const UNINIT: ::core::mem::MaybeUninit<SignalReaderEventData> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SignalReaderEventData>(),
        8usize,
        concat!("Size of: ", stringify!(SignalReaderEventData))
    );
    assert_eq!(
        ::core::mem::align_of::<SignalReaderEventData>(),
        4usize,
        concat!("Alignment of ", stringify!(SignalReaderEventData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SignalReaderEventData),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SignalReaderEventData),
            "::",
            stringify!(len)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SignalReaderEvent {
    pub type_: SignalReaderEventType,
    pub data: *mut SignalReaderEventData,
}
#[test]
fn bindgen_test_layout_SignalReaderEvent() {
    const UNINIT: ::core::mem::MaybeUninit<SignalReaderEvent> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SignalReaderEvent>(),
        8usize,
        concat!("Size of: ", stringify!(SignalReaderEvent))
    );
    assert_eq!(
        ::core::mem::align_of::<SignalReaderEvent>(),
        4usize,
        concat!("Alignment of ", stringify!(SignalReaderEvent))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SignalReaderEvent),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SignalReaderEvent),
            "::",
            stringify!(data)
        )
    );
}
pub const SignalReaderTimeUnit_SignalReaderTimeUnit64Mhz: SignalReaderTimeUnit = 0;
pub type SignalReaderTimeUnit = core::ffi::c_uchar;
pub const SignalReaderPolarity_SignalReaderPolarityNormal: SignalReaderPolarity = 0;
pub const SignalReaderPolarity_SignalReaderPolarityInverted: SignalReaderPolarity = 1;
pub type SignalReaderPolarity = core::ffi::c_uchar;
pub const SignalReaderTrigger_SignalReaderTriggerNone: SignalReaderTrigger = 0;
pub const SignalReaderTrigger_SignalReaderTriggerRisingFallingEdge: SignalReaderTrigger = 1;
pub type SignalReaderTrigger = core::ffi::c_uchar;
pub type SignalReaderCallback = ::core::option::Option<
    unsafe extern "C" fn(event: SignalReaderEvent, context: *mut core::ffi::c_void),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SignalReader {
    _unused: [u8; 0],
}
extern "C" {
    pub fn signal_reader_alloc(gpio_pin: *const GpioPin, size: u32) -> *mut SignalReader;
}
extern "C" {
    pub fn signal_reader_free(instance: *mut SignalReader);
}
extern "C" {
    pub fn signal_reader_set_pull(instance: *mut SignalReader, pull: GpioPull);
}
extern "C" {
    pub fn signal_reader_set_polarity(instance: *mut SignalReader, polarity: SignalReaderPolarity);
}
extern "C" {
    pub fn signal_reader_set_sample_rate(
        instance: *mut SignalReader,
        time_unit: SignalReaderTimeUnit,
        time: u32,
    );
}
extern "C" {
    pub fn signal_reader_set_trigger(instance: *mut SignalReader, trigger: SignalReaderTrigger);
}
extern "C" {
    pub fn signal_reader_start(
        instance: *mut SignalReader,
        callback: SignalReaderCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn signal_reader_stop(instance: *mut SignalReader);
}
#[doc = "Structure definition of some features of COMP instance."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LL_COMP_InitTypeDef {
    #[doc = "< Set comparator operating mode to adjust power and speed.\nThis parameter can be a value of COMP_LL_EC_POWERMODE\n\nThis feature can be modified afterwards using unitary function LL_COMP_SetPowerMode()."]
    pub PowerMode: u32,
    #[doc = "< Set comparator input plus (non-inverting input).\nThis parameter can be a value of COMP_LL_EC_INPUT_PLUS\n\nThis feature can be modified afterwards using unitary function LL_COMP_SetInputPlus()."]
    pub InputPlus: u32,
    #[doc = "< Set comparator input minus (inverting input).\nThis parameter can be a value of COMP_LL_EC_INPUT_MINUS\n\nThis feature can be modified afterwards using unitary function LL_COMP_SetInputMinus()."]
    pub InputMinus: u32,
    #[doc = "< Set comparator hysteresis mode of the input minus.\nThis parameter can be a value of COMP_LL_EC_INPUT_HYSTERESIS\n\nThis feature can be modified afterwards using unitary function LL_COMP_SetInputHysteresis()."]
    pub InputHysteresis: u32,
    #[doc = "< Set comparator output polarity.\nThis parameter can be a value of COMP_LL_EC_OUTPUT_POLARITY\n\nThis feature can be modified afterwards using unitary function LL_COMP_SetOutputPolarity()."]
    pub OutputPolarity: u32,
    #[doc = "< Set comparator blanking source.\nThis parameter can be a value of COMP_LL_EC_OUTPUT_BLANKING_SOURCE\n\nThis feature can be modified afterwards using unitary function LL_COMP_SetOutputBlankingSource()."]
    pub OutputBlankingSource: u32,
}
#[test]
fn bindgen_test_layout_LL_COMP_InitTypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<LL_COMP_InitTypeDef> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LL_COMP_InitTypeDef>(),
        24usize,
        concat!("Size of: ", stringify!(LL_COMP_InitTypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<LL_COMP_InitTypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(LL_COMP_InitTypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PowerMode) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_COMP_InitTypeDef),
            "::",
            stringify!(PowerMode)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).InputPlus) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_COMP_InitTypeDef),
            "::",
            stringify!(InputPlus)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).InputMinus) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_COMP_InitTypeDef),
            "::",
            stringify!(InputMinus)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).InputHysteresis) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_COMP_InitTypeDef),
            "::",
            stringify!(InputHysteresis)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OutputPolarity) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_COMP_InitTypeDef),
            "::",
            stringify!(OutputPolarity)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OutputBlankingSource) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_COMP_InitTypeDef),
            "::",
            stringify!(OutputBlankingSource)
        )
    );
}
extern "C" {
    pub fn LL_COMP_Init(
        COMPx: *mut COMP_TypeDef,
        COMP_InitStruct: *const LL_COMP_InitTypeDef,
    ) -> ErrorStatus;
}
#[doc = "DMA_LL_ES_INIT DMA Exported Init structure\n # "]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LL_DMA_InitTypeDef {
    #[doc = "< Specifies the peripheral base address for DMA transfer\nor as Source base address in case of memory to memory transfer direction.\n\nThis parameter must be a value between Min_Data = 0 and Max_Data = 0xFFFFFFFF."]
    pub PeriphOrM2MSrcAddress: u32,
    #[doc = "< Specifies the memory base address for DMA transfer\nor as Destination base address in case of memory to memory transfer direction.\n\nThis parameter must be a value between Min_Data = 0 and Max_Data = 0xFFFFFFFF."]
    pub MemoryOrM2MDstAddress: u32,
    #[doc = "< Specifies if the data will be transferred from memory to peripheral,\nfrom memory to memory or from peripheral to memory.\nThis parameter can be a value of DMA_LL_EC_DIRECTION\n\nThis feature can be modified afterwards using unitary function LL_DMA_SetDataTransferDirection()."]
    pub Direction: u32,
    #[doc = "< Specifies the normal or circular operation mode.\nThis parameter can be a value of DMA_LL_EC_MODE\nThe circular buffer mode cannot be used if the memory to memory\ndata transfer direction is configured on the selected Channel\n\nThis feature can be modified afterwards using unitary function LL_DMA_SetMode()."]
    pub Mode: u32,
    #[doc = "< Specifies whether the Peripheral address or Source address in case of memory to memory transfer direction\nis incremented or not.\nThis parameter can be a value of DMA_LL_EC_PERIPH\n\nThis feature can be modified afterwards using unitary function LL_DMA_SetPeriphIncMode()."]
    pub PeriphOrM2MSrcIncMode: u32,
    #[doc = "< Specifies whether the Memory address or Destination address in case of memory to memory transfer direction\nis incremented or not.\nThis parameter can be a value of DMA_LL_EC_MEMORY\n\nThis feature can be modified afterwards using unitary function LL_DMA_SetMemoryIncMode()."]
    pub MemoryOrM2MDstIncMode: u32,
    #[doc = "< Specifies the Peripheral data size alignment or Source data size alignment (byte, half word, word)\nin case of memory to memory transfer direction.\nThis parameter can be a value of DMA_LL_EC_PDATAALIGN\n\nThis feature can be modified afterwards using unitary function LL_DMA_SetPeriphSize()."]
    pub PeriphOrM2MSrcDataSize: u32,
    #[doc = "< Specifies the Memory data size alignment or Destination data size alignment (byte, half word, word)\nin case of memory to memory transfer direction.\nThis parameter can be a value of DMA_LL_EC_MDATAALIGN\n\nThis feature can be modified afterwards using unitary function LL_DMA_SetMemorySize()."]
    pub MemoryOrM2MDstDataSize: u32,
    #[doc = "< Specifies the number of data to transfer, in data unit.\nThe data unit is equal to the source buffer configuration set in PeripheralSize\nor MemorySize parameters depending in the transfer direction.\nThis parameter must be a value between Min_Data = 0 and Max_Data = 0x0000FFFF\n\nThis feature can be modified afterwards using unitary function LL_DMA_SetDataLength()."]
    pub NbData: u32,
    #[doc = "< Specifies the peripheral request.\nThis parameter can be a value of DMAMUX_LL_EC_REQUEST\n\nThis feature can be modified afterwards using unitary function LL_DMA_SetPeriphRequest()."]
    pub PeriphRequest: u32,
    #[doc = "< Specifies the channel priority level.\nThis parameter can be a value of DMA_LL_EC_PRIORITY\n\nThis feature can be modified afterwards using unitary function LL_DMA_SetChannelPriorityLevel()."]
    pub Priority: u32,
}
#[test]
fn bindgen_test_layout_LL_DMA_InitTypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<LL_DMA_InitTypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LL_DMA_InitTypeDef>(),
        44usize,
        concat!("Size of: ", stringify!(LL_DMA_InitTypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<LL_DMA_InitTypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(LL_DMA_InitTypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PeriphOrM2MSrcAddress) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_DMA_InitTypeDef),
            "::",
            stringify!(PeriphOrM2MSrcAddress)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).MemoryOrM2MDstAddress) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_DMA_InitTypeDef),
            "::",
            stringify!(MemoryOrM2MDstAddress)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Direction) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_DMA_InitTypeDef),
            "::",
            stringify!(Direction)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Mode) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_DMA_InitTypeDef),
            "::",
            stringify!(Mode)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PeriphOrM2MSrcIncMode) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_DMA_InitTypeDef),
            "::",
            stringify!(PeriphOrM2MSrcIncMode)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).MemoryOrM2MDstIncMode) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_DMA_InitTypeDef),
            "::",
            stringify!(MemoryOrM2MDstIncMode)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PeriphOrM2MSrcDataSize) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_DMA_InitTypeDef),
            "::",
            stringify!(PeriphOrM2MSrcDataSize)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).MemoryOrM2MDstDataSize) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_DMA_InitTypeDef),
            "::",
            stringify!(MemoryOrM2MDstDataSize)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).NbData) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_DMA_InitTypeDef),
            "::",
            stringify!(NbData)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PeriphRequest) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_DMA_InitTypeDef),
            "::",
            stringify!(PeriphRequest)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Priority) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_DMA_InitTypeDef),
            "::",
            stringify!(Priority)
        )
    );
}
extern "C" {
    #[doc = "DMA_LL_EF_Init Initialization and de-initialization functions\n # "]
    pub fn LL_DMA_Init(
        DMAx: *mut DMA_TypeDef,
        Channel: u32,
        DMA_InitStruct: *mut LL_DMA_InitTypeDef,
    ) -> ErrorStatus;
}
extern "C" {
    pub fn LL_DMA_DeInit(DMAx: *mut DMA_TypeDef, Channel: u32) -> ErrorStatus;
}
#[doc = "LPTIM Init structure definition"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LL_LPTIM_InitTypeDef {
    #[doc = "< Specifies the source of the clock used by the LPTIM instance.\nThis parameter can be a value of LPTIM_LL_EC_CLK_SOURCE.\n\nThis feature can be modified afterwards using unitary\nfunction LL_LPTIM_SetClockSource()."]
    pub ClockSource: u32,
    #[doc = "< Specifies the prescaler division ratio.\nThis parameter can be a value of LPTIM_LL_EC_PRESCALER.\n\nThis feature can be modified afterwards using using unitary\nfunction LL_LPTIM_SetPrescaler()."]
    pub Prescaler: u32,
    #[doc = "< Specifies the waveform shape.\nThis parameter can be a value of LPTIM_LL_EC_OUTPUT_WAVEFORM.\n\nThis feature can be modified afterwards using unitary\nfunction LL_LPTIM_ConfigOutput()."]
    pub Waveform: u32,
    #[doc = "< Specifies waveform polarity.\nThis parameter can be a value of LPTIM_LL_EC_OUTPUT_POLARITY.\n\nThis feature can be modified afterwards using unitary\nfunction LL_LPTIM_ConfigOutput()."]
    pub Polarity: u32,
}
#[test]
fn bindgen_test_layout_LL_LPTIM_InitTypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<LL_LPTIM_InitTypeDef> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LL_LPTIM_InitTypeDef>(),
        16usize,
        concat!("Size of: ", stringify!(LL_LPTIM_InitTypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<LL_LPTIM_InitTypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(LL_LPTIM_InitTypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ClockSource) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_LPTIM_InitTypeDef),
            "::",
            stringify!(ClockSource)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Prescaler) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_LPTIM_InitTypeDef),
            "::",
            stringify!(Prescaler)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Waveform) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_LPTIM_InitTypeDef),
            "::",
            stringify!(Waveform)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Polarity) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_LPTIM_InitTypeDef),
            "::",
            stringify!(Polarity)
        )
    );
}
extern "C" {
    #[doc = "LPTIM_LL_EF_Init Initialisation and deinitialisation functions\n # "]
    pub fn LL_LPTIM_DeInit(LPTIMx: *mut LPTIM_TypeDef) -> ErrorStatus;
}
extern "C" {
    pub fn LL_LPTIM_Init(
        LPTIMx: *mut LPTIM_TypeDef,
        LPTIM_InitStruct: *const LL_LPTIM_InitTypeDef,
    ) -> ErrorStatus;
}
#[doc = "LL LPUART Init Structure definition"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LL_LPUART_InitTypeDef {
    #[doc = "< Specifies the Prescaler to compute the communication baud rate.\nThis parameter can be a value of LPUART_LL_EC_PRESCALER.\n\nThis feature can be modified afterwards using unitary\nfunction LL_LPUART_SetPrescaler()."]
    pub PrescalerValue: u32,
    #[doc = "< This field defines expected LPUART communication baud rate.\n\nThis feature can be modified afterwards using unitary\nfunction LL_LPUART_SetBaudRate()."]
    pub BaudRate: u32,
    #[doc = "< Specifies the number of data bits transmitted or received in a frame.\nThis parameter can be a value of LPUART_LL_EC_DATAWIDTH.\n\nThis feature can be modified afterwards using unitary\nfunction LL_LPUART_SetDataWidth()."]
    pub DataWidth: u32,
    #[doc = "< Specifies the number of stop bits transmitted.\nThis parameter can be a value of LPUART_LL_EC_STOPBITS.\n\nThis feature can be modified afterwards using unitary\nfunction LL_LPUART_SetStopBitsLength()."]
    pub StopBits: u32,
    #[doc = "< Specifies the parity mode.\nThis parameter can be a value of LPUART_LL_EC_PARITY.\n\nThis feature can be modified afterwards using unitary\nfunction LL_LPUART_SetParity()."]
    pub Parity: u32,
    #[doc = "< Specifies whether the Receive and/or Transmit mode is enabled or disabled.\nThis parameter can be a value of LPUART_LL_EC_DIRECTION.\n\nThis feature can be modified afterwards using unitary\nfunction LL_LPUART_SetTransferDirection()."]
    pub TransferDirection: u32,
    #[doc = "< Specifies whether the hardware flow control mode is enabled or disabled.\nThis parameter can be a value of LPUART_LL_EC_HWCONTROL.\n\nThis feature can be modified afterwards using unitary\nfunction LL_LPUART_SetHWFlowCtrl()."]
    pub HardwareFlowControl: u32,
}
#[test]
fn bindgen_test_layout_LL_LPUART_InitTypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<LL_LPUART_InitTypeDef> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LL_LPUART_InitTypeDef>(),
        28usize,
        concat!("Size of: ", stringify!(LL_LPUART_InitTypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<LL_LPUART_InitTypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(LL_LPUART_InitTypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PrescalerValue) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_LPUART_InitTypeDef),
            "::",
            stringify!(PrescalerValue)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BaudRate) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_LPUART_InitTypeDef),
            "::",
            stringify!(BaudRate)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).DataWidth) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_LPUART_InitTypeDef),
            "::",
            stringify!(DataWidth)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).StopBits) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_LPUART_InitTypeDef),
            "::",
            stringify!(StopBits)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Parity) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_LPUART_InitTypeDef),
            "::",
            stringify!(Parity)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TransferDirection) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_LPUART_InitTypeDef),
            "::",
            stringify!(TransferDirection)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).HardwareFlowControl) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_LPUART_InitTypeDef),
            "::",
            stringify!(HardwareFlowControl)
        )
    );
}
extern "C" {
    pub fn LL_LPUART_Init(
        LPUARTx: *mut USART_TypeDef,
        LPUART_InitStruct: *const LL_LPUART_InitTypeDef,
    ) -> ErrorStatus;
}
#[doc = "RTC Init structures definition"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LL_RTC_InitTypeDef {
    #[doc = "< Specifies the RTC Hours Format.\nThis parameter can be a value of RTC_LL_EC_HOURFORMAT\n\nThis feature can be modified afterwards using unitary function\nLL_RTC_SetHourFormat()."]
    pub HourFormat: u32,
    #[doc = "< Specifies the RTC Asynchronous Predivider value.\nThis parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7F\n\nThis feature can be modified afterwards using unitary function\nLL_RTC_SetAsynchPrescaler()."]
    pub AsynchPrescaler: u32,
    #[doc = "< Specifies the RTC Synchronous Predivider value.\nThis parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7FFF\n\nThis feature can be modified afterwards using unitary function\nLL_RTC_SetSynchPrescaler()."]
    pub SynchPrescaler: u32,
}
#[test]
fn bindgen_test_layout_LL_RTC_InitTypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<LL_RTC_InitTypeDef> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LL_RTC_InitTypeDef>(),
        12usize,
        concat!("Size of: ", stringify!(LL_RTC_InitTypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<LL_RTC_InitTypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(LL_RTC_InitTypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).HourFormat) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_RTC_InitTypeDef),
            "::",
            stringify!(HourFormat)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).AsynchPrescaler) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_RTC_InitTypeDef),
            "::",
            stringify!(AsynchPrescaler)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).SynchPrescaler) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_RTC_InitTypeDef),
            "::",
            stringify!(SynchPrescaler)
        )
    );
}
extern "C" {
    pub fn LL_RTC_Init(
        RTCx: *mut RTC_TypeDef,
        RTC_InitStruct: *mut LL_RTC_InitTypeDef,
    ) -> ErrorStatus;
}
extern "C" {
    pub fn LL_RTC_EnterInitMode(RTCx: *mut RTC_TypeDef) -> ErrorStatus;
}
#[doc = "LL USART Init Structure definition"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct LL_USART_InitTypeDef {
    #[doc = "< Specifies the Prescaler to compute the communication baud rate.\nThis parameter can be a value of USART_LL_EC_PRESCALER.\n\nThis feature can be modified afterwards using unitary\nfunction LL_USART_SetPrescaler()."]
    pub PrescalerValue: u32,
    #[doc = "< This field defines expected Usart communication baud rate.\n\nThis feature can be modified afterwards using unitary\nfunction LL_USART_SetBaudRate()."]
    pub BaudRate: u32,
    #[doc = "< Specifies the number of data bits transmitted or received in a frame.\nThis parameter can be a value of USART_LL_EC_DATAWIDTH.\n\nThis feature can be modified afterwards using unitary\nfunction LL_USART_SetDataWidth()."]
    pub DataWidth: u32,
    #[doc = "< Specifies the number of stop bits transmitted.\nThis parameter can be a value of USART_LL_EC_STOPBITS.\n\nThis feature can be modified afterwards using unitary\nfunction LL_USART_SetStopBitsLength()."]
    pub StopBits: u32,
    #[doc = "< Specifies the parity mode.\nThis parameter can be a value of USART_LL_EC_PARITY.\n\nThis feature can be modified afterwards using unitary\nfunction LL_USART_SetParity()."]
    pub Parity: u32,
    #[doc = "< Specifies whether the Receive and/or Transmit mode is enabled or disabled.\nThis parameter can be a value of USART_LL_EC_DIRECTION.\n\nThis feature can be modified afterwards using unitary\nfunction LL_USART_SetTransferDirection()."]
    pub TransferDirection: u32,
    #[doc = "< Specifies whether the hardware flow control mode is enabled or disabled.\nThis parameter can be a value of USART_LL_EC_HWCONTROL.\n\nThis feature can be modified afterwards using unitary\nfunction LL_USART_SetHWFlowCtrl()."]
    pub HardwareFlowControl: u32,
    #[doc = "< Specifies whether USART oversampling mode is 16 or 8.\nThis parameter can be a value of USART_LL_EC_OVERSAMPLING.\n\nThis feature can be modified afterwards using unitary\nfunction LL_USART_SetOverSampling()."]
    pub OverSampling: u32,
}
#[test]
fn bindgen_test_layout_LL_USART_InitTypeDef() {
    const UNINIT: ::core::mem::MaybeUninit<LL_USART_InitTypeDef> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<LL_USART_InitTypeDef>(),
        32usize,
        concat!("Size of: ", stringify!(LL_USART_InitTypeDef))
    );
    assert_eq!(
        ::core::mem::align_of::<LL_USART_InitTypeDef>(),
        4usize,
        concat!("Alignment of ", stringify!(LL_USART_InitTypeDef))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).PrescalerValue) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_USART_InitTypeDef),
            "::",
            stringify!(PrescalerValue)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).BaudRate) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_USART_InitTypeDef),
            "::",
            stringify!(BaudRate)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).DataWidth) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_USART_InitTypeDef),
            "::",
            stringify!(DataWidth)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).StopBits) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_USART_InitTypeDef),
            "::",
            stringify!(StopBits)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Parity) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_USART_InitTypeDef),
            "::",
            stringify!(Parity)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).TransferDirection) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_USART_InitTypeDef),
            "::",
            stringify!(TransferDirection)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).HardwareFlowControl) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_USART_InitTypeDef),
            "::",
            stringify!(HardwareFlowControl)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).OverSampling) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(LL_USART_InitTypeDef),
            "::",
            stringify!(OverSampling)
        )
    );
}
extern "C" {
    pub fn LL_USART_Init(
        USARTx: *mut USART_TypeDef,
        USART_InitStruct: *const LL_USART_InitTypeDef,
    ) -> ErrorStatus;
}
extern "C" {
    #[doc = "UTILS_EF_SYSTEM SYSTEM\n # "]
    pub fn LL_SetSystemCoreClock(HCLKFrequency: u32);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzBlockDecoder {
    pub parser_step: u32,
    pub te_last: u32,
    pub decode_data: u64,
    pub decode_count_bit: u8,
}
#[test]
fn bindgen_test_layout_SubGhzBlockDecoder() {
    const UNINIT: ::core::mem::MaybeUninit<SubGhzBlockDecoder> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SubGhzBlockDecoder>(),
        24usize,
        concat!("Size of: ", stringify!(SubGhzBlockDecoder))
    );
    assert_eq!(
        ::core::mem::align_of::<SubGhzBlockDecoder>(),
        8usize,
        concat!("Alignment of ", stringify!(SubGhzBlockDecoder))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).parser_step) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzBlockDecoder),
            "::",
            stringify!(parser_step)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).te_last) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzBlockDecoder),
            "::",
            stringify!(te_last)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).decode_data) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzBlockDecoder),
            "::",
            stringify!(decode_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).decode_count_bit) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzBlockDecoder),
            "::",
            stringify!(decode_count_bit)
        )
    );
}
extern "C" {
    #[doc = "Add data bit when decoding.\n # Arguments\n\n* `decoder` - Pointer to a SubGhzBlockDecoder instance\n * `bit` - data, 1bit"]
    pub fn subghz_protocol_blocks_add_bit(decoder: *mut SubGhzBlockDecoder, bit: u8);
}
extern "C" {
    #[doc = "Add data to_128 bit when decoding.\n # Arguments\n\n* `decoder` - Pointer to a SubGhzBlockDecoder instance\n * `head_64_bit` - Pointer to a head_64_bit\n * `bit` - data, 1bit"]
    pub fn subghz_protocol_blocks_add_to_128_bit(
        decoder: *mut SubGhzBlockDecoder,
        bit: u8,
        head_64_bit: *mut u64,
    );
}
extern "C" {
    #[doc = "Getting the hash sum of the last randomly received parcel.\n # Arguments\n\n* `decoder` - Pointer to a SubGhzBlockDecoder instance\n # Returns\n\nhash Hash sum"]
    pub fn subghz_protocol_blocks_get_hash_data(decoder: *mut SubGhzBlockDecoder, len: usize)
        -> u8;
}
pub const SubGhzProtocolBlockAlignBit_SubGhzProtocolBlockAlignBitLeft: SubGhzProtocolBlockAlignBit =
    0;
pub const SubGhzProtocolBlockAlignBit_SubGhzProtocolBlockAlignBitRight:
    SubGhzProtocolBlockAlignBit = 1;
pub type SubGhzProtocolBlockAlignBit = core::ffi::c_uchar;
extern "C" {
    #[doc = "Set data bit when encoding HEX array.\n # Arguments\n\n* `bit_value` - The value of the bit to be set\n * `data_array` - Pointer to a HEX array\n * `set_index_bit` - Number set a bit in the array starting from the left\n * `max_size_array` - array size, check not to overflow"]
    pub fn subghz_protocol_blocks_set_bit_array(
        bit_value: bool,
        data_array: *mut u8,
        set_index_bit: usize,
        max_size_array: usize,
    );
}
extern "C" {
    #[doc = "Get data bit when encoding HEX array.\n # Arguments\n\n* `data_array` - Pointer to a HEX array\n * `read_index_bit` - Number get a bit in the array starting from the left\n # Returns\n\nbool value bit"]
    pub fn subghz_protocol_blocks_get_bit_array(data_array: *mut u8, read_index_bit: usize)
        -> bool;
}
extern "C" {
    #[doc = "Generating an upload from data.\n # Arguments\n\n* `data_array` - Pointer to a HEX array\n * `count_bit_data_array` - How many bits in the array are processed\n * `upload` - Pointer to a LevelDuration\n * `max_size_upload` - upload size, check not to overflow\n * `duration_bit` - duration 1 bit\n * `align_bit` - alignment of useful bits in an array"]
    pub fn subghz_protocol_blocks_get_upload_from_bit_array(
        data_array: *mut u8,
        count_bit_data_array: usize,
        upload: *mut LevelDuration,
        max_size_upload: usize,
        duration_bit: u32,
        align_bit: SubGhzProtocolBlockAlignBit,
    ) -> usize;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzEnvironment {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzProtocolRegistry {
    pub items: *mut *const SubGhzProtocol,
    pub size: usize,
}
#[test]
fn bindgen_test_layout_SubGhzProtocolRegistry() {
    const UNINIT: ::core::mem::MaybeUninit<SubGhzProtocolRegistry> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SubGhzProtocolRegistry>(),
        8usize,
        concat!("Size of: ", stringify!(SubGhzProtocolRegistry))
    );
    assert_eq!(
        ::core::mem::align_of::<SubGhzProtocolRegistry>(),
        4usize,
        concat!("Alignment of ", stringify!(SubGhzProtocolRegistry))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).items) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolRegistry),
            "::",
            stringify!(items)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolRegistry),
            "::",
            stringify!(size)
        )
    );
}
extern "C" {
    #[doc = "Registration by name SubGhzProtocol.\n # Arguments\n\n* `protocol_registry` - SubGhzProtocolRegistry\n * `name` - Protocol name\n # Returns\n\nSubGhzProtocol* pointer to a SubGhzProtocol instance"]
    pub fn subghz_protocol_registry_get_by_name(
        protocol_registry: *const SubGhzProtocolRegistry,
        name: *const core::ffi::c_char,
    ) -> *const SubGhzProtocol;
}
extern "C" {
    #[doc = "Registration protocol by index in array SubGhzProtocol.\n # Arguments\n\n* `protocol_registry` - SubGhzProtocolRegistry\n * `index` - Protocol by index in array\n # Returns\n\nSubGhzProtocol* pointer to a SubGhzProtocol instance"]
    pub fn subghz_protocol_registry_get_by_index(
        protocol_registry: *const SubGhzProtocolRegistry,
        index: usize,
    ) -> *const SubGhzProtocol;
}
extern "C" {
    #[doc = "Getting the number of registered protocols.\n # Arguments\n\n* `protocol_registry` - SubGhzProtocolRegistry\n # Returns\n\nNumber of protocols"]
    pub fn subghz_protocol_registry_count(
        protocol_registry: *const SubGhzProtocolRegistry,
    ) -> usize;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzKeystore {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate SubGhzEnvironment.\n # Returns\n\nSubGhzEnvironment* pointer to a SubGhzEnvironment instance"]
    pub fn subghz_environment_alloc() -> *mut SubGhzEnvironment;
}
extern "C" {
    #[doc = "Free SubGhzEnvironment.\n # Arguments\n\n* `instance` - Pointer to a SubGhzEnvironment instance"]
    pub fn subghz_environment_free(instance: *mut SubGhzEnvironment);
}
extern "C" {
    #[doc = "Downloading the manufacture key file.\n # Arguments\n\n* `instance` - Pointer to a SubGhzEnvironment instance\n * `filename` - Full path to the file\n # Returns\n\ntrue On success"]
    pub fn subghz_environment_load_keystore(
        instance: *mut SubGhzEnvironment,
        filename: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Get pointer to a SubGhzKeystore* instance.\n # Returns\n\nSubGhzEnvironment* pointer to a SubGhzEnvironment instance"]
    pub fn subghz_environment_get_keystore(instance: *mut SubGhzEnvironment)
        -> *mut SubGhzKeystore;
}
extern "C" {
    #[doc = "Set filename to work with Came Atomo.\n # Arguments\n\n* `instance` - Pointer to a SubGhzEnvironment instance\n * `filename` - Full path to the file"]
    pub fn subghz_environment_set_came_atomo_rainbow_table_file_name(
        instance: *mut SubGhzEnvironment,
        filename: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Get filename to work with Came Atomo.\n # Arguments\n\n* `instance` - Pointer to a SubGhzEnvironment instance\n # Returns\n\nFull path to the file"]
    pub fn subghz_environment_get_came_atomo_rainbow_table_file_name(
        instance: *mut SubGhzEnvironment,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Set filename to work with Alutech at-4n.\n # Arguments\n\n* `instance` - Pointer to a SubGhzEnvironment instance\n * `filename` - Full path to the file"]
    pub fn subghz_environment_set_alutech_at_4n_rainbow_table_file_name(
        instance: *mut SubGhzEnvironment,
        filename: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Get filename to work with Alutech at-4n.\n # Arguments\n\n* `instance` - Pointer to a SubGhzEnvironment instance\n # Returns\n\nFull path to the file"]
    pub fn subghz_environment_get_alutech_at_4n_rainbow_table_file_name(
        instance: *mut SubGhzEnvironment,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Set filename to work with Nice Flor-S.\n # Arguments\n\n* `instance` - Pointer to a SubGhzEnvironment instance\n * `filename` - Full path to the file"]
    pub fn subghz_environment_set_nice_flor_s_rainbow_table_file_name(
        instance: *mut SubGhzEnvironment,
        filename: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Get filename to work with Nice Flor-S.\n # Arguments\n\n* `instance` - Pointer to a SubGhzEnvironment instance\n # Returns\n\nFull path to the file"]
    pub fn subghz_environment_get_nice_flor_s_rainbow_table_file_name(
        instance: *mut SubGhzEnvironment,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    #[doc = "Set list of protocols to work.\n # Arguments\n\n* `instance` - Pointer to a SubGhzEnvironment instance\n * `protocol_registry_items` - Pointer to a SubGhzProtocolRegistry"]
    pub fn subghz_environment_set_protocol_registry(
        instance: *mut SubGhzEnvironment,
        protocol_registry_items: *const SubGhzProtocolRegistry,
    );
}
extern "C" {
    #[doc = "Get list of protocols to work.\n # Arguments\n\n* `instance` - Pointer to a SubGhzEnvironment instance\n # Returns\n\nPointer to a SubGhzProtocolRegistry"]
    pub fn subghz_environment_get_protocol_registry(
        instance: *mut SubGhzEnvironment,
    ) -> *const SubGhzProtocolRegistry;
}
extern "C" {
    #[doc = "Get list of protocols names.\n # Arguments\n\n* `instance` - Pointer to a SubGhzEnvironment instance\n * `idx` - index protocols\n # Returns\n\nPointer to a SubGhzProtocolRegistry"]
    pub fn subghz_environment_get_protocol_name_registry(
        instance: *mut SubGhzEnvironment,
        idx: usize,
    ) -> *const core::ffi::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzRadioPreset {
    pub name: *mut FuriString,
    pub frequency: u32,
    pub data: *mut u8,
    pub data_size: usize,
}
#[test]
fn bindgen_test_layout_SubGhzRadioPreset() {
    const UNINIT: ::core::mem::MaybeUninit<SubGhzRadioPreset> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SubGhzRadioPreset>(),
        16usize,
        concat!("Size of: ", stringify!(SubGhzRadioPreset))
    );
    assert_eq!(
        ::core::mem::align_of::<SubGhzRadioPreset>(),
        4usize,
        concat!("Alignment of ", stringify!(SubGhzRadioPreset))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzRadioPreset),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).frequency) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzRadioPreset),
            "::",
            stringify!(frequency)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzRadioPreset),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data_size) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzRadioPreset),
            "::",
            stringify!(data_size)
        )
    );
}
pub const SubGhzProtocolStatus_SubGhzProtocolStatusOk: SubGhzProtocolStatus = 0;
#[doc = "< General unclassified error"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusError: SubGhzProtocolStatus = -1;
#[doc = "< Missing or invalid file header"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusErrorParserHeader: SubGhzProtocolStatus = -2;
#[doc = "< Missing `Frequency`"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusErrorParserFrequency: SubGhzProtocolStatus = -3;
#[doc = "< Missing `Preset`"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusErrorParserPreset: SubGhzProtocolStatus = -4;
#[doc = "< Missing `Custom_preset_module`"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusErrorParserCustomPreset: SubGhzProtocolStatus =
    -5;
#[doc = "< Missing `Protocol` name"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusErrorParserProtocolName: SubGhzProtocolStatus =
    -6;
#[doc = "< Missing `Bit`"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusErrorParserBitCount: SubGhzProtocolStatus = -7;
#[doc = "< Missing `Key`"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusErrorParserKey: SubGhzProtocolStatus = -8;
#[doc = "< Missing `Te`"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusErrorParserTe: SubGhzProtocolStatus = -9;
#[doc = "< Missing some other mandatory keys"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusErrorParserOthers: SubGhzProtocolStatus = -10;
#[doc = "< Invalid bit count value"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusErrorValueBitCount: SubGhzProtocolStatus = -11;
#[doc = "< Payload encoder failure"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusErrorEncoderGetUpload: SubGhzProtocolStatus =
    -12;
#[doc = "< Protocol not found"]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusErrorProtocolNotFound: SubGhzProtocolStatus =
    -13;
#[doc = "< Prevents enum down-size compiler optimization."]
pub const SubGhzProtocolStatus_SubGhzProtocolStatusReserved: SubGhzProtocolStatus = 2147483647;
pub type SubGhzProtocolStatus = core::ffi::c_int;
pub type SubGhzAlloc = ::core::option::Option<
    unsafe extern "C" fn(environment: *mut SubGhzEnvironment) -> *mut core::ffi::c_void,
>;
pub type SubGhzFree = ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
pub type SubGhzSerialize = ::core::option::Option<
    unsafe extern "C" fn(
        context: *mut core::ffi::c_void,
        flipper_format: *mut FlipperFormat,
        preset: *mut SubGhzRadioPreset,
    ) -> SubGhzProtocolStatus,
>;
pub type SubGhzDeserialize = ::core::option::Option<
    unsafe extern "C" fn(
        context: *mut core::ffi::c_void,
        flipper_format: *mut FlipperFormat,
    ) -> SubGhzProtocolStatus,
>;
pub type SubGhzDecoderFeed = ::core::option::Option<
    unsafe extern "C" fn(decoder: *mut core::ffi::c_void, level: bool, duration: u32),
>;
pub type SubGhzDecoderReset =
    ::core::option::Option<unsafe extern "C" fn(decoder: *mut core::ffi::c_void)>;
pub type SubGhzGetHashData =
    ::core::option::Option<unsafe extern "C" fn(decoder: *mut core::ffi::c_void) -> u8>;
pub type SubGhzGetString = ::core::option::Option<
    unsafe extern "C" fn(decoder: *mut core::ffi::c_void, output: *mut FuriString),
>;
pub type SubGhzEncoderStop =
    ::core::option::Option<unsafe extern "C" fn(encoder: *mut core::ffi::c_void)>;
pub type SubGhzEncoderYield =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void) -> LevelDuration>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzProtocolDecoder {
    pub alloc: SubGhzAlloc,
    pub free: SubGhzFree,
    pub feed: SubGhzDecoderFeed,
    pub reset: SubGhzDecoderReset,
    pub get_hash_data: SubGhzGetHashData,
    pub get_string: SubGhzGetString,
    pub serialize: SubGhzSerialize,
    pub deserialize: SubGhzDeserialize,
}
#[test]
fn bindgen_test_layout_SubGhzProtocolDecoder() {
    const UNINIT: ::core::mem::MaybeUninit<SubGhzProtocolDecoder> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SubGhzProtocolDecoder>(),
        32usize,
        concat!("Size of: ", stringify!(SubGhzProtocolDecoder))
    );
    assert_eq!(
        ::core::mem::align_of::<SubGhzProtocolDecoder>(),
        4usize,
        concat!("Alignment of ", stringify!(SubGhzProtocolDecoder))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).alloc) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolDecoder),
            "::",
            stringify!(alloc)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).free) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolDecoder),
            "::",
            stringify!(free)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).feed) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolDecoder),
            "::",
            stringify!(feed)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).reset) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolDecoder),
            "::",
            stringify!(reset)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).get_hash_data) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolDecoder),
            "::",
            stringify!(get_hash_data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).get_string) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolDecoder),
            "::",
            stringify!(get_string)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).serialize) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolDecoder),
            "::",
            stringify!(serialize)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).deserialize) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolDecoder),
            "::",
            stringify!(deserialize)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzProtocolEncoder {
    pub alloc: SubGhzAlloc,
    pub free: SubGhzFree,
    pub deserialize: SubGhzDeserialize,
    pub stop: SubGhzEncoderStop,
    pub yield_: SubGhzEncoderYield,
}
#[test]
fn bindgen_test_layout_SubGhzProtocolEncoder() {
    const UNINIT: ::core::mem::MaybeUninit<SubGhzProtocolEncoder> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SubGhzProtocolEncoder>(),
        20usize,
        concat!("Size of: ", stringify!(SubGhzProtocolEncoder))
    );
    assert_eq!(
        ::core::mem::align_of::<SubGhzProtocolEncoder>(),
        4usize,
        concat!("Alignment of ", stringify!(SubGhzProtocolEncoder))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).alloc) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolEncoder),
            "::",
            stringify!(alloc)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).free) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolEncoder),
            "::",
            stringify!(free)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).deserialize) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolEncoder),
            "::",
            stringify!(deserialize)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).stop) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolEncoder),
            "::",
            stringify!(stop)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).yield_) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolEncoder),
            "::",
            stringify!(yield_)
        )
    );
}
pub const SubGhzProtocolType_SubGhzProtocolTypeUnknown: SubGhzProtocolType = 0;
pub const SubGhzProtocolType_SubGhzProtocolTypeStatic: SubGhzProtocolType = 1;
pub const SubGhzProtocolType_SubGhzProtocolTypeDynamic: SubGhzProtocolType = 2;
pub const SubGhzProtocolType_SubGhzProtocolTypeRAW: SubGhzProtocolType = 3;
pub const SubGhzProtocolType_SubGhzProtocolWeatherStation: SubGhzProtocolType = 4;
pub const SubGhzProtocolType_SubGhzProtocolCustom: SubGhzProtocolType = 5;
pub type SubGhzProtocolType = core::ffi::c_uchar;
pub const SubGhzProtocolFlag_SubGhzProtocolFlag_RAW: SubGhzProtocolFlag = 1;
pub const SubGhzProtocolFlag_SubGhzProtocolFlag_Decodable: SubGhzProtocolFlag = 2;
pub const SubGhzProtocolFlag_SubGhzProtocolFlag_315: SubGhzProtocolFlag = 4;
pub const SubGhzProtocolFlag_SubGhzProtocolFlag_433: SubGhzProtocolFlag = 8;
pub const SubGhzProtocolFlag_SubGhzProtocolFlag_868: SubGhzProtocolFlag = 16;
pub const SubGhzProtocolFlag_SubGhzProtocolFlag_AM: SubGhzProtocolFlag = 32;
pub const SubGhzProtocolFlag_SubGhzProtocolFlag_FM: SubGhzProtocolFlag = 64;
pub const SubGhzProtocolFlag_SubGhzProtocolFlag_Save: SubGhzProtocolFlag = 128;
pub const SubGhzProtocolFlag_SubGhzProtocolFlag_Load: SubGhzProtocolFlag = 256;
pub const SubGhzProtocolFlag_SubGhzProtocolFlag_Send: SubGhzProtocolFlag = 512;
pub const SubGhzProtocolFlag_SubGhzProtocolFlag_BinRAW: SubGhzProtocolFlag = 1024;
pub type SubGhzProtocolFlag = core::ffi::c_ushort;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzProtocol {
    pub name: *const core::ffi::c_char,
    pub type_: SubGhzProtocolType,
    pub flag: SubGhzProtocolFlag,
    pub encoder: *const SubGhzProtocolEncoder,
    pub decoder: *const SubGhzProtocolDecoder,
}
#[test]
fn bindgen_test_layout_SubGhzProtocol() {
    const UNINIT: ::core::mem::MaybeUninit<SubGhzProtocol> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SubGhzProtocol>(),
        16usize,
        concat!("Size of: ", stringify!(SubGhzProtocol))
    );
    assert_eq!(
        ::core::mem::align_of::<SubGhzProtocol>(),
        4usize,
        concat!("Alignment of ", stringify!(SubGhzProtocol))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocol),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocol),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).flag) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocol),
            "::",
            stringify!(flag)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).encoder) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocol),
            "::",
            stringify!(encoder)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).decoder) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocol),
            "::",
            stringify!(decoder)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzBlockGeneric {
    pub protocol_name: *const core::ffi::c_char,
    pub data: u64,
    pub serial: u32,
    pub data_count_bit: u16,
    pub btn: u8,
    pub cnt: u32,
}
#[test]
fn bindgen_test_layout_SubGhzBlockGeneric() {
    const UNINIT: ::core::mem::MaybeUninit<SubGhzBlockGeneric> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SubGhzBlockGeneric>(),
        32usize,
        concat!("Size of: ", stringify!(SubGhzBlockGeneric))
    );
    assert_eq!(
        ::core::mem::align_of::<SubGhzBlockGeneric>(),
        8usize,
        concat!("Alignment of ", stringify!(SubGhzBlockGeneric))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).protocol_name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzBlockGeneric),
            "::",
            stringify!(protocol_name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzBlockGeneric),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).serial) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzBlockGeneric),
            "::",
            stringify!(serial)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data_count_bit) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzBlockGeneric),
            "::",
            stringify!(data_count_bit)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).btn) as usize - ptr as usize },
        22usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzBlockGeneric),
            "::",
            stringify!(btn)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).cnt) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzBlockGeneric),
            "::",
            stringify!(cnt)
        )
    );
}
extern "C" {
    #[doc = "Get name preset.\n # Arguments\n\n* `preset_name` - name preset\n * `preset_str` - Output name preset"]
    pub fn subghz_block_generic_get_preset_name(
        preset_name: *const core::ffi::c_char,
        preset_str: *mut FuriString,
    );
}
extern "C" {
    #[doc = "Serialize data SubGhzBlockGeneric.\n # Arguments\n\n* `instance` - Pointer to a SubGhzBlockGeneric instance\n * `flipper_format` - Pointer to a FlipperFormat instance\n * `preset` - The modulation on which the signal was received, SubGhzRadioPreset\n # Returns\n\nStatus Error"]
    pub fn subghz_block_generic_serialize(
        instance: *mut SubGhzBlockGeneric,
        flipper_format: *mut FlipperFormat,
        preset: *mut SubGhzRadioPreset,
    ) -> SubGhzProtocolStatus;
}
extern "C" {
    #[doc = "Deserialize data SubGhzBlockGeneric.\n # Arguments\n\n* `instance` - Pointer to a SubGhzBlockGeneric instance\n * `flipper_format` - Pointer to a FlipperFormat instance\n # Returns\n\nStatus Error"]
    pub fn subghz_block_generic_deserialize(
        instance: *mut SubGhzBlockGeneric,
        flipper_format: *mut FlipperFormat,
    ) -> SubGhzProtocolStatus;
}
extern "C" {
    #[doc = "Deserialize data SubGhzBlockGeneric.\n # Arguments\n\n* `instance` - Pointer to a SubGhzBlockGeneric instance\n * `flipper_format` - Pointer to a FlipperFormat instance\n * `count_bit` - Count bit protocol\n # Returns\n\nStatus Error"]
    pub fn subghz_block_generic_deserialize_check_count_bit(
        instance: *mut SubGhzBlockGeneric,
        flipper_format: *mut FlipperFormat,
        count_bit: u16,
    ) -> SubGhzProtocolStatus;
}
extern "C" {
    #[doc = "Flip the data bitwise\n\n # Arguments\n\n* `key` - In data\n * `bit_count` - number of data bits\n\n # Returns\n\nReverse data"]
    pub fn subghz_protocol_blocks_reverse_key(key: u64, bit_count: u8) -> u64;
}
extern "C" {
    #[doc = "Get parity the data bitwise\n\n # Arguments\n\n* `key` - In data\n * `bit_count` - number of data bits\n\n # Returns\n\nparity"]
    pub fn subghz_protocol_blocks_get_parity(key: u64, bit_count: u8) -> u8;
}
extern "C" {
    #[doc = "CRC-4\n\n # Arguments\n\n* `message` - array of bytes to check\n * `size` - number of bytes in message\n * `polynomial` - CRC polynomial\n * `init` - starting crc value\n\n # Returns\n\nCRC value"]
    pub fn subghz_protocol_blocks_crc4(
        message: *const u8,
        size: usize,
        polynomial: u8,
        init: u8,
    ) -> u8;
}
extern "C" {
    #[doc = "CRC-7\n\n # Arguments\n\n* `message` - array of bytes to check\n * `size` - number of bytes in message\n * `polynomial` - CRC polynomial\n * `init` - starting crc value\n\n # Returns\n\nCRC value"]
    pub fn subghz_protocol_blocks_crc7(
        message: *const u8,
        size: usize,
        polynomial: u8,
        init: u8,
    ) -> u8;
}
extern "C" {
    #[doc = "Generic Cyclic Redundancy Check CRC-8. Example polynomial: 0x31 = x8 + x5 +\n x4 + 1 (x8 is implicit) Example polynomial: 0x80 = x8 + x7 (a normal\n bit-by-bit parity XOR)\n\n # Arguments\n\n* `message` - array of bytes to check\n * `size` - number of bytes in message\n * `polynomial` - byte is from x^7 to x^0 (x^8 is implicitly one)\n * `init` - starting crc value\n\n # Returns\n\nCRC value"]
    pub fn subghz_protocol_blocks_crc8(
        message: *const u8,
        size: usize,
        polynomial: u8,
        init: u8,
    ) -> u8;
}
extern "C" {
    #[doc = "\"Little-endian\" Cyclic Redundancy Check CRC-8 LE Input and output are\n reflected, i.e. least significant bit is shifted in first\n\n # Arguments\n\n* `message` - array of bytes to check\n * `size` - number of bytes in message\n * `polynomial` - CRC polynomial\n * `init` - starting crc value\n\n # Returns\n\nCRC value"]
    pub fn subghz_protocol_blocks_crc8le(
        message: *const u8,
        size: usize,
        polynomial: u8,
        init: u8,
    ) -> u8;
}
extern "C" {
    #[doc = "CRC-16 LSB. Input and output are reflected, i.e. least significant bit is\n shifted in first. Note that poly and init already need to be reflected\n\n # Arguments\n\n* `message` - array of bytes to check\n * `size` - number of bytes in message\n * `polynomial` - CRC polynomial\n * `init` - starting crc value\n\n # Returns\n\nCRC value"]
    pub fn subghz_protocol_blocks_crc16lsb(
        message: *const u8,
        size: usize,
        polynomial: u16,
        init: u16,
    ) -> u16;
}
extern "C" {
    #[doc = "CRC-16\n\n # Arguments\n\n* `message` - array of bytes to check\n * `size` - number of bytes in message\n * `polynomial` - CRC polynomial\n * `init` - starting crc value\n\n # Returns\n\nCRC value"]
    pub fn subghz_protocol_blocks_crc16(
        message: *const u8,
        size: usize,
        polynomial: u16,
        init: u16,
    ) -> u16;
}
extern "C" {
    #[doc = "Digest-8 by \"LFSR-based Toeplitz hash\"\n\n # Arguments\n\n* `message` - bytes of message data\n * `size` - number of bytes to digest\n * `gen` - key stream generator, needs to includes the MSB if the\n LFSR is rolling\n * `key` - initial key\n\n # Returns\n\ndigest value"]
    pub fn subghz_protocol_blocks_lfsr_digest8(
        message: *const u8,
        size: usize,
        gen: u8,
        key: u8,
    ) -> u8;
}
extern "C" {
    #[doc = "Digest-8 by \"LFSR-based Toeplitz hash\", byte reflect, bit reflect\n\n # Arguments\n\n* `message` - bytes of message data\n * `size` - number of bytes to digest\n * `gen` - key stream generator, needs to includes the MSB if the\n LFSR is rolling\n * `key` - initial key\n\n # Returns\n\ndigest value"]
    pub fn subghz_protocol_blocks_lfsr_digest8_reflect(
        message: *const u8,
        size: usize,
        gen: u8,
        key: u8,
    ) -> u8;
}
extern "C" {
    #[doc = "Digest-16 by \"LFSR-based Toeplitz hash\"\n\n # Arguments\n\n* `message` - bytes of message data\n * `size` - number of bytes to digest\n * `gen` - key stream generator, needs to includes the MSB if the\n LFSR is rolling\n * `key` - initial key\n\n # Returns\n\ndigest value"]
    pub fn subghz_protocol_blocks_lfsr_digest16(
        message: *const u8,
        size: usize,
        gen: u16,
        key: u16,
    ) -> u16;
}
extern "C" {
    #[doc = "Compute Addition of a number of bytes\n\n # Arguments\n\n* `message` - bytes of message data\n * `size` - number of bytes to sum\n\n # Returns\n\nsummation value"]
    pub fn subghz_protocol_blocks_add_bytes(message: *const u8, size: usize) -> u8;
}
extern "C" {
    #[doc = "Compute bit parity of a single byte (8 bits)\n\n # Arguments\n\n* `byte` - single byte to check\n\n # Returns\n\n1 odd parity, 0 even parity"]
    pub fn subghz_protocol_blocks_parity8(byte: u8) -> u8;
}
extern "C" {
    #[doc = "Compute bit parity of a number of bytes\n\n # Arguments\n\n* `message` - bytes of message data\n * `size` - number of bytes to sum\n\n # Returns\n\n1 odd parity, 0 even parity"]
    pub fn subghz_protocol_blocks_parity_bytes(message: *const u8, size: usize) -> u8;
}
extern "C" {
    #[doc = "Compute XOR (byte-wide parity) of a number of bytes\n\n # Arguments\n\n* `message` - bytes of message data\n * `size` - number of bytes to sum\n\n # Returns\n\nsummation value, per bit-position 1 odd parity, 0 even parity"]
    pub fn subghz_protocol_blocks_xor_bytes(message: *const u8, size: usize) -> u8;
}
extern "C" {
    pub static subghz_device_cc1101_preset_ook_270khz_async_regs: [u8; 0usize];
}
extern "C" {
    pub static subghz_device_cc1101_preset_ook_650khz_async_regs: [u8; 0usize];
}
extern "C" {
    pub static subghz_device_cc1101_preset_2fsk_dev2_38khz_async_regs: [u8; 0usize];
}
extern "C" {
    pub static subghz_device_cc1101_preset_2fsk_dev47_6khz_async_regs: [u8; 0usize];
}
extern "C" {
    pub static subghz_device_cc1101_preset_msk_99_97kb_async_regs: [u8; 0usize];
}
extern "C" {
    pub static subghz_device_cc1101_preset_gfsk_9_99kb_async_regs: [u8; 0usize];
}
extern "C" {
    #[doc = "Key generation from simple data.\n # Arguments\n\n* `context` - Pointer to a SubGhzProtocolEncoderSecPlus_v2 instance\n * `flipper_format` - Pointer to a FlipperFormat instance\n * `serial` - Serial number, 32 bit\n * `btn` - Button number, 8 bit\n * `cnt` - Container value, 28 bit\n * `manufacture_name` - Name of manufacturer's key\n * `preset` - Modulation, SubGhzRadioPreset\n # Returns\n\ntrue On success"]
    pub fn subghz_protocol_secplus_v2_create_data(
        context: *mut core::ffi::c_void,
        flipper_format: *mut FlipperFormat,
        serial: u32,
        btn: u8,
        cnt: u32,
        preset: *mut SubGhzRadioPreset,
    ) -> bool;
}
extern "C" {
    #[doc = "Key generation from simple data.\n # Arguments\n\n* `context` - Pointer to a SubGhzProtocolEncoderKeeloq instance\n * `flipper_format` - Pointer to a FlipperFormat instance\n * `serial` - Serial number, 28 bit\n * `btn` - Button number, 4 bit\n * `cnt` - Container value, 16 bit\n * `manufacture_name` - Name of manufacturer's key\n * `preset` - Modulation, SubGhzRadioPreset\n # Returns\n\ntrue On success"]
    pub fn subghz_protocol_keeloq_create_data(
        context: *mut core::ffi::c_void,
        flipper_format: *mut FlipperFormat,
        serial: u32,
        btn: u8,
        cnt: u16,
        manufacture_name: *const core::ffi::c_char,
        preset: *mut SubGhzRadioPreset,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzProtocolDecoderBinRAW {
    _unused: [u8; 0],
}
extern "C" {
    pub fn subghz_protocol_decoder_bin_raw_data_input_rssi(
        instance: *mut SubGhzProtocolDecoderBinRAW,
        rssi: f32,
    );
}
extern "C" {
    #[doc = "Validation of fixed parts SubGhzProtocolDecoderSecPlus_v1.\n # Arguments\n\n* `fixed` - fixed parts\n # Returns\n\ntrue On success"]
    pub fn subghz_protocol_secplus_v1_check_fixed(fixed: u32) -> bool;
}
pub type SubGhzProtocolDecoderBaseRxCallback = ::core::option::Option<
    unsafe extern "C" fn(instance: *mut SubGhzProtocolDecoderBase, context: *mut core::ffi::c_void),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzProtocolDecoderBase {
    pub protocol: *const SubGhzProtocol,
    pub callback: SubGhzProtocolDecoderBaseRxCallback,
    pub context: *mut core::ffi::c_void,
}
#[test]
fn bindgen_test_layout_SubGhzProtocolDecoderBase() {
    const UNINIT: ::core::mem::MaybeUninit<SubGhzProtocolDecoderBase> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SubGhzProtocolDecoderBase>(),
        12usize,
        concat!("Size of: ", stringify!(SubGhzProtocolDecoderBase))
    );
    assert_eq!(
        ::core::mem::align_of::<SubGhzProtocolDecoderBase>(),
        4usize,
        concat!("Alignment of ", stringify!(SubGhzProtocolDecoderBase))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).protocol) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolDecoderBase),
            "::",
            stringify!(protocol)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolDecoderBase),
            "::",
            stringify!(callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolDecoderBase),
            "::",
            stringify!(context)
        )
    );
}
extern "C" {
    #[doc = "Getting a textual representation of the received data.\n # Arguments\n\n* `decoder_base` - Pointer to a SubGhzProtocolDecoderBase instance\n * `output` - Resulting text"]
    pub fn subghz_protocol_decoder_base_get_string(
        decoder_base: *mut SubGhzProtocolDecoderBase,
        output: *mut FuriString,
    ) -> bool;
}
extern "C" {
    #[doc = "Serialize data SubGhzProtocolDecoderBase.\n # Arguments\n\n* `decoder_base` - Pointer to a SubGhzProtocolDecoderBase instance\n * `flipper_format` - Pointer to a FlipperFormat instance\n * `preset` - The modulation on which the signal was received, SubGhzRadioPreset\n # Returns\n\nStatus Error"]
    pub fn subghz_protocol_decoder_base_serialize(
        decoder_base: *mut SubGhzProtocolDecoderBase,
        flipper_format: *mut FlipperFormat,
        preset: *mut SubGhzRadioPreset,
    ) -> SubGhzProtocolStatus;
}
extern "C" {
    #[doc = "Deserialize data SubGhzProtocolDecoderBase.\n # Arguments\n\n* `decoder_base` - Pointer to a SubGhzProtocolDecoderBase instance\n * `flipper_format` - Pointer to a FlipperFormat instance\n # Returns\n\nStatus Error"]
    pub fn subghz_protocol_decoder_base_deserialize(
        decoder_base: *mut SubGhzProtocolDecoderBase,
        flipper_format: *mut FlipperFormat,
    ) -> SubGhzProtocolStatus;
}
extern "C" {
    #[doc = "Getting the hash sum of the last randomly received parcel.\n # Arguments\n\n* `decoder_base` - Pointer to a SubGhzProtocolDecoderBase instance\n # Returns\n\nhash Hash sum"]
    pub fn subghz_protocol_decoder_base_get_hash_data(
        decoder_base: *mut SubGhzProtocolDecoderBase,
    ) -> u8;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzProtocolEncoderBase {
    pub protocol: *const SubGhzProtocol,
}
#[test]
fn bindgen_test_layout_SubGhzProtocolEncoderBase() {
    const UNINIT: ::core::mem::MaybeUninit<SubGhzProtocolEncoderBase> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SubGhzProtocolEncoderBase>(),
        4usize,
        concat!("Size of: ", stringify!(SubGhzProtocolEncoderBase))
    );
    assert_eq!(
        ::core::mem::align_of::<SubGhzProtocolEncoderBase>(),
        4usize,
        concat!("Alignment of ", stringify!(SubGhzProtocolEncoderBase))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).protocol) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SubGhzProtocolEncoderBase),
            "::",
            stringify!(protocol)
        )
    );
}
pub type SubGhzProtocolEncoderRAWCallbackEnd =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzProtocolDecoderRAW {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzProtocolEncoderRAW {
    _unused: [u8; 0],
}
extern "C" {
    pub static subghz_protocol_raw_decoder: SubGhzProtocolDecoder;
}
extern "C" {
    pub static subghz_protocol_raw_encoder: SubGhzProtocolEncoder;
}
extern "C" {
    pub static subghz_protocol_raw: SubGhzProtocol;
}
extern "C" {
    #[doc = "Open file for writing\n # Arguments\n\n* `instance` - Pointer to a SubGhzProtocolDecoderRAW instance\n * `dev_name` - File name\n * `preset` - The modulation on which the signal was received, SubGhzRadioPreset\n # Returns\n\ntrue On success"]
    pub fn subghz_protocol_raw_save_to_file_init(
        instance: *mut SubGhzProtocolDecoderRAW,
        dev_name: *const core::ffi::c_char,
        preset: *mut SubGhzRadioPreset,
    ) -> bool;
}
extern "C" {
    #[doc = "Stop writing file to flash\n # Arguments\n\n* `instance` - Pointer to a SubGhzProtocolDecoderRAW instance"]
    pub fn subghz_protocol_raw_save_to_file_stop(instance: *mut SubGhzProtocolDecoderRAW);
}
extern "C" {
    #[doc = "Get the number of samples received SubGhzProtocolDecoderRAW.\n # Arguments\n\n* `instance` - Pointer to a SubGhzProtocolDecoderRAW instance\n # Returns\n\ncount of samples"]
    pub fn subghz_protocol_raw_get_sample_write(instance: *mut SubGhzProtocolDecoderRAW) -> usize;
}
extern "C" {
    #[doc = "Allocate SubGhzProtocolDecoderRAW.\n # Arguments\n\n* `environment` - Pointer to a SubGhzEnvironment instance\n # Returns\n\nSubGhzProtocolDecoderRAW* pointer to a SubGhzProtocolDecoderRAW instance"]
    pub fn subghz_protocol_decoder_raw_alloc(
        environment: *mut SubGhzEnvironment,
    ) -> *mut core::ffi::c_void;
}
extern "C" {
    #[doc = "Free SubGhzProtocolDecoderRAW.\n # Arguments\n\n* `context` - Pointer to a SubGhzProtocolDecoderRAW instance"]
    pub fn subghz_protocol_decoder_raw_free(context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Reset decoder SubGhzProtocolDecoderRAW.\n # Arguments\n\n* `context` - Pointer to a SubGhzProtocolDecoderRAW instance"]
    pub fn subghz_protocol_decoder_raw_reset(context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Parse a raw sequence of levels and durations received from the air.\n # Arguments\n\n* `context` - Pointer to a SubGhzProtocolDecoderRAW instance\n * `level` - Signal level true-high false-low\n * `duration` - Duration of this level in, us"]
    pub fn subghz_protocol_decoder_raw_feed(
        context: *mut core::ffi::c_void,
        level: bool,
        duration: u32,
    );
}
extern "C" {
    #[doc = "Deserialize data SubGhzProtocolDecoderRAW.\n # Arguments\n\n* `context` - Pointer to a SubGhzProtocolDecoderRAW instance\n * `flipper_format` - Pointer to a FlipperFormat instance\n # Returns\n\nstatus"]
    pub fn subghz_protocol_decoder_raw_deserialize(
        context: *mut core::ffi::c_void,
        flipper_format: *mut FlipperFormat,
    ) -> SubGhzProtocolStatus;
}
extern "C" {
    #[doc = "Getting a textual representation of the received data.\n # Arguments\n\n* `context` - Pointer to a SubGhzProtocolDecoderRAW instance\n * `output` - Resulting text"]
    pub fn subghz_protocol_decoder_raw_get_string(
        context: *mut core::ffi::c_void,
        output: *mut FuriString,
    );
}
extern "C" {
    #[doc = "Allocate SubGhzProtocolEncoderRAW.\n # Arguments\n\n* `environment` - Pointer to a SubGhzEnvironment instance\n # Returns\n\nSubGhzProtocolEncoderRAW* pointer to a SubGhzProtocolEncoderRAW instance"]
    pub fn subghz_protocol_encoder_raw_alloc(
        environment: *mut SubGhzEnvironment,
    ) -> *mut core::ffi::c_void;
}
extern "C" {
    #[doc = "Free SubGhzProtocolEncoderRAW.\n # Arguments\n\n* `context` - Pointer to a SubGhzProtocolEncoderRAW instance"]
    pub fn subghz_protocol_encoder_raw_free(context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Forced transmission stop.\n # Arguments\n\n* `context` - Pointer to a SubGhzProtocolEncoderRAW instance"]
    pub fn subghz_protocol_encoder_raw_stop(context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "pause writing to flash.\n # Arguments\n\n* `context` - Pointer to a SubGhzProtocolEncoderRAW instance\n * `pause` - pause writing"]
    pub fn subghz_protocol_raw_save_to_file_pause(
        instance: *mut SubGhzProtocolDecoderRAW,
        pause: bool,
    );
}
extern "C" {
    #[doc = "Set callback on completion of file transfer.\n # Arguments\n\n* `instance` - Pointer to a SubGhzProtocolEncoderRAW instance\n * `callback_end` - Callback, SubGhzProtocolEncoderRAWCallbackEnd\n * `context_end` - Context"]
    pub fn subghz_protocol_raw_file_encoder_worker_set_callback_end(
        instance: *mut SubGhzProtocolEncoderRAW,
        callback_end: SubGhzProtocolEncoderRAWCallbackEnd,
        context_end: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "File generation for RAW work.\n # Arguments\n\n* `flipper_format` - Pointer to a FlipperFormat instance\n * `file_path` - File path\n * `radio_dev_name` - Radio device name"]
    pub fn subghz_protocol_raw_gen_fff_data(
        flipper_format: *mut FlipperFormat,
        file_path: *const core::ffi::c_char,
        radio_dev_name: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Deserialize and generating an upload to send.\n # Arguments\n\n* `context` - Pointer to a SubGhzProtocolEncoderRAW instance\n * `flipper_format` - Pointer to a FlipperFormat instance\n # Returns\n\nstatus"]
    pub fn subghz_protocol_encoder_raw_deserialize(
        context: *mut core::ffi::c_void,
        flipper_format: *mut FlipperFormat,
    ) -> SubGhzProtocolStatus;
}
extern "C" {
    #[doc = "Getting the level and duration of the upload to be loaded into DMA.\n # Arguments\n\n* `context` - Pointer to a SubGhzProtocolEncoderRAW instance\n # Returns\n\nLevelDuration"]
    pub fn subghz_protocol_encoder_raw_yield(context: *mut core::ffi::c_void) -> LevelDuration;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzReceiver {
    _unused: [u8; 0],
}
pub type SubGhzReceiverCallback = ::core::option::Option<
    unsafe extern "C" fn(
        decoder: *mut SubGhzReceiver,
        decoder_base: *mut SubGhzProtocolDecoderBase,
        context: *mut core::ffi::c_void,
    ),
>;
extern "C" {
    #[doc = "Allocate and init SubGhzReceiver.\n # Arguments\n\n* `environment` - Pointer to a SubGhzEnvironment instance\n # Returns\n\nSubGhzReceiver* pointer to a SubGhzReceiver instance"]
    pub fn subghz_receiver_alloc_init(environment: *mut SubGhzEnvironment) -> *mut SubGhzReceiver;
}
extern "C" {
    #[doc = "Free SubGhzReceiver.\n # Arguments\n\n* `instance` - Pointer to a SubGhzReceiver instance"]
    pub fn subghz_receiver_free(instance: *mut SubGhzReceiver);
}
extern "C" {
    #[doc = "Parse a raw sequence of levels and durations received from the air.\n # Arguments\n\n* `instance` - Pointer to a SubGhzReceiver instance\n * `level` - Signal level true-high false-low\n * `duration` - Duration of this level in, us"]
    pub fn subghz_receiver_decode(instance: *mut SubGhzReceiver, level: bool, duration: u32);
}
extern "C" {
    #[doc = "Reset decoder SubGhzReceiver.\n # Arguments\n\n* `instance` - Pointer to a SubGhzReceiver instance"]
    pub fn subghz_receiver_reset(instance: *mut SubGhzReceiver);
}
extern "C" {
    #[doc = "Set a callback upon completion of successful decoding of one of the protocols.\n # Arguments\n\n* `instance` - Pointer to a SubGhzReceiver instance\n * `callback` - Callback, SubGhzReceiverCallback\n * `context` - Context"]
    pub fn subghz_receiver_set_rx_callback(
        instance: *mut SubGhzReceiver,
        callback: SubGhzReceiverCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Set the filter of receivers that will work at the moment.\n # Arguments\n\n* `instance` - Pointer to a SubGhzReceiver instance\n * `filter` - Filter, SubGhzProtocolFlag"]
    pub fn subghz_receiver_set_filter(instance: *mut SubGhzReceiver, filter: SubGhzProtocolFlag);
}
extern "C" {
    #[doc = "Search for a cattery by his name.\n # Arguments\n\n* `instance` - Pointer to a SubGhzReceiver instance\n * `decoder_name` - Receiver name\n # Returns\n\nSubGhzProtocolDecoderBase* pointer to a SubGhzProtocolDecoderBase instance"]
    pub fn subghz_receiver_search_decoder_base_by_name(
        instance: *mut SubGhzReceiver,
        decoder_name: *const core::ffi::c_char,
    ) -> *mut SubGhzProtocolDecoderBase;
}
pub type SubGhzFileEncoderWorkerCallbackEnd =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzFileEncoderWorker {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "End callback SubGhzWorker.\n # Arguments\n\n* `instance` - SubGhzFileEncoderWorker instance\n * `callback` - SubGhzFileEncoderWorkerCallbackEnd callback"]
    pub fn subghz_file_encoder_worker_callback_end(
        instance: *mut SubGhzFileEncoderWorker,
        callback_end: SubGhzFileEncoderWorkerCallbackEnd,
        context_end: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Allocate SubGhzFileEncoderWorker.\n # Returns\n\nSubGhzFileEncoderWorker* pointer to a SubGhzFileEncoderWorker instance"]
    pub fn subghz_file_encoder_worker_alloc() -> *mut SubGhzFileEncoderWorker;
}
extern "C" {
    #[doc = "Free SubGhzFileEncoderWorker.\n # Arguments\n\n* `instance` - Pointer to a SubGhzFileEncoderWorker instance"]
    pub fn subghz_file_encoder_worker_free(instance: *mut SubGhzFileEncoderWorker);
}
extern "C" {
    #[doc = "Getting the level and duration of the upload to be loaded into DMA.\n # Arguments\n\n* `context` - Pointer to a SubGhzFileEncoderWorker instance\n # Returns\n\nLevelDuration"]
    pub fn subghz_file_encoder_worker_get_level_duration(
        context: *mut core::ffi::c_void,
    ) -> LevelDuration;
}
extern "C" {
    #[doc = "Start SubGhzFileEncoderWorker.\n # Arguments\n\n* `instance` - Pointer to a SubGhzFileEncoderWorker instance\n * `file_path` - File path\n * `radio_device_name` - Radio device name\n # Returns\n\nbool - true if ok"]
    pub fn subghz_file_encoder_worker_start(
        instance: *mut SubGhzFileEncoderWorker,
        file_path: *const core::ffi::c_char,
        radio_device_name: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Stop SubGhzFileEncoderWorker\n # Arguments\n\n* `instance` - Pointer to a SubGhzFileEncoderWorker instance"]
    pub fn subghz_file_encoder_worker_stop(instance: *mut SubGhzFileEncoderWorker);
}
extern "C" {
    #[doc = "Check if worker is running\n # Arguments\n\n* `instance` - Pointer to a SubGhzFileEncoderWorker instance\n # Returns\n\nbool - true if running"]
    pub fn subghz_file_encoder_worker_is_running(instance: *mut SubGhzFileEncoderWorker) -> bool;
}
extern "C" {
    pub static subghz_protocol_registry: SubGhzProtocolRegistry;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzSetting {
    _unused: [u8; 0],
}
extern "C" {
    pub fn subghz_setting_alloc() -> *mut SubGhzSetting;
}
extern "C" {
    pub fn subghz_setting_free(instance: *mut SubGhzSetting);
}
extern "C" {
    pub fn subghz_setting_load(instance: *mut SubGhzSetting, file_path: *const core::ffi::c_char);
}
extern "C" {
    pub fn subghz_setting_get_frequency_count(instance: *mut SubGhzSetting) -> usize;
}
extern "C" {
    pub fn subghz_setting_get_hopper_frequency_count(instance: *mut SubGhzSetting) -> usize;
}
extern "C" {
    pub fn subghz_setting_get_preset_count(instance: *mut SubGhzSetting) -> usize;
}
extern "C" {
    pub fn subghz_setting_get_preset_name(
        instance: *mut SubGhzSetting,
        idx: usize,
    ) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn subghz_setting_get_inx_preset_by_name(
        instance: *mut SubGhzSetting,
        preset_name: *const core::ffi::c_char,
    ) -> core::ffi::c_int;
}
extern "C" {
    pub fn subghz_setting_get_preset_data(instance: *mut SubGhzSetting, idx: usize) -> *mut u8;
}
extern "C" {
    pub fn subghz_setting_get_preset_data_size(instance: *mut SubGhzSetting, idx: usize) -> usize;
}
extern "C" {
    pub fn subghz_setting_get_preset_data_by_name(
        instance: *mut SubGhzSetting,
        preset_name: *const core::ffi::c_char,
    ) -> *mut u8;
}
extern "C" {
    pub fn subghz_setting_load_custom_preset(
        instance: *mut SubGhzSetting,
        preset_name: *const core::ffi::c_char,
        fff_data_file: *mut FlipperFormat,
    ) -> bool;
}
extern "C" {
    pub fn subghz_setting_delete_custom_preset(
        instance: *mut SubGhzSetting,
        preset_name: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    pub fn subghz_setting_get_frequency(instance: *mut SubGhzSetting, idx: usize) -> u32;
}
extern "C" {
    pub fn subghz_setting_get_hopper_frequency(instance: *mut SubGhzSetting, idx: usize) -> u32;
}
extern "C" {
    pub fn subghz_setting_get_frequency_default_index(instance: *mut SubGhzSetting) -> u32;
}
extern "C" {
    pub fn subghz_setting_get_default_frequency(instance: *mut SubGhzSetting) -> u32;
}
extern "C" {
    pub fn subghz_devices_init();
}
extern "C" {
    pub fn subghz_devices_deinit();
}
extern "C" {
    pub fn subghz_devices_get_by_name(device_name: *const core::ffi::c_char)
        -> *const SubGhzDevice;
}
extern "C" {
    pub fn subghz_devices_get_name(device: *const SubGhzDevice) -> *const core::ffi::c_char;
}
extern "C" {
    pub fn subghz_devices_begin(device: *const SubGhzDevice) -> bool;
}
extern "C" {
    pub fn subghz_devices_end(device: *const SubGhzDevice);
}
extern "C" {
    pub fn subghz_devices_is_connect(device: *const SubGhzDevice) -> bool;
}
extern "C" {
    pub fn subghz_devices_reset(device: *const SubGhzDevice);
}
extern "C" {
    pub fn subghz_devices_sleep(device: *const SubGhzDevice);
}
extern "C" {
    pub fn subghz_devices_idle(device: *const SubGhzDevice);
}
extern "C" {
    pub fn subghz_devices_load_preset(
        device: *const SubGhzDevice,
        preset: FuriHalSubGhzPreset,
        preset_data: *mut u8,
    );
}
extern "C" {
    pub fn subghz_devices_set_frequency(device: *const SubGhzDevice, frequency: u32) -> u32;
}
extern "C" {
    pub fn subghz_devices_is_frequency_valid(device: *const SubGhzDevice, frequency: u32) -> bool;
}
extern "C" {
    pub fn subghz_devices_set_async_mirror_pin(device: *const SubGhzDevice, gpio: *const GpioPin);
}
extern "C" {
    pub fn subghz_devices_get_data_gpio(device: *const SubGhzDevice) -> *const GpioPin;
}
extern "C" {
    pub fn subghz_devices_set_tx(device: *const SubGhzDevice) -> bool;
}
extern "C" {
    pub fn subghz_devices_flush_tx(device: *const SubGhzDevice);
}
extern "C" {
    pub fn subghz_devices_start_async_tx(
        device: *const SubGhzDevice,
        callback: *mut core::ffi::c_void,
        context: *mut core::ffi::c_void,
    ) -> bool;
}
extern "C" {
    pub fn subghz_devices_is_async_complete_tx(device: *const SubGhzDevice) -> bool;
}
extern "C" {
    pub fn subghz_devices_stop_async_tx(device: *const SubGhzDevice);
}
extern "C" {
    pub fn subghz_devices_set_rx(device: *const SubGhzDevice);
}
extern "C" {
    pub fn subghz_devices_flush_rx(device: *const SubGhzDevice);
}
extern "C" {
    pub fn subghz_devices_start_async_rx(
        device: *const SubGhzDevice,
        callback: *mut core::ffi::c_void,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn subghz_devices_stop_async_rx(device: *const SubGhzDevice);
}
extern "C" {
    pub fn subghz_devices_get_rssi(device: *const SubGhzDevice) -> f32;
}
extern "C" {
    pub fn subghz_devices_get_lqi(device: *const SubGhzDevice) -> u8;
}
extern "C" {
    pub fn subghz_devices_rx_pipe_not_empty(device: *const SubGhzDevice) -> bool;
}
extern "C" {
    pub fn subghz_devices_is_rx_data_crc_valid(device: *const SubGhzDevice) -> bool;
}
extern "C" {
    pub fn subghz_devices_read_packet(device: *const SubGhzDevice, data: *mut u8, size: *mut u8);
}
extern "C" {
    pub fn subghz_devices_write_packet(device: *const SubGhzDevice, data: *const u8, size: u8);
}
pub type SubGhzTxRxWorkerCallbackHaveRead =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzTxRxWorker {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "SubGhzTxRxWorker, add data to transfer\n # Arguments\n\n* `instance` - Pointer to a SubGhzTxRxWorker instance\n * `data` - *data\n * `size` - data size\n # Returns\n\nbool true if ok"]
    pub fn subghz_tx_rx_worker_write(
        instance: *mut SubGhzTxRxWorker,
        data: *mut u8,
        size: usize,
    ) -> bool;
}
extern "C" {
    #[doc = "SubGhzTxRxWorker, get available data\n # Arguments\n\n* `instance` - Pointer to a SubGhzTxRxWorker instance\n # Returns\n\nsize_t data size"]
    pub fn subghz_tx_rx_worker_available(instance: *mut SubGhzTxRxWorker) -> usize;
}
extern "C" {
    #[doc = "SubGhzTxRxWorker, read data\n # Arguments\n\n* `instance` - Pointer to a SubGhzTxRxWorker instance\n * `data` - *data\n * `size` - max data size, which can be read\n # Returns\n\nsize_t data size, how much is actually read"]
    pub fn subghz_tx_rx_worker_read(
        instance: *mut SubGhzTxRxWorker,
        data: *mut u8,
        size: usize,
    ) -> usize;
}
extern "C" {
    #[doc = "Сallback SubGhzTxRxWorker when there is data to read in an empty buffer\n # Arguments\n\n* `instance` - Pointer to a SubGhzTxRxWorker instance\n * `callback` - SubGhzTxRxWorkerCallbackHaveRead callback\n * `context` -"]
    pub fn subghz_tx_rx_worker_set_callback_have_read(
        instance: *mut SubGhzTxRxWorker,
        callback: SubGhzTxRxWorkerCallbackHaveRead,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Allocate SubGhzTxRxWorker\n # Returns\n\nSubGhzTxRxWorker* Pointer to a SubGhzTxRxWorker instance"]
    pub fn subghz_tx_rx_worker_alloc() -> *mut SubGhzTxRxWorker;
}
extern "C" {
    #[doc = "Free SubGhzTxRxWorker\n # Arguments\n\n* `instance` - Pointer to a SubGhzTxRxWorker instance"]
    pub fn subghz_tx_rx_worker_free(instance: *mut SubGhzTxRxWorker);
}
extern "C" {
    #[doc = "Start SubGhzTxRxWorker\n # Arguments\n\n* `instance` - Pointer to a SubGhzTxRxWorker instance\n * `device` - Pointer to a SubGhzDevice instance\n # Returns\n\nbool - true if ok"]
    pub fn subghz_tx_rx_worker_start(
        instance: *mut SubGhzTxRxWorker,
        device: *const SubGhzDevice,
        frequency: u32,
    ) -> bool;
}
extern "C" {
    #[doc = "Stop SubGhzTxRxWorker\n # Arguments\n\n* `instance` - Pointer to a SubGhzTxRxWorker instance"]
    pub fn subghz_tx_rx_worker_stop(instance: *mut SubGhzTxRxWorker);
}
extern "C" {
    #[doc = "Check if worker is running\n # Arguments\n\n* `instance` - Pointer to a SubGhzTxRxWorker instance\n # Returns\n\nbool - true if running"]
    pub fn subghz_tx_rx_worker_is_running(instance: *mut SubGhzTxRxWorker) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzWorker {
    _unused: [u8; 0],
}
pub type SubGhzWorkerOverrunCallback =
    ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>;
pub type SubGhzWorkerPairCallback = ::core::option::Option<
    unsafe extern "C" fn(context: *mut core::ffi::c_void, level: bool, duration: u32),
>;
extern "C" {
    pub fn subghz_worker_rx_callback(level: bool, duration: u32, context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Allocate SubGhzWorker.\n # Returns\n\nSubGhzWorker* Pointer to a SubGhzWorker instance"]
    pub fn subghz_worker_alloc() -> *mut SubGhzWorker;
}
extern "C" {
    #[doc = "Free SubGhzWorker.\n # Arguments\n\n* `instance` - Pointer to a SubGhzWorker instance"]
    pub fn subghz_worker_free(instance: *mut SubGhzWorker);
}
extern "C" {
    #[doc = "Overrun callback SubGhzWorker.\n # Arguments\n\n* `instance` - Pointer to a SubGhzWorker instance\n * `callback` - SubGhzWorkerOverrunCallback callback"]
    pub fn subghz_worker_set_overrun_callback(
        instance: *mut SubGhzWorker,
        callback: SubGhzWorkerOverrunCallback,
    );
}
extern "C" {
    #[doc = "Pair callback SubGhzWorker.\n # Arguments\n\n* `instance` - Pointer to a SubGhzWorker instance\n * `callback` - SubGhzWorkerOverrunCallback callback"]
    pub fn subghz_worker_set_pair_callback(
        instance: *mut SubGhzWorker,
        callback: SubGhzWorkerPairCallback,
    );
}
extern "C" {
    #[doc = "Context callback SubGhzWorker.\n # Arguments\n\n* `instance` - Pointer to a SubGhzWorker instance\n * `context` -"]
    pub fn subghz_worker_set_context(instance: *mut SubGhzWorker, context: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Start SubGhzWorker.\n # Arguments\n\n* `instance` - Pointer to a SubGhzWorker instance"]
    pub fn subghz_worker_start(instance: *mut SubGhzWorker);
}
extern "C" {
    #[doc = "Stop SubGhzWorker\n # Arguments\n\n* `instance` - Pointer to a SubGhzWorker instance"]
    pub fn subghz_worker_stop(instance: *mut SubGhzWorker);
}
extern "C" {
    #[doc = "Check if worker is running.\n # Arguments\n\n* `instance` - Pointer to a SubGhzWorker instance\n # Returns\n\nbool - true if running"]
    pub fn subghz_worker_is_running(instance: *mut SubGhzWorker) -> bool;
}
extern "C" {
    #[doc = "Short duration filter setting.\n glues short durations into 1. The default setting is 30 us, if set to 0 the filter will be disabled\n # Arguments\n\n* `instance` - Pointer to a SubGhzWorker instance\n * `timeout` - time in us"]
    pub fn subghz_worker_set_filter(instance: *mut SubGhzWorker, timeout: u16);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SubGhzTransmitter {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate and init SubGhzTransmitter.\n # Arguments\n\n* `environment` - Pointer to a SubGhzEnvironment instance\n # Returns\n\nSubGhzTransmitter* pointer to a SubGhzTransmitter instance"]
    pub fn subghz_transmitter_alloc_init(
        environment: *mut SubGhzEnvironment,
        protocol_name: *const core::ffi::c_char,
    ) -> *mut SubGhzTransmitter;
}
extern "C" {
    #[doc = "Free SubGhzTransmitter.\n # Arguments\n\n* `instance` - Pointer to a SubGhzTransmitter instance"]
    pub fn subghz_transmitter_free(instance: *mut SubGhzTransmitter);
}
extern "C" {
    #[doc = "Get protocol instance.\n # Arguments\n\n* `instance` - Pointer to a SubGhzTransmitter instance"]
    pub fn subghz_transmitter_get_protocol_instance(
        instance: *mut SubGhzTransmitter,
    ) -> *mut SubGhzProtocolEncoderBase;
}
extern "C" {
    #[doc = "Forced transmission stop.\n # Arguments\n\n* `instance` - Pointer to a SubGhzTransmitter instance"]
    pub fn subghz_transmitter_stop(instance: *mut SubGhzTransmitter) -> bool;
}
extern "C" {
    #[doc = "Deserialize and generating an upload to send.\n # Arguments\n\n* `instance` - Pointer to a SubGhzTransmitter instance\n * `flipper_format` - Pointer to a FlipperFormat instance\n # Returns\n\nstatus"]
    pub fn subghz_transmitter_deserialize(
        instance: *mut SubGhzTransmitter,
        flipper_format: *mut FlipperFormat,
    ) -> SubGhzProtocolStatus;
}
extern "C" {
    #[doc = "Getting the level and duration of the upload to be loaded into DMA.\n # Arguments\n\n* `context` - Pointer to a SubGhzTransmitter instance\n # Returns\n\nLevelDuration"]
    pub fn subghz_transmitter_yield(context: *mut core::ffi::c_void) -> LevelDuration;
}
extern "C" {
    #[doc = "Extract int value and trim arguments string\n\n # Arguments\n\n* `args` - - arguments string\n * `word` - first argument, output\n # Returns\n\ntrue - success\n false - arguments string does not contain int"]
    pub fn args_read_int_and_trim(args: *mut FuriString, value: *mut core::ffi::c_int) -> bool;
}
extern "C" {
    #[doc = "Extract first argument from arguments string and trim arguments string\n\n # Arguments\n\n* `args` - arguments string\n * `word` - first argument, output\n # Returns\n\ntrue - success\n false - arguments string does not contain anything"]
    pub fn args_read_string_and_trim(args: *mut FuriString, word: *mut FuriString) -> bool;
}
extern "C" {
    #[doc = "Extract the first quoted argument from the argument string and trim the argument string. If the argument is not quoted, calls args_read_string_and_trim.\n\n # Arguments\n\n* `args` - arguments string\n * `word` - first argument, output, without quotes\n # Returns\n\ntrue - success\n false - arguments string does not contain anything"]
    pub fn args_read_probably_quoted_string_and_trim(
        args: *mut FuriString,
        word: *mut FuriString,
    ) -> bool;
}
extern "C" {
    #[doc = "Convert hex ASCII values to byte array\n\n # Arguments\n\n* `args` - arguments string\n * `bytes` - byte array pointer, output\n * `bytes_count` - needed bytes count\n # Returns\n\ntrue - success\n false - arguments string does not contain enough values, or contain non-hex ASCII values"]
    pub fn args_read_hex_bytes(args: *mut FuriString, bytes: *mut u8, bytes_count: usize) -> bool;
}
extern "C" {
    #[doc = "Get length of first word from arguments string\n\n # Arguments\n\n* `args` - arguments string\n # Returns\n\nsize_t length of first word"]
    pub fn args_get_first_word_length(args: *mut FuriString) -> usize;
}
extern "C" {
    #[doc = "Get length of arguments string\n\n # Arguments\n\n* `args` - arguments string\n # Returns\n\nsize_t length of arguments string"]
    pub fn args_length(args: *mut FuriString) -> usize;
}
extern "C" {
    #[doc = "Convert ASCII hex values to byte\n\n # Arguments\n\n* `hi_nibble` - ASCII hi nibble character\n * `low_nibble` - ASCII low nibble character\n * `byte` - byte pointer, output\n # Returns\n\nbool conversion status"]
    pub fn args_char_to_hex(
        hi_nibble: core::ffi::c_char,
        low_nibble: core::ffi::c_char,
        byte: *mut u8,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CompressIcon {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Initialize icon compressor\n\n # Arguments\n\n* `decode_buf_size` (direction in) - The icon buffer size for decoding. Ensure that\n it's big enough for any icons that you are\n planning to decode with it.\n\n # Returns\n\nCompress Icon instance"]
    pub fn compress_icon_alloc(decode_buf_size: usize) -> *mut CompressIcon;
}
extern "C" {
    #[doc = "Free icon compressor\n\n # Arguments\n\n* `instance` - The Compress Icon instance"]
    pub fn compress_icon_free(instance: *mut CompressIcon);
}
extern "C" {
    #[doc = "Decompress icon\n\n output pointer set by this function is valid till next\n `compress_icon_decode` or `compress_icon_free` call\n\n # Arguments\n\n* `instance` - The Compress Icon instance\n * `icon_data` - pointer to icon data.\n * `output` (direction in) - pointer to decoded buffer pointer. Data in buffer is\n valid till next call. If icon data was not compressed,\n pointer within icon_data is returned"]
    pub fn compress_icon_decode(
        instance: *mut CompressIcon,
        icon_data: *const u8,
        output: *mut *mut u8,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Compress {
    _unused: [u8; 0],
}
pub const CompressType_CompressTypeHeatshrink: CompressType = 0;
#[doc = "Supported compression types"]
pub type CompressType = core::ffi::c_uchar;
#[doc = "Configuration for heatshrink compression"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CompressConfigHeatshrink {
    pub window_sz2: u16,
    pub lookahead_sz2: u16,
    pub input_buffer_sz: u16,
}
#[test]
fn bindgen_test_layout_CompressConfigHeatshrink() {
    const UNINIT: ::core::mem::MaybeUninit<CompressConfigHeatshrink> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<CompressConfigHeatshrink>(),
        6usize,
        concat!("Size of: ", stringify!(CompressConfigHeatshrink))
    );
    assert_eq!(
        ::core::mem::align_of::<CompressConfigHeatshrink>(),
        2usize,
        concat!("Alignment of ", stringify!(CompressConfigHeatshrink))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).window_sz2) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(CompressConfigHeatshrink),
            "::",
            stringify!(window_sz2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).lookahead_sz2) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(CompressConfigHeatshrink),
            "::",
            stringify!(lookahead_sz2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).input_buffer_sz) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(CompressConfigHeatshrink),
            "::",
            stringify!(input_buffer_sz)
        )
    );
}
extern "C" {
    #[doc = "Default configuration for heatshrink compression. Used for image assets."]
    pub static compress_config_heatshrink_default: CompressConfigHeatshrink;
}
extern "C" {
    #[doc = "Allocate encoder and decoder\n\n # Arguments\n\n* `type` - Compression type\n * `config` (direction in) - Configuration for compression, specific to type\n\n # Returns\n\nCompress instance"]
    pub fn compress_alloc(type_: CompressType, config: *const core::ffi::c_void) -> *mut Compress;
}
extern "C" {
    #[doc = "Free encoder and decoder\n\n # Arguments\n\n* `compress` - Compress instance"]
    pub fn compress_free(compress: *mut Compress);
}
extern "C" {
    #[doc = "Encode data\n\n # Arguments\n\n* `compress` - Compress instance\n * `data_in` - pointer to input data\n * `data_in_size` - size of input data\n * `data_out` - maximum size of output data\n * `data_out_size` (direction in) - The data out size\n * `data_res_size` - pointer to result output data size\n\n > **Note:** Prepends compressed stream with a header. If data is not compressible,\n it will be stored as is after the header.\n # Returns\n\ntrue on success"]
    pub fn compress_encode(
        compress: *mut Compress,
        data_in: *mut u8,
        data_in_size: usize,
        data_out: *mut u8,
        data_out_size: usize,
        data_res_size: *mut usize,
    ) -> bool;
}
extern "C" {
    #[doc = "Decode data\n\n # Arguments\n\n* `compress` - Compress instance\n * `data_in` - pointer to input data\n * `data_in_size` - size of input data\n * `data_out` - maximum size of output data\n * `data_out_size` (direction in) - The data out size\n * `data_res_size` - pointer to result output data size\n\n > **Note:** Expects compressed stream with a header, as produced by `compress_encode`.\n # Returns\n\ntrue on success"]
    pub fn compress_decode(
        compress: *mut Compress,
        data_in: *mut u8,
        data_in_size: usize,
        data_out: *mut u8,
        data_out_size: usize,
        data_res_size: *mut usize,
    ) -> bool;
}
#[doc = "I/O callback for streamed compression/decompression\n\n # Arguments\n\n* `context` - user context\n * `buffer` - buffer to read/write\n * `size` - size of buffer\n\n # Returns\n\nnumber of bytes read/written, 0 on end of stream, negative on error"]
pub type CompressIoCallback = ::core::option::Option<
    unsafe extern "C" fn(context: *mut core::ffi::c_void, buffer: *mut u8, size: usize) -> i32,
>;
extern "C" {
    #[doc = "Decompress streamed data\n\n # Arguments\n\n* `compress` - Compress instance\n * `read_cb` - read callback\n * `read_context` - read callback context\n * `write_cb` - write callback\n * `write_context` - write callback context\n\n > **Note:** Does not expect a header, just compressed data stream.\n # Returns\n\ntrue on success"]
    pub fn compress_decode_streamed(
        compress: *mut Compress,
        read_cb: CompressIoCallback,
        read_context: *mut core::ffi::c_void,
        write_cb: CompressIoCallback,
        write_context: *mut core::ffi::c_void,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CompressStreamDecoder {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Allocate stream decoder\n\n # Arguments\n\n* `type` - Compression type\n * `config` (direction in) - Configuration for compression, specific to type\n * `read_cb` - The read callback for input (compressed) data\n * `read_context` - The read context\n\n # Returns\n\nCompressStreamDecoder instance"]
    pub fn compress_stream_decoder_alloc(
        type_: CompressType,
        config: *const core::ffi::c_void,
        read_cb: CompressIoCallback,
        read_context: *mut core::ffi::c_void,
    ) -> *mut CompressStreamDecoder;
}
extern "C" {
    #[doc = "Free stream decoder\n\n # Arguments\n\n* `instance` - The CompressStreamDecoder instance"]
    pub fn compress_stream_decoder_free(instance: *mut CompressStreamDecoder);
}
extern "C" {
    #[doc = "Read uncompressed data chunk from stream decoder\n\n # Arguments\n\n* `instance` - The CompressStreamDecoder instance\n * `data_out` - The data out\n * `data_out_size` (direction in) - The data out size\n\n # Returns\n\ntrue on success"]
    pub fn compress_stream_decoder_read(
        instance: *mut CompressStreamDecoder,
        data_out: *mut u8,
        data_out_size: usize,
    ) -> bool;
}
extern "C" {
    #[doc = "Seek to position in uncompressed data stream\n\n # Arguments\n\n* `instance` - The CompressStreamDecoder instance\n * `position` (direction in) - The position\n\n # Returns\n\ntrue on success\n Backward seeking is not supported"]
    pub fn compress_stream_decoder_seek(
        instance: *mut CompressStreamDecoder,
        position: usize,
    ) -> bool;
}
extern "C" {
    #[doc = "Get current position in uncompressed data stream\n\n # Arguments\n\n* `instance` - The CompressStreamDecoder instance\n\n # Returns\n\ncurrent position"]
    pub fn compress_stream_decoder_tell(instance: *mut CompressStreamDecoder) -> usize;
}
extern "C" {
    #[doc = "Reset stream decoder to the beginning\n Read callback must be repositioned by caller separately\n\n # Arguments\n\n* `instance` - The CompressStreamDecoder instance\n\n # Returns\n\ntrue on success"]
    pub fn compress_stream_decoder_rewind(instance: *mut CompressStreamDecoder) -> bool;
}
extern "C" {
    pub fn crc32_calc_buffer(crc: u32, buffer: *const core::ffi::c_void, size: usize) -> u32;
}
pub type FileCrcProgressCb =
    ::core::option::Option<unsafe extern "C" fn(progress: u8, context: *mut core::ffi::c_void)>;
extern "C" {
    pub fn crc32_calc_file(
        file: *mut File,
        progress_cb: FileCrcProgressCb,
        context: *mut core::ffi::c_void,
    ) -> u32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DirWalk {
    _unused: [u8; 0],
}
#[doc = "< OK"]
pub const DirWalkResult_DirWalkOK: DirWalkResult = 0;
#[doc = "< Error"]
pub const DirWalkResult_DirWalkError: DirWalkResult = 1;
#[doc = "< Last element"]
pub const DirWalkResult_DirWalkLast: DirWalkResult = 2;
pub type DirWalkResult = core::ffi::c_uchar;
pub type DirWalkFilterCb = ::core::option::Option<
    unsafe extern "C" fn(
        name: *const core::ffi::c_char,
        fileinfo: *mut FileInfo,
        ctx: *mut core::ffi::c_void,
    ) -> bool,
>;
extern "C" {
    #[doc = "Allocate DirWalk\n # Arguments\n\n* `storage` -\n # Returns\n\nDirWalk*"]
    pub fn dir_walk_alloc(storage: *mut Storage) -> *mut DirWalk;
}
extern "C" {
    #[doc = "Free DirWalk\n # Arguments\n\n* `dir_walk` -"]
    pub fn dir_walk_free(dir_walk: *mut DirWalk);
}
extern "C" {
    #[doc = "Set recursive mode (true by default)\n # Arguments\n\n* `dir_walk` -\n * `recursive` -"]
    pub fn dir_walk_set_recursive(dir_walk: *mut DirWalk, recursive: bool);
}
extern "C" {
    #[doc = "Set filter callback (Should return true if the data is valid)\n # Arguments\n\n* `dir_walk` -\n * `cb` -\n * `context` -"]
    pub fn dir_walk_set_filter_cb(
        dir_walk: *mut DirWalk,
        cb: DirWalkFilterCb,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Open directory\n # Arguments\n\n* `dir_walk` -\n * `path` -\n # Returns\n\ntrue\n false"]
    pub fn dir_walk_open(dir_walk: *mut DirWalk, path: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Get error id\n # Arguments\n\n* `dir_walk` -\n # Returns\n\nFS_Error"]
    pub fn dir_walk_get_error(dir_walk: *mut DirWalk) -> FS_Error;
}
extern "C" {
    #[doc = "Read next element from directory\n # Arguments\n\n* `dir_walk` -\n * `return_path` -\n * `fileinfo` -\n # Returns\n\nDirWalkResult"]
    pub fn dir_walk_read(
        dir_walk: *mut DirWalk,
        return_path: *mut FuriString,
        fileinfo: *mut FileInfo,
    ) -> DirWalkResult;
}
extern "C" {
    #[doc = "Close directory\n # Arguments\n\n* `dir_walk` -"]
    pub fn dir_walk_close(dir_walk: *mut DirWalk);
}
extern "C" {
    #[doc = "Compare two floating point numbers\n # Arguments\n\n* `a` - First number to compare\n * `b` - Second number to compare\n\n # Returns\n\nbool true if a equals b, false otherwise"]
    pub fn float_is_equal(a: f32, b: f32) -> bool;
}
extern "C" {
    #[doc = "Convert ASCII hex value to nibble\n # Arguments\n\n* `c` - ASCII character\n * `nibble` - nibble pointer, output\n\n # Returns\n\nbool conversion status"]
    pub fn hex_char_to_hex_nibble(c: core::ffi::c_char, nibble: *mut u8) -> bool;
}
extern "C" {
    #[doc = "Convert ASCII hex value to byte\n # Arguments\n\n* `hi` - hi nibble text\n * `low` - low nibble text\n * `value` - output value\n\n # Returns\n\nbool conversion status"]
    pub fn hex_char_to_uint8(hi: core::ffi::c_char, low: core::ffi::c_char, value: *mut u8)
        -> bool;
}
extern "C" {
    #[doc = "Convert ASCII hex values to uint8_t\n # Arguments\n\n* `value_str` - ASCII data\n * `value` - output value\n\n # Returns\n\nbool conversion status"]
    pub fn hex_chars_to_uint8(value_str: *const core::ffi::c_char, value: *mut u8) -> bool;
}
extern "C" {
    #[doc = "Convert ASCII hex values to uint64_t\n # Arguments\n\n* `value_str` - ASCII 64 bi data\n * `value` - output value\n\n # Returns\n\nbool conversion status"]
    pub fn hex_chars_to_uint64(value_str: *const core::ffi::c_char, value: *mut u64) -> bool;
}
extern "C" {
    #[doc = "Convert uint8_t to ASCII hex values\n # Arguments\n\n* `src` - source data\n * `target` - output value\n * `length` - data length\n"]
    pub fn uint8_to_hex_chars(src: *const u8, target: *mut u8, length: core::ffi::c_int);
}
pub const KeysDictMode_KeysDictModeOpenExisting: KeysDictMode = 0;
pub const KeysDictMode_KeysDictModeOpenAlways: KeysDictMode = 1;
pub type KeysDictMode = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct KeysDict {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = "Check if the file list exists\n\n # Arguments\n\n* `path` - - list path\n\n # Returns\n\ntrue if list exists, false otherwise"]
    pub fn keys_dict_check_presence(path: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Open or create list\n Depending on mode, list will be opened or created.\n\n # Arguments\n\n* `path` - - Path of the file that contain the list\n * `mode` - - ListKeysMode value\n * `key_size` - - Size of each key in bytes\n\n # Returns\n\nReturns KeysDict list instance"]
    pub fn keys_dict_alloc(
        path: *const core::ffi::c_char,
        mode: KeysDictMode,
        key_size: usize,
    ) -> *mut KeysDict;
}
extern "C" {
    #[doc = "Close list\n\n # Arguments\n\n* `instance` - - KeysDict list instance"]
    pub fn keys_dict_free(instance: *mut KeysDict);
}
extern "C" {
    #[doc = "Get total number of keys in list\n\n # Arguments\n\n* `instance` - - KeysDict list instance\n\n # Returns\n\nReturns total number of keys in list"]
    pub fn keys_dict_get_total_keys(instance: *mut KeysDict) -> usize;
}
extern "C" {
    #[doc = "Rewind list\n\n # Arguments\n\n* `instance` - - KeysDict list instance\n\n # Returns\n\nReturns true if rewind was successful, false otherwise"]
    pub fn keys_dict_rewind(instance: *mut KeysDict) -> bool;
}
extern "C" {
    #[doc = "Check if key is present in list\n\n # Arguments\n\n* `instance` - - KeysDict list instance\n * `key` - - key to check\n * `key_size` - - Size of the key in bytes\n\n # Returns\n\nReturns true if key is present, false otherwise"]
    pub fn keys_dict_is_key_present(
        instance: *mut KeysDict,
        key: *const u8,
        key_size: usize,
    ) -> bool;
}
extern "C" {
    #[doc = "Get next key from the list\n This function will return next key from list. If there are no more\n keys, it will return false, and keys_dict_rewind() should be called.\n\n # Arguments\n\n* `instance` - - KeysDict list instance\n * `key` - - Array where to store key\n * `key_size` - - Size of key in bytes\n\n # Returns\n\nReturns true if key was successfully retrieved, false otherwise"]
    pub fn keys_dict_get_next_key(instance: *mut KeysDict, key: *mut u8, key_size: usize) -> bool;
}
extern "C" {
    #[doc = "Add key to list\n\n # Arguments\n\n* `instance` - - KeysDict list instance\n * `key` - - Key to add\n * `key_size` - - Size of the key in bytes\n\n # Returns\n\nReturns true if key was successfully added, false otherwise"]
    pub fn keys_dict_add_key(instance: *mut KeysDict, key: *const u8, key_size: usize) -> bool;
}
extern "C" {
    #[doc = "Delete key from list\n\n # Arguments\n\n* `instance` - - KeysDict list instance\n * `key` - - Key to delete\n * `key_size` - - Size of the key in bytes\n\n # Returns\n\nReturns true if key was successfully deleted, false otherwise"]
    pub fn keys_dict_delete_key(instance: *mut KeysDict, key: *const u8, key_size: usize) -> bool;
}
pub const ManchesterEvent_ManchesterEventShortLow: ManchesterEvent = 0;
pub const ManchesterEvent_ManchesterEventShortHigh: ManchesterEvent = 2;
pub const ManchesterEvent_ManchesterEventLongLow: ManchesterEvent = 4;
pub const ManchesterEvent_ManchesterEventLongHigh: ManchesterEvent = 6;
pub const ManchesterEvent_ManchesterEventReset: ManchesterEvent = 8;
pub type ManchesterEvent = core::ffi::c_uchar;
pub const ManchesterState_ManchesterStateStart1: ManchesterState = 0;
pub const ManchesterState_ManchesterStateMid1: ManchesterState = 1;
pub const ManchesterState_ManchesterStateMid0: ManchesterState = 2;
pub const ManchesterState_ManchesterStateStart0: ManchesterState = 3;
pub type ManchesterState = core::ffi::c_uchar;
extern "C" {
    pub fn manchester_advance(
        state: ManchesterState,
        event: ManchesterEvent,
        next_state: *mut ManchesterState,
        data: *mut bool,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ManchesterEncoderState {
    pub prev_bit: bool,
    pub step: u8,
}
#[test]
fn bindgen_test_layout_ManchesterEncoderState() {
    const UNINIT: ::core::mem::MaybeUninit<ManchesterEncoderState> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<ManchesterEncoderState>(),
        2usize,
        concat!("Size of: ", stringify!(ManchesterEncoderState))
    );
    assert_eq!(
        ::core::mem::align_of::<ManchesterEncoderState>(),
        1usize,
        concat!("Alignment of ", stringify!(ManchesterEncoderState))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).prev_bit) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ManchesterEncoderState),
            "::",
            stringify!(prev_bit)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).step) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ManchesterEncoderState),
            "::",
            stringify!(step)
        )
    );
}
pub const ManchesterEncoderResult_ManchesterEncoderResultShortLow: ManchesterEncoderResult = 0;
pub const ManchesterEncoderResult_ManchesterEncoderResultLongLow: ManchesterEncoderResult = 1;
pub const ManchesterEncoderResult_ManchesterEncoderResultLongHigh: ManchesterEncoderResult = 2;
pub const ManchesterEncoderResult_ManchesterEncoderResultShortHigh: ManchesterEncoderResult = 3;
pub type ManchesterEncoderResult = core::ffi::c_uchar;
extern "C" {
    pub fn manchester_encoder_reset(state: *mut ManchesterEncoderState);
}
extern "C" {
    pub fn manchester_encoder_advance(
        state: *mut ManchesterEncoderState,
        curr_bit: bool,
        result: *mut ManchesterEncoderResult,
    ) -> bool;
}
extern "C" {
    pub fn manchester_encoder_finish(state: *mut ManchesterEncoderState)
        -> ManchesterEncoderResult;
}
extern "C" {
    pub fn md5_calc_file(
        file: *mut File,
        path: *const core::ffi::c_char,
        output: *mut core::ffi::c_uchar,
        file_error: *mut FS_Error,
    ) -> bool;
}
extern "C" {
    pub fn md5_string_calc_file(
        file: *mut File,
        path: *const core::ffi::c_char,
        output: *mut FuriString,
        file_error: *mut FS_Error,
    ) -> bool;
}
extern "C" {
    #[doc = "Generates detailed/random name based on furi_hal flags\n\n # Arguments\n\n* `name` - buffer to write random name\n * `max_name_size` - length of given buffer\n * `prefix` (direction in) - The prefix of the name"]
    pub fn name_generator_make_auto(
        name: *mut core::ffi::c_char,
        max_name_size: usize,
        prefix: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Generates random name\n\n # Arguments\n\n* `name` - buffer to write random name\n * `max_name_size` - length of given buffer"]
    pub fn name_generator_make_random(name: *mut core::ffi::c_char, max_name_size: usize);
}
extern "C" {
    #[doc = "Generates detailed name\n\n # Arguments\n\n* `name` - buffer to write random name\n * `max_name_size` - length of given buffer\n * `prefix` (direction in) - The prefix of the name"]
    pub fn name_generator_make_detailed(
        name: *mut core::ffi::c_char,
        max_name_size: usize,
        prefix: *const core::ffi::c_char,
    );
}
extern "C" {
    #[doc = "Extract filename without extension from path.\n\n # Arguments\n\n* `path` - path string\n * `filename` - output filename string. Must be initialized before."]
    pub fn path_extract_filename_no_ext(path: *const core::ffi::c_char, filename: *mut FuriString);
}
extern "C" {
    #[doc = "Extract filename string from path.\n\n # Arguments\n\n* `path` - path string\n * `filename` - output filename string. Must be initialized before.\n * `trim_ext` - true - get filename without extension"]
    pub fn path_extract_filename(path: *mut FuriString, filename: *mut FuriString, trim_ext: bool);
}
extern "C" {
    #[doc = "Extract file extension from path.\n\n # Arguments\n\n* `path` - path string\n * `ext` - output extension string\n * `ext_len_max` - maximum extension string length"]
    pub fn path_extract_extension(
        path: *mut FuriString,
        ext: *mut core::ffi::c_char,
        ext_len_max: usize,
    );
}
extern "C" {
    #[doc = "Extract last path component\n\n # Arguments\n\n* `path` - path string\n * `filename` - output string. Must be initialized before."]
    pub fn path_extract_basename(path: *const core::ffi::c_char, basename: *mut FuriString);
}
extern "C" {
    #[doc = "Extract path, except for last component\n\n # Arguments\n\n* `path` - path string\n * `filename` - output string. Must be initialized before."]
    pub fn path_extract_dirname(path: *const core::ffi::c_char, dirname: *mut FuriString);
}
extern "C" {
    #[doc = "Appends new component to path, adding path delimiter\n\n # Arguments\n\n* `path` - path string\n * `suffix` - path part to apply"]
    pub fn path_append(path: *mut FuriString, suffix: *const core::ffi::c_char);
}
extern "C" {
    #[doc = "Appends new component to path, adding path delimiter\n\n # Arguments\n\n* `path` - first path part\n * `suffix` - second path part\n * `out_path` - output string to combine parts into. Must be initialized"]
    pub fn path_concat(
        path: *const core::ffi::c_char,
        suffix: *const core::ffi::c_char,
        out_path: *mut FuriString,
    );
}
extern "C" {
    #[doc = "Check that path contains only ascii characters\n\n # Arguments\n\n* `path` -\n # Returns\n\ntrue\n false"]
    pub fn path_contains_only_ascii(path: *const core::ffi::c_char) -> bool;
}
extern "C" {
    #[doc = "Format a data buffer as a canonical HEX dump\n # Arguments\n\n* `[out]` - result pointer to the output string (must be initialised)\n * `[in]` - num_places the number of bytes on one line (both as HEX and ASCII)\n * `[in]` - line_prefix if not NULL, prepend this string to each line\n * `[in]` - data pointer to the input data buffer\n * `[in]` - data_size input data size"]
    pub fn pretty_format_bytes_hex_canonical(
        result: *mut FuriString,
        num_places: usize,
        line_prefix: *const core::ffi::c_char,
        data: *const u8,
        data_size: usize,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PulseGlue {
    _unused: [u8; 0],
}
extern "C" {
    pub fn pulse_glue_alloc() -> *mut PulseGlue;
}
extern "C" {
    pub fn pulse_glue_free(pulse_glue: *mut PulseGlue);
}
extern "C" {
    pub fn pulse_glue_reset(pulse_glue: *mut PulseGlue);
}
extern "C" {
    pub fn pulse_glue_push(pulse_glue: *mut PulseGlue, polarity: bool, length: u32) -> bool;
}
extern "C" {
    pub fn pulse_glue_pop(pulse_glue: *mut PulseGlue, length: *mut u32, period: *mut u32);
}
extern "C" {
    #[doc = "Load data from the file in saved structure format\n\n # Arguments\n\n* `path` (direction in) - The path to the file\n * `data` (direction out) - Pointer to the memory where to load data\n * `size` (direction in) - The size of the data\n * `magic` (direction in) - The magic to embed into metadata\n * `version` (direction in) - The version to embed into metadata\n\n # Returns\n\ntrue on success, false otherwise"]
    pub fn saved_struct_load(
        path: *const core::ffi::c_char,
        data: *mut core::ffi::c_void,
        size: usize,
        magic: u8,
        version: u8,
    ) -> bool;
}
extern "C" {
    #[doc = "Save data in saved structure format\n\n # Arguments\n\n* `path` (direction in) - The path to the file\n * `data` (direction in) - Pointer to the memory where data\n * `size` (direction in) - The size of the data\n * `magic` (direction in) - The magic to embed into metadata\n * `version` (direction in) - The version to embed into metadata\n\n # Returns\n\ntrue on success, false otherwise"]
    pub fn saved_struct_save(
        path: *const core::ffi::c_char,
        data: *const core::ffi::c_void,
        size: usize,
        magic: u8,
        version: u8,
    ) -> bool;
}
extern "C" {
    #[doc = "Get SavedStructure file metadata\n\n # Arguments\n\n* `path` (direction in) - The path to the file\n * `magic` (direction out) - Pointer to store magic or NULL if you don't need it\n * `version` (direction out) - Pointer to store version or NULL if you don't need\n it\n * `payload_size` (direction out) - Pointer to store payload size or NULL if you don't\n need it\n\n # Returns\n\ntrue on success, false otherwise"]
    pub fn saved_struct_get_metadata(
        path: *const core::ffi::c_char,
        magic: *mut u8,
        version: *mut u8,
        payload_size: *mut usize,
    ) -> bool;
}
extern "C" {
    #[doc = "Allocate a file stream with buffered read operations\n # Returns\n\nStream*"]
    pub fn buffered_file_stream_alloc(storage: *mut Storage) -> *mut Stream;
}
extern "C" {
    #[doc = "Opens an existing file or creates a new one.\n # Arguments\n\n* `stream` - pointer to file stream object.\n * `path` - path to file\n * `access_mode` - access mode from FS_AccessMode\n * `open_mode` - open mode from FS_OpenMode\n # Returns\n\nTrue on success, False on failure. You need to close the file even if the open operation failed."]
    pub fn buffered_file_stream_open(
        stream: *mut Stream,
        path: *const core::ffi::c_char,
        access_mode: FS_AccessMode,
        open_mode: FS_OpenMode,
    ) -> bool;
}
extern "C" {
    #[doc = "Closes the file.\n # Arguments\n\n* `stream` - pointer to file stream object.\n # Returns\n\nTrue on success, False on failure."]
    pub fn buffered_file_stream_close(stream: *mut Stream) -> bool;
}
extern "C" {
    #[doc = "Forces write from cache to the underlying file.\n # Arguments\n\n* `stream` - pointer to file stream object.\n # Returns\n\nTrue on success, False on failure."]
    pub fn buffered_file_stream_sync(stream: *mut Stream) -> bool;
}
extern "C" {
    #[doc = "Retrieves the error id from the file object\n # Arguments\n\n* `stream` - pointer to stream object.\n # Returns\n\nFS_Error error id"]
    pub fn buffered_file_stream_get_error(stream: *mut Stream) -> FS_Error;
}
extern "C" {
    #[doc = "Allocate file stream\n # Returns\n\nStream*"]
    pub fn file_stream_alloc(storage: *mut Storage) -> *mut Stream;
}
extern "C" {
    #[doc = "Opens an existing file or create a new one.\n # Arguments\n\n* `stream` - pointer to file stream object.\n * `path` - path to file\n * `access_mode` - access mode from FS_AccessMode\n * `open_mode` - open mode from FS_OpenMode\n # Returns\n\nsuccess flag. You need to close the file even if the open operation failed."]
    pub fn file_stream_open(
        stream: *mut Stream,
        path: *const core::ffi::c_char,
        access_mode: FS_AccessMode,
        open_mode: FS_OpenMode,
    ) -> bool;
}
extern "C" {
    #[doc = "Closes the file.\n # Arguments\n\n* `stream` -\n # Returns\n\ntrue\n false"]
    pub fn file_stream_close(stream: *mut Stream) -> bool;
}
extern "C" {
    #[doc = "Retrieves the error id from the file object\n # Arguments\n\n* `stream` - pointer to stream object.\n # Returns\n\nFS_Error error id"]
    pub fn file_stream_get_error(stream: *mut Stream) -> FS_Error;
}
extern "C" {
    #[doc = "Allocate string stream\n # Returns\n\nStream*"]
    pub fn string_stream_alloc() -> *mut Stream;
}
#[doc = "!< Conversion performed successfully"]
pub const StrintParseError_StrintParseNoError: StrintParseError = 0;
#[doc = "!< Multiple leading `+` or `-` characters, or leading `-` character if the type is unsigned"]
pub const StrintParseError_StrintParseSignError: StrintParseError = 1;
#[doc = "!< No valid digits after the leading whitespace, sign and prefix"]
pub const StrintParseError_StrintParseAbsentError: StrintParseError = 2;
#[doc = "!< Result does not fit in the requested type"]
pub const StrintParseError_StrintParseOverflowError: StrintParseError = 3;
#[doc = "String to integer conversion error"]
pub type StrintParseError = core::ffi::c_uchar;
extern "C" {
    #[doc = "See `strint_to_uint32`"]
    pub fn strint_to_uint64(
        str_: *const core::ffi::c_char,
        end: *mut *mut core::ffi::c_char,
        out: *mut u64,
        base: u8,
    ) -> StrintParseError;
}
extern "C" {
    #[doc = "See `strint_to_uint32`"]
    pub fn strint_to_int64(
        str_: *const core::ffi::c_char,
        end: *mut *mut core::ffi::c_char,
        out: *mut i64,
        base: u8,
    ) -> StrintParseError;
}
extern "C" {
    #[doc = "Converts a string to a `uint32_t`\n\n # Arguments\n\n* `str` (direction in) - Input string\n * `end` (direction out) - Pointer to first character after the number in input string\n * `out` (direction out) - Parse result\n * `base` (direction in) - Integer base\n\n # Returns\n\nParse error\n\n Parses the number in the input string. The number may be surrounded by\n whitespace characters to the left and any non-digit characters to the right.\n What's considered a digit is determined by the input base in the following\n order: `0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ`. The number may be prefixed\n with either a `+` or a `-` to indicate its sign. The pointer to the first\n character after the leading whitespace, allowed prefixes and digits is\n assigned to `end`.\n\n If the input base is 0, the base is inferred from the leading characters of\n the number:\n - If it starts with `0x`, it's read in base 16;\n - If it starts with a `0`, it's read in base 8;\n - If it starts with `0b`, it's read in base 2.\n - Otherwise, it's read in base 10.\n\n For a description of the return codes, see `StrintParseError`. If the return\n code is something other than `StrintParseNoError`, the values at `end` and\n `out` are unaltered."]
    pub fn strint_to_uint32(
        str_: *const core::ffi::c_char,
        end: *mut *mut core::ffi::c_char,
        out: *mut u32,
        base: u8,
    ) -> StrintParseError;
}
extern "C" {
    #[doc = "See `strint_to_uint32`"]
    pub fn strint_to_int32(
        str_: *const core::ffi::c_char,
        end: *mut *mut core::ffi::c_char,
        out: *mut i32,
        base: u8,
    ) -> StrintParseError;
}
extern "C" {
    #[doc = "See `strint_to_uint32`"]
    pub fn strint_to_uint16(
        str_: *const core::ffi::c_char,
        end: *mut *mut core::ffi::c_char,
        out: *mut u16,
        base: u8,
    ) -> StrintParseError;
}
extern "C" {
    #[doc = "See `strint_to_uint32`"]
    pub fn strint_to_int16(
        str_: *const core::ffi::c_char,
        end: *mut *mut core::ffi::c_char,
        out: *mut i16,
        base: u8,
    ) -> StrintParseError;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TarArchive {
    _unused: [u8; 0],
}
pub const TarOpenMode_TarOpenModeRead: TarOpenMode = 114;
pub const TarOpenMode_TarOpenModeWrite: TarOpenMode = 119;
pub const TarOpenMode_TarOpenModeReadHeatshrink: TarOpenMode = 104;
#[doc = "Tar archive open mode"]
pub type TarOpenMode = core::ffi::c_uchar;
extern "C" {
    #[doc = "Get expected open mode for archive at the path.\n Used for automatic mode detection based on the file extension.\n\n # Arguments\n\n* `path` (direction in) - Path to the archive\n\n # Returns\n\nopen mode from TarOpenMode enum"]
    pub fn tar_archive_get_mode_for_path(path: *const core::ffi::c_char) -> TarOpenMode;
}
extern "C" {
    #[doc = "Tar archive constructor\n\n # Arguments\n\n* `storage` - Storage API pointer\n\n # Returns\n\nallocated object"]
    pub fn tar_archive_alloc(storage: *mut Storage) -> *mut TarArchive;
}
extern "C" {
    #[doc = "Open tar archive\n\n # Arguments\n\n* `archive` - Tar archive object\n * `path` (direction in) - Path to the tar archive\n * `mode` - Open mode\n\n # Returns\n\ntrue if successful"]
    pub fn tar_archive_open(
        archive: *mut TarArchive,
        path: *const core::ffi::c_char,
        mode: TarOpenMode,
    ) -> bool;
}
extern "C" {
    #[doc = "Tar archive destructor\n\n # Arguments\n\n* `archive` - Tar archive object"]
    pub fn tar_archive_free(archive: *mut TarArchive);
}
pub type TarArchiveNameConverter =
    ::core::option::Option<unsafe extern "C" fn(arg1: *mut FuriString)>;
extern "C" {
    #[doc = "Unpack tar archive to destination\n\n # Arguments\n\n* `archive` - Tar archive object. Must be opened in read mode\n * `destination` (direction in) - Destination path\n * `converter` - Storage name converter\n\n # Returns\n\ntrue if successful"]
    pub fn tar_archive_unpack_to(
        archive: *mut TarArchive,
        destination: *const core::ffi::c_char,
        converter: TarArchiveNameConverter,
    ) -> bool;
}
extern "C" {
    #[doc = "Add file to tar archive\n\n # Arguments\n\n* `archive` - Tar archive object. Must be opened in write mode\n * `fs_file_path` (direction in) - Path to the file on the filesystem\n * `archive_fname` (direction in) - Name of the file in the archive\n * `file_size` - Size of the file\n\n # Returns\n\ntrue if successful"]
    pub fn tar_archive_add_file(
        archive: *mut TarArchive,
        fs_file_path: *const core::ffi::c_char,
        archive_fname: *const core::ffi::c_char,
        file_size: i32,
    ) -> bool;
}
extern "C" {
    #[doc = "Add directory to tar archive\n\n # Arguments\n\n* `archive` - Tar archive object. Must be opened in write mode\n * `fs_full_path` - Path to the directory on the filesystem\n * `path_prefix` - Prefix to add to the directory name in the archive\n\n # Returns\n\ntrue if successful"]
    pub fn tar_archive_add_dir(
        archive: *mut TarArchive,
        fs_full_path: *const core::ffi::c_char,
        path_prefix: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Get number of entries in the archive\n\n # Arguments\n\n* `archive` - Tar archive object\n\n # Returns\n\nnumber of entries. -1 on error"]
    pub fn tar_archive_get_entries_count(archive: *mut TarArchive) -> i32;
}
extern "C" {
    #[doc = "Get read progress\n\n # Arguments\n\n* `archive` - Tar archive object. Must be opened in read mode\n * `processed` (direction in) - Number of processed entries\n * `total` (direction in) - Total number of entries\n\n # Returns\n\ntrue if successful"]
    pub fn tar_archive_get_read_progress(
        archive: *mut TarArchive,
        processed: *mut i32,
        total: *mut i32,
    ) -> bool;
}
extern "C" {
    #[doc = "Unpack single file from tar archive\n\n # Arguments\n\n* `archive` - Tar archive object. Must be opened in read mode\n * `archive_fname` (direction in) - Name of the file in the archive\n * `destination` (direction in) - Destination path\n\n # Returns\n\ntrue if successful"]
    pub fn tar_archive_unpack_file(
        archive: *mut TarArchive,
        archive_fname: *const core::ffi::c_char,
        destination: *const core::ffi::c_char,
    ) -> bool;
}
#[doc = "Optional per-entry callback on unpacking\n # Arguments\n\n* `name` - Name of the file or directory\n * `is_directory` - True if the entry is a directory\n * `context` (direction in) - User context\n # Returns\n\ntrue to process the entry, false to skip"]
pub type tar_unpack_file_cb = ::core::option::Option<
    unsafe extern "C" fn(
        name: *const core::ffi::c_char,
        is_directory: bool,
        context: *mut core::ffi::c_void,
    ) -> bool,
>;
extern "C" {
    #[doc = "Set per-entry callback on unpacking\n # Arguments\n\n* `archive` - Tar archive object\n * `callback` - Callback function\n * `context` (direction in) - User context"]
    pub fn tar_archive_set_file_callback(
        archive: *mut TarArchive,
        callback: tar_unpack_file_cb,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    #[doc = "Add tar archive directory header\n\n # Arguments\n\n* `archive` - Tar archive object. Must be opened in write mode\n * `dirpath` (direction in) - Path to the directory\n\n # Returns\n\ntrue if successful"]
    pub fn tar_archive_dir_add_element(
        archive: *mut TarArchive,
        dirpath: *const core::ffi::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = "Add tar archive file header\n\n # Arguments\n\n* `archive` - Tar archive object. Must be opened in write mode\n * `path` (direction in) - Path to the file\n * `data_len` - Size of the file\n\n # Returns\n\ntrue if successful"]
    pub fn tar_archive_file_add_header(
        archive: *mut TarArchive,
        path: *const core::ffi::c_char,
        data_len: i32,
    ) -> bool;
}
extern "C" {
    #[doc = "Add tar archive file data block\n\n # Arguments\n\n* `archive` - Tar archive object. Must be opened in write mode\n * `data_block` (direction in) - Data block\n * `block_len` - Size of the data block\n\n # Returns\n\ntrue if successful"]
    pub fn tar_archive_file_add_data_block(
        archive: *mut TarArchive,
        data_block: *const u8,
        block_len: i32,
    ) -> bool;
}
extern "C" {
    #[doc = "Finalize tar archive file\n\n # Arguments\n\n* `archive` - Tar archive object. Must be opened in write mode\n\n # Returns\n\ntrue if successful"]
    pub fn tar_archive_file_finalize(archive: *mut TarArchive) -> bool;
}
extern "C" {
    #[doc = "Store data in tar archive\n\n # Arguments\n\n* `archive` - Tar archive object. Must be opened in write mode\n * `path` (direction in) - Path to the file\n * `data` (direction in) - Data to store\n * `data_len` - Size of the data\n\n # Returns\n\ntrue if successful"]
    pub fn tar_archive_store_data(
        archive: *mut TarArchive,
        path: *const core::ffi::c_char,
        data: *const u8,
        data_len: i32,
    ) -> bool;
}
extern "C" {
    #[doc = "Finalize tar archive\n\n # Arguments\n\n* `archive` - Tar archive object. Must be opened in write mode\n\n # Returns\n\ntrue if successful"]
    pub fn tar_archive_finalize(archive: *mut TarArchive) -> bool;
}
extern "C" {
    #[doc = "Get the index of a int32_t array element which is closest to the given value.\n\n Returned index corresponds to the first element found.\n If no suitable elements were found, the function returns 0.\n\n # Arguments\n\n* `value` - value to be searched.\n * `values` - pointer to the array to perform the search in.\n * `values_count` - array size.\n\n # Returns\n\nvalue's index."]
    pub fn value_index_int32(value: i32, values: *const i32, values_count: usize) -> usize;
}
extern "C" {
    #[doc = "Get the index of a uint32_t array element which is closest to the given value.\n\n Returned index corresponds to the first element found.\n If no suitable elements were found, the function returns 0.\n\n # Arguments\n\n* `value` - value to be searched.\n * `values` - pointer to the array to perform the search in.\n * `values_count` - array size.\n\n # Returns\n\nvalue's index."]
    pub fn value_index_uint32(value: u32, values: *const u32, values_count: usize) -> usize;
}
extern "C" {
    #[doc = "Get the index of a float array element which is closest to the given value.\n\n Returned index corresponds to the first element found.\n If no suitable elements were found, the function returns 0.\n\n # Arguments\n\n* `value` - value to be searched.\n * `values` - pointer to the array to perform the search in.\n * `values_count` - array size.\n\n # Returns\n\nvalue's index."]
    pub fn value_index_float(value: f32, values: *const f32, values_count: usize) -> usize;
}
extern "C" {
    #[doc = "Get the index of a bool array element which is equal to the given value.\n\n Returned index corresponds to the first element found.\n If no suitable elements were found, the function returns 0.\n\n # Arguments\n\n* `value` - value to be searched.\n * `values` - pointer to the array to perform the search in.\n * `values_count` - array size.\n\n # Returns\n\nvalue's index."]
    pub fn value_index_bool(value: bool, values: *const bool, values_count: usize) -> usize;
}
extern "C" {
    #[doc = "Pack uint32 to varint\n # Arguments\n\n* `value` - value from UINT32_MIN to UINT32_MAX\n * `output` - output array, need to be at least 5 bytes long\n # Returns\n\nsize_t"]
    pub fn varint_uint32_pack(value: u32, output: *mut u8) -> usize;
}
extern "C" {
    pub fn varint_uint32_unpack(value: *mut u32, input: *const u8, input_size: usize) -> usize;
}
extern "C" {
    pub fn varint_uint32_length(value: u32) -> usize;
}
extern "C" {
    #[doc = "Pack int32 to varint\n # Arguments\n\n* `value` - value from (INT32_MIN / 2 + 1) to INT32_MAX\n * `output` - output array, need to be at least 5 bytes long\n # Returns\n\nsize_t"]
    pub fn varint_int32_pack(value: i32, output: *mut u8) -> usize;
}
extern "C" {
    pub fn varint_int32_unpack(value: *mut i32, input: *const u8, input_size: usize) -> usize;
}
extern "C" {
    pub fn varint_int32_length(value: i32) -> usize;
}
pub const BleEventAckStatus_BleEventNotAck: BleEventAckStatus = 0;
pub const BleEventAckStatus_BleEventAckFlowEnable: BleEventAckStatus = 1;
pub const BleEventAckStatus_BleEventAckFlowDisable: BleEventAckStatus = 2;
pub type BleEventAckStatus = core::ffi::c_uchar;
pub type BleSvcEventHandlerCb = ::core::option::Option<
    unsafe extern "C" fn(
        event: *mut core::ffi::c_void,
        context: *mut core::ffi::c_void,
    ) -> BleEventAckStatus,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct GapEventHandler {
    _unused: [u8; 0],
}
pub type GapSvcEventHandler = GapEventHandler;
extern "C" {
    pub fn ble_event_dispatcher_register_svc_handler(
        handler: BleSvcEventHandlerCb,
        context: *mut core::ffi::c_void,
    ) -> *mut GapSvcEventHandler;
}
extern "C" {
    pub fn ble_event_dispatcher_unregister_svc_handler(handler: *mut GapSvcEventHandler);
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub union Service_UUID_t {
    #[doc = "16-bit UUID"]
    pub Service_UUID_16: u16,
    #[doc = "128-bit UUID"]
    pub Service_UUID_128: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_Service_UUID_t() {
    const UNINIT: ::core::mem::MaybeUninit<Service_UUID_t> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<Service_UUID_t>(),
        16usize,
        concat!("Size of: ", stringify!(Service_UUID_t))
    );
    assert_eq!(
        ::core::mem::align_of::<Service_UUID_t>(),
        1usize,
        concat!("Alignment of ", stringify!(Service_UUID_t))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Service_UUID_16) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Service_UUID_t),
            "::",
            stringify!(Service_UUID_16)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Service_UUID_128) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Service_UUID_t),
            "::",
            stringify!(Service_UUID_128)
        )
    );
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub union Char_UUID_t {
    #[doc = "16-bit UUID"]
    pub Char_UUID_16: u16,
    #[doc = "128-bit UUID"]
    pub Char_UUID_128: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_Char_UUID_t() {
    const UNINIT: ::core::mem::MaybeUninit<Char_UUID_t> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<Char_UUID_t>(),
        16usize,
        concat!("Size of: ", stringify!(Char_UUID_t))
    );
    assert_eq!(
        ::core::mem::align_of::<Char_UUID_t>(),
        1usize,
        concat!("Alignment of ", stringify!(Char_UUID_t))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Char_UUID_16) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Char_UUID_t),
            "::",
            stringify!(Char_UUID_16)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Char_UUID_128) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Char_UUID_t),
            "::",
            stringify!(Char_UUID_128)
        )
    );
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub union Char_Desc_Uuid_t {
    #[doc = "16-bit UUID"]
    pub Char_UUID_16: u16,
    #[doc = "128-bit UUID"]
    pub Char_UUID_128: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_Char_Desc_Uuid_t() {
    const UNINIT: ::core::mem::MaybeUninit<Char_Desc_Uuid_t> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<Char_Desc_Uuid_t>(),
        16usize,
        concat!("Size of: ", stringify!(Char_Desc_Uuid_t))
    );
    assert_eq!(
        ::core::mem::align_of::<Char_Desc_Uuid_t>(),
        1usize,
        concat!("Alignment of ", stringify!(Char_Desc_Uuid_t))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Char_UUID_16) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Char_Desc_Uuid_t),
            "::",
            stringify!(Char_UUID_16)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).Char_UUID_128) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Char_Desc_Uuid_t),
            "::",
            stringify!(Char_UUID_128)
        )
    );
}
pub type cbBleGattCharacteristicData = ::core::option::Option<
    unsafe extern "C" fn(
        context: *const core::ffi::c_void,
        data: *mut *const u8,
        data_len: *mut u16,
    ) -> bool,
>;
pub const BleGattCharacteristicDataType_FlipperGattCharacteristicDataFixed:
    BleGattCharacteristicDataType = 0;
pub const BleGattCharacteristicDataType_FlipperGattCharacteristicDataCallback:
    BleGattCharacteristicDataType = 1;
pub type BleGattCharacteristicDataType = core::ffi::c_uchar;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct BleGattCharacteristicDescriptorParams {
    pub uuid: Char_Desc_Uuid_t,
    pub data_callback: BleGattCharacteristicDescriptorParams__bindgen_ty_1,
    pub uuid_type: u8,
    pub max_length: u8,
    pub security_permissions: u8,
    pub access_permissions: u8,
    pub gatt_evt_mask: u8,
    pub is_variable: u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BleGattCharacteristicDescriptorParams__bindgen_ty_1 {
    pub fn_: cbBleGattCharacteristicData,
    pub context: *const core::ffi::c_void,
}
#[test]
fn bindgen_test_layout_BleGattCharacteristicDescriptorParams__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<BleGattCharacteristicDescriptorParams__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<BleGattCharacteristicDescriptorParams__bindgen_ty_1>(),
        8usize,
        concat!(
            "Size of: ",
            stringify!(BleGattCharacteristicDescriptorParams__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<BleGattCharacteristicDescriptorParams__bindgen_ty_1>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(BleGattCharacteristicDescriptorParams__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicDescriptorParams__bindgen_ty_1),
            "::",
            stringify!(fn_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicDescriptorParams__bindgen_ty_1),
            "::",
            stringify!(context)
        )
    );
}
#[test]
fn bindgen_test_layout_BleGattCharacteristicDescriptorParams() {
    const UNINIT: ::core::mem::MaybeUninit<BleGattCharacteristicDescriptorParams> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<BleGattCharacteristicDescriptorParams>(),
        32usize,
        concat!(
            "Size of: ",
            stringify!(BleGattCharacteristicDescriptorParams)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<BleGattCharacteristicDescriptorParams>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(BleGattCharacteristicDescriptorParams)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).uuid) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicDescriptorParams),
            "::",
            stringify!(uuid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data_callback) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicDescriptorParams),
            "::",
            stringify!(data_callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).uuid_type) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicDescriptorParams),
            "::",
            stringify!(uuid_type)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).max_length) as usize - ptr as usize },
        25usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicDescriptorParams),
            "::",
            stringify!(max_length)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).security_permissions) as usize - ptr as usize },
        26usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicDescriptorParams),
            "::",
            stringify!(security_permissions)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).access_permissions) as usize - ptr as usize },
        27usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicDescriptorParams),
            "::",
            stringify!(access_permissions)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).gatt_evt_mask) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicDescriptorParams),
            "::",
            stringify!(gatt_evt_mask)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).is_variable) as usize - ptr as usize },
        29usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicDescriptorParams),
            "::",
            stringify!(is_variable)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct BleGattCharacteristicParams {
    pub name: *const core::ffi::c_char,
    pub descriptor_params: *mut BleGattCharacteristicDescriptorParams,
    pub data: BleGattCharacteristicParams__bindgen_ty_1,
    pub uuid: Char_UUID_t,
    pub _bitfield_align_1: [u8; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
    pub char_properties: u8,
    pub security_permissions: u8,
    pub gatt_evt_mask: u8,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union BleGattCharacteristicParams__bindgen_ty_1 {
    pub fixed: BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_1,
    pub callback: BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_1 {
    pub ptr: *const u8,
    pub length: u16,
}
#[test]
fn bindgen_test_layout_BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<
        BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_1,
    > = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_1>(),
        8usize,
        concat!(
            "Size of: ",
            stringify!(BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_1>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(ptr)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).length) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(length)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_2 {
    pub fn_: cbBleGattCharacteristicData,
    pub context: *const core::ffi::c_void,
}
#[test]
fn bindgen_test_layout_BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_2() {
    const UNINIT: ::core::mem::MaybeUninit<
        BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_2,
    > = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_2>(),
        8usize,
        concat!(
            "Size of: ",
            stringify!(BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_2)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_2>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_2)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(fn_)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(context)
        )
    );
}
#[test]
fn bindgen_test_layout_BleGattCharacteristicParams__bindgen_ty_1() {
    const UNINIT: ::core::mem::MaybeUninit<BleGattCharacteristicParams__bindgen_ty_1> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<BleGattCharacteristicParams__bindgen_ty_1>(),
        8usize,
        concat!(
            "Size of: ",
            stringify!(BleGattCharacteristicParams__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<BleGattCharacteristicParams__bindgen_ty_1>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(BleGattCharacteristicParams__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).fixed) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams__bindgen_ty_1),
            "::",
            stringify!(fixed)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams__bindgen_ty_1),
            "::",
            stringify!(callback)
        )
    );
}
#[test]
fn bindgen_test_layout_BleGattCharacteristicParams() {
    const UNINIT: ::core::mem::MaybeUninit<BleGattCharacteristicParams> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<BleGattCharacteristicParams>(),
        36usize,
        concat!("Size of: ", stringify!(BleGattCharacteristicParams))
    );
    assert_eq!(
        ::core::mem::align_of::<BleGattCharacteristicParams>(),
        4usize,
        concat!("Alignment of ", stringify!(BleGattCharacteristicParams))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).descriptor_params) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams),
            "::",
            stringify!(descriptor_params)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).uuid) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams),
            "::",
            stringify!(uuid)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).char_properties) as usize - ptr as usize },
        33usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams),
            "::",
            stringify!(char_properties)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).security_permissions) as usize - ptr as usize },
        34usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams),
            "::",
            stringify!(security_permissions)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).gatt_evt_mask) as usize - ptr as usize },
        35usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicParams),
            "::",
            stringify!(gatt_evt_mask)
        )
    );
}
impl BleGattCharacteristicParams {
    #[inline]
    pub fn data_prop_type(&self) -> BleGattCharacteristicDataType {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u8) }
    }
    #[inline]
    pub fn set_data_prop_type(&mut self, val: BleGattCharacteristicDataType) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 2u8, val as u64)
        }
    }
    #[inline]
    pub fn is_variable(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u8) }
    }
    #[inline]
    pub fn set_is_variable(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(2usize, 2u8, val as u64)
        }
    }
    #[inline]
    pub fn uuid_type(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u8) }
    }
    #[inline]
    pub fn set_uuid_type(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(4usize, 2u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        data_prop_type: BleGattCharacteristicDataType,
        is_variable: u8,
        uuid_type: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 2u8, {
            let data_prop_type: u8 = unsafe { ::core::mem::transmute(data_prop_type) };
            data_prop_type as u64
        });
        __bindgen_bitfield_unit.set(2usize, 2u8, {
            let is_variable: u8 = unsafe { ::core::mem::transmute(is_variable) };
            is_variable as u64
        });
        __bindgen_bitfield_unit.set(4usize, 2u8, {
            let uuid_type: u8 = unsafe { ::core::mem::transmute(uuid_type) };
            uuid_type as u64
        });
        __bindgen_bitfield_unit
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BleGattCharacteristicInstance {
    pub characteristic: *const BleGattCharacteristicParams,
    pub handle: u16,
    pub descriptor_handle: u16,
}
#[test]
fn bindgen_test_layout_BleGattCharacteristicInstance() {
    const UNINIT: ::core::mem::MaybeUninit<BleGattCharacteristicInstance> =
        ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<BleGattCharacteristicInstance>(),
        8usize,
        concat!("Size of: ", stringify!(BleGattCharacteristicInstance))
    );
    assert_eq!(
        ::core::mem::align_of::<BleGattCharacteristicInstance>(),
        4usize,
        concat!("Alignment of ", stringify!(BleGattCharacteristicInstance))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).characteristic) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicInstance),
            "::",
            stringify!(characteristic)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).handle) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicInstance),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).descriptor_handle) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(BleGattCharacteristicInstance),
            "::",
            stringify!(descriptor_handle)
        )
    );
}
extern "C" {
    pub fn ble_gatt_characteristic_init(
        svc_handle: u16,
        char_descriptor: *const BleGattCharacteristicParams,
        char_instance: *mut BleGattCharacteristicInstance,
    );
}
extern "C" {
    pub fn ble_gatt_characteristic_delete(
        svc_handle: u16,
        char_instance: *mut BleGattCharacteristicInstance,
    );
}
extern "C" {
    pub fn ble_gatt_characteristic_update(
        svc_handle: u16,
        char_instance: *mut BleGattCharacteristicInstance,
        source: *const core::ffi::c_void,
    ) -> bool;
}
extern "C" {
    pub fn ble_gatt_service_add(
        Service_UUID_Type: u8,
        Service_UUID: *const Service_UUID_t,
        Service_Type: u8,
        Max_Attribute_Records: u8,
        Service_Handle: *mut u16,
    ) -> bool;
}
extern "C" {
    pub fn ble_gatt_service_delete(svc_handle: u16) -> bool;
}
pub const SerialServiceEventType_SerialServiceEventTypeDataReceived: SerialServiceEventType = 0;
pub const SerialServiceEventType_SerialServiceEventTypeDataSent: SerialServiceEventType = 1;
pub const SerialServiceEventType_SerialServiceEventTypesBleResetRequest: SerialServiceEventType = 2;
pub type SerialServiceEventType = core::ffi::c_uchar;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SerialServiceData {
    pub buffer: *mut u8,
    pub size: u16,
}
#[test]
fn bindgen_test_layout_SerialServiceData() {
    const UNINIT: ::core::mem::MaybeUninit<SerialServiceData> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SerialServiceData>(),
        8usize,
        concat!("Size of: ", stringify!(SerialServiceData))
    );
    assert_eq!(
        ::core::mem::align_of::<SerialServiceData>(),
        4usize,
        concat!("Alignment of ", stringify!(SerialServiceData))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SerialServiceData),
            "::",
            stringify!(buffer)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SerialServiceData),
            "::",
            stringify!(size)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SerialServiceEvent {
    pub event: SerialServiceEventType,
    pub data: SerialServiceData,
}
#[test]
fn bindgen_test_layout_SerialServiceEvent() {
    const UNINIT: ::core::mem::MaybeUninit<SerialServiceEvent> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<SerialServiceEvent>(),
        12usize,
        concat!("Size of: ", stringify!(SerialServiceEvent))
    );
    assert_eq!(
        ::core::mem::align_of::<SerialServiceEvent>(),
        4usize,
        concat!("Alignment of ", stringify!(SerialServiceEvent))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).event) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SerialServiceEvent),
            "::",
            stringify!(event)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(SerialServiceEvent),
            "::",
            stringify!(data)
        )
    );
}
pub type SerialServiceEventCallback = ::core::option::Option<
    unsafe extern "C" fn(event: SerialServiceEvent, context: *mut core::ffi::c_void) -> u16,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BleServiceSerial {
    _unused: [u8; 0],
}
extern "C" {
    pub fn ble_svc_serial_start() -> *mut BleServiceSerial;
}
extern "C" {
    pub fn ble_svc_serial_stop(service: *mut BleServiceSerial);
}
extern "C" {
    pub fn ble_svc_serial_set_callbacks(
        service: *mut BleServiceSerial,
        buff_size: u16,
        callback: SerialServiceEventCallback,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn ble_svc_serial_set_rpc_active(service: *mut BleServiceSerial, active: bool);
}
extern "C" {
    pub fn ble_svc_serial_notify_buffer_is_empty(service: *mut BleServiceSerial);
}
extern "C" {
    pub fn ble_svc_serial_update_tx(
        service: *mut BleServiceSerial,
        data: *mut u8,
        data_len: u16,
    ) -> bool;
}
#[doc = "Serial service callback type"]
pub type FuriHalBtSerialCallback = SerialServiceEventCallback;
extern "C" {
    #[doc = "Send data through BLE\n\n # Arguments\n\n* `profile` - Profile instance\n * `data` - data buffer\n * `size` - data buffer size\n\n # Returns\n\ntrue on success"]
    pub fn ble_profile_serial_tx(
        profile: *mut FuriHalBleProfileBase,
        data: *mut u8,
        size: u16,
    ) -> bool;
}
extern "C" {
    #[doc = "Set BLE RPC status\n\n # Arguments\n\n* `profile` - Profile instance\n * `active` - true if RPC is active"]
    pub fn ble_profile_serial_set_rpc_active(profile: *mut FuriHalBleProfileBase, active: bool);
}
extern "C" {
    #[doc = "Notify that application buffer is empty\n # Arguments\n\n* `profile` - Profile instance"]
    pub fn ble_profile_serial_notify_buffer_is_empty(profile: *mut FuriHalBleProfileBase);
}
extern "C" {
    #[doc = "Set Serial service events callback\n\n # Arguments\n\n* `profile` - Profile instance\n * `buffer_size` - Applicaition buffer size\n * `calback` - FuriHalBtSerialCallback instance\n * `context` - pointer to context"]
    pub fn ble_profile_serial_set_event_callback(
        profile: *mut FuriHalBleProfileBase,
        buff_size: u16,
        callback: FuriHalBtSerialCallback,
        context: *mut core::ffi::c_void,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BleServiceBattery {
    _unused: [u8; 0],
}
extern "C" {
    pub fn ble_svc_battery_start(auto_update: bool) -> *mut BleServiceBattery;
}
extern "C" {
    pub fn ble_svc_battery_stop(service: *mut BleServiceBattery);
}
extern "C" {
    pub fn ble_svc_battery_update_level(service: *mut BleServiceBattery, battery_level: u8)
        -> bool;
}
extern "C" {
    pub fn ble_svc_battery_update_power_state(
        service: *mut BleServiceBattery,
        charging: bool,
    ) -> bool;
}
extern "C" {
    pub fn ble_svc_battery_state_update(battery_level: *mut u8, charging: *mut bool);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BleServiceDevInfo {
    _unused: [u8; 0],
}
extern "C" {
    pub fn ble_svc_dev_info_start() -> *mut BleServiceDevInfo;
}
extern "C" {
    pub fn ble_svc_dev_info_stop(service: *mut BleServiceDevInfo);
}
pub const FuriHalPwmOutputId_FuriHalPwmOutputIdTim1PA7: FuriHalPwmOutputId = 0;
pub const FuriHalPwmOutputId_FuriHalPwmOutputIdLptim2PA4: FuriHalPwmOutputId = 1;
pub type FuriHalPwmOutputId = core::ffi::c_uchar;
extern "C" {
    #[doc = "Enable PWM channel and set parameters\n\n # Arguments\n\n* `channel` (direction in) - PWM channel (FuriHalPwmOutputId)\n * `freq` (direction in) - Frequency in Hz\n * `duty` (direction in) - Duty cycle value in %"]
    pub fn furi_hal_pwm_start(channel: FuriHalPwmOutputId, freq: u32, duty: u8);
}
extern "C" {
    #[doc = "Disable PWM channel\n\n # Arguments\n\n* `channel` (direction in) - PWM channel (FuriHalPwmOutputId)"]
    pub fn furi_hal_pwm_stop(channel: FuriHalPwmOutputId);
}
extern "C" {
    #[doc = "Set PWM channel parameters\n\n # Arguments\n\n* `channel` (direction in) - PWM channel (FuriHalPwmOutputId)\n * `freq` (direction in) - Frequency in Hz\n * `duty` (direction in) - Duty cycle value in %"]
    pub fn furi_hal_pwm_set_params(channel: FuriHalPwmOutputId, freq: u32, duty: u8);
}
extern "C" {
    #[doc = "Is PWM channel running?\n\n # Arguments\n\n* `channel` (direction in) - PWM channel (FuriHalPwmOutputId)\n # Returns\n\nbool - true if running"]
    pub fn furi_hal_pwm_is_running(channel: FuriHalPwmOutputId) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CdcCallbacks {
    pub tx_ep_callback:
        ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>,
    pub rx_ep_callback:
        ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void)>,
    pub state_callback:
        ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void, state: u8)>,
    pub ctrl_line_callback:
        ::core::option::Option<unsafe extern "C" fn(context: *mut core::ffi::c_void, state: u8)>,
    pub config_callback: ::core::option::Option<
        unsafe extern "C" fn(context: *mut core::ffi::c_void, config: *mut usb_cdc_line_coding),
    >,
}
#[test]
fn bindgen_test_layout_CdcCallbacks() {
    const UNINIT: ::core::mem::MaybeUninit<CdcCallbacks> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<CdcCallbacks>(),
        20usize,
        concat!("Size of: ", stringify!(CdcCallbacks))
    );
    assert_eq!(
        ::core::mem::align_of::<CdcCallbacks>(),
        4usize,
        concat!("Alignment of ", stringify!(CdcCallbacks))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).tx_ep_callback) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(CdcCallbacks),
            "::",
            stringify!(tx_ep_callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).rx_ep_callback) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(CdcCallbacks),
            "::",
            stringify!(rx_ep_callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).state_callback) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(CdcCallbacks),
            "::",
            stringify!(state_callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).ctrl_line_callback) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(CdcCallbacks),
            "::",
            stringify!(ctrl_line_callback)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).config_callback) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(CdcCallbacks),
            "::",
            stringify!(config_callback)
        )
    );
}
extern "C" {
    pub fn furi_hal_cdc_set_callbacks(
        if_num: u8,
        cb: *mut CdcCallbacks,
        context: *mut core::ffi::c_void,
    );
}
extern "C" {
    pub fn furi_hal_cdc_get_port_settings(if_num: u8) -> *mut usb_cdc_line_coding;
}
extern "C" {
    pub fn furi_hal_cdc_get_ctrl_line_state(if_num: u8) -> u8;
}
extern "C" {
    pub fn furi_hal_cdc_send(if_num: u8, buf: *mut u8, len: u16);
}
extern "C" {
    pub fn furi_hal_cdc_receive(if_num: u8, buf: *mut u8, max_len: u16) -> i32;
}
extern "C" {
    pub fn __errno() -> *mut core::ffi::c_int;
}
extern "C" {
    pub fn __cxa_pure_virtual();
}
extern "C" {
    pub fn __clear_cache(arg1: *mut core::ffi::c_void, arg2: *mut core::ffi::c_void);
}
extern "C" {
    pub fn __aeabi_uldivmod(arg1: u64, arg2: u64) -> *mut core::ffi::c_void;
}
extern "C" {
    #[doc = "Init memory pool manager"]
    pub fn furi_hal_memory_init();
}
extern "C" {
    #[doc = "Allocate memory from separate memory pool. That memory can't be freed.\n\n # Arguments\n\n* `size` -\n # Returns\n\nvoid*"]
    pub fn furi_hal_memory_alloc(size: usize) -> *mut core::ffi::c_void;
}
extern "C" {
    #[doc = "Get free memory pool size\n\n # Returns\n\nsize_t"]
    pub fn furi_hal_memory_get_free() -> usize;
}
extern "C" {
    #[doc = "Get max free block size from memory pool\n\n # Returns\n\nsize_t"]
    pub fn furi_hal_memory_max_pool_block() -> usize;
}
pub const FuriHalMpuRegion_FuriHalMpuRegionNULL: FuriHalMpuRegion = 0;
pub const FuriHalMpuRegion_FuriHalMpuRegionMainStack: FuriHalMpuRegion = 1;
pub const FuriHalMpuRegion_FuriHalMpuRegionThreadStack: FuriHalMpuRegion = 2;
pub const FuriHalMpuRegion_FuriHalMpuRegion3: FuriHalMpuRegion = 3;
pub const FuriHalMpuRegion_FuriHalMpuRegion4: FuriHalMpuRegion = 4;
pub const FuriHalMpuRegion_FuriHalMpuRegion5: FuriHalMpuRegion = 5;
pub const FuriHalMpuRegion_FuriHalMpuRegion6: FuriHalMpuRegion = 6;
pub const FuriHalMpuRegion_FuriHalMpuRegion7: FuriHalMpuRegion = 7;
pub type FuriHalMpuRegion = core::ffi::c_uchar;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize32B: FuriHalMPURegionSize = 4;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize64B: FuriHalMPURegionSize = 5;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize128B: FuriHalMPURegionSize = 6;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize256B: FuriHalMPURegionSize = 7;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize512B: FuriHalMPURegionSize = 8;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize1KB: FuriHalMPURegionSize = 9;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize2KB: FuriHalMPURegionSize = 10;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize4KB: FuriHalMPURegionSize = 11;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize8KB: FuriHalMPURegionSize = 12;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize16KB: FuriHalMPURegionSize = 13;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize32KB: FuriHalMPURegionSize = 14;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize64KB: FuriHalMPURegionSize = 15;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize128KB: FuriHalMPURegionSize = 16;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize256KB: FuriHalMPURegionSize = 17;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize512KB: FuriHalMPURegionSize = 18;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize1MB: FuriHalMPURegionSize = 19;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize2MB: FuriHalMPURegionSize = 20;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize4MB: FuriHalMPURegionSize = 21;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize8MB: FuriHalMPURegionSize = 22;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize16MB: FuriHalMPURegionSize = 23;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize32MB: FuriHalMPURegionSize = 24;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize64MB: FuriHalMPURegionSize = 25;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize128MB: FuriHalMPURegionSize = 26;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize256MB: FuriHalMPURegionSize = 27;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize512MB: FuriHalMPURegionSize = 28;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize1GB: FuriHalMPURegionSize = 29;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize2GB: FuriHalMPURegionSize = 30;
pub const FuriHalMPURegionSize_FuriHalMPURegionSize4GB: FuriHalMPURegionSize = 31;
pub type FuriHalMPURegionSize = core::ffi::c_uchar;
extern "C" {
    #[doc = "Enable memory protection unit"]
    pub fn furi_hal_mpu_enable();
}
extern "C" {
    #[doc = "Disable memory protection unit"]
    pub fn furi_hal_mpu_disable();
}
extern "C" {
    pub fn furi_hal_mpu_protect_no_access(
        region: FuriHalMpuRegion,
        address: u32,
        size: FuriHalMPURegionSize,
    );
}
extern "C" {
    pub fn furi_hal_mpu_protect_read_only(
        region: FuriHalMpuRegion,
        address: u32,
        size: FuriHalMPURegionSize,
    );
}
extern "C" {
    pub fn furi_hal_mpu_protect_disable(region: FuriHalMpuRegion);
}
pub const HidU2fEvent_HidU2fDisconnected: HidU2fEvent = 0;
pub const HidU2fEvent_HidU2fConnected: HidU2fEvent = 1;
pub const HidU2fEvent_HidU2fRequest: HidU2fEvent = 2;
pub type HidU2fEvent = core::ffi::c_uchar;
pub type HidU2fCallback =
    ::core::option::Option<unsafe extern "C" fn(ev: HidU2fEvent, context: *mut core::ffi::c_void)>;
extern "C" {
    #[doc = "Get HID U2F connection state\n\n # Returns\n\ntrue / false"]
    pub fn furi_hal_hid_u2f_is_connected() -> bool;
}
extern "C" {
    #[doc = "Set HID U2F event callback\n\n # Arguments\n\n* `cb` - callback\n * `ctx` - callback context"]
    pub fn furi_hal_hid_u2f_set_callback(cb: HidU2fCallback, ctx: *mut core::ffi::c_void);
}
extern "C" {
    #[doc = "Get received U2F HID packet\n"]
    pub fn furi_hal_hid_u2f_get_request(data: *mut u8) -> u32;
}
extern "C" {
    #[doc = "Send U2F HID response packet\n\n # Arguments\n\n* `data` - response data\n * `len` - packet length"]
    pub fn furi_hal_hid_u2f_send_response(data: *mut u8, len: u8);
}