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

/*
 * Copyright (c) 2012 - 2019, Nordic Semiconductor ASA
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, must reproduce the above copyright notice, this list of
 *    conditions and the following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 *
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 *
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 *
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

pub type c_schar = i8;
pub type c_uchar = u8;
pub type c_char = u8;

pub type c_short = i16;
pub type c_ushort = u16;

pub type c_int = i32;
pub type c_uint = u32;

pub type c_long = i32;
pub type c_ulong = u32;

pub type c_longlong = i64;
pub type c_ulonglong = u64;

pub type c_void = core::ffi::c_void;

trait ToAsm {
    fn to_asm(self) -> u32;
}

fn to_asm<T: ToAsm>(t: T) -> u32 {
    t.to_asm()
}

impl ToAsm for u32 {
    fn to_asm(self) -> u32 {
        self
    }
}

impl ToAsm for u16 {
    fn to_asm(self) -> u32 {
        self as u32
    }
}

impl ToAsm for u8 {
    fn to_asm(self) -> u32 {
        self as u32
    }
}

impl ToAsm for i8 {
    fn to_asm(self) -> u32 {
        self as u32
    }
}

impl<T> ToAsm for *const T {
    fn to_asm(self) -> u32 {
        self as u32
    }
}

impl<T> ToAsm for *mut T {
    fn to_asm(self) -> u32 {
        self as u32
    }
}

impl<T: ToAsm> ToAsm for Option<T> {
    fn to_asm(self) -> u32 {
        match self {
            Some(x) => x.to_asm(),
            None => 0,
        }
    }
}

impl<X, R> ToAsm for unsafe extern "C" fn(X) -> R {
    fn to_asm(self) -> u32 {
        self as u32
    }
}

impl<X, Y, R> ToAsm for unsafe extern "C" fn(X, Y) -> R {
    fn to_asm(self) -> u32 {
        self as u32
    }
}

impl<X, Y, Z, R> ToAsm for unsafe extern "C" fn(X, Y, Z) -> R {
    fn to_asm(self) -> u32 {
        self as u32
    }
}

/* automatically generated by rust-bindgen 0.54.1 */

#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage, Align> {
    storage: Storage,
    align: [Align; 0],
}
impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align> {
    #[inline]
    pub const fn new(storage: Storage) -> Self {
        Self { storage, align: [] }
    }
}
impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align>
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);
        }
    }
}
pub const NRF_ERROR_BASE_NUM: u32 = 0;
pub const NRF_ERROR_SDM_BASE_NUM: u32 = 4096;
pub const NRF_ERROR_SOC_BASE_NUM: u32 = 8192;
pub const NRF_ERROR_STK_BASE_NUM: u32 = 12288;
pub const NRF_SUCCESS: u32 = 0;
pub const NRF_ERROR_SVC_HANDLER_MISSING: u32 = 1;
pub const NRF_ERROR_SOFTDEVICE_NOT_ENABLED: u32 = 2;
pub const NRF_ERROR_INTERNAL: u32 = 3;
pub const NRF_ERROR_NO_MEM: u32 = 4;
pub const NRF_ERROR_NOT_FOUND: u32 = 5;
pub const NRF_ERROR_NOT_SUPPORTED: u32 = 6;
pub const NRF_ERROR_INVALID_PARAM: u32 = 7;
pub const NRF_ERROR_INVALID_STATE: u32 = 8;
pub const NRF_ERROR_INVALID_LENGTH: u32 = 9;
pub const NRF_ERROR_INVALID_FLAGS: u32 = 10;
pub const NRF_ERROR_INVALID_DATA: u32 = 11;
pub const NRF_ERROR_DATA_SIZE: u32 = 12;
pub const NRF_ERROR_TIMEOUT: u32 = 13;
pub const NRF_ERROR_NULL: u32 = 14;
pub const NRF_ERROR_FORBIDDEN: u32 = 15;
pub const NRF_ERROR_INVALID_ADDR: u32 = 16;
pub const NRF_ERROR_BUSY: u32 = 17;
pub const NRF_ERROR_CONN_COUNT: u32 = 18;
pub const NRF_ERROR_RESOURCES: u32 = 19;
pub const NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN: u32 = 4096;
pub const NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION: u32 = 4097;
pub const NRF_ERROR_SDM_INCORRECT_CLENR0: u32 = 4098;
pub const BLE_ERROR_NOT_ENABLED: u32 = 12289;
pub const BLE_ERROR_INVALID_CONN_HANDLE: u32 = 12290;
pub const BLE_ERROR_INVALID_ATTR_HANDLE: u32 = 12291;
pub const BLE_ERROR_INVALID_ADV_HANDLE: u32 = 12292;
pub const BLE_ERROR_INVALID_ROLE: u32 = 12293;
pub const BLE_ERROR_BLOCKED_BY_OTHER_LINKS: u32 = 12294;
pub const NRF_L2CAP_ERR_BASE: u32 = 12544;
pub const NRF_GAP_ERR_BASE: u32 = 12800;
pub const NRF_GATTC_ERR_BASE: u32 = 13056;
pub const NRF_GATTS_ERR_BASE: u32 = 13312;
pub const NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN: u32 = 8192;
pub const NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE: u32 = 8193;
pub const NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED: u32 = 8194;
pub const NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN: u32 = 8195;
pub const NRF_ERROR_SOC_POWER_MODE_UNKNOWN: u32 = 8196;
pub const NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN: u32 = 8197;
pub const NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN: u32 = 8198;
pub const NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES: u32 = 8199;
pub const NRF_ERROR_SOC_PPI_INVALID_CHANNEL: u32 = 8200;
pub const NRF_ERROR_SOC_PPI_INVALID_GROUP: u32 = 8201;
pub const SOC_SVC_BASE: u32 = 32;
pub const SOC_SVC_BASE_NOT_AVAILABLE: u32 = 44;
pub const NRF_RADIO_NOTIFICATION_INACTIVE_GUARANTEED_TIME_US: u32 = 62;
pub const NRF_RADIO_MINIMUM_TIMESLOT_LENGTH_EXTENSION_TIME_US: u32 = 200;
pub const NRF_RADIO_MAX_EXTENSION_PROCESSING_TIME_US: u32 = 20;
pub const NRF_RADIO_MIN_EXTENSION_MARGIN_US: u32 = 82;
pub const SOC_ECB_KEY_LENGTH: u32 = 16;
pub const SOC_ECB_CLEARTEXT_LENGTH: u32 = 16;
pub const SOC_ECB_CIPHERTEXT_LENGTH: u32 = 16;
pub const NRF_RADIO_LENGTH_MIN_US: u32 = 100;
pub const NRF_RADIO_LENGTH_MAX_US: u32 = 100000;
pub const NRF_RADIO_DISTANCE_MAX_US: u32 = 127999999;
pub const NRF_RADIO_EARLIEST_TIMEOUT_MAX_US: u32 = 127999999;
pub const NRF_RADIO_START_JITTER_US: u32 = 2;
pub const SD_MAJOR_VERSION: u32 = 7;
pub const SD_MINOR_VERSION: u32 = 0;
pub const SD_BUGFIX_VERSION: u32 = 1;
pub const SD_VARIANT_ID: u32 = 113;
pub const SD_VERSION: u32 = 7000001;
pub const SDM_SVC_BASE: u32 = 16;
pub const SD_UNIQUE_STR_SIZE: u32 = 20;
pub const SDM_INFO_FIELD_INVALID: u32 = 0;
pub const SOFTDEVICE_INFO_STRUCT_OFFSET: u32 = 8192;
pub const SD_INFO_STRUCT_SIZE_OFFSET: u32 = 8192;
pub const SD_SIZE_OFFSET: u32 = 8200;
pub const SD_FWID_OFFSET: u32 = 8204;
pub const SD_ID_OFFSET: u32 = 8208;
pub const SD_VERSION_OFFSET: u32 = 8212;
pub const SD_UNIQUE_STR_OFFSET: u32 = 8216;
pub const SD_FLASH_SIZE: u32 = 110592;
pub const NRF_FAULT_ID_SD_RANGE_START: u32 = 0;
pub const NRF_FAULT_ID_APP_RANGE_START: u32 = 4096;
pub const NRF_FAULT_ID_SD_ASSERT: u32 = 1;
pub const NRF_FAULT_ID_APP_MEMACC: u32 = 4097;
pub const NRF_CLOCK_LF_ACCURACY_250_PPM: u32 = 0;
pub const NRF_CLOCK_LF_ACCURACY_500_PPM: u32 = 1;
pub const NRF_CLOCK_LF_ACCURACY_150_PPM: u32 = 2;
pub const NRF_CLOCK_LF_ACCURACY_100_PPM: u32 = 3;
pub const NRF_CLOCK_LF_ACCURACY_75_PPM: u32 = 4;
pub const NRF_CLOCK_LF_ACCURACY_50_PPM: u32 = 5;
pub const NRF_CLOCK_LF_ACCURACY_30_PPM: u32 = 6;
pub const NRF_CLOCK_LF_ACCURACY_20_PPM: u32 = 7;
pub const NRF_CLOCK_LF_ACCURACY_10_PPM: u32 = 8;
pub const NRF_CLOCK_LF_ACCURACY_5_PPM: u32 = 9;
pub const NRF_CLOCK_LF_ACCURACY_2_PPM: u32 = 10;
pub const NRF_CLOCK_LF_ACCURACY_1_PPM: u32 = 11;
pub const NRF_CLOCK_LF_SRC_RC: u32 = 0;
pub const NRF_CLOCK_LF_SRC_XTAL: u32 = 1;
pub const NRF_CLOCK_LF_SRC_SYNTH: u32 = 2;
pub const BLE_HCI_STATUS_CODE_SUCCESS: u32 = 0;
pub const BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND: u32 = 1;
pub const BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER: u32 = 2;
pub const BLE_HCI_AUTHENTICATION_FAILURE: u32 = 5;
pub const BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING: u32 = 6;
pub const BLE_HCI_MEMORY_CAPACITY_EXCEEDED: u32 = 7;
pub const BLE_HCI_CONNECTION_TIMEOUT: u32 = 8;
pub const BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED: u32 = 12;
pub const BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS: u32 = 18;
pub const BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION: u32 = 19;
pub const BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES: u32 = 20;
pub const BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF: u32 = 21;
pub const BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION: u32 = 22;
pub const BLE_HCI_UNSUPPORTED_REMOTE_FEATURE: u32 = 26;
pub const BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS: u32 = 30;
pub const BLE_HCI_STATUS_CODE_UNSPECIFIED_ERROR: u32 = 31;
pub const BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT: u32 = 34;
pub const BLE_HCI_STATUS_CODE_LMP_ERROR_TRANSACTION_COLLISION: u32 = 35;
pub const BLE_HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED: u32 = 36;
pub const BLE_HCI_INSTANT_PASSED: u32 = 40;
pub const BLE_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED: u32 = 41;
pub const BLE_HCI_DIFFERENT_TRANSACTION_COLLISION: u32 = 42;
pub const BLE_HCI_PARAMETER_OUT_OF_MANDATORY_RANGE: u32 = 48;
pub const BLE_HCI_CONTROLLER_BUSY: u32 = 58;
pub const BLE_HCI_CONN_INTERVAL_UNACCEPTABLE: u32 = 59;
pub const BLE_HCI_DIRECTED_ADVERTISER_TIMEOUT: u32 = 60;
pub const BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE: u32 = 61;
pub const BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED: u32 = 62;
pub const BLE_SVC_BASE: u32 = 96;
pub const BLE_SVC_LAST: u32 = 107;
pub const BLE_GAP_SVC_BASE: u32 = 108;
pub const BLE_GAP_SVC_LAST: u32 = 154;
pub const BLE_GATTC_SVC_BASE: u32 = 155;
pub const BLE_GATTC_SVC_LAST: u32 = 167;
pub const BLE_GATTS_SVC_BASE: u32 = 168;
pub const BLE_GATTS_SVC_LAST: u32 = 183;
pub const BLE_L2CAP_SVC_BASE: u32 = 184;
pub const BLE_L2CAP_SVC_LAST: u32 = 191;
pub const BLE_EVT_INVALID: u32 = 0;
pub const BLE_EVT_BASE: u32 = 1;
pub const BLE_EVT_LAST: u32 = 15;
pub const BLE_GAP_EVT_BASE: u32 = 16;
pub const BLE_GAP_EVT_LAST: u32 = 47;
pub const BLE_GATTC_EVT_BASE: u32 = 48;
pub const BLE_GATTC_EVT_LAST: u32 = 79;
pub const BLE_GATTS_EVT_BASE: u32 = 80;
pub const BLE_GATTS_EVT_LAST: u32 = 111;
pub const BLE_L2CAP_EVT_BASE: u32 = 112;
pub const BLE_L2CAP_EVT_LAST: u32 = 143;
pub const BLE_OPT_INVALID: u32 = 0;
pub const BLE_OPT_BASE: u32 = 1;
pub const BLE_OPT_LAST: u32 = 31;
pub const BLE_GAP_OPT_BASE: u32 = 32;
pub const BLE_GAP_OPT_LAST: u32 = 63;
pub const BLE_GATT_OPT_BASE: u32 = 64;
pub const BLE_GATT_OPT_LAST: u32 = 95;
pub const BLE_GATTC_OPT_BASE: u32 = 96;
pub const BLE_GATTC_OPT_LAST: u32 = 127;
pub const BLE_GATTS_OPT_BASE: u32 = 128;
pub const BLE_GATTS_OPT_LAST: u32 = 159;
pub const BLE_L2CAP_OPT_BASE: u32 = 160;
pub const BLE_L2CAP_OPT_LAST: u32 = 191;
pub const BLE_CFG_INVALID: u32 = 0;
pub const BLE_CFG_BASE: u32 = 1;
pub const BLE_CFG_LAST: u32 = 31;
pub const BLE_CONN_CFG_BASE: u32 = 32;
pub const BLE_CONN_CFG_LAST: u32 = 63;
pub const BLE_GAP_CFG_BASE: u32 = 64;
pub const BLE_GAP_CFG_LAST: u32 = 95;
pub const BLE_GATT_CFG_BASE: u32 = 96;
pub const BLE_GATT_CFG_LAST: u32 = 127;
pub const BLE_GATTC_CFG_BASE: u32 = 128;
pub const BLE_GATTC_CFG_LAST: u32 = 159;
pub const BLE_GATTS_CFG_BASE: u32 = 160;
pub const BLE_GATTS_CFG_LAST: u32 = 191;
pub const BLE_L2CAP_CFG_BASE: u32 = 192;
pub const BLE_L2CAP_CFG_LAST: u32 = 223;
pub const BLE_CONN_HANDLE_INVALID: u32 = 65535;
pub const BLE_CONN_HANDLE_ALL: u32 = 65534;
pub const BLE_UUID_UNKNOWN: u32 = 0;
pub const BLE_UUID_SERVICE_PRIMARY: u32 = 10240;
pub const BLE_UUID_SERVICE_SECONDARY: u32 = 10241;
pub const BLE_UUID_SERVICE_INCLUDE: u32 = 10242;
pub const BLE_UUID_CHARACTERISTIC: u32 = 10243;
pub const BLE_UUID_DESCRIPTOR_CHAR_EXT_PROP: u32 = 10496;
pub const BLE_UUID_DESCRIPTOR_CHAR_USER_DESC: u32 = 10497;
pub const BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG: u32 = 10498;
pub const BLE_UUID_DESCRIPTOR_SERVER_CHAR_CONFIG: u32 = 10499;
pub const BLE_UUID_DESCRIPTOR_CHAR_PRESENTATION_FORMAT: u32 = 10500;
pub const BLE_UUID_DESCRIPTOR_CHAR_AGGREGATE_FORMAT: u32 = 10501;
pub const BLE_UUID_GATT: u32 = 6145;
pub const BLE_UUID_GATT_CHARACTERISTIC_SERVICE_CHANGED: u32 = 10757;
pub const BLE_UUID_GAP: u32 = 6144;
pub const BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME: u32 = 10752;
pub const BLE_UUID_GAP_CHARACTERISTIC_APPEARANCE: u32 = 10753;
pub const BLE_UUID_GAP_CHARACTERISTIC_RECONN_ADDR: u32 = 10755;
pub const BLE_UUID_GAP_CHARACTERISTIC_PPCP: u32 = 10756;
pub const BLE_UUID_GAP_CHARACTERISTIC_CAR: u32 = 10918;
pub const BLE_UUID_GAP_CHARACTERISTIC_RPA_ONLY: u32 = 10953;
pub const BLE_UUID_TYPE_UNKNOWN: u32 = 0;
pub const BLE_UUID_TYPE_BLE: u32 = 1;
pub const BLE_UUID_TYPE_VENDOR_BEGIN: u32 = 2;
pub const BLE_APPEARANCE_UNKNOWN: u32 = 0;
pub const BLE_APPEARANCE_GENERIC_PHONE: u32 = 64;
pub const BLE_APPEARANCE_GENERIC_COMPUTER: u32 = 128;
pub const BLE_APPEARANCE_GENERIC_WATCH: u32 = 192;
pub const BLE_APPEARANCE_WATCH_SPORTS_WATCH: u32 = 193;
pub const BLE_APPEARANCE_GENERIC_CLOCK: u32 = 256;
pub const BLE_APPEARANCE_GENERIC_DISPLAY: u32 = 320;
pub const BLE_APPEARANCE_GENERIC_REMOTE_CONTROL: u32 = 384;
pub const BLE_APPEARANCE_GENERIC_EYE_GLASSES: u32 = 448;
pub const BLE_APPEARANCE_GENERIC_TAG: u32 = 512;
pub const BLE_APPEARANCE_GENERIC_KEYRING: u32 = 576;
pub const BLE_APPEARANCE_GENERIC_MEDIA_PLAYER: u32 = 640;
pub const BLE_APPEARANCE_GENERIC_BARCODE_SCANNER: u32 = 704;
pub const BLE_APPEARANCE_GENERIC_THERMOMETER: u32 = 768;
pub const BLE_APPEARANCE_THERMOMETER_EAR: u32 = 769;
pub const BLE_APPEARANCE_GENERIC_HEART_RATE_SENSOR: u32 = 832;
pub const BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT: u32 = 833;
pub const BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE: u32 = 896;
pub const BLE_APPEARANCE_BLOOD_PRESSURE_ARM: u32 = 897;
pub const BLE_APPEARANCE_BLOOD_PRESSURE_WRIST: u32 = 898;
pub const BLE_APPEARANCE_GENERIC_HID: u32 = 960;
pub const BLE_APPEARANCE_HID_KEYBOARD: u32 = 961;
pub const BLE_APPEARANCE_HID_MOUSE: u32 = 962;
pub const BLE_APPEARANCE_HID_JOYSTICK: u32 = 963;
pub const BLE_APPEARANCE_HID_GAMEPAD: u32 = 964;
pub const BLE_APPEARANCE_HID_DIGITIZERSUBTYPE: u32 = 965;
pub const BLE_APPEARANCE_HID_CARD_READER: u32 = 966;
pub const BLE_APPEARANCE_HID_DIGITAL_PEN: u32 = 967;
pub const BLE_APPEARANCE_HID_BARCODE: u32 = 968;
pub const BLE_APPEARANCE_GENERIC_GLUCOSE_METER: u32 = 1024;
pub const BLE_APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR: u32 = 1088;
pub const BLE_APPEARANCE_RUNNING_WALKING_SENSOR_IN_SHOE: u32 = 1089;
pub const BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_SHOE: u32 = 1090;
pub const BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_HIP: u32 = 1091;
pub const BLE_APPEARANCE_GENERIC_CYCLING: u32 = 1152;
pub const BLE_APPEARANCE_CYCLING_CYCLING_COMPUTER: u32 = 1153;
pub const BLE_APPEARANCE_CYCLING_SPEED_SENSOR: u32 = 1154;
pub const BLE_APPEARANCE_CYCLING_CADENCE_SENSOR: u32 = 1155;
pub const BLE_APPEARANCE_CYCLING_POWER_SENSOR: u32 = 1156;
pub const BLE_APPEARANCE_CYCLING_SPEED_CADENCE_SENSOR: u32 = 1157;
pub const BLE_APPEARANCE_GENERIC_PULSE_OXIMETER: u32 = 3136;
pub const BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP: u32 = 3137;
pub const BLE_APPEARANCE_PULSE_OXIMETER_WRIST_WORN: u32 = 3138;
pub const BLE_APPEARANCE_GENERIC_WEIGHT_SCALE: u32 = 3200;
pub const BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS_ACT: u32 = 5184;
pub const BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_DISP: u32 = 5185;
pub const BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_DISP: u32 = 5186;
pub const BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD: u32 = 5187;
pub const BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD: u32 = 5188;
pub const BLE_GATT_ATT_MTU_DEFAULT: u32 = 23;
pub const BLE_GATT_HANDLE_INVALID: u32 = 0;
pub const BLE_GATT_HANDLE_START: u32 = 1;
pub const BLE_GATT_HANDLE_END: u32 = 65535;
pub const BLE_GATT_TIMEOUT_SRC_PROTOCOL: u32 = 0;
pub const BLE_GATT_OP_INVALID: u32 = 0;
pub const BLE_GATT_OP_WRITE_REQ: u32 = 1;
pub const BLE_GATT_OP_WRITE_CMD: u32 = 2;
pub const BLE_GATT_OP_SIGN_WRITE_CMD: u32 = 3;
pub const BLE_GATT_OP_PREP_WRITE_REQ: u32 = 4;
pub const BLE_GATT_OP_EXEC_WRITE_REQ: u32 = 5;
pub const BLE_GATT_EXEC_WRITE_FLAG_PREPARED_CANCEL: u32 = 0;
pub const BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE: u32 = 1;
pub const BLE_GATT_HVX_INVALID: u32 = 0;
pub const BLE_GATT_HVX_NOTIFICATION: u32 = 1;
pub const BLE_GATT_HVX_INDICATION: u32 = 2;
pub const BLE_GATT_STATUS_SUCCESS: u32 = 0;
pub const BLE_GATT_STATUS_UNKNOWN: u32 = 1;
pub const BLE_GATT_STATUS_ATTERR_INVALID: u32 = 256;
pub const BLE_GATT_STATUS_ATTERR_INVALID_HANDLE: u32 = 257;
pub const BLE_GATT_STATUS_ATTERR_READ_NOT_PERMITTED: u32 = 258;
pub const BLE_GATT_STATUS_ATTERR_WRITE_NOT_PERMITTED: u32 = 259;
pub const BLE_GATT_STATUS_ATTERR_INVALID_PDU: u32 = 260;
pub const BLE_GATT_STATUS_ATTERR_INSUF_AUTHENTICATION: u32 = 261;
pub const BLE_GATT_STATUS_ATTERR_REQUEST_NOT_SUPPORTED: u32 = 262;
pub const BLE_GATT_STATUS_ATTERR_INVALID_OFFSET: u32 = 263;
pub const BLE_GATT_STATUS_ATTERR_INSUF_AUTHORIZATION: u32 = 264;
pub const BLE_GATT_STATUS_ATTERR_PREPARE_QUEUE_FULL: u32 = 265;
pub const BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND: u32 = 266;
pub const BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_LONG: u32 = 267;
pub const BLE_GATT_STATUS_ATTERR_INSUF_ENC_KEY_SIZE: u32 = 268;
pub const BLE_GATT_STATUS_ATTERR_INVALID_ATT_VAL_LENGTH: u32 = 269;
pub const BLE_GATT_STATUS_ATTERR_UNLIKELY_ERROR: u32 = 270;
pub const BLE_GATT_STATUS_ATTERR_INSUF_ENCRYPTION: u32 = 271;
pub const BLE_GATT_STATUS_ATTERR_UNSUPPORTED_GROUP_TYPE: u32 = 272;
pub const BLE_GATT_STATUS_ATTERR_INSUF_RESOURCES: u32 = 273;
pub const BLE_GATT_STATUS_ATTERR_RFU_RANGE1_BEGIN: u32 = 274;
pub const BLE_GATT_STATUS_ATTERR_RFU_RANGE1_END: u32 = 383;
pub const BLE_GATT_STATUS_ATTERR_APP_BEGIN: u32 = 384;
pub const BLE_GATT_STATUS_ATTERR_APP_END: u32 = 415;
pub const BLE_GATT_STATUS_ATTERR_RFU_RANGE2_BEGIN: u32 = 416;
pub const BLE_GATT_STATUS_ATTERR_RFU_RANGE2_END: u32 = 479;
pub const BLE_GATT_STATUS_ATTERR_RFU_RANGE3_BEGIN: u32 = 480;
pub const BLE_GATT_STATUS_ATTERR_RFU_RANGE3_END: u32 = 508;
pub const BLE_GATT_STATUS_ATTERR_CPS_WRITE_REQ_REJECTED: u32 = 508;
pub const BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR: u32 = 509;
pub const BLE_GATT_STATUS_ATTERR_CPS_PROC_ALR_IN_PROG: u32 = 510;
pub const BLE_GATT_STATUS_ATTERR_CPS_OUT_OF_RANGE: u32 = 511;
pub const BLE_GATT_CPF_FORMAT_RFU: u32 = 0;
pub const BLE_GATT_CPF_FORMAT_BOOLEAN: u32 = 1;
pub const BLE_GATT_CPF_FORMAT_2BIT: u32 = 2;
pub const BLE_GATT_CPF_FORMAT_NIBBLE: u32 = 3;
pub const BLE_GATT_CPF_FORMAT_UINT8: u32 = 4;
pub const BLE_GATT_CPF_FORMAT_UINT12: u32 = 5;
pub const BLE_GATT_CPF_FORMAT_UINT16: u32 = 6;
pub const BLE_GATT_CPF_FORMAT_UINT24: u32 = 7;
pub const BLE_GATT_CPF_FORMAT_UINT32: u32 = 8;
pub const BLE_GATT_CPF_FORMAT_UINT48: u32 = 9;
pub const BLE_GATT_CPF_FORMAT_UINT64: u32 = 10;
pub const BLE_GATT_CPF_FORMAT_UINT128: u32 = 11;
pub const BLE_GATT_CPF_FORMAT_SINT8: u32 = 12;
pub const BLE_GATT_CPF_FORMAT_SINT12: u32 = 13;
pub const BLE_GATT_CPF_FORMAT_SINT16: u32 = 14;
pub const BLE_GATT_CPF_FORMAT_SINT24: u32 = 15;
pub const BLE_GATT_CPF_FORMAT_SINT32: u32 = 16;
pub const BLE_GATT_CPF_FORMAT_SINT48: u32 = 17;
pub const BLE_GATT_CPF_FORMAT_SINT64: u32 = 18;
pub const BLE_GATT_CPF_FORMAT_SINT128: u32 = 19;
pub const BLE_GATT_CPF_FORMAT_FLOAT32: u32 = 20;
pub const BLE_GATT_CPF_FORMAT_FLOAT64: u32 = 21;
pub const BLE_GATT_CPF_FORMAT_SFLOAT: u32 = 22;
pub const BLE_GATT_CPF_FORMAT_FLOAT: u32 = 23;
pub const BLE_GATT_CPF_FORMAT_DUINT16: u32 = 24;
pub const BLE_GATT_CPF_FORMAT_UTF8S: u32 = 25;
pub const BLE_GATT_CPF_FORMAT_UTF16S: u32 = 26;
pub const BLE_GATT_CPF_FORMAT_STRUCT: u32 = 27;
pub const BLE_GATT_CPF_NAMESPACE_BTSIG: u32 = 1;
pub const BLE_GATT_CPF_NAMESPACE_DESCRIPTION_UNKNOWN: u32 = 0;
pub const MBR_SVC_BASE: u32 = 24;
pub const MBR_PAGE_SIZE_IN_WORDS: u32 = 1024;
pub const MBR_SIZE: u32 = 4096;
pub const MBR_BOOTLOADER_ADDR: u32 = 4088;
pub const MBR_PARAM_PAGE_ADDR: u32 = 4092;
pub const BLE_ERROR_GAP_UUID_LIST_MISMATCH: u32 = 12800;
pub const BLE_ERROR_GAP_DISCOVERABLE_WITH_WHITELIST: u32 = 12801;
pub const BLE_ERROR_GAP_INVALID_BLE_ADDR: u32 = 12802;
pub const BLE_ERROR_GAP_WHITELIST_IN_USE: u32 = 12803;
pub const BLE_ERROR_GAP_DEVICE_IDENTITIES_IN_USE: u32 = 12804;
pub const BLE_ERROR_GAP_DEVICE_IDENTITIES_DUPLICATE: u32 = 12805;
pub const BLE_GAP_ROLE_INVALID: u32 = 0;
pub const BLE_GAP_ROLE_PERIPH: u32 = 1;
pub const BLE_GAP_TIMEOUT_SRC_CONN: u32 = 2;
pub const BLE_GAP_TIMEOUT_SRC_AUTH_PAYLOAD: u32 = 3;
pub const BLE_GAP_ADDR_TYPE_PUBLIC: u32 = 0;
pub const BLE_GAP_ADDR_TYPE_RANDOM_STATIC: u32 = 1;
pub const BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE: u32 = 2;
pub const BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE: u32 = 3;
pub const BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S: u32 = 900;
pub const BLE_GAP_MAX_PRIVATE_ADDR_CYCLE_INTERVAL_S: u32 = 41400;
pub const BLE_GAP_ADDR_LEN: u32 = 6;
pub const BLE_GAP_PRIVACY_MODE_OFF: u32 = 0;
pub const BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY: u32 = 1;
pub const BLE_GAP_PRIVACY_MODE_NETWORK_PRIVACY: u32 = 2;
pub const BLE_GAP_POWER_LEVEL_INVALID: u32 = 127;
pub const BLE_GAP_ADV_SET_HANDLE_NOT_SET: u32 = 255;
pub const BLE_GAP_ADV_SET_COUNT_DEFAULT: u32 = 1;
pub const BLE_GAP_ADV_SET_COUNT_MAX: u32 = 1;
pub const BLE_GAP_ADV_SET_DATA_SIZE_MAX: u32 = 31;
pub const BLE_GAP_ADV_REPORT_SET_ID_NOT_AVAILABLE: u32 = 255;
pub const BLE_GAP_EVT_ADV_SET_TERMINATED_REASON_TIMEOUT: u32 = 1;
pub const BLE_GAP_EVT_ADV_SET_TERMINATED_REASON_LIMIT_REACHED: u32 = 2;
pub const BLE_GAP_AD_TYPE_FLAGS: u32 = 1;
pub const BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_MORE_AVAILABLE: u32 = 2;
pub const BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_COMPLETE: u32 = 3;
pub const BLE_GAP_AD_TYPE_32BIT_SERVICE_UUID_MORE_AVAILABLE: u32 = 4;
pub const BLE_GAP_AD_TYPE_32BIT_SERVICE_UUID_COMPLETE: u32 = 5;
pub const BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_MORE_AVAILABLE: u32 = 6;
pub const BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE: u32 = 7;
pub const BLE_GAP_AD_TYPE_SHORT_LOCAL_NAME: u32 = 8;
pub const BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME: u32 = 9;
pub const BLE_GAP_AD_TYPE_TX_POWER_LEVEL: u32 = 10;
pub const BLE_GAP_AD_TYPE_CLASS_OF_DEVICE: u32 = 13;
pub const BLE_GAP_AD_TYPE_SIMPLE_PAIRING_HASH_C: u32 = 14;
pub const BLE_GAP_AD_TYPE_SIMPLE_PAIRING_RANDOMIZER_R: u32 = 15;
pub const BLE_GAP_AD_TYPE_SECURITY_MANAGER_TK_VALUE: u32 = 16;
pub const BLE_GAP_AD_TYPE_SECURITY_MANAGER_OOB_FLAGS: u32 = 17;
pub const BLE_GAP_AD_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE: u32 = 18;
pub const BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_16BIT: u32 = 20;
pub const BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_128BIT: u32 = 21;
pub const BLE_GAP_AD_TYPE_SERVICE_DATA: u32 = 22;
pub const BLE_GAP_AD_TYPE_PUBLIC_TARGET_ADDRESS: u32 = 23;
pub const BLE_GAP_AD_TYPE_RANDOM_TARGET_ADDRESS: u32 = 24;
pub const BLE_GAP_AD_TYPE_APPEARANCE: u32 = 25;
pub const BLE_GAP_AD_TYPE_ADVERTISING_INTERVAL: u32 = 26;
pub const BLE_GAP_AD_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS: u32 = 27;
pub const BLE_GAP_AD_TYPE_LE_ROLE: u32 = 28;
pub const BLE_GAP_AD_TYPE_SIMPLE_PAIRING_HASH_C256: u32 = 29;
pub const BLE_GAP_AD_TYPE_SIMPLE_PAIRING_RANDOMIZER_R256: u32 = 30;
pub const BLE_GAP_AD_TYPE_SERVICE_DATA_32BIT_UUID: u32 = 32;
pub const BLE_GAP_AD_TYPE_SERVICE_DATA_128BIT_UUID: u32 = 33;
pub const BLE_GAP_AD_TYPE_LESC_CONFIRMATION_VALUE: u32 = 34;
pub const BLE_GAP_AD_TYPE_LESC_RANDOM_VALUE: u32 = 35;
pub const BLE_GAP_AD_TYPE_URI: u32 = 36;
pub const BLE_GAP_AD_TYPE_3D_INFORMATION_DATA: u32 = 61;
pub const BLE_GAP_AD_TYPE_MANUFACTURER_SPECIFIC_DATA: u32 = 255;
pub const BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE: u32 = 1;
pub const BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE: u32 = 2;
pub const BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED: u32 = 4;
pub const BLE_GAP_ADV_FLAG_LE_BR_EDR_CONTROLLER: u32 = 8;
pub const BLE_GAP_ADV_FLAG_LE_BR_EDR_HOST: u32 = 16;
pub const BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE: u32 = 5;
pub const BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE: u32 = 6;
pub const BLE_GAP_ADV_INTERVAL_MIN: u32 = 32;
pub const BLE_GAP_ADV_INTERVAL_MAX: u32 = 16384;
pub const BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED: u32 = 1;
pub const BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE: u32 = 2;
pub const BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED: u32 = 3;
pub const BLE_GAP_ADV_TYPE_NONCONNECTABLE_SCANNABLE_UNDIRECTED: u32 = 4;
pub const BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED: u32 = 5;
pub const BLE_GAP_ADV_FP_ANY: u32 = 0;
pub const BLE_GAP_ADV_FP_FILTER_SCANREQ: u32 = 1;
pub const BLE_GAP_ADV_FP_FILTER_CONNREQ: u32 = 2;
pub const BLE_GAP_ADV_FP_FILTER_BOTH: u32 = 3;
pub const BLE_GAP_ADV_TIMEOUT_HIGH_DUTY_MAX: u32 = 128;
pub const BLE_GAP_ADV_TIMEOUT_LIMITED_MAX: u32 = 18000;
pub const BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED: u32 = 0;
pub const BLE_GAP_DISC_MODE_NOT_DISCOVERABLE: u32 = 0;
pub const BLE_GAP_DISC_MODE_LIMITED: u32 = 1;
pub const BLE_GAP_DISC_MODE_GENERAL: u32 = 2;
pub const BLE_GAP_IO_CAPS_DISPLAY_ONLY: u32 = 0;
pub const BLE_GAP_IO_CAPS_DISPLAY_YESNO: u32 = 1;
pub const BLE_GAP_IO_CAPS_KEYBOARD_ONLY: u32 = 2;
pub const BLE_GAP_IO_CAPS_NONE: u32 = 3;
pub const BLE_GAP_IO_CAPS_KEYBOARD_DISPLAY: u32 = 4;
pub const BLE_GAP_AUTH_KEY_TYPE_NONE: u32 = 0;
pub const BLE_GAP_AUTH_KEY_TYPE_PASSKEY: u32 = 1;
pub const BLE_GAP_AUTH_KEY_TYPE_OOB: u32 = 2;
pub const BLE_GAP_KP_NOT_TYPE_PASSKEY_START: u32 = 0;
pub const BLE_GAP_KP_NOT_TYPE_PASSKEY_DIGIT_IN: u32 = 1;
pub const BLE_GAP_KP_NOT_TYPE_PASSKEY_DIGIT_OUT: u32 = 2;
pub const BLE_GAP_KP_NOT_TYPE_PASSKEY_CLEAR: u32 = 3;
pub const BLE_GAP_KP_NOT_TYPE_PASSKEY_END: u32 = 4;
pub const BLE_GAP_SEC_STATUS_SUCCESS: u32 = 0;
pub const BLE_GAP_SEC_STATUS_TIMEOUT: u32 = 1;
pub const BLE_GAP_SEC_STATUS_PDU_INVALID: u32 = 2;
pub const BLE_GAP_SEC_STATUS_RFU_RANGE1_BEGIN: u32 = 3;
pub const BLE_GAP_SEC_STATUS_RFU_RANGE1_END: u32 = 128;
pub const BLE_GAP_SEC_STATUS_PASSKEY_ENTRY_FAILED: u32 = 129;
pub const BLE_GAP_SEC_STATUS_OOB_NOT_AVAILABLE: u32 = 130;
pub const BLE_GAP_SEC_STATUS_AUTH_REQ: u32 = 131;
pub const BLE_GAP_SEC_STATUS_CONFIRM_VALUE: u32 = 132;
pub const BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP: u32 = 133;
pub const BLE_GAP_SEC_STATUS_ENC_KEY_SIZE: u32 = 134;
pub const BLE_GAP_SEC_STATUS_SMP_CMD_UNSUPPORTED: u32 = 135;
pub const BLE_GAP_SEC_STATUS_UNSPECIFIED: u32 = 136;
pub const BLE_GAP_SEC_STATUS_REPEATED_ATTEMPTS: u32 = 137;
pub const BLE_GAP_SEC_STATUS_INVALID_PARAMS: u32 = 138;
pub const BLE_GAP_SEC_STATUS_DHKEY_FAILURE: u32 = 139;
pub const BLE_GAP_SEC_STATUS_NUM_COMP_FAILURE: u32 = 140;
pub const BLE_GAP_SEC_STATUS_BR_EDR_IN_PROG: u32 = 141;
pub const BLE_GAP_SEC_STATUS_X_TRANS_KEY_DISALLOWED: u32 = 142;
pub const BLE_GAP_SEC_STATUS_RFU_RANGE2_BEGIN: u32 = 143;
pub const BLE_GAP_SEC_STATUS_RFU_RANGE2_END: u32 = 255;
pub const BLE_GAP_SEC_STATUS_SOURCE_LOCAL: u32 = 0;
pub const BLE_GAP_SEC_STATUS_SOURCE_REMOTE: u32 = 1;
pub const BLE_GAP_CP_MIN_CONN_INTVL_NONE: u32 = 65535;
pub const BLE_GAP_CP_MIN_CONN_INTVL_MIN: u32 = 6;
pub const BLE_GAP_CP_MIN_CONN_INTVL_MAX: u32 = 3200;
pub const BLE_GAP_CP_MAX_CONN_INTVL_NONE: u32 = 65535;
pub const BLE_GAP_CP_MAX_CONN_INTVL_MIN: u32 = 6;
pub const BLE_GAP_CP_MAX_CONN_INTVL_MAX: u32 = 3200;
pub const BLE_GAP_CP_SLAVE_LATENCY_MAX: u32 = 499;
pub const BLE_GAP_CP_CONN_SUP_TIMEOUT_NONE: u32 = 65535;
pub const BLE_GAP_CP_CONN_SUP_TIMEOUT_MIN: u32 = 10;
pub const BLE_GAP_CP_CONN_SUP_TIMEOUT_MAX: u32 = 3200;
pub const BLE_GAP_DEVNAME_DEFAULT: &'static [u8; 6usize] = b"nRF5x\0";
pub const BLE_GAP_DEVNAME_DEFAULT_LEN: u32 = 31;
pub const BLE_GAP_DEVNAME_MAX_LEN: u32 = 248;
pub const BLE_GAP_RSSI_THRESHOLD_INVALID: u32 = 255;
pub const BLE_GAP_PHY_AUTO: u32 = 0;
pub const BLE_GAP_PHY_1MBPS: u32 = 1;
pub const BLE_GAP_PHY_2MBPS: u32 = 2;
pub const BLE_GAP_PHY_CODED: u32 = 4;
pub const BLE_GAP_PHY_NOT_SET: u32 = 255;
pub const BLE_GAP_PHYS_SUPPORTED: u32 = 3;
pub const BLE_GAP_SEC_RAND_LEN: u32 = 8;
pub const BLE_GAP_SEC_KEY_LEN: u32 = 16;
pub const BLE_GAP_LESC_P256_PK_LEN: u32 = 64;
pub const BLE_GAP_LESC_DHKEY_LEN: u32 = 32;
pub const BLE_GAP_PASSKEY_LEN: u32 = 6;
pub const BLE_GAP_WHITELIST_ADDR_MAX_COUNT: u32 = 8;
pub const BLE_GAP_DEVICE_IDENTITIES_MAX_COUNT: u32 = 8;
pub const BLE_GAP_CONN_COUNT_DEFAULT: u32 = 1;
pub const BLE_GAP_EVENT_LENGTH_MIN: u32 = 2;
pub const BLE_GAP_EVENT_LENGTH_DEFAULT: u32 = 3;
pub const BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT: u32 = 1;
pub const BLE_GAP_ROLE_COUNT_COMBINED_MAX: u32 = 20;
pub const BLE_GAP_DATA_LENGTH_AUTO: u32 = 0;
pub const BLE_GAP_AUTH_PAYLOAD_TIMEOUT_MAX: u32 = 48000;
pub const BLE_GAP_AUTH_PAYLOAD_TIMEOUT_MIN: u32 = 1;
pub const BLE_GAP_SEC_MODE: u32 = 0;
pub const BLE_GAP_CHAR_INCL_CONFIG_INCLUDE: u32 = 0;
pub const BLE_GAP_CHAR_INCL_CONFIG_EXCLUDE_WITH_SPACE: u32 = 1;
pub const BLE_GAP_CHAR_INCL_CONFIG_EXCLUDE_WITHOUT_SPACE: u32 = 2;
pub const BLE_GAP_PPCP_INCL_CONFIG_DEFAULT: u32 = 0;
pub const BLE_GAP_CAR_INCL_CONFIG_DEFAULT: u32 = 0;
pub const BLE_L2CAP_CH_COUNT_MAX: u32 = 64;
pub const BLE_L2CAP_MTU_MIN: u32 = 23;
pub const BLE_L2CAP_MPS_MIN: u32 = 23;
pub const BLE_L2CAP_CID_INVALID: u32 = 0;
pub const BLE_L2CAP_CREDITS_DEFAULT: u32 = 1;
pub const BLE_L2CAP_CH_SETUP_REFUSED_SRC_LOCAL: u32 = 1;
pub const BLE_L2CAP_CH_SETUP_REFUSED_SRC_REMOTE: u32 = 2;
pub const BLE_L2CAP_CH_STATUS_CODE_SUCCESS: u32 = 0;
pub const BLE_L2CAP_CH_STATUS_CODE_LE_PSM_NOT_SUPPORTED: u32 = 2;
pub const BLE_L2CAP_CH_STATUS_CODE_NO_RESOURCES: u32 = 4;
pub const BLE_L2CAP_CH_STATUS_CODE_INSUFF_AUTHENTICATION: u32 = 5;
pub const BLE_L2CAP_CH_STATUS_CODE_INSUFF_AUTHORIZATION: u32 = 6;
pub const BLE_L2CAP_CH_STATUS_CODE_INSUFF_ENC_KEY_SIZE: u32 = 7;
pub const BLE_L2CAP_CH_STATUS_CODE_INSUFF_ENC: u32 = 8;
pub const BLE_L2CAP_CH_STATUS_CODE_INVALID_SCID: u32 = 9;
pub const BLE_L2CAP_CH_STATUS_CODE_SCID_ALLOCATED: u32 = 10;
pub const BLE_L2CAP_CH_STATUS_CODE_UNACCEPTABLE_PARAMS: u32 = 11;
pub const BLE_L2CAP_CH_STATUS_CODE_NOT_UNDERSTOOD: u32 = 32768;
pub const BLE_L2CAP_CH_STATUS_CODE_TIMEOUT: u32 = 49152;
pub const BLE_ERROR_GATTC_PROC_NOT_PERMITTED: u32 = 13056;
pub const BLE_GATTC_ATTR_INFO_FORMAT_16BIT: u32 = 1;
pub const BLE_GATTC_ATTR_INFO_FORMAT_128BIT: u32 = 2;
pub const BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT: u32 = 1;
pub const BLE_ERROR_GATTS_INVALID_ATTR_TYPE: u32 = 13312;
pub const BLE_ERROR_GATTS_SYS_ATTR_MISSING: u32 = 13313;
pub const BLE_GATTS_FIX_ATTR_LEN_MAX: u32 = 510;
pub const BLE_GATTS_VAR_ATTR_LEN_MAX: u32 = 512;
pub const BLE_GATTS_SRVC_TYPE_INVALID: u32 = 0;
pub const BLE_GATTS_SRVC_TYPE_PRIMARY: u32 = 1;
pub const BLE_GATTS_SRVC_TYPE_SECONDARY: u32 = 2;
pub const BLE_GATTS_ATTR_TYPE_INVALID: u32 = 0;
pub const BLE_GATTS_ATTR_TYPE_PRIM_SRVC_DECL: u32 = 1;
pub const BLE_GATTS_ATTR_TYPE_SEC_SRVC_DECL: u32 = 2;
pub const BLE_GATTS_ATTR_TYPE_INC_DECL: u32 = 3;
pub const BLE_GATTS_ATTR_TYPE_CHAR_DECL: u32 = 4;
pub const BLE_GATTS_ATTR_TYPE_CHAR_VAL: u32 = 5;
pub const BLE_GATTS_ATTR_TYPE_DESC: u32 = 6;
pub const BLE_GATTS_ATTR_TYPE_OTHER: u32 = 7;
pub const BLE_GATTS_OP_INVALID: u32 = 0;
pub const BLE_GATTS_OP_WRITE_REQ: u32 = 1;
pub const BLE_GATTS_OP_WRITE_CMD: u32 = 2;
pub const BLE_GATTS_OP_SIGN_WRITE_CMD: u32 = 3;
pub const BLE_GATTS_OP_PREP_WRITE_REQ: u32 = 4;
pub const BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL: u32 = 5;
pub const BLE_GATTS_OP_EXEC_WRITE_REQ_NOW: u32 = 6;
pub const BLE_GATTS_VLOC_INVALID: u32 = 0;
pub const BLE_GATTS_VLOC_STACK: u32 = 1;
pub const BLE_GATTS_VLOC_USER: u32 = 2;
pub const BLE_GATTS_AUTHORIZE_TYPE_INVALID: u32 = 0;
pub const BLE_GATTS_AUTHORIZE_TYPE_READ: u32 = 1;
pub const BLE_GATTS_AUTHORIZE_TYPE_WRITE: u32 = 2;
pub const BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS: u32 = 1;
pub const BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS: u32 = 2;
pub const BLE_GATTS_SERVICE_CHANGED_DEFAULT: u32 = 1;
pub const BLE_GATTS_ATTR_TAB_SIZE_MIN: u32 = 248;
pub const BLE_GATTS_ATTR_TAB_SIZE_DEFAULT: u32 = 1408;
pub const BLE_GATTS_HVN_TX_QUEUE_SIZE_DEFAULT: u32 = 1;
pub const BLE_EVT_PTR_ALIGNMENT: u32 = 4;
pub const BLE_USER_MEM_TYPE_INVALID: u32 = 0;
pub const BLE_USER_MEM_TYPE_GATTS_QUEUED_WRITES: u32 = 1;
pub const BLE_UUID_VS_COUNT_DEFAULT: u32 = 10;
pub const BLE_UUID_VS_COUNT_MAX: u32 = 254;
pub const BLE_CONN_CFG_TAG_DEFAULT: u32 = 0;
pub const SD_TIMERS_USED: u32 = 1;
pub const SD_SWI_USED: u32 = 54;
pub type int_least64_t = i64;
pub type uint_least64_t = u64;
pub type int_fast64_t = i64;
pub type uint_fast64_t = u64;
pub type int_least32_t = i32;
pub type uint_least32_t = u32;
pub type int_fast32_t = i32;
pub type uint_fast32_t = u32;
pub type int_least16_t = i16;
pub type uint_least16_t = u16;
pub type int_fast16_t = i16;
pub type uint_fast16_t = u16;
pub type int_least8_t = i8;
pub type uint_least8_t = u8;
pub type int_fast8_t = i8;
pub type uint_fast8_t = u8;
pub type intmax_t = self::c_longlong;
pub type uintmax_t = self::c_ulonglong;
pub const NRF_SOC_SVCS_SD_PPI_CHANNEL_ENABLE_GET: NRF_SOC_SVCS = 32;
pub const NRF_SOC_SVCS_SD_PPI_CHANNEL_ENABLE_SET: NRF_SOC_SVCS = 33;
pub const NRF_SOC_SVCS_SD_PPI_CHANNEL_ENABLE_CLR: NRF_SOC_SVCS = 34;
pub const NRF_SOC_SVCS_SD_PPI_CHANNEL_ASSIGN: NRF_SOC_SVCS = 35;
pub const NRF_SOC_SVCS_SD_PPI_GROUP_TASK_ENABLE: NRF_SOC_SVCS = 36;
pub const NRF_SOC_SVCS_SD_PPI_GROUP_TASK_DISABLE: NRF_SOC_SVCS = 37;
pub const NRF_SOC_SVCS_SD_PPI_GROUP_ASSIGN: NRF_SOC_SVCS = 38;
pub const NRF_SOC_SVCS_SD_PPI_GROUP_GET: NRF_SOC_SVCS = 39;
pub const NRF_SOC_SVCS_SD_FLASH_PAGE_ERASE: NRF_SOC_SVCS = 40;
pub const NRF_SOC_SVCS_SD_FLASH_WRITE: NRF_SOC_SVCS = 41;
pub const NRF_SOC_SVCS_SD_FLASH_PROTECT: NRF_SOC_SVCS = 42;
pub const NRF_SOC_SVCS_SD_PROTECTED_REGISTER_WRITE: NRF_SOC_SVCS = 43;
pub const NRF_SOC_SVCS_SD_MUTEX_NEW: NRF_SOC_SVCS = 44;
pub const NRF_SOC_SVCS_SD_MUTEX_ACQUIRE: NRF_SOC_SVCS = 45;
pub const NRF_SOC_SVCS_SD_MUTEX_RELEASE: NRF_SOC_SVCS = 46;
pub const NRF_SOC_SVCS_SD_RAND_APPLICATION_POOL_CAPACITY_GET: NRF_SOC_SVCS = 47;
pub const NRF_SOC_SVCS_SD_RAND_APPLICATION_BYTES_AVAILABLE_GET: NRF_SOC_SVCS = 48;
pub const NRF_SOC_SVCS_SD_RAND_APPLICATION_VECTOR_GET: NRF_SOC_SVCS = 49;
pub const NRF_SOC_SVCS_SD_POWER_MODE_SET: NRF_SOC_SVCS = 50;
pub const NRF_SOC_SVCS_SD_POWER_SYSTEM_OFF: NRF_SOC_SVCS = 51;
pub const NRF_SOC_SVCS_SD_POWER_RESET_REASON_GET: NRF_SOC_SVCS = 52;
pub const NRF_SOC_SVCS_SD_POWER_RESET_REASON_CLR: NRF_SOC_SVCS = 53;
pub const NRF_SOC_SVCS_SD_POWER_POF_ENABLE: NRF_SOC_SVCS = 54;
pub const NRF_SOC_SVCS_SD_POWER_POF_THRESHOLD_SET: NRF_SOC_SVCS = 55;
pub const NRF_SOC_SVCS_SD_POWER_RAM_POWER_SET: NRF_SOC_SVCS = 57;
pub const NRF_SOC_SVCS_SD_POWER_RAM_POWER_CLR: NRF_SOC_SVCS = 58;
pub const NRF_SOC_SVCS_SD_POWER_RAM_POWER_GET: NRF_SOC_SVCS = 59;
pub const NRF_SOC_SVCS_SD_POWER_GPREGRET_SET: NRF_SOC_SVCS = 60;
pub const NRF_SOC_SVCS_SD_POWER_GPREGRET_CLR: NRF_SOC_SVCS = 61;
pub const NRF_SOC_SVCS_SD_POWER_GPREGRET_GET: NRF_SOC_SVCS = 62;
pub const NRF_SOC_SVCS_SD_POWER_DCDC_MODE_SET: NRF_SOC_SVCS = 63;
pub const NRF_SOC_SVCS_SD_APP_EVT_WAIT: NRF_SOC_SVCS = 65;
pub const NRF_SOC_SVCS_SD_CLOCK_HFCLK_REQUEST: NRF_SOC_SVCS = 66;
pub const NRF_SOC_SVCS_SD_CLOCK_HFCLK_RELEASE: NRF_SOC_SVCS = 67;
pub const NRF_SOC_SVCS_SD_CLOCK_HFCLK_IS_RUNNING: NRF_SOC_SVCS = 68;
pub const NRF_SOC_SVCS_SD_RADIO_NOTIFICATION_CFG_SET: NRF_SOC_SVCS = 69;
pub const NRF_SOC_SVCS_SD_ECB_BLOCK_ENCRYPT: NRF_SOC_SVCS = 70;
pub const NRF_SOC_SVCS_SD_ECB_BLOCKS_ENCRYPT: NRF_SOC_SVCS = 71;
pub const NRF_SOC_SVCS_SD_RADIO_SESSION_OPEN: NRF_SOC_SVCS = 72;
pub const NRF_SOC_SVCS_SD_RADIO_SESSION_CLOSE: NRF_SOC_SVCS = 73;
pub const NRF_SOC_SVCS_SD_RADIO_REQUEST: NRF_SOC_SVCS = 74;
pub const NRF_SOC_SVCS_SD_EVT_GET: NRF_SOC_SVCS = 75;
pub const NRF_SOC_SVCS_SD_TEMP_GET: NRF_SOC_SVCS = 76;
pub const NRF_SOC_SVCS_SD_POWER_USBPWRRDY_ENABLE: NRF_SOC_SVCS = 77;
pub const NRF_SOC_SVCS_SD_POWER_USBDETECTED_ENABLE: NRF_SOC_SVCS = 78;
pub const NRF_SOC_SVCS_SD_POWER_USBREMOVED_ENABLE: NRF_SOC_SVCS = 79;
pub const NRF_SOC_SVCS_SD_POWER_USBREGSTATUS_GET: NRF_SOC_SVCS = 80;
pub const NRF_SOC_SVCS_SVC_SOC_LAST: NRF_SOC_SVCS = 81;
#[doc = "@brief The SVC numbers used by the SVC functions in the SoC library."]
pub type NRF_SOC_SVCS = u32;
pub const NRF_MUTEX_VALUES_NRF_MUTEX_FREE: NRF_MUTEX_VALUES = 0;
pub const NRF_MUTEX_VALUES_NRF_MUTEX_TAKEN: NRF_MUTEX_VALUES = 1;
#[doc = "@brief Possible values of a ::nrf_mutex_t."]
pub type NRF_MUTEX_VALUES = u32;
#[doc = "< Constant latency mode. See power management in the reference manual."]
pub const NRF_POWER_MODES_NRF_POWER_MODE_CONSTLAT: NRF_POWER_MODES = 0;
#[doc = "< Low power mode. See power management in the reference manual."]
pub const NRF_POWER_MODES_NRF_POWER_MODE_LOWPWR: NRF_POWER_MODES = 1;
#[doc = "@brief Power modes."]
pub type NRF_POWER_MODES = u32;
#[doc = "< 1.7 Volts power failure threshold."]
pub const NRF_POWER_THRESHOLDS_NRF_POWER_THRESHOLD_V17: NRF_POWER_THRESHOLDS = 4;
#[doc = "< 1.8 Volts power failure threshold."]
pub const NRF_POWER_THRESHOLDS_NRF_POWER_THRESHOLD_V18: NRF_POWER_THRESHOLDS = 5;
#[doc = "< 1.9 Volts power failure threshold."]
pub const NRF_POWER_THRESHOLDS_NRF_POWER_THRESHOLD_V19: NRF_POWER_THRESHOLDS = 6;
#[doc = "< 2.0 Volts power failure threshold."]
pub const NRF_POWER_THRESHOLDS_NRF_POWER_THRESHOLD_V20: NRF_POWER_THRESHOLDS = 7;
#[doc = "< 2.1 Volts power failure threshold."]
pub const NRF_POWER_THRESHOLDS_NRF_POWER_THRESHOLD_V21: NRF_POWER_THRESHOLDS = 8;
#[doc = "< 2.2 Volts power failure threshold."]
pub const NRF_POWER_THRESHOLDS_NRF_POWER_THRESHOLD_V22: NRF_POWER_THRESHOLDS = 9;
#[doc = "< 2.3 Volts power failure threshold."]
pub const NRF_POWER_THRESHOLDS_NRF_POWER_THRESHOLD_V23: NRF_POWER_THRESHOLDS = 10;
#[doc = "< 2.4 Volts power failure threshold."]
pub const NRF_POWER_THRESHOLDS_NRF_POWER_THRESHOLD_V24: NRF_POWER_THRESHOLDS = 11;
#[doc = "< 2.5 Volts power failure threshold."]
pub const NRF_POWER_THRESHOLDS_NRF_POWER_THRESHOLD_V25: NRF_POWER_THRESHOLDS = 12;
#[doc = "< 2.6 Volts power failure threshold."]
pub const NRF_POWER_THRESHOLDS_NRF_POWER_THRESHOLD_V26: NRF_POWER_THRESHOLDS = 13;
#[doc = "< 2.7 Volts power failure threshold."]
pub const NRF_POWER_THRESHOLDS_NRF_POWER_THRESHOLD_V27: NRF_POWER_THRESHOLDS = 14;
#[doc = "< 2.8 Volts power failure threshold."]
pub const NRF_POWER_THRESHOLDS_NRF_POWER_THRESHOLD_V28: NRF_POWER_THRESHOLDS = 15;
#[doc = "@brief Power failure thresholds"]
pub type NRF_POWER_THRESHOLDS = u32;
#[doc = "< The DCDC is disabled."]
pub const NRF_POWER_DCDC_MODES_NRF_POWER_DCDC_DISABLE: NRF_POWER_DCDC_MODES = 0;
#[doc = "< The DCDC is enabled."]
pub const NRF_POWER_DCDC_MODES_NRF_POWER_DCDC_ENABLE: NRF_POWER_DCDC_MODES = 1;
#[doc = "@brief DC/DC converter modes."]
pub type NRF_POWER_DCDC_MODES = u32;
#[doc = "< The event does not have a notification."]
pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_NONE:
    NRF_RADIO_NOTIFICATION_DISTANCES = 0;
#[doc = "< The distance from the active notification to start of radio activity."]
pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_800US:
    NRF_RADIO_NOTIFICATION_DISTANCES = 1;
#[doc = "< The distance from the active notification to start of radio activity."]
pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_1740US:
    NRF_RADIO_NOTIFICATION_DISTANCES = 2;
#[doc = "< The distance from the active notification to start of radio activity."]
pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_2680US:
    NRF_RADIO_NOTIFICATION_DISTANCES = 3;
#[doc = "< The distance from the active notification to start of radio activity."]
pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_3620US:
    NRF_RADIO_NOTIFICATION_DISTANCES = 4;
#[doc = "< The distance from the active notification to start of radio activity."]
pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_4560US:
    NRF_RADIO_NOTIFICATION_DISTANCES = 5;
#[doc = "< The distance from the active notification to start of radio activity."]
pub const NRF_RADIO_NOTIFICATION_DISTANCES_NRF_RADIO_NOTIFICATION_DISTANCE_5500US:
    NRF_RADIO_NOTIFICATION_DISTANCES = 6;
#[doc = "@brief Radio notification distances."]
pub type NRF_RADIO_NOTIFICATION_DISTANCES = u32;
#[doc = "< The event does not have a radio notification signal."]
pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_NONE:
    NRF_RADIO_NOTIFICATION_TYPES = 0;
#[doc = "< Using interrupt for notification when the radio will be enabled."]
pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE:
    NRF_RADIO_NOTIFICATION_TYPES = 1;
#[doc = "< Using interrupt for notification when the radio has been disabled."]
pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE:
    NRF_RADIO_NOTIFICATION_TYPES = 2;
#[doc = "< Using interrupt for notification both when the radio will be enabled and disabled."]
pub const NRF_RADIO_NOTIFICATION_TYPES_NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH:
    NRF_RADIO_NOTIFICATION_TYPES = 3;
#[doc = "@brief Radio notification types."]
pub type NRF_RADIO_NOTIFICATION_TYPES = u32;
#[doc = "< This signal indicates the start of the radio timeslot."]
pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_START:
    NRF_RADIO_CALLBACK_SIGNAL_TYPE = 0;
#[doc = "< This signal indicates the NRF_TIMER0 interrupt."]
pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0:
    NRF_RADIO_CALLBACK_SIGNAL_TYPE = 1;
#[doc = "< This signal indicates the NRF_RADIO interrupt."]
pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO:
    NRF_RADIO_CALLBACK_SIGNAL_TYPE = 2;
#[doc = "< This signal indicates extend action failed."]
pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED:
    NRF_RADIO_CALLBACK_SIGNAL_TYPE = 3;
#[doc = "< This signal indicates extend action succeeded."]
pub const NRF_RADIO_CALLBACK_SIGNAL_TYPE_NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED:
    NRF_RADIO_CALLBACK_SIGNAL_TYPE = 4;
#[doc = "@brief The Radio signal callback types."]
pub type NRF_RADIO_CALLBACK_SIGNAL_TYPE = u32;
#[doc = "< Return without action."]
pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE:
    NRF_RADIO_SIGNAL_CALLBACK_ACTION = 0;
#[doc = "< Request an extension of the current"]
#[doc = "timeslot. Maximum execution time for this action:"]
#[doc = "@ref NRF_RADIO_MAX_EXTENSION_PROCESSING_TIME_US."]
#[doc = "This action must be started at least"]
#[doc = "@ref NRF_RADIO_MIN_EXTENSION_MARGIN_US before"]
#[doc = "the end of the timeslot."]
pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND:
    NRF_RADIO_SIGNAL_CALLBACK_ACTION = 1;
#[doc = "< End the current radio timeslot."]
pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_END:
    NRF_RADIO_SIGNAL_CALLBACK_ACTION = 2;
#[doc = "< Request a new radio timeslot and end the current timeslot."]
pub const NRF_RADIO_SIGNAL_CALLBACK_ACTION_NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END:
    NRF_RADIO_SIGNAL_CALLBACK_ACTION = 3;
#[doc = "@brief The actions requested by the signal callback."]
#[doc = ""]
#[doc = "  This code gives the SOC instructions about what action to take when the signal callback has"]
#[doc = "  returned."]
pub type NRF_RADIO_SIGNAL_CALLBACK_ACTION = u32;
#[doc = "< The SoftDevice will guarantee that the high frequency clock source is the"]
#[doc = "external crystal for the whole duration of the timeslot. This should be the"]
#[doc = "preferred option for events that use the radio or require high timing accuracy."]
#[doc = "@note The SoftDevice will automatically turn on and off the external crystal,"]
#[doc = "at the beginning and end of the timeslot, respectively. The crystal may also"]
#[doc = "intentionally be left running after the timeslot, in cases where it is needed"]
#[doc = "by the SoftDevice shortly after the end of the timeslot."]
pub const NRF_RADIO_HFCLK_CFG_NRF_RADIO_HFCLK_CFG_XTAL_GUARANTEED: NRF_RADIO_HFCLK_CFG = 0;
#[doc = "< This configuration allows for earlier and tighter scheduling of timeslots."]
#[doc = "The RC oscillator may be the clock source in part or for the whole duration of the timeslot."]
#[doc = "The RC oscillator's accuracy must therefore be taken into consideration."]
#[doc = "@note If the application will use the radio peripheral in timeslots with this configuration,"]
#[doc = "it must make sure that the crystal is running and stable before starting the radio."]
pub const NRF_RADIO_HFCLK_CFG_NRF_RADIO_HFCLK_CFG_NO_GUARANTEE: NRF_RADIO_HFCLK_CFG = 1;
#[doc = "@brief Radio timeslot high frequency clock source configuration."]
pub type NRF_RADIO_HFCLK_CFG = u32;
#[doc = "< High (equal priority as the normal connection priority of the SoftDevice stack(s))."]
pub const NRF_RADIO_PRIORITY_NRF_RADIO_PRIORITY_HIGH: NRF_RADIO_PRIORITY = 0;
#[doc = "< Normal (equal priority as the priority of secondary activities of the SoftDevice stack(s))."]
pub const NRF_RADIO_PRIORITY_NRF_RADIO_PRIORITY_NORMAL: NRF_RADIO_PRIORITY = 1;
#[doc = "@brief Radio timeslot priorities."]
pub type NRF_RADIO_PRIORITY = u32;
#[doc = "< Request radio timeslot as early as possible. This should always be used for the first request in a session."]
pub const NRF_RADIO_REQUEST_TYPE_NRF_RADIO_REQ_TYPE_EARLIEST: NRF_RADIO_REQUEST_TYPE = 0;
#[doc = "< Normal radio timeslot request."]
pub const NRF_RADIO_REQUEST_TYPE_NRF_RADIO_REQ_TYPE_NORMAL: NRF_RADIO_REQUEST_TYPE = 1;
#[doc = "@brief Radio timeslot request type."]
pub type NRF_RADIO_REQUEST_TYPE = u32;
#[doc = "< Event indicating that the HFCLK has started."]
pub const NRF_SOC_EVTS_NRF_EVT_HFCLKSTARTED: NRF_SOC_EVTS = 0;
#[doc = "< Event indicating that a power failure warning has occurred."]
pub const NRF_SOC_EVTS_NRF_EVT_POWER_FAILURE_WARNING: NRF_SOC_EVTS = 1;
#[doc = "< Event indicating that the ongoing flash operation has completed successfully."]
pub const NRF_SOC_EVTS_NRF_EVT_FLASH_OPERATION_SUCCESS: NRF_SOC_EVTS = 2;
#[doc = "< Event indicating that the ongoing flash operation has timed out with an error."]
pub const NRF_SOC_EVTS_NRF_EVT_FLASH_OPERATION_ERROR: NRF_SOC_EVTS = 3;
#[doc = "< Event indicating that a radio timeslot was blocked."]
pub const NRF_SOC_EVTS_NRF_EVT_RADIO_BLOCKED: NRF_SOC_EVTS = 4;
#[doc = "< Event indicating that a radio timeslot was canceled by SoftDevice."]
pub const NRF_SOC_EVTS_NRF_EVT_RADIO_CANCELED: NRF_SOC_EVTS = 5;
#[doc = "< Event indicating that a radio timeslot signal callback handler return was invalid."]
pub const NRF_SOC_EVTS_NRF_EVT_RADIO_SIGNAL_CALLBACK_INVALID_RETURN: NRF_SOC_EVTS = 6;
#[doc = "< Event indicating that a radio timeslot session is idle."]
pub const NRF_SOC_EVTS_NRF_EVT_RADIO_SESSION_IDLE: NRF_SOC_EVTS = 7;
#[doc = "< Event indicating that a radio timeslot session is closed."]
pub const NRF_SOC_EVTS_NRF_EVT_RADIO_SESSION_CLOSED: NRF_SOC_EVTS = 8;
#[doc = "< Event indicating that a USB 3.3 V supply is ready."]
pub const NRF_SOC_EVTS_NRF_EVT_POWER_USB_POWER_READY: NRF_SOC_EVTS = 9;
#[doc = "< Event indicating that voltage supply is detected on VBUS."]
pub const NRF_SOC_EVTS_NRF_EVT_POWER_USB_DETECTED: NRF_SOC_EVTS = 10;
#[doc = "< Event indicating that voltage supply is removed from VBUS."]
pub const NRF_SOC_EVTS_NRF_EVT_POWER_USB_REMOVED: NRF_SOC_EVTS = 11;
pub const NRF_SOC_EVTS_NRF_EVT_NUMBER_OF_EVTS: NRF_SOC_EVTS = 12;
#[doc = "@brief SoC Events."]
pub type NRF_SOC_EVTS = u32;
#[doc = "@brief Represents a mutex for use with the nrf_mutex functions."]
#[doc = " @note Accessing the value directly is not safe, use the mutex functions!"]
pub type nrf_mutex_t = u8;
#[doc = "@brief Parameters for a request for a timeslot as early as possible."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nrf_radio_request_earliest_t {
    #[doc = "< High frequency clock source, see @ref NRF_RADIO_HFCLK_CFG."]
    pub hfclk: u8,
    #[doc = "< The radio timeslot priority, see @ref NRF_RADIO_PRIORITY."]
    pub priority: u8,
    #[doc = "< The radio timeslot length (in the range 100 to 100,000] microseconds)."]
    pub length_us: u32,
    #[doc = "< Longest acceptable delay until the start of the requested timeslot (up to @ref NRF_RADIO_EARLIEST_TIMEOUT_MAX_US microseconds)."]
    pub timeout_us: u32,
}
#[test]
fn bindgen_test_layout_nrf_radio_request_earliest_t() {
    assert_eq!(
        ::core::mem::size_of::<nrf_radio_request_earliest_t>(),
        12usize,
        concat!("Size of: ", stringify!(nrf_radio_request_earliest_t))
    );
    assert_eq!(
        ::core::mem::align_of::<nrf_radio_request_earliest_t>(),
        4usize,
        concat!("Alignment of ", stringify!(nrf_radio_request_earliest_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_request_earliest_t>())).hfclk as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_request_earliest_t),
            "::",
            stringify!(hfclk)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_request_earliest_t>())).priority as *const _ as usize
        },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_request_earliest_t),
            "::",
            stringify!(priority)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_request_earliest_t>())).length_us as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_request_earliest_t),
            "::",
            stringify!(length_us)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_request_earliest_t>())).timeout_us as *const _
                as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_request_earliest_t),
            "::",
            stringify!(timeout_us)
        )
    );
}
#[doc = "@brief Parameters for a normal radio timeslot request."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nrf_radio_request_normal_t {
    #[doc = "< High frequency clock source, see @ref NRF_RADIO_HFCLK_CFG."]
    pub hfclk: u8,
    #[doc = "< The radio timeslot priority, see @ref NRF_RADIO_PRIORITY."]
    pub priority: u8,
    #[doc = "< Distance from the start of the previous radio timeslot (up to @ref NRF_RADIO_DISTANCE_MAX_US microseconds)."]
    pub distance_us: u32,
    #[doc = "< The radio timeslot length (in the range [100..100,000] microseconds)."]
    pub length_us: u32,
}
#[test]
fn bindgen_test_layout_nrf_radio_request_normal_t() {
    assert_eq!(
        ::core::mem::size_of::<nrf_radio_request_normal_t>(),
        12usize,
        concat!("Size of: ", stringify!(nrf_radio_request_normal_t))
    );
    assert_eq!(
        ::core::mem::align_of::<nrf_radio_request_normal_t>(),
        4usize,
        concat!("Alignment of ", stringify!(nrf_radio_request_normal_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_request_normal_t>())).hfclk as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_request_normal_t),
            "::",
            stringify!(hfclk)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_request_normal_t>())).priority as *const _ as usize
        },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_request_normal_t),
            "::",
            stringify!(priority)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_request_normal_t>())).distance_us as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_request_normal_t),
            "::",
            stringify!(distance_us)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_request_normal_t>())).length_us as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_request_normal_t),
            "::",
            stringify!(length_us)
        )
    );
}
#[doc = "@brief Radio timeslot request parameters."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct nrf_radio_request_t {
    #[doc = "< Type of request, see @ref NRF_RADIO_REQUEST_TYPE."]
    pub request_type: u8,
    #[doc = "< Parameter union."]
    pub params: nrf_radio_request_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union nrf_radio_request_t__bindgen_ty_1 {
    #[doc = "< Parameters for requesting a radio timeslot as early as possible."]
    pub earliest: nrf_radio_request_earliest_t,
    #[doc = "< Parameters for requesting a normal radio timeslot."]
    pub normal: nrf_radio_request_normal_t,
    _bindgen_union_align: [u32; 3usize],
}
#[test]
fn bindgen_test_layout_nrf_radio_request_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<nrf_radio_request_t__bindgen_ty_1>(),
        12usize,
        concat!("Size of: ", stringify!(nrf_radio_request_t__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<nrf_radio_request_t__bindgen_ty_1>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(nrf_radio_request_t__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_request_t__bindgen_ty_1>())).earliest as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_request_t__bindgen_ty_1),
            "::",
            stringify!(earliest)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_request_t__bindgen_ty_1>())).normal as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_request_t__bindgen_ty_1),
            "::",
            stringify!(normal)
        )
    );
}
#[test]
fn bindgen_test_layout_nrf_radio_request_t() {
    assert_eq!(
        ::core::mem::size_of::<nrf_radio_request_t>(),
        16usize,
        concat!("Size of: ", stringify!(nrf_radio_request_t))
    );
    assert_eq!(
        ::core::mem::align_of::<nrf_radio_request_t>(),
        4usize,
        concat!("Alignment of ", stringify!(nrf_radio_request_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_request_t>())).request_type as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_request_t),
            "::",
            stringify!(request_type)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<nrf_radio_request_t>())).params as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_request_t),
            "::",
            stringify!(params)
        )
    );
}
#[doc = "@brief Return parameters of the radio timeslot signal callback."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct nrf_radio_signal_callback_return_param_t {
    #[doc = "< The action requested by the application when returning from the signal callback, see @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION."]
    pub callback_action: u8,
    #[doc = "< Parameter union."]
    pub params: nrf_radio_signal_callback_return_param_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union nrf_radio_signal_callback_return_param_t__bindgen_ty_1 {
    #[doc = "< Additional parameters for return_code @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END."]
    pub request: nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1,
    #[doc = "< Additional parameters for return_code @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND."]
    pub extend: nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2,
    _bindgen_union_align: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1 {
    #[doc = "< The request parameters for the next radio timeslot."]
    pub p_next: *mut nrf_radio_request_t,
}
#[test]
fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1>(
        ),
        4usize,
        concat!(
            "Size of: ",
            stringify!(nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1>(
        ),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<
                nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1,
            >()))
            .p_next as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(p_next)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2 {
    #[doc = "< Requested extension of the radio timeslot duration (microseconds) (for minimum time see @ref NRF_RADIO_MINIMUM_TIMESLOT_LENGTH_EXTENSION_TIME_US)."]
    pub length_us: u32,
}
#[test]
fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2() {
    assert_eq!(
        ::core::mem::size_of::<nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2>(
        ),
        4usize,
        concat!(
            "Size of: ",
            stringify!(nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2>(
        ),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<
                nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2,
            >()))
            .length_us as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_signal_callback_return_param_t__bindgen_ty_1__bindgen_ty_2),
            "::",
            stringify!(length_us)
        )
    );
}
#[test]
fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<nrf_radio_signal_callback_return_param_t__bindgen_ty_1>(),
        4usize,
        concat!(
            "Size of: ",
            stringify!(nrf_radio_signal_callback_return_param_t__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<nrf_radio_signal_callback_return_param_t__bindgen_ty_1>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(nrf_radio_signal_callback_return_param_t__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_signal_callback_return_param_t__bindgen_ty_1>()))
                .request as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_signal_callback_return_param_t__bindgen_ty_1),
            "::",
            stringify!(request)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_signal_callback_return_param_t__bindgen_ty_1>()))
                .extend as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_signal_callback_return_param_t__bindgen_ty_1),
            "::",
            stringify!(extend)
        )
    );
}
#[test]
fn bindgen_test_layout_nrf_radio_signal_callback_return_param_t() {
    assert_eq!(
        ::core::mem::size_of::<nrf_radio_signal_callback_return_param_t>(),
        8usize,
        concat!(
            "Size of: ",
            stringify!(nrf_radio_signal_callback_return_param_t)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<nrf_radio_signal_callback_return_param_t>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(nrf_radio_signal_callback_return_param_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_signal_callback_return_param_t>())).callback_action
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_signal_callback_return_param_t),
            "::",
            stringify!(callback_action)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_radio_signal_callback_return_param_t>())).params as *const _
                as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_radio_signal_callback_return_param_t),
            "::",
            stringify!(params)
        )
    );
}
#[doc = "@brief The radio timeslot signal callback type."]
#[doc = ""]
#[doc = " @note In case of invalid return parameters, the radio timeslot will automatically end"]
#[doc = "       immediately after returning from the signal callback and the"]
#[doc = "       @ref NRF_EVT_RADIO_SIGNAL_CALLBACK_INVALID_RETURN event will be sent."]
#[doc = " @note The returned struct pointer must remain valid after the signal callback"]
#[doc = "       function returns. For instance, this means that it must not point to a stack variable."]
#[doc = ""]
#[doc = " @param[in] signal_type Type of signal, see @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE."]
#[doc = ""]
#[doc = " @return Pointer to structure containing action requested by the application."]
pub type nrf_radio_signal_callback_t = ::core::option::Option<
    unsafe extern "C" fn(signal_type: u8) -> *mut nrf_radio_signal_callback_return_param_t,
>;
#[doc = "@brief AES ECB parameter typedefs"]
pub type soc_ecb_key_t = [u8; 16usize];
pub type soc_ecb_cleartext_t = [u8; 16usize];
pub type soc_ecb_ciphertext_t = [u8; 16usize];
#[doc = "@brief AES ECB data structure"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nrf_ecb_hal_data_t {
    #[doc = "< Encryption key."]
    pub key: soc_ecb_key_t,
    #[doc = "< Cleartext data."]
    pub cleartext: soc_ecb_cleartext_t,
    #[doc = "< Ciphertext data."]
    pub ciphertext: soc_ecb_ciphertext_t,
}
#[test]
fn bindgen_test_layout_nrf_ecb_hal_data_t() {
    assert_eq!(
        ::core::mem::size_of::<nrf_ecb_hal_data_t>(),
        48usize,
        concat!("Size of: ", stringify!(nrf_ecb_hal_data_t))
    );
    assert_eq!(
        ::core::mem::align_of::<nrf_ecb_hal_data_t>(),
        1usize,
        concat!("Alignment of ", stringify!(nrf_ecb_hal_data_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<nrf_ecb_hal_data_t>())).key as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_ecb_hal_data_t),
            "::",
            stringify!(key)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<nrf_ecb_hal_data_t>())).cleartext as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_ecb_hal_data_t),
            "::",
            stringify!(cleartext)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<nrf_ecb_hal_data_t>())).ciphertext as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_ecb_hal_data_t),
            "::",
            stringify!(ciphertext)
        )
    );
}
#[doc = "@brief AES ECB block. Used to provide multiple blocks in a single call"]
#[doc = "to @ref sd_ecb_blocks_encrypt."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nrf_ecb_hal_data_block_t {
    #[doc = "< Pointer to the Encryption key."]
    pub p_key: *const soc_ecb_key_t,
    #[doc = "< Pointer to the Cleartext data."]
    pub p_cleartext: *const soc_ecb_cleartext_t,
    #[doc = "< Pointer to the Ciphertext data."]
    pub p_ciphertext: *mut soc_ecb_ciphertext_t,
}
#[test]
fn bindgen_test_layout_nrf_ecb_hal_data_block_t() {
    assert_eq!(
        ::core::mem::size_of::<nrf_ecb_hal_data_block_t>(),
        12usize,
        concat!("Size of: ", stringify!(nrf_ecb_hal_data_block_t))
    );
    assert_eq!(
        ::core::mem::align_of::<nrf_ecb_hal_data_block_t>(),
        4usize,
        concat!("Alignment of ", stringify!(nrf_ecb_hal_data_block_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<nrf_ecb_hal_data_block_t>())).p_key as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_ecb_hal_data_block_t),
            "::",
            stringify!(p_key)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_ecb_hal_data_block_t>())).p_cleartext as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_ecb_hal_data_block_t),
            "::",
            stringify!(p_cleartext)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_ecb_hal_data_block_t>())).p_ciphertext as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_ecb_hal_data_block_t),
            "::",
            stringify!(p_ciphertext)
        )
    );
}

    #[doc = "@brief Initialize a mutex."]
    #[doc = ""]
    #[doc = " @param[in] p_mutex Pointer to the mutex to initialize."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_mutex_new(p_mutex: *mut nrf_mutex_t) -> u32 {
    let ret: u32;
    asm!("svc 44",
        inout("r0") to_asm(p_mutex) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Attempt to acquire a mutex."]
    #[doc = ""]
    #[doc = " @param[in] p_mutex Pointer to the mutex to acquire."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS The mutex was successfully acquired."]
    #[doc = " @retval ::NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN The mutex could not be acquired."]
    
#[inline(always)]
pub unsafe fn sd_mutex_acquire(p_mutex: *mut nrf_mutex_t) -> u32 {
    let ret: u32;
    asm!("svc 45",
        inout("r0") to_asm(p_mutex) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Release a mutex."]
    #[doc = ""]
    #[doc = " @param[in] p_mutex Pointer to the mutex to release."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_mutex_release(p_mutex: *mut nrf_mutex_t) -> u32 {
    let ret: u32;
    asm!("svc 46",
        inout("r0") to_asm(p_mutex) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Query the capacity of the application random pool."]
    #[doc = ""]
    #[doc = " @param[out] p_pool_capacity The capacity of the pool."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_rand_application_pool_capacity_get(p_pool_capacity: *mut u8) -> u32 {
    let ret: u32;
    asm!("svc 47",
        inout("r0") to_asm(p_pool_capacity) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get number of random bytes available to the application."]
    #[doc = ""]
    #[doc = " @param[out] p_bytes_available The number of bytes currently available in the pool."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_rand_application_bytes_available_get(p_bytes_available: *mut u8) -> u32 {
    let ret: u32;
    asm!("svc 48",
        inout("r0") to_asm(p_bytes_available) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get random bytes from the application pool."]
    #[doc = ""]
    #[doc = " @param[out]  p_buff  Pointer to unit8_t buffer for storing the bytes."]
    #[doc = " @param[in]   length  Number of bytes to take from pool and place in p_buff."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS The requested bytes were written to p_buff."]
    #[doc = " @retval ::NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES No bytes were written to the buffer, because there were not enough bytes available."]
    
#[inline(always)]
pub unsafe fn sd_rand_application_vector_get(p_buff: *mut u8, length: u8) -> u32 {
    let ret: u32;
    asm!("svc 49",
        inout("r0") to_asm(p_buff) => ret,
        inout("r1") to_asm(length) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Gets the reset reason register."]
    #[doc = ""]
    #[doc = " @param[out]  p_reset_reason  Contents of the NRF_POWER->RESETREAS register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_reset_reason_get(p_reset_reason: *mut u32) -> u32 {
    let ret: u32;
    asm!("svc 52",
        inout("r0") to_asm(p_reset_reason) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Clears the bits of the reset reason register."]
    #[doc = ""]
    #[doc = " @param[in] reset_reason_clr_msk Contains the bits to clear from the reset reason register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_reset_reason_clr(reset_reason_clr_msk: u32) -> u32 {
    let ret: u32;
    asm!("svc 53",
        inout("r0") to_asm(reset_reason_clr_msk) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Sets the power mode when in CPU sleep."]
    #[doc = ""]
    #[doc = " @param[in] power_mode The power mode to use when in CPU sleep, see @ref NRF_POWER_MODES. @sa sd_app_evt_wait"]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS The power mode was set."]
    #[doc = " @retval ::NRF_ERROR_SOC_POWER_MODE_UNKNOWN The power mode was unknown."]
    
#[inline(always)]
pub unsafe fn sd_power_mode_set(power_mode: u8) -> u32 {
    let ret: u32;
    asm!("svc 50",
        inout("r0") to_asm(power_mode) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Puts the chip in System OFF mode."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN"]
    
#[inline(always)]
pub unsafe fn sd_power_system_off() -> u32 {
    let ret: u32;
    asm!("svc 51",
        lateout("r0") ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Enables or disables the power-fail comparator."]
    #[doc = ""]
    #[doc = " Enabling this will give a SoftDevice event (NRF_EVT_POWER_FAILURE_WARNING) when the power failure warning occurs."]
    #[doc = " The event can be retrieved with sd_evt_get();"]
    #[doc = ""]
    #[doc = " @param[in] pof_enable    True if the power-fail comparator should be enabled, false if it should be disabled."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_pof_enable(pof_enable: u8) -> u32 {
    let ret: u32;
    asm!("svc 54",
        inout("r0") to_asm(pof_enable) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Enables or disables the USB power ready event."]
    #[doc = ""]
    #[doc = " Enabling this will give a SoftDevice event (NRF_EVT_POWER_USB_POWER_READY) when a USB 3.3 V supply is ready."]
    #[doc = " The event can be retrieved with sd_evt_get();"]
    #[doc = ""]
    #[doc = " @param[in] usbpwrrdy_enable    True if the power ready event should be enabled, false if it should be disabled."]
    #[doc = ""]
    #[doc = " @note Calling this function on a chip without USBD peripheral will result in undefined behaviour."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_usbpwrrdy_enable(usbpwrrdy_enable: u8) -> u32 {
    let ret: u32;
    asm!("svc 77",
        inout("r0") to_asm(usbpwrrdy_enable) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Enables or disables the power USB-detected event."]
    #[doc = ""]
    #[doc = " Enabling this will give a SoftDevice event (NRF_EVT_POWER_USB_DETECTED) when a voltage supply is detected on VBUS."]
    #[doc = " The event can be retrieved with sd_evt_get();"]
    #[doc = ""]
    #[doc = " @param[in] usbdetected_enable    True if the power ready event should be enabled, false if it should be disabled."]
    #[doc = ""]
    #[doc = " @note Calling this function on a chip without USBD peripheral will result in undefined behaviour."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_usbdetected_enable(usbdetected_enable: u8) -> u32 {
    let ret: u32;
    asm!("svc 78",
        inout("r0") to_asm(usbdetected_enable) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Enables or disables the power USB-removed event."]
    #[doc = ""]
    #[doc = " Enabling this will give a SoftDevice event (NRF_EVT_POWER_USB_REMOVED) when a voltage supply is removed from VBUS."]
    #[doc = " The event can be retrieved with sd_evt_get();"]
    #[doc = ""]
    #[doc = " @param[in] usbremoved_enable    True if the power ready event should be enabled, false if it should be disabled."]
    #[doc = ""]
    #[doc = " @note Calling this function on a chip without USBD peripheral will result in undefined behaviour."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_usbremoved_enable(usbremoved_enable: u8) -> u32 {
    let ret: u32;
    asm!("svc 79",
        inout("r0") to_asm(usbremoved_enable) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get USB supply status register content."]
    #[doc = ""]
    #[doc = " @param[out] usbregstatus    The content of USBREGSTATUS register."]
    #[doc = ""]
    #[doc = " @note Calling this function on a chip without USBD peripheral will result in undefined behaviour."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_usbregstatus_get(usbregstatus: *mut u32) -> u32 {
    let ret: u32;
    asm!("svc 80",
        inout("r0") to_asm(usbregstatus) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Sets the power failure comparator threshold value."]
    #[doc = ""]
    #[doc = ""]
    #[doc = " @param[in] threshold The power-fail threshold value to use, see @ref NRF_POWER_THRESHOLDS."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS The power failure threshold was set."]
    #[doc = " @retval ::NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN The power failure threshold is unknown."]
    
#[inline(always)]
pub unsafe fn sd_power_pof_threshold_set(threshold: u8) -> u32 {
    let ret: u32;
    asm!("svc 55",
        inout("r0") to_asm(threshold) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Writes the NRF_POWER->RAM[index].POWERSET register."]
    #[doc = ""]
    #[doc = " @param[in] index Contains the index in the NRF_POWER->RAM[index].POWERSET register to write to."]
    #[doc = " @param[in] ram_powerset Contains the word to write to the NRF_POWER->RAM[index].POWERSET register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_ram_power_set(index: u8, ram_powerset: u32) -> u32 {
    let ret: u32;
    asm!("svc 57",
        inout("r0") to_asm(index) => ret,
        inout("r1") to_asm(ram_powerset) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Writes the NRF_POWER->RAM[index].POWERCLR register."]
    #[doc = ""]
    #[doc = " @param[in] index Contains the index in the NRF_POWER->RAM[index].POWERCLR register to write to."]
    #[doc = " @param[in] ram_powerclr Contains the word to write to the NRF_POWER->RAM[index].POWERCLR register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_ram_power_clr(index: u8, ram_powerclr: u32) -> u32 {
    let ret: u32;
    asm!("svc 58",
        inout("r0") to_asm(index) => ret,
        inout("r1") to_asm(ram_powerclr) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get contents of NRF_POWER->RAM[index].POWER register, indicates power status of RAM[index] blocks."]
    #[doc = ""]
    #[doc = " @param[in] index Contains the index in the NRF_POWER->RAM[index].POWER register to read from."]
    #[doc = " @param[out] p_ram_power Content of NRF_POWER->RAM[index].POWER register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_ram_power_get(index: u8, p_ram_power: *mut u32) -> u32 {
    let ret: u32;
    asm!("svc 59",
        inout("r0") to_asm(index) => ret,
        inout("r1") to_asm(p_ram_power) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Set bits in the general purpose retention registers (NRF_POWER->GPREGRET*)."]
    #[doc = ""]
    #[doc = " @param[in] gpregret_id 0 for GPREGRET, 1 for GPREGRET2."]
    #[doc = " @param[in] gpregret_msk Bits to be set in the GPREGRET register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_gpregret_set(gpregret_id: u32, gpregret_msk: u32) -> u32 {
    let ret: u32;
    asm!("svc 60",
        inout("r0") to_asm(gpregret_id) => ret,
        inout("r1") to_asm(gpregret_msk) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Clear bits in the general purpose retention registers (NRF_POWER->GPREGRET*)."]
    #[doc = ""]
    #[doc = " @param[in] gpregret_id 0 for GPREGRET, 1 for GPREGRET2."]
    #[doc = " @param[in] gpregret_msk Bits to be clear in the GPREGRET register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_gpregret_clr(gpregret_id: u32, gpregret_msk: u32) -> u32 {
    let ret: u32;
    asm!("svc 61",
        inout("r0") to_asm(gpregret_id) => ret,
        inout("r1") to_asm(gpregret_msk) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get contents of the general purpose retention registers (NRF_POWER->GPREGRET*)."]
    #[doc = ""]
    #[doc = " @param[in] gpregret_id 0 for GPREGRET, 1 for GPREGRET2."]
    #[doc = " @param[out] p_gpregret Contents of the GPREGRET register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_power_gpregret_get(gpregret_id: u32, p_gpregret: *mut u32) -> u32 {
    let ret: u32;
    asm!("svc 62",
        inout("r0") to_asm(gpregret_id) => ret,
        inout("r1") to_asm(p_gpregret) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Enable or disable the DC/DC regulator."]
    #[doc = ""]
    #[doc = " @param[in] dcdc_mode The mode of the DCDC, see @ref NRF_POWER_DCDC_MODES."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM The DCDC mode is invalid."]
    
#[inline(always)]
pub unsafe fn sd_power_dcdc_mode_set(dcdc_mode: u8) -> u32 {
    let ret: u32;
    asm!("svc 63",
        inout("r0") to_asm(dcdc_mode) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Request the high frequency crystal oscillator."]
    #[doc = ""]
    #[doc = " Will start the high frequency crystal oscillator, the startup time of the crystal varies"]
    #[doc = " and the ::sd_clock_hfclk_is_running function can be polled to check if it has started."]
    #[doc = ""]
    #[doc = " @see sd_clock_hfclk_is_running"]
    #[doc = " @see sd_clock_hfclk_release"]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_clock_hfclk_request() -> u32 {
    let ret: u32;
    asm!("svc 66",
        lateout("r0") ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Releases the high frequency crystal oscillator."]
    #[doc = ""]
    #[doc = " Will stop the high frequency crystal oscillator, this happens immediately."]
    #[doc = ""]
    #[doc = " @see sd_clock_hfclk_is_running"]
    #[doc = " @see sd_clock_hfclk_request"]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_clock_hfclk_release() -> u32 {
    let ret: u32;
    asm!("svc 67",
        lateout("r0") ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Checks if the high frequency crystal oscillator is running."]
    #[doc = ""]
    #[doc = " @see sd_clock_hfclk_request"]
    #[doc = " @see sd_clock_hfclk_release"]
    #[doc = ""]
    #[doc = " @param[out] p_is_running 1 if the external crystal oscillator is running, 0 if not."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_clock_hfclk_is_running(p_is_running: *mut u32) -> u32 {
    let ret: u32;
    asm!("svc 68",
        inout("r0") to_asm(p_is_running) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Waits for an application event."]
    #[doc = ""]
    #[doc = " An application event is either an application interrupt or a pended interrupt when the interrupt"]
    #[doc = " is disabled."]
    #[doc = ""]
    #[doc = " When the application waits for an application event by calling this function, an interrupt that"]
    #[doc = " is enabled will be taken immediately on pending since this function will wait in thread mode,"]
    #[doc = " then the execution will return in the application's main thread."]
    #[doc = ""]
    #[doc = " In order to wake up from disabled interrupts, the SEVONPEND flag has to be set in the Cortex-M"]
    #[doc = " MCU's System Control Register (SCR), CMSIS_SCB. In that case, when a disabled interrupt gets"]
    #[doc = " pended, this function will return to the application's main thread."]
    #[doc = ""]
    #[doc = " @note The application must ensure that the pended flag is cleared using ::sd_nvic_ClearPendingIRQ"]
    #[doc = "       in order to sleep using this function. This is only necessary for disabled interrupts, as"]
    #[doc = "       the interrupt handler will clear the pending flag automatically for enabled interrupts."]
    #[doc = ""]
    #[doc = " @note If an application interrupt has happened since the last time sd_app_evt_wait was"]
    #[doc = "       called this function will return immediately and not go to sleep. This is to avoid race"]
    #[doc = "       conditions that can occur when a flag is updated in the interrupt handler and processed"]
    #[doc = "       in the main loop."]
    #[doc = ""]
    #[doc = " @post An application interrupt has happened or a interrupt pending flag is set."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_app_evt_wait() -> u32 {
    let ret: u32;
    asm!("svc 65",
        lateout("r0") ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get PPI channel enable register contents."]
    #[doc = ""]
    #[doc = " @param[out] p_channel_enable The contents of the PPI CHEN register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_ppi_channel_enable_get(p_channel_enable: *mut u32) -> u32 {
    let ret: u32;
    asm!("svc 32",
        inout("r0") to_asm(p_channel_enable) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Set PPI channel enable register."]
    #[doc = ""]
    #[doc = " @param[in] channel_enable_set_msk Mask containing the bits to set in the PPI CHEN register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_ppi_channel_enable_set(channel_enable_set_msk: u32) -> u32 {
    let ret: u32;
    asm!("svc 33",
        inout("r0") to_asm(channel_enable_set_msk) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Clear PPI channel enable register."]
    #[doc = ""]
    #[doc = " @param[in] channel_enable_clr_msk Mask containing the bits to clear in the PPI CHEN register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_ppi_channel_enable_clr(channel_enable_clr_msk: u32) -> u32 {
    let ret: u32;
    asm!("svc 34",
        inout("r0") to_asm(channel_enable_clr_msk) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Assign endpoints to a PPI channel."]
    #[doc = ""]
    #[doc = " @param[in] channel_num Number of the PPI channel to assign."]
    #[doc = " @param[in] evt_endpoint Event endpoint of the PPI channel."]
    #[doc = " @param[in] task_endpoint Task endpoint of the PPI channel."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_SOC_PPI_INVALID_CHANNEL The channel number is invalid."]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_ppi_channel_assign(
        channel_num: u8,
        evt_endpoint: *const self::c_void,
        task_endpoint: *const self::c_void,
    ) -> u32 {
    let ret: u32;
    asm!("svc 35",
        inout("r0") to_asm(channel_num) => ret,
        inout("r1") to_asm(evt_endpoint) => _,
        inout("r2") to_asm(task_endpoint) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Task to enable a channel group."]
    #[doc = ""]
    #[doc = " @param[in] group_num Number of the channel group."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid"]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_ppi_group_task_enable(group_num: u8) -> u32 {
    let ret: u32;
    asm!("svc 36",
        inout("r0") to_asm(group_num) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Task to disable a channel group."]
    #[doc = ""]
    #[doc = " @param[in] group_num Number of the PPI group."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid."]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_ppi_group_task_disable(group_num: u8) -> u32 {
    let ret: u32;
    asm!("svc 37",
        inout("r0") to_asm(group_num) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Assign PPI channels to a channel group."]
    #[doc = ""]
    #[doc = " @param[in] group_num Number of the channel group."]
    #[doc = " @param[in] channel_msk Mask of the channels to assign to the group."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid."]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_ppi_group_assign(group_num: u8, channel_msk: u32) -> u32 {
    let ret: u32;
    asm!("svc 38",
        inout("r0") to_asm(group_num) => ret,
        inout("r1") to_asm(channel_msk) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Gets the PPI channels of a channel group."]
    #[doc = ""]
    #[doc = " @param[in]   group_num Number of the channel group."]
    #[doc = " @param[out]  p_channel_msk Mask of the channels assigned to the group."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid."]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_ppi_group_get(group_num: u8, p_channel_msk: *mut u32) -> u32 {
    let ret: u32;
    asm!("svc 39",
        inout("r0") to_asm(group_num) => ret,
        inout("r1") to_asm(p_channel_msk) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Configures the Radio Notification signal."]
    #[doc = ""]
    #[doc = " @note"]
    #[doc = "      - The notification signal latency depends on the interrupt priority settings of SWI used"]
    #[doc = "        for notification signal."]
    #[doc = "      - To ensure that the radio notification signal behaves in a consistent way, the radio"]
    #[doc = "        notifications must be configured when there is no protocol stack or other SoftDevice"]
    #[doc = "        activity in progress. It is recommended that the radio notification signal is"]
    #[doc = "        configured directly after the SoftDevice has been enabled."]
    #[doc = "      - In the period between the ACTIVE signal and the start of the Radio Event, the SoftDevice"]
    #[doc = "        will interrupt the application to do Radio Event preparation."]
    #[doc = "      - Using the Radio Notification feature may limit the bandwidth, as the SoftDevice may have"]
    #[doc = "        to shorten the connection events to have time for the Radio Notification signals."]
    #[doc = ""]
    #[doc = " @param[in]  type      Type of notification signal, see @ref NRF_RADIO_NOTIFICATION_TYPES."]
    #[doc = "                       @ref NRF_RADIO_NOTIFICATION_TYPE_NONE shall be used to turn off radio"]
    #[doc = "                       notification. Using @ref NRF_RADIO_NOTIFICATION_DISTANCE_NONE is"]
    #[doc = "                       recommended (but not required) to be used with"]
    #[doc = "                       @ref NRF_RADIO_NOTIFICATION_TYPE_NONE."]
    #[doc = ""]
    #[doc = " @param[in]  distance  Distance between the notification signal and start of radio activity, see @ref NRF_RADIO_NOTIFICATION_DISTANCES."]
    #[doc = "                       This parameter is ignored when @ref NRF_RADIO_NOTIFICATION_TYPE_NONE or"]
    #[doc = "                       @ref NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE is used."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM The group number is invalid."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE A protocol stack or other SoftDevice is running. Stop all"]
    #[doc = "                                   running activities and retry."]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_radio_notification_cfg_set(type_: u8, distance: u8) -> u32 {
    let ret: u32;
    asm!("svc 69",
        inout("r0") to_asm(type_) => ret,
        inout("r1") to_asm(distance) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Encrypts a block according to the specified parameters."]
    #[doc = ""]
    #[doc = " 128-bit AES encryption."]
    #[doc = ""]
    #[doc = " @note:"]
    #[doc = "    - The application may set the SEVONPEND bit in the SCR to 1 to make the SoftDevice sleep while"]
    #[doc = "      the ECB is running. The SEVONPEND bit should only be cleared (set to 0) from application"]
    #[doc = "      main or low interrupt level."]
    #[doc = ""]
    #[doc = " @param[in, out] p_ecb_data Pointer to the ECB parameters' struct (two input"]
    #[doc = "                            parameters and one output parameter)."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_ecb_block_encrypt(p_ecb_data: *mut nrf_ecb_hal_data_t) -> u32 {
    let ret: u32;
    asm!("svc 70",
        inout("r0") to_asm(p_ecb_data) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Encrypts multiple data blocks provided as an array of data block structures."]
    #[doc = ""]
    #[doc = " @details: Performs 128-bit AES encryption on multiple data blocks"]
    #[doc = ""]
    #[doc = " @note:"]
    #[doc = "    - The application may set the SEVONPEND bit in the SCR to 1 to make the SoftDevice sleep while"]
    #[doc = "      the ECB is running. The SEVONPEND bit should only be cleared (set to 0) from application"]
    #[doc = "      main or low interrupt level."]
    #[doc = ""]
    #[doc = " @param[in]     block_count     Count of blocks in the p_data_blocks array."]
    #[doc = " @param[in,out] p_data_blocks   Pointer to the first entry in a contiguous array of"]
    #[doc = "                                @ref nrf_ecb_hal_data_block_t structures."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_ecb_blocks_encrypt(
        block_count: u8,
        p_data_blocks: *mut nrf_ecb_hal_data_block_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 71",
        inout("r0") to_asm(block_count) => ret,
        inout("r1") to_asm(p_data_blocks) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Gets any pending events generated by the SoC API."]
    #[doc = ""]
    #[doc = " The application should keep calling this function to get events, until ::NRF_ERROR_NOT_FOUND is returned."]
    #[doc = ""]
    #[doc = " @param[out] p_evt_id Set to one of the values in @ref NRF_SOC_EVTS, if any events are pending."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS An event was pending. The event id is written in the p_evt_id parameter."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND No pending events."]
    
#[inline(always)]
pub unsafe fn sd_evt_get(p_evt_id: *mut u32) -> u32 {
    let ret: u32;
    asm!("svc 75",
        inout("r0") to_asm(p_evt_id) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get the temperature measured on the chip"]
    #[doc = ""]
    #[doc = " This function will block until the temperature measurement is done."]
    #[doc = " It takes around 50 us from call to return."]
    #[doc = ""]
    #[doc = " @param[out] p_temp Result of temperature measurement. Die temperature in 0.25 degrees Celsius."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS A temperature measurement was done, and the temperature was written to temp"]
    
#[inline(always)]
pub unsafe fn sd_temp_get(p_temp: *mut i32) -> u32 {
    let ret: u32;
    asm!("svc 76",
        inout("r0") to_asm(p_temp) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Flash Write"]
    #[doc = ""]
    #[doc = " Commands to write a buffer to flash"]
    #[doc = ""]
    #[doc = " If the SoftDevice is enabled:"]
    #[doc = "  This call initiates the flash access command, and its completion will be communicated to the"]
    #[doc = "  application with exactly one of the following events:"]
    #[doc = "      - @ref NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed."]
    #[doc = "      - @ref NRF_EVT_FLASH_OPERATION_ERROR   - The command could not be started."]
    #[doc = ""]
    #[doc = " If the SoftDevice is not enabled no event will be generated, and this call will return @ref NRF_SUCCESS when the"]
    #[doc = " write has been completed"]
    #[doc = ""]
    #[doc = " @note"]
    #[doc = "      - This call takes control over the radio and the CPU during flash erase and write to make sure that"]
    #[doc = "        they will not interfere with the flash access. This means that all interrupts will be blocked"]
    #[doc = "        for a predictable time (depending on the NVMC specification in the device's Product Specification"]
    #[doc = "        and the command parameters)."]
    #[doc = "      - The data in the p_src buffer should not be modified before the @ref NRF_EVT_FLASH_OPERATION_SUCCESS"]
    #[doc = "        or the @ref NRF_EVT_FLASH_OPERATION_ERROR have been received if the SoftDevice is enabled."]
    #[doc = "      - This call will make the SoftDevice trigger a hardfault when the page is written, if it is"]
    #[doc = "        protected."]
    #[doc = ""]
    #[doc = ""]
    #[doc = " @param[in]  p_dst Pointer to start of flash location to be written."]
    #[doc = " @param[in]  p_src Pointer to buffer with data to be written."]
    #[doc = " @param[in]  size  Number of 32-bit words to write. Maximum size is the number of words in one"]
    #[doc = "                   flash page. See the device's Product Specification for details."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR   Tried to write to a non existing flash address, or p_dst or p_src was unaligned."]
    #[doc = " @retval ::NRF_ERROR_BUSY           The previous command has not yet completed."]
    #[doc = " @retval ::NRF_ERROR_INVALID_LENGTH Size was 0, or higher than the maximum allowed size."]
    #[doc = " @retval ::NRF_ERROR_FORBIDDEN      Tried to write to an address outside the application flash area."]
    #[doc = " @retval ::NRF_SUCCESS              The command was accepted."]
    
#[inline(always)]
pub unsafe fn sd_flash_write(p_dst: *mut u32, p_src: *const u32, size: u32) -> u32 {
    let ret: u32;
    asm!("svc 41",
        inout("r0") to_asm(p_dst) => ret,
        inout("r1") to_asm(p_src) => _,
        inout("r2") to_asm(size) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Flash Erase page"]
    #[doc = ""]
    #[doc = " Commands to erase a flash page"]
    #[doc = " If the SoftDevice is enabled:"]
    #[doc = "  This call initiates the flash access command, and its completion will be communicated to the"]
    #[doc = "  application with exactly one of the following events:"]
    #[doc = "      - @ref NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed."]
    #[doc = "      - @ref NRF_EVT_FLASH_OPERATION_ERROR   - The command could not be started."]
    #[doc = ""]
    #[doc = " If the SoftDevice is not enabled no event will be generated, and this call will return @ref NRF_SUCCESS when the"]
    #[doc = " erase has been completed"]
    #[doc = ""]
    #[doc = " @note"]
    #[doc = "      - This call takes control over the radio and the CPU during flash erase and write to make sure that"]
    #[doc = "        they will not interfere with the flash access. This means that all interrupts will be blocked"]
    #[doc = "        for a predictable time (depending on the NVMC specification in the device's Product Specification"]
    #[doc = "        and the command parameters)."]
    #[doc = "      - This call will make the SoftDevice trigger a hardfault when the page is erased, if it is"]
    #[doc = "        protected."]
    #[doc = ""]
    #[doc = ""]
    #[doc = " @param[in]  page_number           Page number of the page to erase"]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_INTERNAL      If a new session could not be opened due to an internal error."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR  Tried to erase to a non existing flash page."]
    #[doc = " @retval ::NRF_ERROR_BUSY          The previous command has not yet completed."]
    #[doc = " @retval ::NRF_ERROR_FORBIDDEN     Tried to erase a page outside the application flash area."]
    #[doc = " @retval ::NRF_SUCCESS             The command was accepted."]
    
#[inline(always)]
pub unsafe fn sd_flash_page_erase(page_number: u32) -> u32 {
    let ret: u32;
    asm!("svc 40",
        inout("r0") to_asm(page_number) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Flash Protection set"]
    #[doc = ""]
    #[doc = " Commands to set the flash protection configuration registers."]
    #[doc = "This sets the CONFIGx registers of the BPROT peripheral."]
    #[doc = ""]
    #[doc = " @note Not all parameters are valid for all products. Some bits in each parameter may not be"]
    #[doc = "       valid for your product. Please refer your Product Specification for more details."]
    #[doc = ""]
    #[doc = " @note To read the values read them directly. They are only write-protected."]
    #[doc = ""]
    #[doc = " @note It is possible to use @ref sd_protected_register_write instead of this function."]
    #[doc = ""]
    #[doc = " @param[in]  block_cfg0 Value to be written to the configuration register."]
    #[doc = " @param[in]  block_cfg1 Value to be written to the configuration register."]
    #[doc = " @param[in]  block_cfg2 Value to be written to the configuration register."]
    #[doc = " @param[in]  block_cfg3 Value to be written to the configuration register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Non-zero value supplied to one or more of the unsupported parameters."]
    #[doc = " @retval ::NRF_SUCCESS Values successfully written to configuration registers."]
    
#[inline(always)]
pub unsafe fn sd_flash_protect(
        block_cfg0: u32,
        block_cfg1: u32,
        block_cfg2: u32,
        block_cfg3: u32,
    ) -> u32 {
    let ret: u32;
    asm!("svc 42",
        inout("r0") to_asm(block_cfg0) => ret,
        inout("r1") to_asm(block_cfg1) => _,
        inout("r2") to_asm(block_cfg2) => _,
        inout("r3") to_asm(block_cfg3) => _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Opens a session for radio timeslot requests."]
    #[doc = ""]
    #[doc = " @note Only one session can be open at a time."]
    #[doc = " @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START) will be called when the radio timeslot"]
    #[doc = "       starts. From this point the NRF_RADIO and NRF_TIMER0 peripherals can be freely accessed"]
    #[doc = "       by the application."]
    #[doc = " @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0) is called whenever the NRF_TIMER0"]
    #[doc = "       interrupt occurs."]
    #[doc = " @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO) is called whenever the NRF_RADIO"]
    #[doc = "       interrupt occurs."]
    #[doc = " @note p_radio_signal_callback() will be called at ARM interrupt priority level 0. This"]
    #[doc = "       implies that none of the sd_* API calls can be used from p_radio_signal_callback()."]
    #[doc = ""]
    #[doc = " @param[in] p_radio_signal_callback The signal callback."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR p_radio_signal_callback is an invalid function pointer."]
    #[doc = " @retval ::NRF_ERROR_BUSY If session cannot be opened."]
    #[doc = " @retval ::NRF_ERROR_INTERNAL If a new session could not be opened due to an internal error."]
    #[doc = " @retval ::NRF_SUCCESS Otherwise."]
    
#[inline(always)]
pub unsafe fn sd_radio_session_open(p_radio_signal_callback: nrf_radio_signal_callback_t) -> u32 {
    let ret: u32;
    asm!("svc 72",
        inout("r0") to_asm(p_radio_signal_callback) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Closes a session for radio timeslot requests."]
    #[doc = ""]
    #[doc = " @note Any current radio timeslot will be finished before the session is closed."]
    #[doc = " @note If a radio timeslot is scheduled when the session is closed, it will be canceled."]
    #[doc = " @note The application cannot consider the session closed until the @ref NRF_EVT_RADIO_SESSION_CLOSED"]
    #[doc = "       event is received."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_FORBIDDEN If session not opened."]
    #[doc = " @retval ::NRF_ERROR_BUSY If session is currently being closed."]
    #[doc = " @retval ::NRF_SUCCESS Otherwise."]
    
#[inline(always)]
pub unsafe fn sd_radio_session_close() -> u32 {
    let ret: u32;
    asm!("svc 73",
        lateout("r0") ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Requests a radio timeslot."]
    #[doc = ""]
    #[doc = " @note The request type is determined by p_request->request_type, and can be one of @ref NRF_RADIO_REQ_TYPE_EARLIEST"]
    #[doc = "       and @ref NRF_RADIO_REQ_TYPE_NORMAL. The first request in a session must always be of type @ref NRF_RADIO_REQ_TYPE_EARLIEST."]
    #[doc = " @note For a normal request (@ref NRF_RADIO_REQ_TYPE_NORMAL), the start time of a radio timeslot is specified by"]
    #[doc = "       p_request->distance_us and is given relative to the start of the previous timeslot."]
    #[doc = " @note A too small p_request->distance_us will lead to a @ref NRF_EVT_RADIO_BLOCKED event."]
    #[doc = " @note Timeslots scheduled too close will lead to a @ref NRF_EVT_RADIO_BLOCKED event."]
    #[doc = " @note See the SoftDevice Specification for more on radio timeslot scheduling, distances and lengths."]
    #[doc = " @note If an opportunity for the first radio timeslot is not found before 100 ms after the call to this"]
    #[doc = "       function, it is not scheduled, and instead a @ref NRF_EVT_RADIO_BLOCKED event is sent."]
    #[doc = "       The application may then try to schedule the first radio timeslot again."]
    #[doc = " @note Successful requests will result in nrf_radio_signal_callback_t(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START)."]
    #[doc = "       Unsuccessful requests will result in a @ref NRF_EVT_RADIO_BLOCKED event, see @ref NRF_SOC_EVTS."]
    #[doc = " @note The jitter in the start time of the radio timeslots is +/- @ref NRF_RADIO_START_JITTER_US us."]
    #[doc = " @note The nrf_radio_signal_callback_t(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START) call has a latency relative to the"]
    #[doc = "       specified radio timeslot start, but this does not affect the actual start time of the timeslot."]
    #[doc = " @note NRF_TIMER0 is reset at the start of the radio timeslot, and is clocked at 1MHz from the high frequency"]
    #[doc = "       (16 MHz) clock source. If p_request->hfclk_force_xtal is true, the high frequency clock is"]
    #[doc = "       guaranteed to be clocked from the external crystal."]
    #[doc = " @note The SoftDevice will neither access the NRF_RADIO peripheral nor the NRF_TIMER0 peripheral"]
    #[doc = "       during the radio timeslot."]
    #[doc = ""]
    #[doc = " @param[in] p_request Pointer to the request parameters."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_FORBIDDEN Either:"]
    #[doc = "                                - The session is not open."]
    #[doc = "                                - The session is not IDLE."]
    #[doc = "                                - This is the first request and its type is not @ref NRF_RADIO_REQ_TYPE_EARLIEST."]
    #[doc = "                                - The request type was set to @ref NRF_RADIO_REQ_TYPE_NORMAL after a"]
    #[doc = "                                  @ref NRF_RADIO_REQ_TYPE_EARLIEST request was blocked."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR If the p_request pointer is invalid."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM If the parameters of p_request are not valid."]
    #[doc = " @retval ::NRF_SUCCESS Otherwise."]
    
#[inline(always)]
pub unsafe fn sd_radio_request(p_request: *const nrf_radio_request_t) -> u32 {
    let ret: u32;
    asm!("svc 74",
        inout("r0") to_asm(p_request) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Write register protected by the SoftDevice"]
    #[doc = ""]
    #[doc = " This function writes to a register that is write-protected by the SoftDevice. Please refer to your"]
    #[doc = " SoftDevice Specification for more details about which registers that are protected by SoftDevice."]
    #[doc = " This function can write to the following protected peripheral:"]
    #[doc = "  - BPROT"]
    #[doc = ""]
    #[doc = " @note Protected registers may be read directly."]
    #[doc = " @note Register that are write-once will return @ref NRF_SUCCESS on second set, even the value in"]
    #[doc = "       the register has not changed. See the Product Specification for more details about register"]
    #[doc = "       properties."]
    #[doc = ""]
    #[doc = " @param[in]  p_register Pointer to register to be written."]
    #[doc = " @param[in]  value Value to be written to the register."]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR This function can not write to the reguested register."]
    #[doc = " @retval ::NRF_SUCCESS Value successfully written to register."]
    #[doc = ""]
    
#[inline(always)]
pub unsafe fn sd_protected_register_write(p_register: *mut u32, value: u32) -> u32 {
    let ret: u32;
    asm!("svc 43",
        inout("r0") to_asm(p_register) => ret,
        inout("r1") to_asm(value) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}

#[doc = "< ::sd_softdevice_enable"]
pub const NRF_SD_SVCS_SD_SOFTDEVICE_ENABLE: NRF_SD_SVCS = 16;
#[doc = "< ::sd_softdevice_disable"]
pub const NRF_SD_SVCS_SD_SOFTDEVICE_DISABLE: NRF_SD_SVCS = 17;
#[doc = "< ::sd_softdevice_is_enabled"]
pub const NRF_SD_SVCS_SD_SOFTDEVICE_IS_ENABLED: NRF_SD_SVCS = 18;
#[doc = "< ::sd_softdevice_vector_table_base_set"]
pub const NRF_SD_SVCS_SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET: NRF_SD_SVCS = 19;
#[doc = "< Placeholder for last SDM SVC"]
pub const NRF_SD_SVCS_SVC_SDM_LAST: NRF_SD_SVCS = 20;
#[doc = "@brief nRF SoftDevice Manager API SVC numbers."]
pub type NRF_SD_SVCS = u32;
#[doc = "@brief Type representing LFCLK oscillator source."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nrf_clock_lf_cfg_t {
    #[doc = "< LF oscillator clock source, see @ref NRF_CLOCK_LF_SRC."]
    pub source: u8,
    #[doc = "< Only for ::NRF_CLOCK_LF_SRC_RC: Calibration timer interval in 1/4 second"]
    #[doc = "units (nRF52: 1-32)."]
    #[doc = "@note To avoid excessive clock drift, 0.5 degrees Celsius is the"]
    #[doc = "maximum temperature change allowed in one calibration timer"]
    #[doc = "interval. The interval should be selected to ensure this."]
    #[doc = ""]
    #[doc = "@note Must be 0 if source is not ::NRF_CLOCK_LF_SRC_RC."]
    pub rc_ctiv: u8,
    #[doc = "<  Only for ::NRF_CLOCK_LF_SRC_RC: How often (in number of calibration"]
    #[doc = "intervals) the RC oscillator shall be calibrated if the temperature"]
    #[doc = "hasn't changed."]
    #[doc = "0: Always calibrate even if the temperature hasn't changed."]
    #[doc = "1: Only calibrate if the temperature has changed (legacy - nRF51 only)."]
    #[doc = "2-33: Check the temperature and only calibrate if it has changed,"]
    #[doc = "however calibration will take place every rc_temp_ctiv"]
    #[doc = "intervals in any case."]
    #[doc = ""]
    #[doc = "@note Must be 0 if source is not ::NRF_CLOCK_LF_SRC_RC."]
    #[doc = ""]
    #[doc = "@note For nRF52, the application must ensure calibration at least once"]
    #[doc = "every 8 seconds to ensure +/-500 ppm clock stability. The"]
    #[doc = "recommended configuration for ::NRF_CLOCK_LF_SRC_RC on nRF52 is"]
    #[doc = "rc_ctiv=16 and rc_temp_ctiv=2. This will ensure calibration at"]
    #[doc = "least once every 8 seconds and for temperature changes of 0.5"]
    #[doc = "degrees Celsius every 4 seconds. See the Product Specification"]
    #[doc = "for the nRF52 device being used for more information."]
    pub rc_temp_ctiv: u8,
    #[doc = "< External clock accuracy used in the LL to compute timing"]
    #[doc = "windows, see @ref NRF_CLOCK_LF_ACCURACY."]
    pub accuracy: u8,
}
#[test]
fn bindgen_test_layout_nrf_clock_lf_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<nrf_clock_lf_cfg_t>(),
        4usize,
        concat!("Size of: ", stringify!(nrf_clock_lf_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<nrf_clock_lf_cfg_t>(),
        1usize,
        concat!("Alignment of ", stringify!(nrf_clock_lf_cfg_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<nrf_clock_lf_cfg_t>())).source as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_clock_lf_cfg_t),
            "::",
            stringify!(source)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<nrf_clock_lf_cfg_t>())).rc_ctiv as *const _ as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_clock_lf_cfg_t),
            "::",
            stringify!(rc_ctiv)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<nrf_clock_lf_cfg_t>())).rc_temp_ctiv as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_clock_lf_cfg_t),
            "::",
            stringify!(rc_temp_ctiv)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<nrf_clock_lf_cfg_t>())).accuracy as *const _ as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(nrf_clock_lf_cfg_t),
            "::",
            stringify!(accuracy)
        )
    );
}
#[doc = "@brief Fault Handler type."]
#[doc = ""]
#[doc = " When certain unrecoverable errors occur within the application or SoftDevice the fault handler will be called back."]
#[doc = " The protocol stack will be in an undefined state when this happens and the only way to recover will be to"]
#[doc = " perform a reset, using e.g. CMSIS NVIC_SystemReset()."]
#[doc = " If the application returns from the fault handler the SoftDevice will call NVIC_SystemReset()."]
#[doc = ""]
#[doc = " @note It is recommended to either perform a reset in the fault handler or to let the SoftDevice reset the device."]
#[doc = "       Otherwise SoC peripherals may behave in an undefined way. For example, the RADIO peripherial may"]
#[doc = "       continously transmit packets."]
#[doc = ""]
#[doc = " @note This callback is executed in HardFault context, thus SVC functions cannot be called from the fault callback."]
#[doc = ""]
#[doc = " @param[in] id Fault identifier. See @ref NRF_FAULT_IDS."]
#[doc = " @param[in] pc The program counter of the instruction that triggered the fault."]
#[doc = " @param[in] info Optional additional information regarding the fault. Refer to each Fault identifier for details."]
#[doc = ""]
#[doc = " @note When id is set to @ref NRF_FAULT_ID_APP_MEMACC, pc will contain the address of the instruction being executed at the time when"]
#[doc = " the fault is detected by the CPU. The CPU program counter may have advanced up to 2 instructions (no branching) after the one that triggered the fault."]
pub type nrf_fault_handler_t =
    ::core::option::Option<unsafe extern "C" fn(id: u32, pc: u32, info: u32)>;

    #[doc = "@brief Enables the SoftDevice and by extension the protocol stack."]
    #[doc = ""]
    #[doc = " @note Some care must be taken if a low frequency clock source is already running when calling this function:"]
    #[doc = "       If the LF clock has a different source then the one currently running, it will be stopped. Then, the new"]
    #[doc = "       clock source will be started."]
    #[doc = ""]
    #[doc = " @note This function has no effect when returning with an error."]
    #[doc = ""]
    #[doc = " @post If return code is ::NRF_SUCCESS"]
    #[doc = "       - SoC library and protocol stack APIs are made available."]
    #[doc = "       - A portion of RAM will be unavailable (see relevant SDS documentation)."]
    #[doc = "       - Some peripherals will be unavailable or available only through the SoC API (see relevant SDS documentation)."]
    #[doc = "       - Interrupts will not arrive from protected peripherals or interrupts."]
    #[doc = "       - nrf_nvic_ functions must be used instead of CMSIS NVIC_ functions for reliable usage of the SoftDevice."]
    #[doc = "       - Interrupt latency may be affected by the SoftDevice  (see relevant SDS documentation)."]
    #[doc = "       - Chosen low frequency clock source will be running."]
    #[doc = ""]
    #[doc = " @param p_clock_lf_cfg Low frequency clock source and accuracy."]
    #[doc = "If NULL the clock will be configured as an RC source with rc_ctiv = 16 and .rc_temp_ctiv = 2"]
    #[doc = "In the case of XTAL source, the PPM accuracy of the chosen clock source must be greater than or equal to the actual characteristics of your XTAL clock."]
    #[doc = " @param fault_handler Callback to be invoked in case of fault, cannot be NULL."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR  Invalid or NULL pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE SoftDevice is already enabled, and the clock source and fault handler cannot be updated."]
    #[doc = " @retval ::NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION SoftDevice interrupt is already enabled, or an enabled interrupt has an illegal priority level."]
    #[doc = " @retval ::NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN Unknown low frequency clock source selected."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid clock source configuration supplied in p_clock_lf_cfg."]
    
#[inline(always)]
pub unsafe fn sd_softdevice_enable(
        p_clock_lf_cfg: *const nrf_clock_lf_cfg_t,
        fault_handler: nrf_fault_handler_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 16",
        inout("r0") to_asm(p_clock_lf_cfg) => ret,
        inout("r1") to_asm(fault_handler) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Disables the SoftDevice and by extension the protocol stack."]
    #[doc = ""]
    #[doc = " Idempotent function to disable the SoftDevice."]
    #[doc = ""]
    #[doc = " @post SoC library and protocol stack APIs are made unavailable."]
    #[doc = " @post All interrupts that was protected by the SoftDevice will be disabled and initialized to priority 0 (highest)."]
    #[doc = " @post All peripherals used by the SoftDevice will be reset to default values."]
    #[doc = " @post All of RAM become available."]
    #[doc = " @post All interrupts are forwarded to the application."]
    #[doc = " @post LFCLK source chosen in ::sd_softdevice_enable will be left running."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_softdevice_disable() -> u32 {
    let ret: u32;
    asm!("svc 17",
        lateout("r0") ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Check if the SoftDevice is enabled."]
    #[doc = ""]
    #[doc = " @param[out]  p_softdevice_enabled If the SoftDevice is enabled: 1 else 0."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_softdevice_is_enabled(p_softdevice_enabled: *mut u8) -> u32 {
    let ret: u32;
    asm!("svc 18",
        inout("r0") to_asm(p_softdevice_enabled) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Sets the base address of the interrupt vector table for interrupts forwarded from the SoftDevice"]
    #[doc = ""]
    #[doc = " This function is only intended to be called when a bootloader is enabled."]
    #[doc = ""]
    #[doc = " @param[in] address The base address of the interrupt vector table for forwarded interrupts."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS"]
    
#[inline(always)]
pub unsafe fn sd_softdevice_vector_table_base_set(address: u32) -> u32 {
    let ret: u32;
    asm!("svc 19",
        inout("r0") to_asm(address) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}

#[doc = " @brief 128 bit UUID values."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_uuid128_t {
    #[doc = "< Little-Endian UUID bytes."]
    pub uuid128: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_ble_uuid128_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_uuid128_t>(),
        16usize,
        concat!("Size of: ", stringify!(ble_uuid128_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_uuid128_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_uuid128_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_uuid128_t>())).uuid128 as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_uuid128_t),
            "::",
            stringify!(uuid128)
        )
    );
}
#[doc = " @brief  Bluetooth Low Energy UUID type, encapsulates both 16-bit and 128-bit UUIDs."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_uuid_t {
    #[doc = "< 16-bit UUID value or octets 12-13 of 128-bit UUID."]
    pub uuid: u16,
    #[doc = "< UUID type, see @ref BLE_UUID_TYPES. If type is @ref BLE_UUID_TYPE_UNKNOWN, the value of uuid is undefined."]
    pub type_: u8,
}
#[test]
fn bindgen_test_layout_ble_uuid_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_uuid_t>(),
        4usize,
        concat!("Size of: ", stringify!(ble_uuid_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_uuid_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_uuid_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_uuid_t>())).uuid as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_uuid_t),
            "::",
            stringify!(uuid)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_uuid_t>())).type_ as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_uuid_t),
            "::",
            stringify!(type_)
        )
    );
}
#[doc = "@brief Data structure."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_data_t {
    #[doc = "< Pointer to the data buffer provided to/from the application."]
    pub p_data: *mut u8,
    #[doc = "< Length of the data buffer, in bytes."]
    pub len: u16,
}
#[test]
fn bindgen_test_layout_ble_data_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_data_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_data_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_data_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_data_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_data_t>())).p_data as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_data_t),
            "::",
            stringify!(p_data)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_data_t>())).len as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_data_t),
            "::",
            stringify!(len)
        )
    );
}
#[doc = " @brief BLE GATT connection configuration parameters, set with @ref sd_ble_cfg_set."]
#[doc = ""]
#[doc = " @retval ::NRF_ERROR_INVALID_PARAM att_mtu is smaller than @ref BLE_GATT_ATT_MTU_DEFAULT."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatt_conn_cfg_t {
    #[doc = "< Maximum size of ATT packet the SoftDevice can send or receive."]
    #[doc = "The default and minimum value is @ref BLE_GATT_ATT_MTU_DEFAULT."]
    #[doc = "@mscs"]
    #[doc = "@mmsc{@ref BLE_GATTC_MTU_EXCHANGE}"]
    #[doc = "@mmsc{@ref BLE_GATTS_MTU_EXCHANGE}"]
    #[doc = "@endmscs"]
    pub att_mtu: u16,
}
#[test]
fn bindgen_test_layout_ble_gatt_conn_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatt_conn_cfg_t>(),
        2usize,
        concat!("Size of: ", stringify!(ble_gatt_conn_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatt_conn_cfg_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gatt_conn_cfg_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatt_conn_cfg_t>())).att_mtu as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatt_conn_cfg_t),
            "::",
            stringify!(att_mtu)
        )
    );
}
#[doc = "@brief GATT Characteristic Properties."]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatt_char_props_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gatt_char_props_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatt_char_props_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gatt_char_props_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatt_char_props_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gatt_char_props_t))
    );
}
impl ble_gatt_char_props_t {
    #[inline]
    pub fn broadcast(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_broadcast(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn read(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_read(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn write_wo_resp(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_write_wo_resp(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(2usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn write(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_write(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn notify(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_notify(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(4usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn indicate(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_indicate(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(5usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn auth_signed_wr(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_auth_signed_wr(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(6usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        broadcast: u8,
        read: u8,
        write_wo_resp: u8,
        write: u8,
        notify: u8,
        indicate: u8,
        auth_signed_wr: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let broadcast: u8 = unsafe { ::core::mem::transmute(broadcast) };
            broadcast as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let read: u8 = unsafe { ::core::mem::transmute(read) };
            read as u64
        });
        __bindgen_bitfield_unit.set(2usize, 1u8, {
            let write_wo_resp: u8 = unsafe { ::core::mem::transmute(write_wo_resp) };
            write_wo_resp as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let write: u8 = unsafe { ::core::mem::transmute(write) };
            write as u64
        });
        __bindgen_bitfield_unit.set(4usize, 1u8, {
            let notify: u8 = unsafe { ::core::mem::transmute(notify) };
            notify as u64
        });
        __bindgen_bitfield_unit.set(5usize, 1u8, {
            let indicate: u8 = unsafe { ::core::mem::transmute(indicate) };
            indicate as u64
        });
        __bindgen_bitfield_unit.set(6usize, 1u8, {
            let auth_signed_wr: u8 = unsafe { ::core::mem::transmute(auth_signed_wr) };
            auth_signed_wr as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief GATT Characteristic Extended Properties."]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatt_char_ext_props_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gatt_char_ext_props_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatt_char_ext_props_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gatt_char_ext_props_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatt_char_ext_props_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gatt_char_ext_props_t))
    );
}
impl ble_gatt_char_ext_props_t {
    #[inline]
    pub fn reliable_wr(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_reliable_wr(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn wr_aux(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_wr_aux(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(reliable_wr: u8, wr_aux: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let reliable_wr: u8 = unsafe { ::core::mem::transmute(reliable_wr) };
            reliable_wr as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let wr_aux: u8 = unsafe { ::core::mem::transmute(wr_aux) };
            wr_aux as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "< ::sd_mbr_command"]
pub const NRF_MBR_SVCS_SD_MBR_COMMAND: NRF_MBR_SVCS = 24;
#[doc = "@brief nRF Master Boot Record API SVC numbers."]
pub type NRF_MBR_SVCS = u32;
#[doc = "< Copy a new BootLoader. @see ::sd_mbr_command_copy_bl_t"]
pub const NRF_MBR_COMMANDS_SD_MBR_COMMAND_COPY_BL: NRF_MBR_COMMANDS = 0;
#[doc = "< Copy a new SoftDevice. @see ::sd_mbr_command_copy_sd_t"]
pub const NRF_MBR_COMMANDS_SD_MBR_COMMAND_COPY_SD: NRF_MBR_COMMANDS = 1;
#[doc = "< Initialize forwarding interrupts to SD, and run reset function in SD. Does not require any parameters in ::sd_mbr_command_t params."]
pub const NRF_MBR_COMMANDS_SD_MBR_COMMAND_INIT_SD: NRF_MBR_COMMANDS = 2;
#[doc = "< This command works like memcmp. @see ::sd_mbr_command_compare_t"]
pub const NRF_MBR_COMMANDS_SD_MBR_COMMAND_COMPARE: NRF_MBR_COMMANDS = 3;
#[doc = "< Change the address the MBR starts after a reset. @see ::sd_mbr_command_vector_table_base_set_t"]
pub const NRF_MBR_COMMANDS_SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET: NRF_MBR_COMMANDS = 4;
pub const NRF_MBR_COMMANDS_SD_MBR_COMMAND_RESERVED: NRF_MBR_COMMANDS = 5;
#[doc = "< Start forwarding all interrupts to this address. @see ::sd_mbr_command_irq_forward_address_set_t"]
pub const NRF_MBR_COMMANDS_SD_MBR_COMMAND_IRQ_FORWARD_ADDRESS_SET: NRF_MBR_COMMANDS = 6;
#[doc = "@brief Possible values for ::sd_mbr_command_t.command"]
pub type NRF_MBR_COMMANDS = u32;
#[doc = "@brief This command copies part of a new SoftDevice"]
#[doc = ""]
#[doc = " The destination area is erased before copying."]
#[doc = " If dst is in the middle of a flash page, that whole flash page will be erased."]
#[doc = " If (dst+len) is in the middle of a flash page, that whole flash page will be erased."]
#[doc = ""]
#[doc = " The user of this function is responsible for setting the BPROT registers."]
#[doc = ""]
#[doc = " @retval ::NRF_SUCCESS indicates that the contents of the memory blocks where copied correctly."]
#[doc = " @retval ::NRF_ERROR_INTERNAL indicates that the contents of the memory blocks where not verified correctly after copying."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sd_mbr_command_copy_sd_t {
    #[doc = "< Pointer to the source of data to be copied."]
    pub src: *mut u32,
    #[doc = "< Pointer to the destination where the content is to be copied."]
    pub dst: *mut u32,
    #[doc = "< Number of 32 bit words to copy. Must be a multiple of @ref MBR_PAGE_SIZE_IN_WORDS words."]
    pub len: u32,
}
#[test]
fn bindgen_test_layout_sd_mbr_command_copy_sd_t() {
    assert_eq!(
        ::core::mem::size_of::<sd_mbr_command_copy_sd_t>(),
        12usize,
        concat!("Size of: ", stringify!(sd_mbr_command_copy_sd_t))
    );
    assert_eq!(
        ::core::mem::align_of::<sd_mbr_command_copy_sd_t>(),
        4usize,
        concat!("Alignment of ", stringify!(sd_mbr_command_copy_sd_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<sd_mbr_command_copy_sd_t>())).src as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_copy_sd_t),
            "::",
            stringify!(src)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<sd_mbr_command_copy_sd_t>())).dst as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_copy_sd_t),
            "::",
            stringify!(dst)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<sd_mbr_command_copy_sd_t>())).len as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_copy_sd_t),
            "::",
            stringify!(len)
        )
    );
}
#[doc = "@brief This command works like memcmp, but takes the length in words."]
#[doc = ""]
#[doc = " @retval ::NRF_SUCCESS indicates that the contents of both memory blocks are equal."]
#[doc = " @retval ::NRF_ERROR_NULL indicates that the contents of the memory blocks are not equal."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sd_mbr_command_compare_t {
    #[doc = "< Pointer to block of memory."]
    pub ptr1: *mut u32,
    #[doc = "< Pointer to block of memory."]
    pub ptr2: *mut u32,
    #[doc = "< Number of 32 bit words to compare."]
    pub len: u32,
}
#[test]
fn bindgen_test_layout_sd_mbr_command_compare_t() {
    assert_eq!(
        ::core::mem::size_of::<sd_mbr_command_compare_t>(),
        12usize,
        concat!("Size of: ", stringify!(sd_mbr_command_compare_t))
    );
    assert_eq!(
        ::core::mem::align_of::<sd_mbr_command_compare_t>(),
        4usize,
        concat!("Alignment of ", stringify!(sd_mbr_command_compare_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<sd_mbr_command_compare_t>())).ptr1 as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_compare_t),
            "::",
            stringify!(ptr1)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<sd_mbr_command_compare_t>())).ptr2 as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_compare_t),
            "::",
            stringify!(ptr2)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<sd_mbr_command_compare_t>())).len as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_compare_t),
            "::",
            stringify!(len)
        )
    );
}
#[doc = "@brief This command copies a new BootLoader."]
#[doc = ""]
#[doc = " The MBR assumes that either @ref MBR_BOOTLOADER_ADDR or @ref MBR_UICR_BOOTLOADER_ADDR is set to"]
#[doc = " the address where the bootloader will be copied. If both addresses are set, the MBR will prioritize"]
#[doc = " @ref MBR_BOOTLOADER_ADDR."]
#[doc = ""]
#[doc = " The bootloader destination is erased by this function."]
#[doc = " If (destination+bl_len) is in the middle of a flash page, that whole flash page will be erased."]
#[doc = ""]
#[doc = " This command requires that @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR is set,"]
#[doc = " see @ref sd_mbr_command."]
#[doc = ""]
#[doc = " This command will use the flash protect peripheral (BPROT or ACL) to protect the flash that is"]
#[doc = " not intended to be written."]
#[doc = ""]
#[doc = " On success, this function will not return. It will start the new bootloader from reset-vector as normal."]
#[doc = ""]
#[doc = " @retval ::NRF_ERROR_INTERNAL indicates an internal error that should not happen."]
#[doc = " @retval ::NRF_ERROR_FORBIDDEN if the bootloader address is not set."]
#[doc = " @retval ::NRF_ERROR_INVALID_LENGTH if parameters attempts to read or write outside flash area."]
#[doc = " @retval ::NRF_ERROR_NO_MEM No MBR parameter page is provided. See @ref sd_mbr_command."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sd_mbr_command_copy_bl_t {
    #[doc = "< Pointer to the source of the bootloader to be be copied."]
    pub bl_src: *mut u32,
    #[doc = "< Number of 32 bit words to copy for BootLoader."]
    pub bl_len: u32,
}
#[test]
fn bindgen_test_layout_sd_mbr_command_copy_bl_t() {
    assert_eq!(
        ::core::mem::size_of::<sd_mbr_command_copy_bl_t>(),
        8usize,
        concat!("Size of: ", stringify!(sd_mbr_command_copy_bl_t))
    );
    assert_eq!(
        ::core::mem::align_of::<sd_mbr_command_copy_bl_t>(),
        4usize,
        concat!("Alignment of ", stringify!(sd_mbr_command_copy_bl_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<sd_mbr_command_copy_bl_t>())).bl_src as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_copy_bl_t),
            "::",
            stringify!(bl_src)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<sd_mbr_command_copy_bl_t>())).bl_len as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_copy_bl_t),
            "::",
            stringify!(bl_len)
        )
    );
}
#[doc = "@brief Change the address the MBR starts after a reset"]
#[doc = ""]
#[doc = " Once this function has been called, this address is where the MBR will start to forward"]
#[doc = " interrupts to after a reset."]
#[doc = ""]
#[doc = " To restore default forwarding, this function should be called with @ref address set to 0. If a"]
#[doc = " bootloader is present, interrupts will be forwarded to the bootloader. If not, interrupts will"]
#[doc = " be forwarded to the SoftDevice."]
#[doc = ""]
#[doc = " The location of a bootloader can be specified in @ref MBR_BOOTLOADER_ADDR or"]
#[doc = " @ref MBR_UICR_BOOTLOADER_ADDR. If both addresses are set, the MBR will prioritize"]
#[doc = " @ref MBR_BOOTLOADER_ADDR."]
#[doc = ""]
#[doc = " This command requires that @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR is set,"]
#[doc = " see @ref sd_mbr_command."]
#[doc = ""]
#[doc = " On success, this function will not return. It will reset the device."]
#[doc = ""]
#[doc = " @retval ::NRF_ERROR_INTERNAL indicates an internal error that should not happen."]
#[doc = " @retval ::NRF_ERROR_INVALID_ADDR if parameter address is outside of the flash size."]
#[doc = " @retval ::NRF_ERROR_NO_MEM No MBR parameter page is provided. See @ref sd_mbr_command."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sd_mbr_command_vector_table_base_set_t {
    #[doc = "< The base address of the interrupt vector table for forwarded interrupts."]
    pub address: u32,
}
#[test]
fn bindgen_test_layout_sd_mbr_command_vector_table_base_set_t() {
    assert_eq!(
        ::core::mem::size_of::<sd_mbr_command_vector_table_base_set_t>(),
        4usize,
        concat!(
            "Size of: ",
            stringify!(sd_mbr_command_vector_table_base_set_t)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<sd_mbr_command_vector_table_base_set_t>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(sd_mbr_command_vector_table_base_set_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<sd_mbr_command_vector_table_base_set_t>())).address as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_vector_table_base_set_t),
            "::",
            stringify!(address)
        )
    );
}
#[doc = "@brief Sets the base address of the interrupt vector table for interrupts forwarded from the MBR"]
#[doc = ""]
#[doc = " Unlike sd_mbr_command_vector_table_base_set_t, this function does not reset, and it does not"]
#[doc = " change where the MBR starts after reset."]
#[doc = ""]
#[doc = " @retval ::NRF_SUCCESS"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sd_mbr_command_irq_forward_address_set_t {
    #[doc = "< The base address of the interrupt vector table for forwarded interrupts."]
    pub address: u32,
}
#[test]
fn bindgen_test_layout_sd_mbr_command_irq_forward_address_set_t() {
    assert_eq!(
        ::core::mem::size_of::<sd_mbr_command_irq_forward_address_set_t>(),
        4usize,
        concat!(
            "Size of: ",
            stringify!(sd_mbr_command_irq_forward_address_set_t)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<sd_mbr_command_irq_forward_address_set_t>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(sd_mbr_command_irq_forward_address_set_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<sd_mbr_command_irq_forward_address_set_t>())).address
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_irq_forward_address_set_t),
            "::",
            stringify!(address)
        )
    );
}
#[doc = "@brief Input structure containing data used when calling ::sd_mbr_command"]
#[doc = ""]
#[doc = " Depending on what command value that is set, the corresponding params value type must also be"]
#[doc = " set. See @ref NRF_MBR_COMMANDS for command types and corresponding params value type. If command"]
#[doc = " @ref SD_MBR_COMMAND_INIT_SD is set, it is not necessary to set any values under params."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct sd_mbr_command_t {
    #[doc = "< Type of command to be issued. See @ref NRF_MBR_COMMANDS."]
    pub command: u32,
    #[doc = "< Command parameters."]
    pub params: sd_mbr_command_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union sd_mbr_command_t__bindgen_ty_1 {
    #[doc = "< Parameters for copy SoftDevice."]
    pub copy_sd: sd_mbr_command_copy_sd_t,
    #[doc = "< Parameters for verify."]
    pub compare: sd_mbr_command_compare_t,
    #[doc = "< Parameters for copy BootLoader. Requires parameter page."]
    pub copy_bl: sd_mbr_command_copy_bl_t,
    #[doc = "< Parameters for vector table base set. Requires parameter page."]
    pub base_set: sd_mbr_command_vector_table_base_set_t,
    #[doc = "< Parameters for irq forward address set"]
    pub irq_forward_address_set: sd_mbr_command_irq_forward_address_set_t,
    _bindgen_union_align: [u32; 3usize],
}
#[test]
fn bindgen_test_layout_sd_mbr_command_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<sd_mbr_command_t__bindgen_ty_1>(),
        12usize,
        concat!("Size of: ", stringify!(sd_mbr_command_t__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<sd_mbr_command_t__bindgen_ty_1>(),
        4usize,
        concat!("Alignment of ", stringify!(sd_mbr_command_t__bindgen_ty_1))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<sd_mbr_command_t__bindgen_ty_1>())).copy_sd as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_t__bindgen_ty_1),
            "::",
            stringify!(copy_sd)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<sd_mbr_command_t__bindgen_ty_1>())).compare as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_t__bindgen_ty_1),
            "::",
            stringify!(compare)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<sd_mbr_command_t__bindgen_ty_1>())).copy_bl as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_t__bindgen_ty_1),
            "::",
            stringify!(copy_bl)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<sd_mbr_command_t__bindgen_ty_1>())).base_set as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_t__bindgen_ty_1),
            "::",
            stringify!(base_set)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<sd_mbr_command_t__bindgen_ty_1>())).irq_forward_address_set
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_t__bindgen_ty_1),
            "::",
            stringify!(irq_forward_address_set)
        )
    );
}
#[test]
fn bindgen_test_layout_sd_mbr_command_t() {
    assert_eq!(
        ::core::mem::size_of::<sd_mbr_command_t>(),
        16usize,
        concat!("Size of: ", stringify!(sd_mbr_command_t))
    );
    assert_eq!(
        ::core::mem::align_of::<sd_mbr_command_t>(),
        4usize,
        concat!("Alignment of ", stringify!(sd_mbr_command_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<sd_mbr_command_t>())).command as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_t),
            "::",
            stringify!(command)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<sd_mbr_command_t>())).params as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(sd_mbr_command_t),
            "::",
            stringify!(params)
        )
    );
}

    #[doc = "@brief Issue Master Boot Record commands"]
    #[doc = ""]
    #[doc = " Commands used when updating a SoftDevice and bootloader."]
    #[doc = ""]
    #[doc = " The @ref SD_MBR_COMMAND_COPY_BL and @ref SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET requires"]
    #[doc = " parameters to be retained by the MBR when resetting the IC. This is done in a separate flash"]
    #[doc = " page. The location of the flash page should be provided by the application in either"]
    #[doc = " @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR. If both addresses are set, the MBR"]
    #[doc = " will prioritize @ref MBR_PARAM_PAGE_ADDR. This page will be cleared by the MBR and is used to"]
    #[doc = " store the command before reset. When an address is specified, the page it refers to must not be"]
    #[doc = " used by the application. If no address is provided by the application, i.e. both"]
    #[doc = " @ref MBR_PARAM_PAGE_ADDR and @ref MBR_UICR_PARAM_PAGE_ADDR is 0xFFFFFFFF, MBR commands which use"]
    #[doc = " flash will be unavailable and return @ref NRF_ERROR_NO_MEM."]
    #[doc = ""]
    #[doc = " @param[in]  param Pointer to a struct describing the command."]
    #[doc = ""]
    #[doc = " @note For a complete set of return values, see ::sd_mbr_command_copy_sd_t,"]
    #[doc = "       ::sd_mbr_command_copy_bl_t, ::sd_mbr_command_compare_t,"]
    #[doc = "       ::sd_mbr_command_vector_table_base_set_t, ::sd_mbr_command_irq_forward_address_set_t"]
    #[doc = ""]
    #[doc = " @retval ::NRF_ERROR_NO_MEM No MBR parameter page provided"]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM if an invalid command is given."]
    
#[inline(always)]
pub unsafe fn sd_mbr_command(param: *mut sd_mbr_command_t) -> u32 {
    let ret: u32;
    asm!("svc 24",
        inout("r0") to_asm(param) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}

#[doc = "< Set own Bluetooth Address."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_ADDR_SET: BLE_GAP_SVCS = 108;
#[doc = "< Get own Bluetooth Address."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_ADDR_GET: BLE_GAP_SVCS = 109;
#[doc = "< Set active whitelist."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_WHITELIST_SET: BLE_GAP_SVCS = 110;
#[doc = "< Set device identity list."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_DEVICE_IDENTITIES_SET: BLE_GAP_SVCS = 111;
#[doc = "< Set Privacy settings"]
pub const BLE_GAP_SVCS_SD_BLE_GAP_PRIVACY_SET: BLE_GAP_SVCS = 112;
#[doc = "< Get Privacy settings"]
pub const BLE_GAP_SVCS_SD_BLE_GAP_PRIVACY_GET: BLE_GAP_SVCS = 113;
#[doc = "< Configure an advertising set."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_ADV_SET_CONFIGURE: BLE_GAP_SVCS = 114;
#[doc = "< Start Advertising."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_ADV_START: BLE_GAP_SVCS = 115;
#[doc = "< Stop Advertising."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_ADV_STOP: BLE_GAP_SVCS = 116;
#[doc = "< Connection Parameter Update."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_CONN_PARAM_UPDATE: BLE_GAP_SVCS = 117;
#[doc = "< Disconnect."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_DISCONNECT: BLE_GAP_SVCS = 118;
#[doc = "< Set TX Power."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_TX_POWER_SET: BLE_GAP_SVCS = 119;
#[doc = "< Set Appearance."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_APPEARANCE_SET: BLE_GAP_SVCS = 120;
#[doc = "< Get Appearance."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_APPEARANCE_GET: BLE_GAP_SVCS = 121;
#[doc = "< Set PPCP."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_PPCP_SET: BLE_GAP_SVCS = 122;
#[doc = "< Get PPCP."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_PPCP_GET: BLE_GAP_SVCS = 123;
#[doc = "< Set Device Name."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_DEVICE_NAME_SET: BLE_GAP_SVCS = 124;
#[doc = "< Get Device Name."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_DEVICE_NAME_GET: BLE_GAP_SVCS = 125;
#[doc = "< Initiate Pairing/Bonding."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_AUTHENTICATE: BLE_GAP_SVCS = 126;
#[doc = "< Reply with Security Parameters."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_SEC_PARAMS_REPLY: BLE_GAP_SVCS = 127;
#[doc = "< Reply with an authentication key."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_AUTH_KEY_REPLY: BLE_GAP_SVCS = 128;
#[doc = "< Reply with an LE Secure Connections DHKey."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_LESC_DHKEY_REPLY: BLE_GAP_SVCS = 129;
#[doc = "< Notify of a keypress during an authentication procedure."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_KEYPRESS_NOTIFY: BLE_GAP_SVCS = 130;
#[doc = "< Get the local LE Secure Connections OOB data."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_LESC_OOB_DATA_GET: BLE_GAP_SVCS = 131;
#[doc = "< Set the remote LE Secure Connections OOB data."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_LESC_OOB_DATA_SET: BLE_GAP_SVCS = 132;
#[doc = "< Reply with Security Information."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_SEC_INFO_REPLY: BLE_GAP_SVCS = 134;
#[doc = "< Obtain connection security level."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_CONN_SEC_GET: BLE_GAP_SVCS = 135;
#[doc = "< Start reporting of changes in RSSI."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_RSSI_START: BLE_GAP_SVCS = 136;
#[doc = "< Stop reporting of changes in RSSI."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_RSSI_STOP: BLE_GAP_SVCS = 137;
#[doc = "< Get the last RSSI sample."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_RSSI_GET: BLE_GAP_SVCS = 142;
#[doc = "< Initiate or respond to a PHY Update Procedure."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_PHY_UPDATE: BLE_GAP_SVCS = 143;
#[doc = "< Initiate or respond to a Data Length Update Procedure."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_DATA_LENGTH_UPDATE: BLE_GAP_SVCS = 144;
#[doc = "< Get the Address used on air while Advertising."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_ADV_ADDR_GET: BLE_GAP_SVCS = 147;
#[doc = "< Get the next connection event counter."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_NEXT_CONN_EVT_COUNTER_GET: BLE_GAP_SVCS = 148;
pub const BLE_GAP_SVCS_SD_BLE_GAP_CONN_EVT_TRIGGER_START: BLE_GAP_SVCS = 149;
#[doc = " Start triggering a given task on connection event start."]
pub const BLE_GAP_SVCS_SD_BLE_GAP_CONN_EVT_TRIGGER_STOP: BLE_GAP_SVCS = 150;
#[doc = "@brief GAP API SVC numbers."]
pub type BLE_GAP_SVCS = u32;
#[doc = "< Connected to peer.                              \\n See @ref ble_gap_evt_connected_t"]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_CONNECTED: BLE_GAP_EVTS = 16;
#[doc = "< Disconnected from peer.                         \\n See @ref ble_gap_evt_disconnected_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_DISCONNECTED: BLE_GAP_EVTS = 17;
#[doc = "< Connection Parameters updated.                  \\n See @ref ble_gap_evt_conn_param_update_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_CONN_PARAM_UPDATE: BLE_GAP_EVTS = 18;
#[doc = "< Request to provide security parameters.         \\n Reply with @ref sd_ble_gap_sec_params_reply.  \\n See @ref ble_gap_evt_sec_params_request_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_SEC_PARAMS_REQUEST: BLE_GAP_EVTS = 19;
#[doc = "< Request to provide security information.        \\n Reply with @ref sd_ble_gap_sec_info_reply.    \\n See @ref ble_gap_evt_sec_info_request_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_SEC_INFO_REQUEST: BLE_GAP_EVTS = 20;
#[doc = "< Request to display a passkey to the user.       \\n In LESC Numeric Comparison, reply with @ref sd_ble_gap_auth_key_reply. \\n See @ref ble_gap_evt_passkey_display_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_PASSKEY_DISPLAY: BLE_GAP_EVTS = 21;
#[doc = "< Notification of a keypress on the remote device.\\n See @ref ble_gap_evt_key_pressed_t"]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_KEY_PRESSED: BLE_GAP_EVTS = 22;
#[doc = "< Request to provide an authentication key.       \\n Reply with @ref sd_ble_gap_auth_key_reply.    \\n See @ref ble_gap_evt_auth_key_request_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_AUTH_KEY_REQUEST: BLE_GAP_EVTS = 23;
#[doc = "< Request to calculate an LE Secure Connections DHKey. \\n Reply with @ref sd_ble_gap_lesc_dhkey_reply.  \\n See @ref ble_gap_evt_lesc_dhkey_request_t"]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_LESC_DHKEY_REQUEST: BLE_GAP_EVTS = 24;
#[doc = "< Authentication procedure completed with status. \\n See @ref ble_gap_evt_auth_status_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_AUTH_STATUS: BLE_GAP_EVTS = 25;
#[doc = "< Connection security updated.                    \\n See @ref ble_gap_evt_conn_sec_update_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_CONN_SEC_UPDATE: BLE_GAP_EVTS = 26;
#[doc = "< Timeout expired.                                \\n See @ref ble_gap_evt_timeout_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_TIMEOUT: BLE_GAP_EVTS = 27;
#[doc = "< RSSI report.                                    \\n See @ref ble_gap_evt_rssi_changed_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_RSSI_CHANGED: BLE_GAP_EVTS = 28;
#[doc = "< Security Request.                               \\n See @ref ble_gap_evt_sec_request_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_SEC_REQUEST: BLE_GAP_EVTS = 30;
#[doc = "< Scan request report.                            \\n See @ref ble_gap_evt_scan_req_report_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_SCAN_REQ_REPORT: BLE_GAP_EVTS = 32;
#[doc = "< PHY Update Request.                             \\n Reply with @ref sd_ble_gap_phy_update. \\n See @ref ble_gap_evt_phy_update_request_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_PHY_UPDATE_REQUEST: BLE_GAP_EVTS = 33;
#[doc = "< PHY Update Procedure is complete.               \\n See @ref ble_gap_evt_phy_update_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_PHY_UPDATE: BLE_GAP_EVTS = 34;
#[doc = "< Data Length Update Request.                     \\n Reply with @ref sd_ble_gap_data_length_update. \\n See @ref ble_gap_evt_data_length_update_request_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST: BLE_GAP_EVTS = 35;
#[doc = "< LL Data Channel PDU payload length updated.     \\n See @ref ble_gap_evt_data_length_update_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_DATA_LENGTH_UPDATE: BLE_GAP_EVTS = 36;
#[doc = "< Advertising set terminated.                     \\n See @ref ble_gap_evt_adv_set_terminated_t."]
pub const BLE_GAP_EVTS_BLE_GAP_EVT_ADV_SET_TERMINATED: BLE_GAP_EVTS = 38;
#[doc = "@brief GAP Event IDs."]
#[doc = " IDs that uniquely identify an event coming from the stack to the application."]
pub type BLE_GAP_EVTS = u32;
#[doc = "< Channel Map. @ref ble_gap_opt_ch_map_t"]
pub const BLE_GAP_OPTS_BLE_GAP_OPT_CH_MAP: BLE_GAP_OPTS = 32;
#[doc = "< Local connection latency. @ref ble_gap_opt_local_conn_latency_t"]
pub const BLE_GAP_OPTS_BLE_GAP_OPT_LOCAL_CONN_LATENCY: BLE_GAP_OPTS = 33;
#[doc = "< Set passkey. @ref ble_gap_opt_passkey_t"]
pub const BLE_GAP_OPTS_BLE_GAP_OPT_PASSKEY: BLE_GAP_OPTS = 34;
#[doc = "< Set Authenticated payload timeout. @ref ble_gap_opt_auth_payload_timeout_t"]
pub const BLE_GAP_OPTS_BLE_GAP_OPT_AUTH_PAYLOAD_TIMEOUT: BLE_GAP_OPTS = 36;
#[doc = "< Disable slave latency. @ref ble_gap_opt_slave_latency_disable_t"]
pub const BLE_GAP_OPTS_BLE_GAP_OPT_SLAVE_LATENCY_DISABLE: BLE_GAP_OPTS = 37;
#[doc = "@brief GAP Option IDs."]
#[doc = " IDs that uniquely identify a GAP option."]
pub type BLE_GAP_OPTS = u32;
#[doc = "< Role count configuration."]
pub const BLE_GAP_CFGS_BLE_GAP_CFG_ROLE_COUNT: BLE_GAP_CFGS = 64;
#[doc = "< Device name configuration."]
pub const BLE_GAP_CFGS_BLE_GAP_CFG_DEVICE_NAME: BLE_GAP_CFGS = 65;
#[doc = "< Peripheral Preferred Connection Parameters characteristic"]
#[doc = "inclusion configuration."]
pub const BLE_GAP_CFGS_BLE_GAP_CFG_PPCP_INCL_CONFIG: BLE_GAP_CFGS = 66;
#[doc = "< Central Address Resolution characteristic"]
#[doc = "inclusion configuration."]
pub const BLE_GAP_CFGS_BLE_GAP_CFG_CAR_INCL_CONFIG: BLE_GAP_CFGS = 67;
#[doc = "@brief GAP Configuration IDs."]
#[doc = ""]
#[doc = " IDs that uniquely identify a GAP configuration."]
pub type BLE_GAP_CFGS = u32;
#[doc = "< Advertiser role."]
pub const BLE_GAP_TX_POWER_ROLES_BLE_GAP_TX_POWER_ROLE_ADV: BLE_GAP_TX_POWER_ROLES = 1;
#[doc = "< Connection role."]
pub const BLE_GAP_TX_POWER_ROLES_BLE_GAP_TX_POWER_ROLE_CONN: BLE_GAP_TX_POWER_ROLES = 3;
#[doc = "@brief GAP TX Power roles."]
pub type BLE_GAP_TX_POWER_ROLES = u32;
#[doc = "@brief Advertising event properties."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_adv_properties_t {
    #[doc = "< Advertising type. See @ref BLE_GAP_ADV_TYPES."]
    pub type_: u8,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gap_adv_properties_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_adv_properties_t>(),
        2usize,
        concat!("Size of: ", stringify!(ble_gap_adv_properties_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_adv_properties_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_adv_properties_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_adv_properties_t>())).type_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_adv_properties_t),
            "::",
            stringify!(type_)
        )
    );
}
impl ble_gap_adv_properties_t {
    #[inline]
    pub fn anonymous(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_anonymous(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn include_tx_power(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_include_tx_power(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        anonymous: u8,
        include_tx_power: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let anonymous: u8 = unsafe { ::core::mem::transmute(anonymous) };
            anonymous as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let include_tx_power: u8 = unsafe { ::core::mem::transmute(include_tx_power) };
            include_tx_power as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief Bluetooth Low Energy address."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_addr_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    #[doc = "< 48-bit address, LSB format."]
    pub addr: [u8; 6usize],
}
#[test]
fn bindgen_test_layout_ble_gap_addr_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_addr_t>(),
        7usize,
        concat!("Size of: ", stringify!(ble_gap_addr_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_addr_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_addr_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_addr_t>())).addr as *const _ as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_addr_t),
            "::",
            stringify!(addr)
        )
    );
}
impl ble_gap_addr_t {
    #[inline]
    pub fn addr_id_peer(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_addr_id_peer(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn addr_type(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 7u8) as u8) }
    }
    #[inline]
    pub fn set_addr_type(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(1usize, 7u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        addr_id_peer: u8,
        addr_type: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let addr_id_peer: u8 = unsafe { ::core::mem::transmute(addr_id_peer) };
            addr_id_peer as u64
        });
        __bindgen_bitfield_unit.set(1usize, 7u8, {
            let addr_type: u8 = unsafe { ::core::mem::transmute(addr_type) };
            addr_type as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief GAP connection parameters."]
#[doc = ""]
#[doc = " @note  When ble_conn_params_t is received in an event, both min_conn_interval and"]
#[doc = "        max_conn_interval will be equal to the connection interval set by the central."]
#[doc = ""]
#[doc = " @note  If both conn_sup_timeout and max_conn_interval are specified, then the following constraint applies:"]
#[doc = "        conn_sup_timeout * 4 > (1 + slave_latency) * max_conn_interval"]
#[doc = "        that corresponds to the following Bluetooth Spec requirement:"]
#[doc = "        The Supervision_Timeout in milliseconds shall be larger than"]
#[doc = "        (1 + Conn_Latency) * Conn_Interval_Max * 2, where Conn_Interval_Max is given in milliseconds."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_conn_params_t {
    #[doc = "< Minimum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS."]
    pub min_conn_interval: u16,
    #[doc = "< Maximum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS."]
    pub max_conn_interval: u16,
    #[doc = "< Slave Latency in number of connection events, see @ref BLE_GAP_CP_LIMITS."]
    pub slave_latency: u16,
    #[doc = "< Connection Supervision Timeout in 10 ms units, see @ref BLE_GAP_CP_LIMITS."]
    pub conn_sup_timeout: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_conn_params_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_conn_params_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gap_conn_params_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_conn_params_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gap_conn_params_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_conn_params_t>())).min_conn_interval as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_conn_params_t),
            "::",
            stringify!(min_conn_interval)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_conn_params_t>())).max_conn_interval as *const _
                as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_conn_params_t),
            "::",
            stringify!(max_conn_interval)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_conn_params_t>())).slave_latency as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_conn_params_t),
            "::",
            stringify!(slave_latency)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_conn_params_t>())).conn_sup_timeout as *const _ as usize
        },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_conn_params_t),
            "::",
            stringify!(conn_sup_timeout)
        )
    );
}
#[doc = "@brief GAP connection security modes."]
#[doc = ""]
#[doc = " Security Mode 0 Level 0: No access permissions at all (this level is not defined by the Bluetooth Core specification).\\n"]
#[doc = " Security Mode 1 Level 1: No security is needed (aka open link).\\n"]
#[doc = " Security Mode 1 Level 2: Encrypted link required, MITM protection not necessary.\\n"]
#[doc = " Security Mode 1 Level 3: MITM protected encrypted link required.\\n"]
#[doc = " Security Mode 1 Level 4: LESC MITM protected encrypted link using a 128-bit strength encryption key required.\\n"]
#[doc = " Security Mode 2 Level 1: Signing or encryption required, MITM protection not necessary.\\n"]
#[doc = " Security Mode 2 Level 2: MITM protected signing required, unless link is MITM protected encrypted.\\n"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_conn_sec_mode_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gap_conn_sec_mode_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_conn_sec_mode_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gap_conn_sec_mode_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_conn_sec_mode_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_conn_sec_mode_t))
    );
}
impl ble_gap_conn_sec_mode_t {
    #[inline]
    pub fn sm(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
    }
    #[inline]
    pub fn set_sm(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 4u8, val as u64)
        }
    }
    #[inline]
    pub fn lv(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) }
    }
    #[inline]
    pub fn set_lv(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(4usize, 4u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(sm: u8, lv: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 4u8, {
            let sm: u8 = unsafe { ::core::mem::transmute(sm) };
            sm as u64
        });
        __bindgen_bitfield_unit.set(4usize, 4u8, {
            let lv: u8 = unsafe { ::core::mem::transmute(lv) };
            lv as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief GAP connection security status."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_conn_sec_t {
    #[doc = "< Currently active security mode for this connection."]
    pub sec_mode: ble_gap_conn_sec_mode_t,
    #[doc = "< Length of currently active encryption key, 7 to 16 octets (only applicable for bonding procedures)."]
    pub encr_key_size: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_conn_sec_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_conn_sec_t>(),
        2usize,
        concat!("Size of: ", stringify!(ble_gap_conn_sec_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_conn_sec_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_conn_sec_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_conn_sec_t>())).sec_mode as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_conn_sec_t),
            "::",
            stringify!(sec_mode)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_conn_sec_t>())).encr_key_size as *const _ as usize
        },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_conn_sec_t),
            "::",
            stringify!(encr_key_size)
        )
    );
}
#[doc = "@brief Identity Resolving Key."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_irk_t {
    #[doc = "< Array containing IRK."]
    pub irk: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_ble_gap_irk_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_irk_t>(),
        16usize,
        concat!("Size of: ", stringify!(ble_gap_irk_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_irk_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_irk_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_irk_t>())).irk as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_irk_t),
            "::",
            stringify!(irk)
        )
    );
}
#[doc = "@brief Channel mask (40 bits)."]
#[doc = " Every channel is represented with a bit positioned as per channel index defined in Bluetooth Core Specification v5.0,"]
#[doc = " Vol 6, Part B, Section 1.4.1. The LSB contained in array element 0 represents channel index 0, and bit 39 represents"]
#[doc = " channel index 39. If a bit is set to 1, the channel is not used."]
pub type ble_gap_ch_mask_t = [u8; 5usize];
#[doc = "@brief GAP advertising parameters."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_adv_params_t {
    #[doc = "< The properties of the advertising events."]
    pub properties: ble_gap_adv_properties_t,
    #[doc = "< Address of a known peer."]
    #[doc = "- When privacy is enabled and the local device uses"]
    #[doc = "@ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE addresses,"]
    #[doc = "the device identity list is searched for a matching entry. If"]
    #[doc = "the local IRK for that device identity is set, the local IRK"]
    #[doc = "for that device will be used to generate the advertiser address"]
    #[doc = "field in the advertising packet."]
    #[doc = "- If @ref ble_gap_adv_properties_t::type is directed, this must be"]
    #[doc = "set to the targeted scanner or initiator. If the peer address is"]
    #[doc = "in the device identity list, the peer IRK for that device will be"]
    #[doc = "used to generate @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE"]
    #[doc = "target addresses used in the advertising event PDUs."]
    pub p_peer_addr: *const ble_gap_addr_t,
    #[doc = "< Advertising interval in 625 us units. @sa BLE_GAP_ADV_INTERVALS."]
    #[doc = "@note If @ref ble_gap_adv_properties_t::type is set to"]
    #[doc = "@ref BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE"]
    #[doc = "advertising, this parameter is ignored."]
    pub interval: u32,
    #[doc = "< Advertising duration in 10 ms units. When timeout is reached,"]
    #[doc = "an event of type @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised."]
    #[doc = "@sa BLE_GAP_ADV_TIMEOUT_VALUES."]
    #[doc = "@note The SoftDevice will always complete at least one advertising"]
    #[doc = "event even if the duration is set too low."]
    pub duration: u16,
    #[doc = "< Maximum advertising events that shall be sent prior to disabling"]
    #[doc = "advertising. Setting the value to 0 disables the limitation. When"]
    #[doc = "the count of advertising events specified by this parameter"]
    #[doc = "(if not 0) is reached, advertising will be automatically stopped"]
    #[doc = "and an event of type @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised"]
    #[doc = "@note If @ref ble_gap_adv_properties_t::type is set to"]
    #[doc = "@ref BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE,"]
    #[doc = "this parameter is ignored."]
    pub max_adv_evts: u8,
    #[doc = "< Channel mask for primary channels."]
    #[doc = "At least one of the primary channels, that is channel index 37-39, must be used."]
    pub channel_mask: ble_gap_ch_mask_t,
    #[doc = "< Filter Policy. @sa BLE_GAP_ADV_FILTER_POLICIES."]
    pub filter_policy: u8,
    #[doc = "< Indicates the PHY on which the primary advertising channel packets"]
    #[doc = "are transmitted. If set to @ref BLE_GAP_PHY_AUTO, @ref BLE_GAP_PHY_1MBPS"]
    #[doc = "will be used."]
    #[doc = "The only supported value by this SoftDevice is @ref BLE_GAP_PHY_1MBPS."]
    pub primary_phy: u8,
    #[doc = "< This field is ignored on this SoftDevice."]
    pub secondary_phy: u8,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gap_adv_params_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_adv_params_t>(),
        24usize,
        concat!("Size of: ", stringify!(ble_gap_adv_params_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_adv_params_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_adv_params_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_adv_params_t>())).properties as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_adv_params_t),
            "::",
            stringify!(properties)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_adv_params_t>())).p_peer_addr as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_adv_params_t),
            "::",
            stringify!(p_peer_addr)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_adv_params_t>())).interval as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_adv_params_t),
            "::",
            stringify!(interval)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_adv_params_t>())).duration as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_adv_params_t),
            "::",
            stringify!(duration)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_adv_params_t>())).max_adv_evts as *const _ as usize
        },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_adv_params_t),
            "::",
            stringify!(max_adv_evts)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_adv_params_t>())).channel_mask as *const _ as usize
        },
        15usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_adv_params_t),
            "::",
            stringify!(channel_mask)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_adv_params_t>())).filter_policy as *const _ as usize
        },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_adv_params_t),
            "::",
            stringify!(filter_policy)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_adv_params_t>())).primary_phy as *const _ as usize
        },
        21usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_adv_params_t),
            "::",
            stringify!(primary_phy)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_adv_params_t>())).secondary_phy as *const _ as usize
        },
        22usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_adv_params_t),
            "::",
            stringify!(secondary_phy)
        )
    );
}
impl ble_gap_adv_params_t {
    #[inline]
    pub fn set_id(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
    }
    #[inline]
    pub fn set_set_id(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 4u8, val as u64)
        }
    }
    #[inline]
    pub fn scan_req_notification(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_scan_req_notification(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(4usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        set_id: u8,
        scan_req_notification: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 4u8, {
            let set_id: u8 = unsafe { ::core::mem::transmute(set_id) };
            set_id as u64
        });
        __bindgen_bitfield_unit.set(4usize, 1u8, {
            let scan_req_notification: u8 =
                unsafe { ::core::mem::transmute(scan_req_notification) };
            scan_req_notification as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief GAP advertising data buffers."]
#[doc = ""]
#[doc = " The application must provide the buffers for advertisement. The memory shall reside in application RAM, and"]
#[doc = " shall never be modified while advertising. The data shall be kept alive until either:"]
#[doc = "  - @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised."]
#[doc = "  - @ref BLE_GAP_EVT_CONNECTED is raised with @ref ble_gap_evt_connected_t::adv_handle set to the corresponding"]
#[doc = "    advertising handle."]
#[doc = "  - Advertising is stopped."]
#[doc = "  - Advertising data is changed."]
#[doc = " To update advertising data while advertising, provide new buffers to @ref sd_ble_gap_adv_set_configure."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_adv_data_t {
    #[doc = "< Advertising data."]
    #[doc = "@note"]
    #[doc = "Advertising data can only be specified for a @ref ble_gap_adv_properties_t::type"]
    #[doc = "that is allowed to contain advertising data."]
    pub adv_data: ble_data_t,
    #[doc = "< Scan response data."]
    #[doc = "@note"]
    #[doc = "Scan response data can only be specified for a @ref ble_gap_adv_properties_t::type"]
    #[doc = "that is scannable."]
    pub scan_rsp_data: ble_data_t,
}
#[test]
fn bindgen_test_layout_ble_gap_adv_data_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_adv_data_t>(),
        16usize,
        concat!("Size of: ", stringify!(ble_gap_adv_data_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_adv_data_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_adv_data_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_adv_data_t>())).adv_data as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_adv_data_t),
            "::",
            stringify!(adv_data)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_adv_data_t>())).scan_rsp_data as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_adv_data_t),
            "::",
            stringify!(scan_rsp_data)
        )
    );
}
#[doc = "@brief Privacy."]
#[doc = ""]
#[doc = "        The privacy feature provides a way for the device to avoid being tracked over a period of time."]
#[doc = "        The privacy feature, when enabled, hides the local device identity and replaces it with a private address"]
#[doc = "        that is automatically refreshed at a specified interval."]
#[doc = ""]
#[doc = "        If a device still wants to be recognized by other peers, it needs to share it's Identity Resolving Key (IRK)."]
#[doc = "        With this key, a device can generate a random private address that can only be recognized by peers in possession of that key,"]
#[doc = "        and devices can establish connections without revealing their real identities."]
#[doc = ""]
#[doc = "        Both network privacy (@ref BLE_GAP_PRIVACY_MODE_NETWORK_PRIVACY) and device privacy (@ref BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY)"]
#[doc = "        are supported."]
#[doc = ""]
#[doc = " @note  If the device IRK is updated, the new IRK becomes the one to be distributed in all"]
#[doc = "        bonding procedures performed after @ref sd_ble_gap_privacy_set returns."]
#[doc = "        The IRK distributed during bonding procedure is the device IRK that is active when @ref sd_ble_gap_sec_params_reply is called."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_privacy_params_t {
    #[doc = "< Privacy mode, see @ref BLE_GAP_PRIVACY_MODES. Default is @ref BLE_GAP_PRIVACY_MODE_OFF."]
    pub privacy_mode: u8,
    #[doc = "< The private address type must be either @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE or @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE."]
    pub private_addr_type: u8,
    #[doc = "< Private address cycle interval in seconds. Providing an address cycle value of 0 will use the default value defined by @ref BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S."]
    pub private_addr_cycle_s: u16,
    #[doc = "< When used as input, pointer to IRK structure that will be used as the default IRK. If NULL, the device default IRK will be used."]
    #[doc = "When used as output, pointer to IRK structure where the current default IRK will be written to. If NULL, this argument is ignored."]
    #[doc = "By default, the default IRK is used to generate random private resolvable addresses for the local device unless instructed otherwise."]
    pub p_device_irk: *mut ble_gap_irk_t,
}
#[test]
fn bindgen_test_layout_ble_gap_privacy_params_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_privacy_params_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gap_privacy_params_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_privacy_params_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_privacy_params_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_privacy_params_t>())).privacy_mode as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_privacy_params_t),
            "::",
            stringify!(privacy_mode)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_privacy_params_t>())).private_addr_type as *const _
                as usize
        },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_privacy_params_t),
            "::",
            stringify!(private_addr_type)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_privacy_params_t>())).private_addr_cycle_s as *const _
                as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_privacy_params_t),
            "::",
            stringify!(private_addr_cycle_s)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_privacy_params_t>())).p_device_irk as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_privacy_params_t),
            "::",
            stringify!(p_device_irk)
        )
    );
}
#[doc = "@brief PHY preferences for TX and RX"]
#[doc = " @note  tx_phys and rx_phys are bit fields. Multiple bits can be set in them to indicate multiple preferred PHYs for each direction."]
#[doc = " @code"]
#[doc = " p_gap_phys->tx_phys = BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_2MBPS;"]
#[doc = " p_gap_phys->rx_phys = BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_2MBPS;"]
#[doc = " @endcode"]
#[doc = ""]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_phys_t {
    #[doc = "< Preferred transmit PHYs, see @ref BLE_GAP_PHYS."]
    pub tx_phys: u8,
    #[doc = "< Preferred receive PHYs, see @ref BLE_GAP_PHYS."]
    pub rx_phys: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_phys_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_phys_t>(),
        2usize,
        concat!("Size of: ", stringify!(ble_gap_phys_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_phys_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_phys_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_phys_t>())).tx_phys as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_phys_t),
            "::",
            stringify!(tx_phys)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_phys_t>())).rx_phys as *const _ as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_phys_t),
            "::",
            stringify!(rx_phys)
        )
    );
}
#[doc = " @brief Keys that can be exchanged during a bonding procedure."]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_sec_kdist_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gap_sec_kdist_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_sec_kdist_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gap_sec_kdist_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_sec_kdist_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_sec_kdist_t))
    );
}
impl ble_gap_sec_kdist_t {
    #[inline]
    pub fn enc(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enc(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn id(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_id(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn sign(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_sign(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(2usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn link(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_link(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        enc: u8,
        id: u8,
        sign: u8,
        link: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let enc: u8 = unsafe { ::core::mem::transmute(enc) };
            enc as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let id: u8 = unsafe { ::core::mem::transmute(id) };
            id as u64
        });
        __bindgen_bitfield_unit.set(2usize, 1u8, {
            let sign: u8 = unsafe { ::core::mem::transmute(sign) };
            sign as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let link: u8 = unsafe { ::core::mem::transmute(link) };
            link as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief GAP security parameters."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_sec_params_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    #[doc = "< Minimum encryption key size in octets between 7 and 16. If 0 then not applicable in this instance."]
    pub min_key_size: u8,
    #[doc = "< Maximum encryption key size in octets between min_key_size and 16."]
    pub max_key_size: u8,
    #[doc = "< Key distribution bitmap: keys that the local device will distribute."]
    pub kdist_own: ble_gap_sec_kdist_t,
    #[doc = "< Key distribution bitmap: keys that the remote device will distribute."]
    pub kdist_peer: ble_gap_sec_kdist_t,
}
#[test]
fn bindgen_test_layout_ble_gap_sec_params_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_sec_params_t>(),
        5usize,
        concat!("Size of: ", stringify!(ble_gap_sec_params_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_sec_params_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_sec_params_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_sec_params_t>())).min_key_size as *const _ as usize
        },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_sec_params_t),
            "::",
            stringify!(min_key_size)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_sec_params_t>())).max_key_size as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_sec_params_t),
            "::",
            stringify!(max_key_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_sec_params_t>())).kdist_own as *const _ as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_sec_params_t),
            "::",
            stringify!(kdist_own)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_sec_params_t>())).kdist_peer as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_sec_params_t),
            "::",
            stringify!(kdist_peer)
        )
    );
}
impl ble_gap_sec_params_t {
    #[inline]
    pub fn bond(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_bond(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn mitm(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_mitm(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn lesc(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_lesc(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(2usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn keypress(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_keypress(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn io_caps(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 3u8) as u8) }
    }
    #[inline]
    pub fn set_io_caps(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(4usize, 3u8, val as u64)
        }
    }
    #[inline]
    pub fn oob(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_oob(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(7usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        bond: u8,
        mitm: u8,
        lesc: u8,
        keypress: u8,
        io_caps: u8,
        oob: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let bond: u8 = unsafe { ::core::mem::transmute(bond) };
            bond as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let mitm: u8 = unsafe { ::core::mem::transmute(mitm) };
            mitm as u64
        });
        __bindgen_bitfield_unit.set(2usize, 1u8, {
            let lesc: u8 = unsafe { ::core::mem::transmute(lesc) };
            lesc as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let keypress: u8 = unsafe { ::core::mem::transmute(keypress) };
            keypress as u64
        });
        __bindgen_bitfield_unit.set(4usize, 3u8, {
            let io_caps: u8 = unsafe { ::core::mem::transmute(io_caps) };
            io_caps as u64
        });
        __bindgen_bitfield_unit.set(7usize, 1u8, {
            let oob: u8 = unsafe { ::core::mem::transmute(oob) };
            oob as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief GAP Encryption Information."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_enc_info_t {
    #[doc = "< Long Term Key."]
    pub ltk: [u8; 16usize],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gap_enc_info_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_enc_info_t>(),
        17usize,
        concat!("Size of: ", stringify!(ble_gap_enc_info_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_enc_info_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_enc_info_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_enc_info_t>())).ltk as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_enc_info_t),
            "::",
            stringify!(ltk)
        )
    );
}
impl ble_gap_enc_info_t {
    #[inline]
    pub fn lesc(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_lesc(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn auth(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_auth(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn ltk_len(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u8) }
    }
    #[inline]
    pub fn set_ltk_len(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(2usize, 6u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        lesc: u8,
        auth: u8,
        ltk_len: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let lesc: u8 = unsafe { ::core::mem::transmute(lesc) };
            lesc as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let auth: u8 = unsafe { ::core::mem::transmute(auth) };
            auth as u64
        });
        __bindgen_bitfield_unit.set(2usize, 6u8, {
            let ltk_len: u8 = unsafe { ::core::mem::transmute(ltk_len) };
            ltk_len as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief GAP Master Identification."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_master_id_t {
    #[doc = "< Encrypted Diversifier."]
    pub ediv: u16,
    #[doc = "< Random Number."]
    pub rand: [u8; 8usize],
}
#[test]
fn bindgen_test_layout_ble_gap_master_id_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_master_id_t>(),
        10usize,
        concat!("Size of: ", stringify!(ble_gap_master_id_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_master_id_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gap_master_id_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_master_id_t>())).ediv as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_master_id_t),
            "::",
            stringify!(ediv)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_master_id_t>())).rand as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_master_id_t),
            "::",
            stringify!(rand)
        )
    );
}
#[doc = "@brief GAP Signing Information."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_sign_info_t {
    #[doc = "< Connection Signature Resolving Key."]
    pub csrk: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_ble_gap_sign_info_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_sign_info_t>(),
        16usize,
        concat!("Size of: ", stringify!(ble_gap_sign_info_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_sign_info_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_sign_info_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_sign_info_t>())).csrk as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_sign_info_t),
            "::",
            stringify!(csrk)
        )
    );
}
#[doc = "@brief GAP LE Secure Connections P-256 Public Key."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gap_lesc_p256_pk_t {
    #[doc = "< LE Secure Connections Elliptic Curve Diffie-Hellman P-256 Public Key. Stored in the standard SMP protocol format: {X,Y} both in little-endian."]
    pub pk: [u8; 64usize],
}
#[test]
fn bindgen_test_layout_ble_gap_lesc_p256_pk_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_lesc_p256_pk_t>(),
        64usize,
        concat!("Size of: ", stringify!(ble_gap_lesc_p256_pk_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_lesc_p256_pk_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_lesc_p256_pk_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_lesc_p256_pk_t>())).pk as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_lesc_p256_pk_t),
            "::",
            stringify!(pk)
        )
    );
}
#[doc = "@brief GAP LE Secure Connections DHKey."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_lesc_dhkey_t {
    #[doc = "< LE Secure Connections Elliptic Curve Diffie-Hellman Key. Stored in little-endian."]
    pub key: [u8; 32usize],
}
#[test]
fn bindgen_test_layout_ble_gap_lesc_dhkey_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_lesc_dhkey_t>(),
        32usize,
        concat!("Size of: ", stringify!(ble_gap_lesc_dhkey_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_lesc_dhkey_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_lesc_dhkey_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_lesc_dhkey_t>())).key as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_lesc_dhkey_t),
            "::",
            stringify!(key)
        )
    );
}
#[doc = "@brief GAP LE Secure Connections OOB data."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_lesc_oob_data_t {
    #[doc = "< Bluetooth address of the device."]
    pub addr: ble_gap_addr_t,
    #[doc = "< Random Number."]
    pub r: [u8; 16usize],
    #[doc = "< Confirm Value."]
    pub c: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_ble_gap_lesc_oob_data_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_lesc_oob_data_t>(),
        39usize,
        concat!("Size of: ", stringify!(ble_gap_lesc_oob_data_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_lesc_oob_data_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_lesc_oob_data_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_lesc_oob_data_t>())).addr as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_lesc_oob_data_t),
            "::",
            stringify!(addr)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_lesc_oob_data_t>())).r as *const _ as usize },
        7usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_lesc_oob_data_t),
            "::",
            stringify!(r)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_lesc_oob_data_t>())).c as *const _ as usize },
        23usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_lesc_oob_data_t),
            "::",
            stringify!(c)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_CONNECTED."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_connected_t {
    #[doc = "< Bluetooth address of the peer device. If the peer_addr resolved: @ref ble_gap_addr_t::addr_id_peer is set to 1"]
    #[doc = "and the address is the device's identity address."]
    pub peer_addr: ble_gap_addr_t,
    #[doc = "< BLE role for this connection, see @ref BLE_GAP_ROLES"]
    pub role: u8,
    #[doc = "< GAP Connection Parameters."]
    pub conn_params: ble_gap_conn_params_t,
    #[doc = "< Advertising handle in which advertising has ended."]
    #[doc = "This variable is only set if role is set to @ref BLE_GAP_ROLE_PERIPH."]
    pub adv_handle: u8,
    #[doc = "< Advertising buffers corresponding to the terminated"]
    #[doc = "advertising set. The advertising buffers provided in"]
    #[doc = "@ref sd_ble_gap_adv_set_configure are now released."]
    #[doc = "This variable is only set if role is set to @ref BLE_GAP_ROLE_PERIPH."]
    pub adv_data: ble_gap_adv_data_t,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_connected_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_connected_t>(),
        36usize,
        concat!("Size of: ", stringify!(ble_gap_evt_connected_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_connected_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_connected_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_connected_t>())).peer_addr as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_connected_t),
            "::",
            stringify!(peer_addr)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_evt_connected_t>())).role as *const _ as usize },
        7usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_connected_t),
            "::",
            stringify!(role)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_connected_t>())).conn_params as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_connected_t),
            "::",
            stringify!(conn_params)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_connected_t>())).adv_handle as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_connected_t),
            "::",
            stringify!(adv_handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_connected_t>())).adv_data as *const _ as usize
        },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_connected_t),
            "::",
            stringify!(adv_data)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_DISCONNECTED."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_disconnected_t {
    #[doc = "< HCI error code, see @ref BLE_HCI_STATUS_CODES."]
    pub reason: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_disconnected_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_disconnected_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gap_evt_disconnected_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_disconnected_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_disconnected_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_disconnected_t>())).reason as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_disconnected_t),
            "::",
            stringify!(reason)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_CONN_PARAM_UPDATE."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_conn_param_update_t {
    #[doc = "<  GAP Connection Parameters."]
    pub conn_params: ble_gap_conn_params_t,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_conn_param_update_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_conn_param_update_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gap_evt_conn_param_update_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_conn_param_update_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_conn_param_update_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_conn_param_update_t>())).conn_params as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_conn_param_update_t),
            "::",
            stringify!(conn_params)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_PHY_UPDATE_REQUEST."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_phy_update_request_t {
    #[doc = "< The PHYs the peer prefers to use."]
    pub peer_preferred_phys: ble_gap_phys_t,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_phy_update_request_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_phy_update_request_t>(),
        2usize,
        concat!("Size of: ", stringify!(ble_gap_evt_phy_update_request_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_phy_update_request_t>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gap_evt_phy_update_request_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_phy_update_request_t>())).peer_preferred_phys
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_phy_update_request_t),
            "::",
            stringify!(peer_preferred_phys)
        )
    );
}
#[doc = "@brief Event Structure for @ref BLE_GAP_EVT_PHY_UPDATE."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_phy_update_t {
    #[doc = "< Status of the procedure, see @ref BLE_HCI_STATUS_CODES."]
    pub status: u8,
    #[doc = "< TX PHY for this connection, see @ref BLE_GAP_PHYS."]
    pub tx_phy: u8,
    #[doc = "< RX PHY for this connection, see @ref BLE_GAP_PHYS."]
    pub rx_phy: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_phy_update_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_phy_update_t>(),
        3usize,
        concat!("Size of: ", stringify!(ble_gap_evt_phy_update_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_phy_update_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_phy_update_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_phy_update_t>())).status as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_phy_update_t),
            "::",
            stringify!(status)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_phy_update_t>())).tx_phy as *const _ as usize
        },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_phy_update_t),
            "::",
            stringify!(tx_phy)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_phy_update_t>())).rx_phy as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_phy_update_t),
            "::",
            stringify!(rx_phy)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_sec_params_request_t {
    #[doc = "< Initiator Security Parameters."]
    pub peer_params: ble_gap_sec_params_t,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_sec_params_request_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_sec_params_request_t>(),
        5usize,
        concat!("Size of: ", stringify!(ble_gap_evt_sec_params_request_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_sec_params_request_t>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gap_evt_sec_params_request_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_sec_params_request_t>())).peer_params as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_sec_params_request_t),
            "::",
            stringify!(peer_params)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_SEC_INFO_REQUEST."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_sec_info_request_t {
    #[doc = "< Bluetooth address of the peer device."]
    pub peer_addr: ble_gap_addr_t,
    #[doc = "< Master Identification for LTK lookup."]
    pub master_id: ble_gap_master_id_t,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    pub __bindgen_padding_0: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_sec_info_request_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_sec_info_request_t>(),
        20usize,
        concat!("Size of: ", stringify!(ble_gap_evt_sec_info_request_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_sec_info_request_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_sec_info_request_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_sec_info_request_t>())).peer_addr as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_sec_info_request_t),
            "::",
            stringify!(peer_addr)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_sec_info_request_t>())).master_id as *const _
                as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_sec_info_request_t),
            "::",
            stringify!(master_id)
        )
    );
}
impl ble_gap_evt_sec_info_request_t {
    #[inline]
    pub fn enc_info(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enc_info(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn id_info(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_id_info(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn sign_info(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_sign_info(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(2usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        enc_info: u8,
        id_info: u8,
        sign_info: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let enc_info: u8 = unsafe { ::core::mem::transmute(enc_info) };
            enc_info as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let id_info: u8 = unsafe { ::core::mem::transmute(id_info) };
            id_info as u64
        });
        __bindgen_bitfield_unit.set(2usize, 1u8, {
            let sign_info: u8 = unsafe { ::core::mem::transmute(sign_info) };
            sign_info as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_PASSKEY_DISPLAY."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_passkey_display_t {
    #[doc = "< 6-digit passkey in ASCII ('0'-'9' digits only)."]
    pub passkey: [u8; 6usize],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_passkey_display_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_passkey_display_t>(),
        7usize,
        concat!("Size of: ", stringify!(ble_gap_evt_passkey_display_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_passkey_display_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_passkey_display_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_passkey_display_t>())).passkey as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_passkey_display_t),
            "::",
            stringify!(passkey)
        )
    );
}
impl ble_gap_evt_passkey_display_t {
    #[inline]
    pub fn match_request(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_match_request(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(match_request: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let match_request: u8 = unsafe { ::core::mem::transmute(match_request) };
            match_request as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_KEY_PRESSED."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_key_pressed_t {
    #[doc = "< Keypress notification type, see @ref BLE_GAP_KP_NOT_TYPES."]
    pub kp_not: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_key_pressed_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_key_pressed_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gap_evt_key_pressed_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_key_pressed_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_key_pressed_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_key_pressed_t>())).kp_not as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_key_pressed_t),
            "::",
            stringify!(kp_not)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_AUTH_KEY_REQUEST."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_auth_key_request_t {
    #[doc = "< See @ref BLE_GAP_AUTH_KEY_TYPES."]
    pub key_type: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_auth_key_request_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_auth_key_request_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gap_evt_auth_key_request_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_auth_key_request_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_auth_key_request_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_auth_key_request_t>())).key_type as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_auth_key_request_t),
            "::",
            stringify!(key_type)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_lesc_dhkey_request_t {
    #[doc = "< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory"]
    #[doc = "inside the keyset during the call to @ref sd_ble_gap_sec_params_reply."]
    pub p_pk_peer: *mut ble_gap_lesc_p256_pk_t,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    pub __bindgen_padding_0: [u8; 3usize],
}
#[test]
fn bindgen_test_layout_ble_gap_evt_lesc_dhkey_request_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_lesc_dhkey_request_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gap_evt_lesc_dhkey_request_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_lesc_dhkey_request_t>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gap_evt_lesc_dhkey_request_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_lesc_dhkey_request_t>())).p_pk_peer as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_lesc_dhkey_request_t),
            "::",
            stringify!(p_pk_peer)
        )
    );
}
impl ble_gap_evt_lesc_dhkey_request_t {
    #[inline]
    pub fn oobd_req(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_oobd_req(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(oobd_req: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let oobd_req: u8 = unsafe { ::core::mem::transmute(oobd_req) };
            oobd_req as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief Security levels supported."]
#[doc = " @note  See Bluetooth Specification Version 4.2 Volume 3, Part C, Chapter 10, Section 10.2.1."]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_sec_levels_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gap_sec_levels_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_sec_levels_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gap_sec_levels_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_sec_levels_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_sec_levels_t))
    );
}
impl ble_gap_sec_levels_t {
    #[inline]
    pub fn lv1(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_lv1(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn lv2(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_lv2(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn lv3(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_lv3(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(2usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn lv4(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_lv4(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        lv1: u8,
        lv2: u8,
        lv3: u8,
        lv4: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let lv1: u8 = unsafe { ::core::mem::transmute(lv1) };
            lv1 as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let lv2: u8 = unsafe { ::core::mem::transmute(lv2) };
            lv2 as u64
        });
        __bindgen_bitfield_unit.set(2usize, 1u8, {
            let lv3: u8 = unsafe { ::core::mem::transmute(lv3) };
            lv3 as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let lv4: u8 = unsafe { ::core::mem::transmute(lv4) };
            lv4 as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief Encryption Key."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_enc_key_t {
    #[doc = "< Encryption Information."]
    pub enc_info: ble_gap_enc_info_t,
    #[doc = "< Master Identification."]
    pub master_id: ble_gap_master_id_t,
}
#[test]
fn bindgen_test_layout_ble_gap_enc_key_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_enc_key_t>(),
        28usize,
        concat!("Size of: ", stringify!(ble_gap_enc_key_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_enc_key_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gap_enc_key_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_enc_key_t>())).enc_info as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_enc_key_t),
            "::",
            stringify!(enc_info)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_enc_key_t>())).master_id as *const _ as usize },
        18usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_enc_key_t),
            "::",
            stringify!(master_id)
        )
    );
}
#[doc = "@brief Identity Key."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_id_key_t {
    #[doc = "< Identity Resolving Key."]
    pub id_info: ble_gap_irk_t,
    #[doc = "< Identity Address."]
    pub id_addr_info: ble_gap_addr_t,
}
#[test]
fn bindgen_test_layout_ble_gap_id_key_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_id_key_t>(),
        23usize,
        concat!("Size of: ", stringify!(ble_gap_id_key_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_id_key_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_id_key_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_id_key_t>())).id_info as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_id_key_t),
            "::",
            stringify!(id_info)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_id_key_t>())).id_addr_info as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_id_key_t),
            "::",
            stringify!(id_addr_info)
        )
    );
}
#[doc = "@brief Security Keys."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_sec_keys_t {
    #[doc = "< Encryption Key, or NULL."]
    pub p_enc_key: *mut ble_gap_enc_key_t,
    #[doc = "< Identity Key, or NULL."]
    pub p_id_key: *mut ble_gap_id_key_t,
    #[doc = "< Signing Key, or NULL."]
    pub p_sign_key: *mut ble_gap_sign_info_t,
    #[doc = "< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined"]
    #[doc = "in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1"]
    pub p_pk: *mut ble_gap_lesc_p256_pk_t,
}
#[test]
fn bindgen_test_layout_ble_gap_sec_keys_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_sec_keys_t>(),
        16usize,
        concat!("Size of: ", stringify!(ble_gap_sec_keys_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_sec_keys_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_sec_keys_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_sec_keys_t>())).p_enc_key as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_sec_keys_t),
            "::",
            stringify!(p_enc_key)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_sec_keys_t>())).p_id_key as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_sec_keys_t),
            "::",
            stringify!(p_id_key)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_sec_keys_t>())).p_sign_key as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_sec_keys_t),
            "::",
            stringify!(p_sign_key)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_sec_keys_t>())).p_pk as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_sec_keys_t),
            "::",
            stringify!(p_pk)
        )
    );
}
#[doc = "@brief Security key set for both local and peer keys."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_sec_keyset_t {
    #[doc = "< Keys distributed by the local device. For LE Secure Connections the encryption key will be generated locally and will always be stored if bonding."]
    pub keys_own: ble_gap_sec_keys_t,
    #[doc = "< Keys distributed by the remote device. For LE Secure Connections, p_enc_key must always be NULL."]
    pub keys_peer: ble_gap_sec_keys_t,
}
#[test]
fn bindgen_test_layout_ble_gap_sec_keyset_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_sec_keyset_t>(),
        32usize,
        concat!("Size of: ", stringify!(ble_gap_sec_keyset_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_sec_keyset_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_sec_keyset_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_sec_keyset_t>())).keys_own as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_sec_keyset_t),
            "::",
            stringify!(keys_own)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_sec_keyset_t>())).keys_peer as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_sec_keyset_t),
            "::",
            stringify!(keys_peer)
        )
    );
}
#[doc = "@brief Data Length Update Procedure parameters."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_data_length_params_t {
    #[doc = "< Maximum number of payload octets that a Controller supports for transmission of a single Link Layer Data Channel PDU."]
    pub max_tx_octets: u16,
    #[doc = "< Maximum number of payload octets that a Controller supports for reception of a single Link Layer Data Channel PDU."]
    pub max_rx_octets: u16,
    #[doc = "< Maximum time, in microseconds, that a Controller supports for transmission of a single Link Layer Data Channel PDU."]
    pub max_tx_time_us: u16,
    #[doc = "< Maximum time, in microseconds, that a Controller supports for reception of a single Link Layer Data Channel PDU."]
    pub max_rx_time_us: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_data_length_params_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_data_length_params_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gap_data_length_params_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_data_length_params_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gap_data_length_params_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_data_length_params_t>())).max_tx_octets as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_data_length_params_t),
            "::",
            stringify!(max_tx_octets)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_data_length_params_t>())).max_rx_octets as *const _
                as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_data_length_params_t),
            "::",
            stringify!(max_rx_octets)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_data_length_params_t>())).max_tx_time_us as *const _
                as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_data_length_params_t),
            "::",
            stringify!(max_tx_time_us)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_data_length_params_t>())).max_rx_time_us as *const _
                as usize
        },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_data_length_params_t),
            "::",
            stringify!(max_rx_time_us)
        )
    );
}
#[doc = "@brief Data Length Update Procedure local limitation."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_data_length_limitation_t {
    #[doc = "< If > 0, the requested TX packet length is too long by this many octets."]
    pub tx_payload_limited_octets: u16,
    #[doc = "< If > 0, the requested RX packet length is too long by this many octets."]
    pub rx_payload_limited_octets: u16,
    #[doc = "< If > 0, the requested combination of TX and RX packet lengths is too long by this many microseconds."]
    pub tx_rx_time_limited_us: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_data_length_limitation_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_data_length_limitation_t>(),
        6usize,
        concat!("Size of: ", stringify!(ble_gap_data_length_limitation_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_data_length_limitation_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gap_data_length_limitation_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_data_length_limitation_t>())).tx_payload_limited_octets
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_data_length_limitation_t),
            "::",
            stringify!(tx_payload_limited_octets)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_data_length_limitation_t>())).rx_payload_limited_octets
                as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_data_length_limitation_t),
            "::",
            stringify!(rx_payload_limited_octets)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_data_length_limitation_t>())).tx_rx_time_limited_us
                as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_data_length_limitation_t),
            "::",
            stringify!(tx_rx_time_limited_us)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_AUTH_STATUS."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_auth_status_t {
    #[doc = "< Authentication status, see @ref BLE_GAP_SEC_STATUS."]
    pub auth_status: u8,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    #[doc = "< Levels supported in Security Mode 1."]
    pub sm1_levels: ble_gap_sec_levels_t,
    #[doc = "< Levels supported in Security Mode 2."]
    pub sm2_levels: ble_gap_sec_levels_t,
    #[doc = "< Bitmap stating which keys were exchanged (distributed) by the local device. If bonding with LE Secure Connections, the enc bit will be always set."]
    pub kdist_own: ble_gap_sec_kdist_t,
    #[doc = "< Bitmap stating which keys were exchanged (distributed) by the remote device. If bonding with LE Secure Connections, the enc bit will never be set."]
    pub kdist_peer: ble_gap_sec_kdist_t,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_auth_status_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_auth_status_t>(),
        6usize,
        concat!("Size of: ", stringify!(ble_gap_evt_auth_status_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_auth_status_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_auth_status_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_auth_status_t>())).auth_status as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_auth_status_t),
            "::",
            stringify!(auth_status)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_auth_status_t>())).sm1_levels as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_auth_status_t),
            "::",
            stringify!(sm1_levels)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_auth_status_t>())).sm2_levels as *const _ as usize
        },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_auth_status_t),
            "::",
            stringify!(sm2_levels)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_auth_status_t>())).kdist_own as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_auth_status_t),
            "::",
            stringify!(kdist_own)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_auth_status_t>())).kdist_peer as *const _ as usize
        },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_auth_status_t),
            "::",
            stringify!(kdist_peer)
        )
    );
}
impl ble_gap_evt_auth_status_t {
    #[inline]
    pub fn error_src(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u8) }
    }
    #[inline]
    pub fn set_error_src(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 2u8, val as u64)
        }
    }
    #[inline]
    pub fn bonded(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_bonded(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(2usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn lesc(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_lesc(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        error_src: u8,
        bonded: u8,
        lesc: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 2u8, {
            let error_src: u8 = unsafe { ::core::mem::transmute(error_src) };
            error_src as u64
        });
        __bindgen_bitfield_unit.set(2usize, 1u8, {
            let bonded: u8 = unsafe { ::core::mem::transmute(bonded) };
            bonded as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let lesc: u8 = unsafe { ::core::mem::transmute(lesc) };
            lesc as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_CONN_SEC_UPDATE."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_conn_sec_update_t {
    #[doc = "< Connection security level."]
    pub conn_sec: ble_gap_conn_sec_t,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_conn_sec_update_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_conn_sec_update_t>(),
        2usize,
        concat!("Size of: ", stringify!(ble_gap_evt_conn_sec_update_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_conn_sec_update_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_conn_sec_update_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_conn_sec_update_t>())).conn_sec as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_conn_sec_update_t),
            "::",
            stringify!(conn_sec)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_TIMEOUT."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_timeout_t {
    #[doc = "< Source of timeout event, see @ref BLE_GAP_TIMEOUT_SOURCES."]
    pub src: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_timeout_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_timeout_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gap_evt_timeout_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_timeout_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_timeout_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_evt_timeout_t>())).src as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_timeout_t),
            "::",
            stringify!(src)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_RSSI_CHANGED."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_rssi_changed_t {
    #[doc = "< Received Signal Strength Indication in dBm."]
    pub rssi: i8,
    #[doc = "< Data Channel Index on which the Signal Strength is measured (0-36)."]
    pub ch_index: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_rssi_changed_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_rssi_changed_t>(),
        2usize,
        concat!("Size of: ", stringify!(ble_gap_evt_rssi_changed_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_rssi_changed_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_rssi_changed_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_rssi_changed_t>())).rssi as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_rssi_changed_t),
            "::",
            stringify!(rssi)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_rssi_changed_t>())).ch_index as *const _ as usize
        },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_rssi_changed_t),
            "::",
            stringify!(ch_index)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_ADV_SET_TERMINATED"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_adv_set_terminated_t {
    #[doc = "< Reason for why the advertising set terminated. See"]
    #[doc = "@ref BLE_GAP_EVT_ADV_SET_TERMINATED_REASON."]
    pub reason: u8,
    #[doc = "< Advertising handle in which advertising has ended."]
    pub adv_handle: u8,
    #[doc = "< If @ref ble_gap_adv_params_t::max_adv_evts was not set to 0,"]
    #[doc = "this field indicates the number of completed advertising events."]
    pub num_completed_adv_events: u8,
    #[doc = "< Advertising buffers corresponding to the terminated"]
    #[doc = "advertising set. The advertising buffers provided in"]
    #[doc = "@ref sd_ble_gap_adv_set_configure are now released."]
    pub adv_data: ble_gap_adv_data_t,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_adv_set_terminated_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_adv_set_terminated_t>(),
        20usize,
        concat!("Size of: ", stringify!(ble_gap_evt_adv_set_terminated_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_adv_set_terminated_t>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gap_evt_adv_set_terminated_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_adv_set_terminated_t>())).reason as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_adv_set_terminated_t),
            "::",
            stringify!(reason)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_adv_set_terminated_t>())).adv_handle as *const _
                as usize
        },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_adv_set_terminated_t),
            "::",
            stringify!(adv_handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_adv_set_terminated_t>())).num_completed_adv_events
                as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_adv_set_terminated_t),
            "::",
            stringify!(num_completed_adv_events)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_adv_set_terminated_t>())).adv_data as *const _
                as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_adv_set_terminated_t),
            "::",
            stringify!(adv_data)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_SEC_REQUEST."]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_sec_request_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_sec_request_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_sec_request_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gap_evt_sec_request_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_sec_request_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_sec_request_t))
    );
}
impl ble_gap_evt_sec_request_t {
    #[inline]
    pub fn bond(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_bond(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn mitm(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_mitm(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn lesc(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_lesc(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(2usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn keypress(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_keypress(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        bond: u8,
        mitm: u8,
        lesc: u8,
        keypress: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let bond: u8 = unsafe { ::core::mem::transmute(bond) };
            bond as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let mitm: u8 = unsafe { ::core::mem::transmute(mitm) };
            mitm as u64
        });
        __bindgen_bitfield_unit.set(2usize, 1u8, {
            let lesc: u8 = unsafe { ::core::mem::transmute(lesc) };
            lesc as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let keypress: u8 = unsafe { ::core::mem::transmute(keypress) };
            keypress as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_SCAN_REQ_REPORT."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_scan_req_report_t {
    #[doc = "< Advertising handle for the advertising set which received the Scan Request"]
    pub adv_handle: u8,
    #[doc = "< Received Signal Strength Indication in dBm."]
    pub rssi: i8,
    #[doc = "< Bluetooth address of the peer device. If the peer_addr resolved: @ref ble_gap_addr_t::addr_id_peer is set to 1"]
    #[doc = "and the address is the device's identity address."]
    pub peer_addr: ble_gap_addr_t,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_scan_req_report_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_scan_req_report_t>(),
        9usize,
        concat!("Size of: ", stringify!(ble_gap_evt_scan_req_report_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_scan_req_report_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_scan_req_report_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_scan_req_report_t>())).adv_handle as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_scan_req_report_t),
            "::",
            stringify!(adv_handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_scan_req_report_t>())).rssi as *const _ as usize
        },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_scan_req_report_t),
            "::",
            stringify!(rssi)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_scan_req_report_t>())).peer_addr as *const _
                as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_scan_req_report_t),
            "::",
            stringify!(peer_addr)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_data_length_update_request_t {
    #[doc = "< Peer data length parameters."]
    pub peer_params: ble_gap_data_length_params_t,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_data_length_update_request_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_data_length_update_request_t>(),
        8usize,
        concat!(
            "Size of: ",
            stringify!(ble_gap_evt_data_length_update_request_t)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_data_length_update_request_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gap_evt_data_length_update_request_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_data_length_update_request_t>())).peer_params
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_data_length_update_request_t),
            "::",
            stringify!(peer_params)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_evt_data_length_update_t {
    #[doc = "< The effective data length parameters."]
    pub effective_params: ble_gap_data_length_params_t,
}
#[test]
fn bindgen_test_layout_ble_gap_evt_data_length_update_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_data_length_update_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gap_evt_data_length_update_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_data_length_update_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gap_evt_data_length_update_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_data_length_update_t>())).effective_params
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_data_length_update_t),
            "::",
            stringify!(effective_params)
        )
    );
}
#[doc = "@brief GAP event structure."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gap_evt_t {
    #[doc = "< Connection Handle on which event occurred."]
    pub conn_handle: u16,
    #[doc = "< Event Parameters."]
    pub params: ble_gap_evt_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_gap_evt_t__bindgen_ty_1 {
    #[doc = "< Connected Event Parameters."]
    pub connected: ble_gap_evt_connected_t,
    #[doc = "< Disconnected Event Parameters."]
    pub disconnected: ble_gap_evt_disconnected_t,
    #[doc = "< Connection Parameter Update Parameters."]
    pub conn_param_update: ble_gap_evt_conn_param_update_t,
    #[doc = "< Security Parameters Request Event Parameters."]
    pub sec_params_request: ble_gap_evt_sec_params_request_t,
    #[doc = "< Security Information Request Event Parameters."]
    pub sec_info_request: ble_gap_evt_sec_info_request_t,
    #[doc = "< Passkey Display Event Parameters."]
    pub passkey_display: ble_gap_evt_passkey_display_t,
    #[doc = "< Key Pressed Event Parameters."]
    pub key_pressed: ble_gap_evt_key_pressed_t,
    #[doc = "< Authentication Key Request Event Parameters."]
    pub auth_key_request: ble_gap_evt_auth_key_request_t,
    #[doc = "< LE Secure Connections DHKey calculation request."]
    pub lesc_dhkey_request: ble_gap_evt_lesc_dhkey_request_t,
    #[doc = "< Authentication Status Event Parameters."]
    pub auth_status: ble_gap_evt_auth_status_t,
    #[doc = "< Connection Security Update Event Parameters."]
    pub conn_sec_update: ble_gap_evt_conn_sec_update_t,
    #[doc = "< Timeout Event Parameters."]
    pub timeout: ble_gap_evt_timeout_t,
    #[doc = "< RSSI Event Parameters."]
    pub rssi_changed: ble_gap_evt_rssi_changed_t,
    #[doc = "< Advertising Set Terminated Event Parameters."]
    pub adv_set_terminated: ble_gap_evt_adv_set_terminated_t,
    #[doc = "< Security Request Event Parameters."]
    pub sec_request: ble_gap_evt_sec_request_t,
    #[doc = "< Scan Request Report Parameters."]
    pub scan_req_report: ble_gap_evt_scan_req_report_t,
    #[doc = "< PHY Update Request Event Parameters."]
    pub phy_update_request: ble_gap_evt_phy_update_request_t,
    #[doc = "< PHY Update Parameters."]
    pub phy_update: ble_gap_evt_phy_update_t,
    #[doc = "< Data Length Update Request Event Parameters."]
    pub data_length_update_request: ble_gap_evt_data_length_update_request_t,
    #[doc = "< Data Length Update Event Parameters."]
    pub data_length_update: ble_gap_evt_data_length_update_t,
    _bindgen_union_align: [u32; 9usize],
}
#[test]
fn bindgen_test_layout_ble_gap_evt_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_t__bindgen_ty_1>(),
        36usize,
        concat!("Size of: ", stringify!(ble_gap_evt_t__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_t__bindgen_ty_1>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_t__bindgen_ty_1))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).connected as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(connected)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).disconnected as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(disconnected)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).conn_param_update as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(conn_param_update)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).sec_params_request as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(sec_params_request)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).sec_info_request as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(sec_info_request)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).passkey_display as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(passkey_display)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).key_pressed as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(key_pressed)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).auth_key_request as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(auth_key_request)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).lesc_dhkey_request as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(lesc_dhkey_request)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).auth_status as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(auth_status)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).conn_sec_update as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(conn_sec_update)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).timeout as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(timeout)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).rssi_changed as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(rssi_changed)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).adv_set_terminated as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(adv_set_terminated)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).sec_request as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(sec_request)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).scan_req_report as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(scan_req_report)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).phy_update_request as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(phy_update_request)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).phy_update as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(phy_update)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).data_length_update_request
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(data_length_update_request)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_evt_t__bindgen_ty_1>())).data_length_update as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t__bindgen_ty_1),
            "::",
            stringify!(data_length_update)
        )
    );
}
#[test]
fn bindgen_test_layout_ble_gap_evt_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_evt_t>(),
        40usize,
        concat!("Size of: ", stringify!(ble_gap_evt_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_evt_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_evt_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_evt_t>())).conn_handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t),
            "::",
            stringify!(conn_handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_evt_t>())).params as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_evt_t),
            "::",
            stringify!(params)
        )
    );
}
#[doc = " @brief BLE GAP connection configuration parameters, set with @ref sd_ble_cfg_set."]
#[doc = ""]
#[doc = " @retval ::NRF_ERROR_CONN_COUNT     The connection count for the connection configurations is zero."]
#[doc = " @retval ::NRF_ERROR_INVALID_PARAM  One or more of the following is true:"]
#[doc = "                                    - The sum of conn_count for all connection configurations combined exceeds UINT8_MAX."]
#[doc = "                                    - The event length is smaller than @ref BLE_GAP_EVENT_LENGTH_MIN."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_conn_cfg_t {
    #[doc = "< The number of concurrent connections the application can create with this configuration."]
    #[doc = "The default and minimum value is @ref BLE_GAP_CONN_COUNT_DEFAULT."]
    pub conn_count: u8,
    #[doc = "< The time set aside for this connection on every connection interval in 1.25 ms units."]
    #[doc = "The default value is @ref BLE_GAP_EVENT_LENGTH_DEFAULT, the minimum value is @ref BLE_GAP_EVENT_LENGTH_MIN."]
    #[doc = "The event length and the connection interval are the primary parameters"]
    #[doc = "for setting the throughput of a connection."]
    #[doc = "See the SoftDevice Specification for details on throughput."]
    pub event_length: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_conn_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_conn_cfg_t>(),
        4usize,
        concat!("Size of: ", stringify!(ble_gap_conn_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_conn_cfg_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gap_conn_cfg_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_conn_cfg_t>())).conn_count as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_conn_cfg_t),
            "::",
            stringify!(conn_count)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_conn_cfg_t>())).event_length as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_conn_cfg_t),
            "::",
            stringify!(event_length)
        )
    );
}
#[doc = " @brief Configuration of maximum concurrent connections in the peripheral role, set with"]
#[doc = " @ref sd_ble_cfg_set."]
#[doc = ""]
#[doc = " @retval ::NRF_ERROR_CONN_COUNT     The periph_role_count is too large. The maximum"]
#[doc = "                                    supported sum of concurrent connections is"]
#[doc = "                                    @ref BLE_GAP_ROLE_COUNT_COMBINED_MAX."]
#[doc = " @retval ::NRF_ERROR_RESOURCES      The adv_set_count is too large. The maximum"]
#[doc = "                                    supported advertising handles is"]
#[doc = "                                    @ref BLE_GAP_ADV_SET_COUNT_MAX."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_cfg_role_count_t {
    #[doc = "< Maximum number of advertising sets. Default value is @ref BLE_GAP_ADV_SET_COUNT_DEFAULT."]
    pub adv_set_count: u8,
    #[doc = "< Maximum number of connections concurrently acting as a peripheral. Default value is @ref BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT."]
    pub periph_role_count: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_cfg_role_count_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_cfg_role_count_t>(),
        2usize,
        concat!("Size of: ", stringify!(ble_gap_cfg_role_count_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_cfg_role_count_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_cfg_role_count_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_cfg_role_count_t>())).adv_set_count as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_cfg_role_count_t),
            "::",
            stringify!(adv_set_count)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_cfg_role_count_t>())).periph_role_count as *const _
                as usize
        },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_cfg_role_count_t),
            "::",
            stringify!(periph_role_count)
        )
    );
}
#[doc = " @brief Device name and its properties, set with @ref sd_ble_cfg_set."]
#[doc = ""]
#[doc = " @note  If the device name is not configured, the default device name will be"]
#[doc = "        @ref BLE_GAP_DEVNAME_DEFAULT, the maximum device name length will be"]
#[doc = "        @ref BLE_GAP_DEVNAME_DEFAULT_LEN, vloc will be set to @ref BLE_GATTS_VLOC_STACK and the device name"]
#[doc = "        will have no write access."]
#[doc = ""]
#[doc = " @note  If @ref max_len is more than @ref BLE_GAP_DEVNAME_DEFAULT_LEN and vloc is set to @ref BLE_GATTS_VLOC_STACK,"]
#[doc = "        the attribute table size must be increased to have room for the longer device name (see"]
#[doc = "        @ref sd_ble_cfg_set and @ref ble_gatts_cfg_attr_tab_size_t)."]
#[doc = ""]
#[doc = " @note  If vloc is @ref BLE_GATTS_VLOC_STACK :"]
#[doc = "        - p_value must point to non-volatile memory (flash) or be NULL."]
#[doc = "        - If p_value is NULL, the device name will initially be empty."]
#[doc = ""]
#[doc = " @note  If vloc is @ref BLE_GATTS_VLOC_USER :"]
#[doc = "        - p_value cannot be NULL."]
#[doc = "        - If the device name is writable, p_value must point to volatile memory (RAM)."]
#[doc = ""]
#[doc = " @retval ::NRF_ERROR_INVALID_PARAM  One or more of the following is true:"]
#[doc = "                                    - Invalid device name location (vloc)."]
#[doc = "                                    - Invalid device name security mode."]
#[doc = " @retval ::NRF_ERROR_INVALID_LENGTH One or more of the following is true:"]
#[doc = "                                    - The device name length is invalid (must be between 0 and @ref BLE_GAP_DEVNAME_MAX_LEN)."]
#[doc = "                                    - The device name length is too long for the given Attribute Table."]
#[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED  Device name security mode is not supported."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_cfg_device_name_t {
    #[doc = "< Write permissions."]
    pub write_perm: ble_gap_conn_sec_mode_t,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    #[doc = "< Pointer to where the value (device name) is stored or will be stored."]
    pub p_value: *mut u8,
    #[doc = "< Current length in bytes of the memory pointed to by p_value."]
    pub current_len: u16,
    #[doc = "< Maximum length in bytes of the memory pointed to by p_value."]
    pub max_len: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_cfg_device_name_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_cfg_device_name_t>(),
        12usize,
        concat!("Size of: ", stringify!(ble_gap_cfg_device_name_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_cfg_device_name_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_cfg_device_name_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_cfg_device_name_t>())).write_perm as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_cfg_device_name_t),
            "::",
            stringify!(write_perm)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_cfg_device_name_t>())).p_value as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_cfg_device_name_t),
            "::",
            stringify!(p_value)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_cfg_device_name_t>())).current_len as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_cfg_device_name_t),
            "::",
            stringify!(current_len)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_cfg_device_name_t>())).max_len as *const _ as usize
        },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_cfg_device_name_t),
            "::",
            stringify!(max_len)
        )
    );
}
impl ble_gap_cfg_device_name_t {
    #[inline]
    pub fn vloc(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u8) }
    }
    #[inline]
    pub fn set_vloc(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 2u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(vloc: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 2u8, {
            let vloc: u8 = unsafe { ::core::mem::transmute(vloc) };
            vloc as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief Peripheral Preferred Connection Parameters include configuration parameters, set with @ref sd_ble_cfg_set."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_cfg_ppcp_incl_cfg_t {
    #[doc = "< Inclusion configuration of the Peripheral Preferred Connection Parameters characteristic."]
    #[doc = "See @ref BLE_GAP_CHAR_INCL_CONFIG. Default is @ref BLE_GAP_PPCP_INCL_CONFIG_DEFAULT."]
    pub include_cfg: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_cfg_ppcp_incl_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_cfg_ppcp_incl_cfg_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gap_cfg_ppcp_incl_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_cfg_ppcp_incl_cfg_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_cfg_ppcp_incl_cfg_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_cfg_ppcp_incl_cfg_t>())).include_cfg as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_cfg_ppcp_incl_cfg_t),
            "::",
            stringify!(include_cfg)
        )
    );
}
#[doc = "@brief Central Address Resolution include configuration parameters, set with @ref sd_ble_cfg_set."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_cfg_car_incl_cfg_t {
    #[doc = "< Inclusion configuration of the Central Address Resolution characteristic."]
    #[doc = "See @ref BLE_GAP_CHAR_INCL_CONFIG. Default is @ref BLE_GAP_CAR_INCL_CONFIG_DEFAULT."]
    pub include_cfg: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_cfg_car_incl_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_cfg_car_incl_cfg_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gap_cfg_car_incl_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_cfg_car_incl_cfg_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gap_cfg_car_incl_cfg_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_cfg_car_incl_cfg_t>())).include_cfg as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_cfg_car_incl_cfg_t),
            "::",
            stringify!(include_cfg)
        )
    );
}
#[doc = "@brief Configuration structure for GAP configurations."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_gap_cfg_t {
    #[doc = "< Role count configuration, cfg_id is @ref BLE_GAP_CFG_ROLE_COUNT."]
    pub role_count_cfg: ble_gap_cfg_role_count_t,
    #[doc = "< Device name configuration, cfg_id is @ref BLE_GAP_CFG_DEVICE_NAME."]
    pub device_name_cfg: ble_gap_cfg_device_name_t,
    #[doc = "< Peripheral Preferred Connection Parameters characteristic include"]
    #[doc = "configuration, cfg_id is @ref BLE_GAP_CFG_PPCP_INCL_CONFIG."]
    pub ppcp_include_cfg: ble_gap_cfg_ppcp_incl_cfg_t,
    #[doc = "< Central Address Resolution characteristic include configuration,"]
    #[doc = "cfg_id is @ref BLE_GAP_CFG_CAR_INCL_CONFIG."]
    pub car_include_cfg: ble_gap_cfg_car_incl_cfg_t,
    _bindgen_union_align: [u32; 3usize],
}
#[test]
fn bindgen_test_layout_ble_gap_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_cfg_t>(),
        12usize,
        concat!("Size of: ", stringify!(ble_gap_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_cfg_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_cfg_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_cfg_t>())).role_count_cfg as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_cfg_t),
            "::",
            stringify!(role_count_cfg)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_cfg_t>())).device_name_cfg as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_cfg_t),
            "::",
            stringify!(device_name_cfg)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_cfg_t>())).ppcp_include_cfg as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_cfg_t),
            "::",
            stringify!(ppcp_include_cfg)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_cfg_t>())).car_include_cfg as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_cfg_t),
            "::",
            stringify!(car_include_cfg)
        )
    );
}
#[doc = "@brief Channel Map option."]
#[doc = ""]
#[doc = " @details Used with @ref sd_ble_opt_get to get the current channel map"]
#[doc = "          or @ref sd_ble_opt_set to set a new channel map. When setting the"]
#[doc = "          channel map, it applies to all current and future connections. When getting the"]
#[doc = "          current channel map, it applies to a single connection and the connection handle"]
#[doc = "          must be supplied."]
#[doc = ""]
#[doc = " @note Setting the channel map may take some time, depending on connection parameters."]
#[doc = "       The time taken may be different for each connection and the get operation will"]
#[doc = "       return the previous channel map until the new one has taken effect."]
#[doc = ""]
#[doc = " @note After setting the channel map, by spec it can not be set again until at least 1 s has passed."]
#[doc = "       See Bluetooth Specification Version 4.1 Volume 2, Part E, Section 7.3.46."]
#[doc = ""]
#[doc = " @retval ::NRF_SUCCESS Get or set successful."]
#[doc = " @retval ::NRF_ERROR_INVALID_PARAM One or more of the following is true:"]
#[doc = "                                   - Less then two bits in @ref ch_map are set."]
#[doc = "                                   - Bits for primary advertising channels (37-39) are set."]
#[doc = " @retval ::NRF_ERROR_BUSY Channel map was set again before enough time had passed."]
#[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied for get."]
#[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Returned by @ref sd_ble_opt_set in peripheral-only SoftDevices."]
#[doc = ""]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_opt_ch_map_t {
    #[doc = "< Connection Handle (only applicable for get)"]
    pub conn_handle: u16,
    #[doc = "< Channel Map (37-bit)."]
    pub ch_map: [u8; 5usize],
}
#[test]
fn bindgen_test_layout_ble_gap_opt_ch_map_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_opt_ch_map_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gap_opt_ch_map_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_opt_ch_map_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gap_opt_ch_map_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_opt_ch_map_t>())).conn_handle as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_ch_map_t),
            "::",
            stringify!(conn_handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_opt_ch_map_t>())).ch_map as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_ch_map_t),
            "::",
            stringify!(ch_map)
        )
    );
}
#[doc = "@brief Local connection latency option."]
#[doc = ""]
#[doc = " @details Local connection latency is a feature which enables the slave to improve"]
#[doc = "          current consumption by ignoring the slave latency set by the peer. The"]
#[doc = "          local connection latency can only be set to a multiple of the slave latency,"]
#[doc = "          and cannot be longer than half of the supervision timeout."]
#[doc = ""]
#[doc = " @details Used with @ref sd_ble_opt_set to set the local connection latency. The"]
#[doc = "          @ref sd_ble_opt_get is not supported for this option, but the actual"]
#[doc = "          local connection latency (unless set to NULL) is set as a return parameter"]
#[doc = "          when setting the option."]
#[doc = ""]
#[doc = " @note The latency set will be truncated down to the closest slave latency event"]
#[doc = "       multiple, or the nearest multiple before half of the supervision timeout."]
#[doc = ""]
#[doc = " @note The local connection latency is disabled by default, and needs to be enabled for new"]
#[doc = "       connections and whenever the connection is updated."]
#[doc = ""]
#[doc = " @retval ::NRF_SUCCESS Set successfully."]
#[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Get is not supported."]
#[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_opt_local_conn_latency_t {
    #[doc = "< Connection Handle"]
    pub conn_handle: u16,
    #[doc = "< Requested local connection latency."]
    pub requested_latency: u16,
    #[doc = "< Pointer to storage for the actual local connection latency (can be set to NULL to skip return value)."]
    pub p_actual_latency: *mut u16,
}
#[test]
fn bindgen_test_layout_ble_gap_opt_local_conn_latency_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_opt_local_conn_latency_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gap_opt_local_conn_latency_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_opt_local_conn_latency_t>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gap_opt_local_conn_latency_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_opt_local_conn_latency_t>())).conn_handle as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_local_conn_latency_t),
            "::",
            stringify!(conn_handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_opt_local_conn_latency_t>())).requested_latency
                as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_local_conn_latency_t),
            "::",
            stringify!(requested_latency)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_opt_local_conn_latency_t>())).p_actual_latency
                as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_local_conn_latency_t),
            "::",
            stringify!(p_actual_latency)
        )
    );
}
#[doc = "@brief Disable slave latency"]
#[doc = ""]
#[doc = " @details Used with @ref sd_ble_opt_set to temporarily disable slave latency of a peripheral connection"]
#[doc = "          (see @ref ble_gap_conn_params_t::slave_latency). And to re-enable it again. When disabled, the"]
#[doc = "          peripheral will ignore the slave_latency set by the central."]
#[doc = ""]
#[doc = " @note  Shall only be called on peripheral links."]
#[doc = ""]
#[doc = " @retval ::NRF_SUCCESS Set successfully."]
#[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Get is not supported."]
#[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_opt_slave_latency_disable_t {
    #[doc = "< Connection Handle"]
    pub conn_handle: u16,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    pub __bindgen_padding_0: u8,
}
#[test]
fn bindgen_test_layout_ble_gap_opt_slave_latency_disable_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_opt_slave_latency_disable_t>(),
        4usize,
        concat!("Size of: ", stringify!(ble_gap_opt_slave_latency_disable_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_opt_slave_latency_disable_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gap_opt_slave_latency_disable_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_opt_slave_latency_disable_t>())).conn_handle as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_slave_latency_disable_t),
            "::",
            stringify!(conn_handle)
        )
    );
}
impl ble_gap_opt_slave_latency_disable_t {
    #[inline]
    pub fn disable(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_disable(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(disable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let disable: u8 = unsafe { ::core::mem::transmute(disable) };
            disable as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief Passkey Option."]
#[doc = ""]
#[doc = " @mscs"]
#[doc = " @mmsc{@ref BLE_GAP_PERIPH_BONDING_STATIC_PK_MSC}"]
#[doc = " @endmscs"]
#[doc = ""]
#[doc = " @details Structure containing the passkey to be used during pairing. This can be used with @ref"]
#[doc = "          sd_ble_opt_set to make the SoftDevice use a preprogrammed passkey for authentication"]
#[doc = "          instead of generating a random one."]
#[doc = ""]
#[doc = " @note Repeated pairing attempts using the same preprogrammed passkey makes pairing vulnerable to MITM attacks."]
#[doc = ""]
#[doc = " @note @ref sd_ble_opt_get is not supported for this option."]
#[doc = ""]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_opt_passkey_t {
    #[doc = "< Pointer to 6-digit ASCII string (digit 0..9 only, no NULL termination) passkey to be used during pairing. If this is NULL, the SoftDevice will generate a random passkey if required."]
    pub p_passkey: *const u8,
}
#[test]
fn bindgen_test_layout_ble_gap_opt_passkey_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_opt_passkey_t>(),
        4usize,
        concat!("Size of: ", stringify!(ble_gap_opt_passkey_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_opt_passkey_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_opt_passkey_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_opt_passkey_t>())).p_passkey as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_passkey_t),
            "::",
            stringify!(p_passkey)
        )
    );
}
#[doc = "@brief Authenticated payload timeout option."]
#[doc = ""]
#[doc = " @details This can be used with @ref sd_ble_opt_set to change the Authenticated payload timeout to a value other"]
#[doc = "          than the default of @ref BLE_GAP_AUTH_PAYLOAD_TIMEOUT_MAX."]
#[doc = ""]
#[doc = " @note The authenticated payload timeout event ::BLE_GAP_TIMEOUT_SRC_AUTH_PAYLOAD will be generated"]
#[doc = "       if auth_payload_timeout time has elapsed without receiving a packet with a valid MIC on an encrypted"]
#[doc = "       link."]
#[doc = ""]
#[doc = " @note The LE ping procedure will be initiated before the timer expires to give the peer a chance"]
#[doc = "       to reset the timer. In addition the stack will try to prioritize running of LE ping over other"]
#[doc = "       activities to increase chances of finishing LE ping before timer expires. To avoid side-effects"]
#[doc = "       on other activities, it is recommended to use high timeout values."]
#[doc = "       Recommended timeout > 2*(connInterval * (6 + connSlaveLatency))."]
#[doc = ""]
#[doc = " @retval ::NRF_SUCCESS Set successfully."]
#[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. auth_payload_timeout was outside of allowed range."]
#[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_opt_auth_payload_timeout_t {
    #[doc = "< Connection Handle"]
    pub conn_handle: u16,
    #[doc = "< Requested timeout in 10 ms unit, see @ref BLE_GAP_AUTH_PAYLOAD_TIMEOUT."]
    pub auth_payload_timeout: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_opt_auth_payload_timeout_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_opt_auth_payload_timeout_t>(),
        4usize,
        concat!("Size of: ", stringify!(ble_gap_opt_auth_payload_timeout_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_opt_auth_payload_timeout_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gap_opt_auth_payload_timeout_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_opt_auth_payload_timeout_t>())).conn_handle as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_auth_payload_timeout_t),
            "::",
            stringify!(conn_handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_opt_auth_payload_timeout_t>())).auth_payload_timeout
                as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_auth_payload_timeout_t),
            "::",
            stringify!(auth_payload_timeout)
        )
    );
}
#[doc = "@brief Option structure for GAP options."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_gap_opt_t {
    #[doc = "< Parameters for the Channel Map option."]
    pub ch_map: ble_gap_opt_ch_map_t,
    #[doc = "< Parameters for the Local connection latency option"]
    pub local_conn_latency: ble_gap_opt_local_conn_latency_t,
    #[doc = "< Parameters for the Passkey option."]
    pub passkey: ble_gap_opt_passkey_t,
    #[doc = "< Parameters for the authenticated payload timeout option."]
    pub auth_payload_timeout: ble_gap_opt_auth_payload_timeout_t,
    #[doc = "< Parameters for the Disable slave latency option"]
    pub slave_latency_disable: ble_gap_opt_slave_latency_disable_t,
    _bindgen_union_align: [u32; 2usize],
}
#[test]
fn bindgen_test_layout_ble_gap_opt_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_opt_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gap_opt_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_opt_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_opt_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_opt_t>())).ch_map as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_t),
            "::",
            stringify!(ch_map)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_opt_t>())).local_conn_latency as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_t),
            "::",
            stringify!(local_conn_latency)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gap_opt_t>())).passkey as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_t),
            "::",
            stringify!(passkey)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_opt_t>())).auth_payload_timeout as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_t),
            "::",
            stringify!(auth_payload_timeout)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_opt_t>())).slave_latency_disable as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_opt_t),
            "::",
            stringify!(slave_latency_disable)
        )
    );
}
#[doc = "@brief  Connection event triggering parameters."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gap_conn_event_trigger_t {
    #[doc = "< PPI channel to use. This channel should be regarded as reserved until"]
    #[doc = "connection event PPI task triggering is stopped."]
    #[doc = "The PPI channel ID can not be one of the PPI channels reserved by"]
    #[doc = "the SoftDevice. See @ref NRF_SOC_SD_PPI_CHANNELS_SD_ENABLED_MSK."]
    pub ppi_ch_id: u8,
    #[doc = "< Task Endpoint to trigger."]
    pub task_endpoint: u32,
    #[doc = "< The connection event on which the task triggering should start."]
    pub conn_evt_counter_start: u16,
    #[doc = "< Trigger period. Valid range is [1, 32767]."]
    #[doc = "If the device is in slave role and slave latency is enabled,"]
    #[doc = "this parameter should be set to a multiple of (slave latency + 1)"]
    #[doc = "to ensure low power operation."]
    pub period_in_events: u16,
}
#[test]
fn bindgen_test_layout_ble_gap_conn_event_trigger_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gap_conn_event_trigger_t>(),
        12usize,
        concat!("Size of: ", stringify!(ble_gap_conn_event_trigger_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gap_conn_event_trigger_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gap_conn_event_trigger_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_conn_event_trigger_t>())).ppi_ch_id as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_conn_event_trigger_t),
            "::",
            stringify!(ppi_ch_id)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_conn_event_trigger_t>())).task_endpoint as *const _
                as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_conn_event_trigger_t),
            "::",
            stringify!(task_endpoint)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_conn_event_trigger_t>())).conn_evt_counter_start
                as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_conn_event_trigger_t),
            "::",
            stringify!(conn_evt_counter_start)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gap_conn_event_trigger_t>())).period_in_events as *const _
                as usize
        },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gap_conn_event_trigger_t),
            "::",
            stringify!(period_in_events)
        )
    );
}

    #[doc = "@brief Set the local Bluetooth identity address."]
    #[doc = ""]
    #[doc = "        The local Bluetooth identity address is the address that identifies this device to other peers."]
    #[doc = "        The address type must be either @ref BLE_GAP_ADDR_TYPE_PUBLIC or @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC."]
    #[doc = ""]
    #[doc = " @note  The identity address cannot be changed while advertising."]
    #[doc = ""]
    #[doc = " @note  This address will be distributed to the peer during bonding."]
    #[doc = "        If the address changes, the address stored in the peer device will not be valid and the ability to"]
    #[doc = "        reconnect using the old address will be lost."]
    #[doc = ""]
    #[doc = " @note  By default the SoftDevice will set an address of type @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC upon being"]
    #[doc = "        enabled. The address is a random number populated during the IC manufacturing process and remains unchanged"]
    #[doc = "        for the lifetime of each IC."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_ADV_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] p_addr Pointer to address structure."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Address successfully set."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address."]
    #[doc = " @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE The identity address cannot be changed while advertising."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_addr_set(p_addr: *const ble_gap_addr_t) -> u32 {
    let ret: u32;
    asm!("svc 108",
        inout("r0") to_asm(p_addr) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get local Bluetooth identity address."]
    #[doc = ""]
    #[doc = " @note  This will always return the identity address irrespective of the privacy settings,"]
    #[doc = "        i.e. the address type will always be either @ref BLE_GAP_ADDR_TYPE_PUBLIC or @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC."]
    #[doc = ""]
    #[doc = " @param[out] p_addr Pointer to address structure to be filled in."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Address successfully retrieved."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid or NULL pointer supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_addr_get(p_addr: *mut ble_gap_addr_t) -> u32 {
    let ret: u32;
    asm!("svc 109",
        inout("r0") to_asm(p_addr) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get the Bluetooth device address used by the advertiser."]
    #[doc = ""]
    #[doc = " @note  This function will return the local Bluetooth address used in advertising PDUs. When"]
    #[doc = "        using privacy, the SoftDevice will generate a new private address every"]
    #[doc = "        @ref ble_gap_privacy_params_t::private_addr_cycle_s configured using"]
    #[doc = "        @ref sd_ble_gap_privacy_set. Hence depending on when the application calls this API, the"]
    #[doc = "        address returned may not be the latest address that is used in the advertising PDUs."]
    #[doc = ""]
    #[doc = " @param[in]  adv_handle The advertising handle to get the address from."]
    #[doc = " @param[out] p_addr     Pointer to address structure to be filled in."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                  Address successfully retrieved."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR       Invalid or NULL pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_ADV_HANDLE The provided advertising handle was not found."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE      The advertising set is currently not advertising."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_adv_addr_get(adv_handle: u8, p_addr: *mut ble_gap_addr_t) -> u32 {
    let ret: u32;
    asm!("svc 147",
        inout("r0") to_asm(adv_handle) => ret,
        inout("r1") to_asm(p_addr) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Set the active whitelist in the SoftDevice."]
    #[doc = ""]
    #[doc = " @note  Only one whitelist can be used at a time and the whitelist is shared between the BLE roles."]
    #[doc = "        The whitelist cannot be set if a BLE role is using the whitelist."]
    #[doc = ""]
    #[doc = " @note  If an address is resolved using the information in the device identity list, then the whitelist"]
    #[doc = "        filter policy applies to the peer identity address and not the resolvable address sent on air."]
    #[doc = ""]
    #[doc = " @param[in] pp_wl_addrs Pointer to a whitelist of peer addresses, if NULL the whitelist will be cleared."]
    #[doc = " @param[in] len         Length of the whitelist, maximum @ref BLE_GAP_WHITELIST_ADDR_MAX_COUNT."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS The whitelist is successfully set/cleared."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR The whitelist (or one of its entries) provided is invalid."]
    #[doc = " @retval ::BLE_ERROR_GAP_WHITELIST_IN_USE The whitelist is in use by a BLE role and cannot be set or cleared."]
    #[doc = " @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address type is supplied."]
    #[doc = " @retval ::NRF_ERROR_DATA_SIZE The given whitelist size is invalid (zero or too large); this can only return when"]
    #[doc = "                               pp_wl_addrs is not NULL."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_whitelist_set(pp_wl_addrs: *const *const ble_gap_addr_t, len: u8) -> u32 {
    let ret: u32;
    asm!("svc 110",
        inout("r0") to_asm(pp_wl_addrs) => ret,
        inout("r1") to_asm(len) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Set device identity list."]
    #[doc = ""]
    #[doc = " @note  Only one device identity list can be used at a time and the list is shared between the BLE roles."]
    #[doc = "        The device identity list cannot be set if a BLE role is using the list."]
    #[doc = ""]
    #[doc = " @param[in] pp_id_keys     Pointer to an array of peer identity addresses and peer IRKs, if NULL the device identity list will be cleared."]
    #[doc = " @param[in] pp_local_irks  Pointer to an array of local IRKs. Each entry in the array maps to the entry in pp_id_keys at the same index."]
    #[doc = "                           To fill in the list with the currently set device IRK for all peers, set to NULL."]
    #[doc = " @param[in] len            Length of the device identity list, maximum @ref BLE_GAP_DEVICE_IDENTITIES_MAX_COUNT."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_PRIVACY_ADV_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PRIVACY_ADV_DIR_PRIV_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_CONN_PRIV_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS The device identity list successfully set/cleared."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR The device identity list (or one of its entries) provided is invalid."]
    #[doc = "                                  This code may be returned if the local IRK list also has an invalid entry."]
    #[doc = " @retval ::BLE_ERROR_GAP_DEVICE_IDENTITIES_IN_USE The device identity list is in use and cannot be set or cleared."]
    #[doc = " @retval ::BLE_ERROR_GAP_DEVICE_IDENTITIES_DUPLICATE The device identity list contains multiple entries with the same identity address."]
    #[doc = " @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address type is supplied."]
    #[doc = " @retval ::NRF_ERROR_DATA_SIZE The given device identity list size invalid (zero or too large); this can"]
    #[doc = "                               only return when pp_id_keys is not NULL."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_device_identities_set(
        pp_id_keys: *const *const ble_gap_id_key_t,
        pp_local_irks: *const *const ble_gap_irk_t,
        len: u8,
    ) -> u32 {
    let ret: u32;
    asm!("svc 111",
        inout("r0") to_asm(pp_id_keys) => ret,
        inout("r1") to_asm(pp_local_irks) => _,
        inout("r2") to_asm(len) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Set privacy settings."]
    #[doc = ""]
    #[doc = " @note  Privacy settings cannot be changed while advertising."]
    #[doc = ""]
    #[doc = " @param[in] p_privacy_params Privacy settings."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_PRIVACY_ADV_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PRIVACY_ADV_DIR_PRIV_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Set successfully."]
    #[doc = " @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry."]
    #[doc = " @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address type is supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR The pointer to privacy settings is NULL or invalid."]
    #[doc = "                                  Otherwise, the p_device_irk pointer in privacy parameter is an invalid pointer."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Out of range parameters are provided."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Privacy settings cannot be changed while advertising."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_privacy_set(p_privacy_params: *const ble_gap_privacy_params_t) -> u32 {
    let ret: u32;
    asm!("svc 112",
        inout("r0") to_asm(p_privacy_params) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get privacy settings."]
    #[doc = ""]
    #[doc = " @note ::ble_gap_privacy_params_t::p_device_irk must be initialized to NULL or a valid address before this function is called."]
    #[doc = "       If it is initialized to a valid address, the address pointed to will contain the current device IRK on return."]
    #[doc = ""]
    #[doc = " @param[in,out] p_privacy_params Privacy settings."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS            Privacy settings read."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR The pointer given for returning the privacy settings may be NULL or invalid."]
    #[doc = "                                  Otherwise, the p_device_irk pointer in privacy parameter is an invalid pointer."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_privacy_get(p_privacy_params: *mut ble_gap_privacy_params_t) -> u32 {
    let ret: u32;
    asm!("svc 113",
        inout("r0") to_asm(p_privacy_params) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Configure an advertising set. Set, clear or update advertising and scan response data."]
    #[doc = ""]
    #[doc = " @note  The format of the advertising data will be checked by this call to ensure interoperability."]
    #[doc = "        Limitations imposed by this API call to the data provided include having a flags data type in the scan response data and"]
    #[doc = "        duplicating the local name in the advertising data and scan response data."]
    #[doc = ""]
    #[doc = " @note In order to update advertising data while advertising, new advertising buffers must be provided."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_ADV_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in,out] p_adv_handle                         Provide a pointer to a handle containing @ref BLE_GAP_ADV_SET_HANDLE_NOT_SET to configure"]
    #[doc = "                                                     a new advertising set. On success, a new handle is then returned through the pointer."]
    #[doc = "                                                     Provide a pointer to an existing advertising handle to configure an existing advertising set."]
    #[doc = " @param[in]     p_adv_data                           Advertising data. If set to NULL, no advertising data will be used. See @ref ble_gap_adv_data_t."]
    #[doc = " @param[in]     p_adv_params                         Advertising parameters. When this function is used to update advertising data while advertising,"]
    #[doc = "                                                     this parameter must be NULL. See @ref ble_gap_adv_params_t."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                               Advertising set successfully configured."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM                   Invalid parameter(s) supplied:"]
    #[doc = "                                                      - Invalid advertising data configuration specified. See @ref ble_gap_adv_data_t."]
    #[doc = "                                                      - Invalid configuration of p_adv_params. See @ref ble_gap_adv_params_t."]
    #[doc = "                                                      - Use of whitelist requested but whitelist has not been set,"]
    #[doc = "                                                        see @ref sd_ble_gap_whitelist_set."]
    #[doc = " @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR            ble_gap_adv_params_t::p_peer_addr is invalid."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE                   Invalid state to perform operation. Either:"]
    #[doc = "                                                     - It is invalid to provide non-NULL advertising set parameters while advertising."]
    #[doc = "                                                     - It is invalid to provide the same data buffers while advertising. To update"]
    #[doc = "                                                       advertising data, provide new advertising buffers."]
    #[doc = " @retval ::BLE_ERROR_GAP_DISCOVERABLE_WITH_WHITELIST Discoverable mode and whitelist incompatible."]
    #[doc = " @retval ::BLE_ERROR_INVALID_ADV_HANDLE              The provided advertising handle was not found. Use @ref BLE_GAP_ADV_SET_HANDLE_NOT_SET to"]
    #[doc = "                                                     configure a new advertising handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR                    Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_FLAGS                   Invalid combination of advertising flags supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_DATA                    Invalid data type(s) supplied. Check the advertising data format specification"]
    #[doc = "                                                     given in Bluetooth Specification Version 5.0, Volume 3, Part C, Chapter 11."]
    #[doc = " @retval ::NRF_ERROR_INVALID_LENGTH                  Invalid data length(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED                   Unsupported data length or advertising parameter configuration."]
    #[doc = " @retval ::NRF_ERROR_NO_MEM                          Not enough memory to configure a new advertising handle. Update an"]
    #[doc = "                                                     existing advertising handle instead."]
    #[doc = " @retval ::BLE_ERROR_GAP_UUID_LIST_MISMATCH Invalid UUID list supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_adv_set_configure(
        p_adv_handle: *mut u8,
        p_adv_data: *const ble_gap_adv_data_t,
        p_adv_params: *const ble_gap_adv_params_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 114",
        inout("r0") to_asm(p_adv_handle) => ret,
        inout("r1") to_asm(p_adv_data) => _,
        inout("r2") to_asm(p_adv_params) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Start advertising (GAP Discoverable, Connectable modes, Broadcast Procedure)."]
    #[doc = ""]
    #[doc = " @note Only one advertiser may be active at any time."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GAP_EVT_CONNECTED, Generated after connection has been established through connectable advertising.}"]
    #[doc = " @event{@ref BLE_GAP_EVT_ADV_SET_TERMINATED, Advertising set has terminated.}"]
    #[doc = " @event{@ref BLE_GAP_EVT_SCAN_REQ_REPORT, A scan request was received.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_ADV_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_CONN_PRIV_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PRIVACY_ADV_DIR_PRIV_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] adv_handle   Advertising handle to advertise on, received from @ref sd_ble_gap_adv_set_configure."]
    #[doc = " @param[in] conn_cfg_tag Tag identifying a configuration set by @ref sd_ble_cfg_set or"]
    #[doc = "                         @ref BLE_CONN_CFG_TAG_DEFAULT to use the default connection configuration. For non-connectable"]
    #[doc = "                         advertising, this is ignored."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                  The BLE stack has started advertising."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE      adv_handle is not configured or already advertising."]
    #[doc = " @retval ::NRF_ERROR_CONN_COUNT         The limit of available connections for this connection configuration"]
    #[doc = "                                        tag has been reached; connectable advertiser cannot be started."]
    #[doc = "                                        To increase the number of available connections,"]
    #[doc = "                                        use @ref sd_ble_cfg_set with @ref BLE_GAP_CFG_ROLE_COUNT or @ref BLE_CONN_CFG_GAP."]
    #[doc = " @retval ::BLE_ERROR_INVALID_ADV_HANDLE Advertising handle not found. Configure a new adveriting handle with @ref sd_ble_gap_adv_set_configure."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND          conn_cfg_tag not found."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM      Invalid parameter(s) supplied:"]
    #[doc = "                                        - Invalid configuration of p_adv_params. See @ref ble_gap_adv_params_t."]
    #[doc = "                                        - Use of whitelist requested but whitelist has not been set, see @ref sd_ble_gap_whitelist_set."]
    #[doc = " @retval ::NRF_ERROR_RESOURCES          Either:"]
    #[doc = "                                        - adv_handle is configured with connectable advertising, but the event_length parameter"]
    #[doc = "                                          associated with conn_cfg_tag is too small to be able to establish a connection on"]
    #[doc = "                                          the selected advertising phys. Use @ref sd_ble_cfg_set to increase the event length."]
    #[doc = "                                        - Not enough BLE role slots available."]
    #[doc = "                                          Stop one or more currently active roles (Peripheral or Broadcaster) and try again"]
    #[doc = "                                        - p_adv_params is configured with connectable advertising, but the event_length parameter"]
    #[doc = "                                          associated with conn_cfg_tag is too small to be able to establish a connection on"]
    #[doc = "                                          the selected advertising phys. Use @ref sd_ble_cfg_set to increase the event length."]
    #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Unsupported PHYs supplied to the call."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_adv_start(adv_handle: u8, conn_cfg_tag: u8) -> u32 {
    let ret: u32;
    asm!("svc 115",
        inout("r0") to_asm(adv_handle) => ret,
        inout("r1") to_asm(conn_cfg_tag) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Stop advertising (GAP Discoverable, Connectable modes, Broadcast Procedure)."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_ADV_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] adv_handle The advertising handle that should stop advertising."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS The BLE stack has stopped advertising."]
    #[doc = " @retval ::BLE_ERROR_INVALID_ADV_HANDLE Invalid advertising handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE The advertising handle is not advertising."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_adv_stop(adv_handle: u8) -> u32 {
    let ret: u32;
    asm!("svc 116",
        inout("r0") to_asm(adv_handle) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Update connection parameters."]
    #[doc = ""]
    #[doc = " @details In the peripheral role, this will send the corresponding L2CAP request and wait for"]
    #[doc = "          the central to perform the procedure. Regardless of success or failure, the application"]
    #[doc = "          will be informed of the result with a @ref BLE_GAP_EVT_CONN_PARAM_UPDATE event."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GAP_EVT_CONN_PARAM_UPDATE, Result of the connection parameter update procedure.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_CPU_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection handle."]
    #[doc = " @param[in] p_conn_params  Pointer to desired connection parameters. If NULL is provided on a peripheral role,"]
    #[doc = "                           the parameters in the PPCP characteristic of the GAP service will be used instead."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS The Connection Update procedure has been started successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Disconnection in progress or link has not been established."]
    #[doc = " @retval ::NRF_ERROR_BUSY Procedure already in progress, wait for pending procedures to complete and retry."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_conn_param_update(
        conn_handle: u16,
        p_conn_params: *const ble_gap_conn_params_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 117",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_conn_params) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Disconnect (GAP Link Termination)."]
    #[doc = ""]
    #[doc = " @details This call initiates the disconnection procedure, and its completion will be communicated to the application"]
    #[doc = "          with a @ref BLE_GAP_EVT_DISCONNECTED event."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GAP_EVT_DISCONNECTED, Generated when disconnection procedure is complete.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_CONN_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection handle."]
    #[doc = " @param[in] hci_status_code HCI status code, see @ref BLE_HCI_STATUS_CODES (accepted values are @ref BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION and @ref BLE_HCI_CONN_INTERVAL_UNACCEPTABLE)."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS The disconnection procedure has been started successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Disconnection in progress or link has not been established."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_disconnect(conn_handle: u16, hci_status_code: u8) -> u32 {
    let ret: u32;
    asm!("svc 118",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(hci_status_code) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Set the radio's transmit power."]
    #[doc = ""]
    #[doc = " @param[in] role The role to set the transmit power for, see @ref BLE_GAP_TX_POWER_ROLES for"]
    #[doc = "                 possible roles."]
    #[doc = " @param[in] handle   The handle parameter is interpreted depending on role:"]
    #[doc = "                     - If role is @ref BLE_GAP_TX_POWER_ROLE_CONN, this value is the specific connection handle."]
    #[doc = "                     - If role is @ref BLE_GAP_TX_POWER_ROLE_ADV, the advertising set identified with the advertising handle,"]
    #[doc = "                       will use the specified transmit power, and include it in the advertising packet headers if"]
    #[doc = "                       @ref ble_gap_adv_properties_t::include_tx_power set."]
    #[doc = "                     - For all other roles handle is ignored."]
    #[doc = " @param[in] tx_power Radio transmit power in dBm (see note for accepted values)."]
    #[doc = ""]
    #[doc = " @note Supported tx_power values: -40dBm, -20dBm, -16dBm, -12dBm, -8dBm, -4dBm, 0dBm, +3dBm and +4dBm."]
    #[doc = " @note The initiator will have the same transmit power as the scanner."]
    #[doc = " @note When a connection is created it will inherit the transmit power from the initiator or"]
    #[doc = "       advertiser leading to the connection."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully changed the transmit power."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_ADV_HANDLE Advertising handle not found."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_tx_power_set(role: u8, handle: u16, tx_power: i8) -> u32 {
    let ret: u32;
    asm!("svc 119",
        inout("r0") to_asm(role) => ret,
        inout("r1") to_asm(handle) => _,
        inout("r2") to_asm(tx_power) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Set GAP Appearance value."]
    #[doc = ""]
    #[doc = " @param[in] appearance Appearance (16-bit), see @ref BLE_APPEARANCES."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS  Appearance value set successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_appearance_set(appearance: u16) -> u32 {
    let ret: u32;
    asm!("svc 120",
        inout("r0") to_asm(appearance) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get GAP Appearance value."]
    #[doc = ""]
    #[doc = " @param[out] p_appearance Pointer to appearance (16-bit) to be filled in, see @ref BLE_APPEARANCES."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Appearance value retrieved successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_appearance_get(p_appearance: *mut u16) -> u32 {
    let ret: u32;
    asm!("svc 121",
        inout("r0") to_asm(p_appearance) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Set GAP Peripheral Preferred Connection Parameters."]
    #[doc = ""]
    #[doc = " @param[in] p_conn_params Pointer to a @ref ble_gap_conn_params_t structure with the desired parameters."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Peripheral Preferred Connection Parameters set successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED The characteristic is not included in the Attribute Table,"]
    #[doc = "see @ref ble_gap_cfg_ppcp_incl_cfg_t."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_ppcp_set(p_conn_params: *const ble_gap_conn_params_t) -> u32 {
    let ret: u32;
    asm!("svc 122",
        inout("r0") to_asm(p_conn_params) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get GAP Peripheral Preferred Connection Parameters."]
    #[doc = ""]
    #[doc = " @param[out] p_conn_params Pointer to a @ref ble_gap_conn_params_t structure where the parameters will be stored."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Peripheral Preferred Connection Parameters retrieved successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED The characteristic is not included in the Attribute Table,"]
    #[doc = "see @ref ble_gap_cfg_ppcp_incl_cfg_t."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_ppcp_get(p_conn_params: *mut ble_gap_conn_params_t) -> u32 {
    let ret: u32;
    asm!("svc 123",
        inout("r0") to_asm(p_conn_params) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Set GAP device name."]
    #[doc = ""]
    #[doc = " @note  If the device name is located in application flash memory (see @ref ble_gap_cfg_device_name_t),"]
    #[doc = "        it cannot be changed. Then @ref NRF_ERROR_FORBIDDEN will be returned."]
    #[doc = ""]
    #[doc = " @param[in] p_write_perm Write permissions for the Device Name characteristic, see @ref ble_gap_conn_sec_mode_t."]
    #[doc = " @param[in] p_dev_name Pointer to a UTF-8 encoded, <b>non NULL-terminated</b> string."]
    #[doc = " @param[in] len Length of the UTF-8, <b>non NULL-terminated</b> string pointed to by p_dev_name in octets (must be smaller or equal than @ref BLE_GAP_DEVNAME_MAX_LEN)."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS GAP device name and permissions set successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_FORBIDDEN Device name is not writable."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_device_name_set(
        p_write_perm: *const ble_gap_conn_sec_mode_t,
        p_dev_name: *const u8,
        len: u16,
    ) -> u32 {
    let ret: u32;
    asm!("svc 124",
        inout("r0") to_asm(p_write_perm) => ret,
        inout("r1") to_asm(p_dev_name) => _,
        inout("r2") to_asm(len) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get GAP device name."]
    #[doc = ""]
    #[doc = " @note  If the device name is longer than the size of the supplied buffer,"]
    #[doc = "        p_len will return the complete device name length,"]
    #[doc = "        and not the number of bytes actually returned in p_dev_name."]
    #[doc = "        The application may use this information to allocate a suitable buffer size."]
    #[doc = ""]
    #[doc = " @param[out]    p_dev_name Pointer to an empty buffer where the UTF-8 <b>non NULL-terminated</b> string will be placed. Set to NULL to obtain the complete device name length."]
    #[doc = " @param[in,out] p_len      Length of the buffer pointed by p_dev_name, complete device name length on output."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS GAP device name retrieved successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_device_name_get(p_dev_name: *mut u8, p_len: *mut u16) -> u32 {
    let ret: u32;
    asm!("svc 125",
        inout("r0") to_asm(p_dev_name) => ret,
        inout("r1") to_asm(p_len) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Initiate the GAP Authentication procedure."]
    #[doc = ""]
    #[doc = " @details In the peripheral role, this function will send an SMP Security Request."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{Depending on the security parameters set and the packet exchanges with the peer\\, the following events may be generated:}"]
    #[doc = " @event{@ref BLE_GAP_EVT_SEC_PARAMS_REQUEST}"]
    #[doc = " @event{@ref BLE_GAP_EVT_SEC_INFO_REQUEST}"]
    #[doc = " @event{@ref BLE_GAP_EVT_PASSKEY_DISPLAY}"]
    #[doc = " @event{@ref BLE_GAP_EVT_KEY_PRESSED}"]
    #[doc = " @event{@ref BLE_GAP_EVT_AUTH_KEY_REQUEST}"]
    #[doc = " @event{@ref BLE_GAP_EVT_LESC_DHKEY_REQUEST}"]
    #[doc = " @event{@ref BLE_GAP_EVT_CONN_SEC_UPDATE}"]
    #[doc = " @event{@ref BLE_GAP_EVT_AUTH_STATUS}"]
    #[doc = " @event{@ref BLE_GAP_EVT_TIMEOUT}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_SEC_REQ_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection handle."]
    #[doc = " @param[in] p_sec_params Pointer to the @ref ble_gap_sec_params_t structure with the security parameters to be used during the pairing or bonding procedure."]
    #[doc = "                         In the peripheral role, only the bond, mitm, lesc and keypress fields of this structure are used."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully initiated authentication procedure."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:"]
    #[doc = "                                   - No link has been established."]
    #[doc = "                                   - An encryption is already executing or queued."]
    #[doc = " @retval ::NRF_ERROR_NO_MEM The maximum number of authentication procedures that can run in parallel for the given role is reached."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_authenticate(
        conn_handle: u16,
        p_sec_params: *const ble_gap_sec_params_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 126",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_sec_params) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Reply with GAP security parameters."]
    #[doc = ""]
    #[doc = " @details This function is only used to reply to a @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST, calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE."]
    #[doc = " @note    If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{This function is used during authentication procedures, see the list of events in the documentation of @ref sd_ble_gap_authenticate.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_PAIRING_JW_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_BONDING_JW_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_PERIPH_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_CENTRAL_OOB_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_BONDING_STATIC_PK_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_PAIRING_CONFIRM_FAIL_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_PAIRING_JW_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_PD_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_PAIRING_KS_TOO_SMALL_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_PAIRING_APP_ERROR_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_PAIRING_REMOTE_PAIRING_FAIL_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_PAIRING_TIMEOUT_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection handle."]
    #[doc = " @param[in] sec_status Security status, see @ref BLE_GAP_SEC_STATUS."]
    #[doc = " @param[in] p_sec_params Pointer to a @ref ble_gap_sec_params_t security parameters structure."]
    #[doc = " @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure"]
    #[doc = "                         will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application"]
    #[doc = "                         upon reception of a @ref BLE_GAP_EVT_AUTH_STATUS event."]
    #[doc = "                         Note that the SoftDevice expects the application to provide memory for storing the"]
    #[doc = "                         peer's keys. So it must be ensured that the relevant pointers inside this structure are not NULL. The pointers to the local key"]
    #[doc = "                         can, however, be NULL, in which case, the local key data will not be available to the application upon reception of the"]
    #[doc = "                         @ref BLE_GAP_EVT_AUTH_STATUS event."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully accepted security parameter from the application."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Security parameters has not been requested."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Setting of sign or link fields in @ref ble_gap_sec_kdist_t not supported."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_sec_params_reply(
        conn_handle: u16,
        sec_status: u8,
        p_sec_params: *const ble_gap_sec_params_t,
        p_sec_keyset: *const ble_gap_sec_keyset_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 127",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(sec_status) => _,
        inout("r2") to_asm(p_sec_params) => _,
        inout("r3") to_asm(p_sec_keyset) => _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Reply with an authentication key."]
    #[doc = ""]
    #[doc = " @details This function is only used to reply to a @ref BLE_GAP_EVT_AUTH_KEY_REQUEST or a @ref BLE_GAP_EVT_PASSKEY_DISPLAY, calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE."]
    #[doc = " @note    If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{This function is used during authentication procedures\\, see the list of events in the documentation of @ref sd_ble_gap_authenticate.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_CENTRAL_OOB_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection handle."]
    #[doc = " @param[in] key_type See @ref BLE_GAP_AUTH_KEY_TYPES."]
    #[doc = " @param[in] p_key If key type is @ref BLE_GAP_AUTH_KEY_TYPE_NONE, then NULL."]
    #[doc = "                  If key type is @ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY, then a 6-byte ASCII string (digit 0..9 only, no NULL termination)"]
    #[doc = "                     or NULL when confirming LE Secure Connections Numeric Comparison."]
    #[doc = "                  If key type is @ref BLE_GAP_AUTH_KEY_TYPE_OOB, then a 16-byte OOB key value in little-endian format."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Authentication key successfully set."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Authentication key has not been requested."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_auth_key_reply(conn_handle: u16, key_type: u8, p_key: *const u8) -> u32 {
    let ret: u32;
    asm!("svc 128",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(key_type) => _,
        inout("r2") to_asm(p_key) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Reply with an LE Secure connections DHKey."]
    #[doc = ""]
    #[doc = " @details This function is only used to reply to a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST, calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE."]
    #[doc = " @note    If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{This function is used during authentication procedures\\, see the list of events in the documentation of @ref sd_ble_gap_authenticate.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_PAIRING_JW_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_PD_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection handle."]
    #[doc = " @param[in] p_dhkey LE Secure Connections DHKey."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS DHKey successfully set."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:"]
    #[doc = "                                   - The peer is not authenticated."]
    #[doc = "                                   - The application has not pulled a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_lesc_dhkey_reply(
        conn_handle: u16,
        p_dhkey: *const ble_gap_lesc_dhkey_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 129",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_dhkey) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Notify the peer of a local keypress."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection handle."]
    #[doc = " @param[in] kp_not See @ref BLE_GAP_KP_NOT_TYPES."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Keypress notification successfully queued for transmission."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:"]
    #[doc = "                                   - Authentication key not requested."]
    #[doc = "                                   - Passkey has not been entered."]
    #[doc = "                                   - Keypresses have not been enabled by both peers."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY The BLE stack is busy. Retry at later time."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_keypress_notify(conn_handle: u16, kp_not: u8) -> u32 {
    let ret: u32;
    asm!("svc 130",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(kp_not) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Generate a set of OOB data to send to a peer out of band."]
    #[doc = ""]
    #[doc = " @note  The @ref ble_gap_addr_t included in the OOB data returned will be the currently active one (or, if a connection has already been established,"]
    #[doc = "        the one used during connection setup). The application may manually overwrite it with an updated value."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection handle. Can be @ref BLE_CONN_HANDLE_INVALID if a BLE connection has not been established yet."]
    #[doc = " @param[in] p_pk_own LE Secure Connections local P-256 Public Key."]
    #[doc = " @param[out] p_oobd_own The OOB data to be sent out of band to a peer."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS OOB data successfully generated."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_lesc_oob_data_get(
        conn_handle: u16,
        p_pk_own: *const ble_gap_lesc_p256_pk_t,
        p_oobd_own: *mut ble_gap_lesc_oob_data_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 131",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_pk_own) => _,
        inout("r2") to_asm(p_oobd_own) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Provide the OOB data sent/received out of band."]
    #[doc = ""]
    #[doc = " @note  An authentication procedure with OOB selected as an algorithm must be in progress when calling this function."]
    #[doc = " @note  A @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event with the oobd_req set to 1 must have been received prior to calling this function."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{This function is used during authentication procedures\\, see the list of events in the documentation of @ref sd_ble_gap_authenticate.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection handle."]
    #[doc = " @param[in] p_oobd_own The OOB data sent out of band to a peer or NULL if the peer has not received OOB data."]
    #[doc = "                       Must correspond to @ref ble_gap_sec_params_t::oob flag in @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST."]
    #[doc = " @param[in] p_oobd_peer The OOB data received out of band from a peer or NULL if none received."]
    #[doc = "                        Must correspond to @ref ble_gap_sec_params_t::oob flag"]
    #[doc = "                        in @ref sd_ble_gap_sec_params_reply in the peripheral role."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS OOB data accepted."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:"]
    #[doc = "                                   - Authentication key not requested"]
    #[doc = "                                   - Not expecting LESC OOB data"]
    #[doc = "                                   - Have not actually exchanged passkeys."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_lesc_oob_data_set(
        conn_handle: u16,
        p_oobd_own: *const ble_gap_lesc_oob_data_t,
        p_oobd_peer: *const ble_gap_lesc_oob_data_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 132",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_oobd_own) => _,
        inout("r2") to_asm(p_oobd_peer) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Reply with GAP security information."]
    #[doc = ""]
    #[doc = " @details This function is only used to reply to a @ref BLE_GAP_EVT_SEC_INFO_REQUEST, calling it at other times will result in @ref NRF_ERROR_INVALID_STATE."]
    #[doc = " @note    If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected parameters."]
    #[doc = " @note    Data signing is not yet supported, and p_sign_info must therefore be NULL."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPH_ENC_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection handle."]
    #[doc = " @param[in] p_enc_info Pointer to a @ref ble_gap_enc_info_t encryption information structure. May be NULL to signal none is available."]
    #[doc = " @param[in] p_id_info Pointer to a @ref ble_gap_irk_t identity information structure. May be NULL to signal none is available."]
    #[doc = " @param[in] p_sign_info Pointer to a @ref ble_gap_sign_info_t signing information structure. May be NULL to signal none is available."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully accepted security information."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:"]
    #[doc = "                                   - No link has been established."]
    #[doc = "                                   - No @ref BLE_GAP_EVT_SEC_REQUEST pending."]
    #[doc = "                                   - Encryption information provided by the app without being requested. See @ref ble_gap_evt_sec_info_request_t::enc_info."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_sec_info_reply(
        conn_handle: u16,
        p_enc_info: *const ble_gap_enc_info_t,
        p_id_info: *const ble_gap_irk_t,
        p_sign_info: *const ble_gap_sign_info_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 134",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_enc_info) => _,
        inout("r2") to_asm(p_id_info) => _,
        inout("r3") to_asm(p_sign_info) => _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get the current connection security."]
    #[doc = ""]
    #[doc = " @param[in]  conn_handle Connection handle."]
    #[doc = " @param[out] p_conn_sec  Pointer to a @ref ble_gap_conn_sec_t structure to be filled in."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Current connection security successfully retrieved."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_conn_sec_get(conn_handle: u16, p_conn_sec: *mut ble_gap_conn_sec_t) -> u32 {
    let ret: u32;
    asm!("svc 135",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_conn_sec) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Start reporting the received signal strength to the application."]
    #[doc = ""]
    #[doc = "        A new event is reported whenever the RSSI value changes, until @ref sd_ble_gap_rssi_stop is called."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GAP_EVT_RSSI_CHANGED, New RSSI data available. How often the event is generated is"]
    #[doc = "                                       dependent on the settings of the <code>threshold_dbm</code>"]
    #[doc = "                                       and <code>skip_count</code> input parameters.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_RSSI_FILT_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle        Connection handle."]
    #[doc = " @param[in] threshold_dbm      Minimum change in dBm before triggering the @ref BLE_GAP_EVT_RSSI_CHANGED event. Events are disabled if threshold_dbm equals @ref BLE_GAP_RSSI_THRESHOLD_INVALID."]
    #[doc = " @param[in] skip_count         Number of RSSI samples with a change of threshold_dbm or more before sending a new @ref BLE_GAP_EVT_RSSI_CHANGED event."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                   Successfully activated RSSI reporting."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE       RSSI reporting is already ongoing."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_rssi_start(conn_handle: u16, threshold_dbm: u8, skip_count: u8) -> u32 {
    let ret: u32;
    asm!("svc 136",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(threshold_dbm) => _,
        inout("r2") to_asm(skip_count) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Stop reporting the received signal strength."]
    #[doc = ""]
    #[doc = " @note  An RSSI change detected before the call but not yet received by the application"]
    #[doc = "        may be reported after @ref sd_ble_gap_rssi_stop has been called."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC}"]
    #[doc = " @mmsc{@ref BLE_GAP_RSSI_FILT_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection handle."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                   Successfully deactivated RSSI reporting."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE       RSSI reporting is not ongoing."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_rssi_stop(conn_handle: u16) -> u32 {
    let ret: u32;
    asm!("svc 137",
        inout("r0") to_asm(conn_handle) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get the received signal strength for the last connection event."]
    #[doc = ""]
    #[doc = "        @ref sd_ble_gap_rssi_start must be called to start reporting RSSI before using this function. @ref NRF_ERROR_NOT_FOUND"]
    #[doc = "        will be returned until RSSI was sampled for the first time after calling @ref sd_ble_gap_rssi_start."]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in]  conn_handle Connection handle."]
    #[doc = " @param[out] p_rssi      Pointer to the location where the RSSI measurement shall be stored."]
    #[doc = " @param[out] p_ch_index  Pointer to the location where Channel Index for the RSSI measurement shall be stored."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                   Successfully read the RSSI."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND           No sample is available."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR        Invalid pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE       RSSI reporting is not ongoing."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_rssi_get(conn_handle: u16, p_rssi: *mut i8, p_ch_index: *mut u8) -> u32 {
    let ret: u32;
    asm!("svc 142",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_rssi) => _,
        inout("r2") to_asm(p_ch_index) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Initiate or respond to a PHY Update Procedure"]
    #[doc = ""]
    #[doc = " @details   This function is used to initiate or respond to a PHY Update Procedure. It will always"]
    #[doc = "            generate a @ref BLE_GAP_EVT_PHY_UPDATE event if successfully executed."]
    #[doc = "            If this function is used to initiate a PHY Update procedure and the only option"]
    #[doc = "            provided in @ref ble_gap_phys_t::tx_phys and @ref ble_gap_phys_t::rx_phys is the"]
    #[doc = "            currently active PHYs in the respective directions, the SoftDevice will generate a"]
    #[doc = "            @ref BLE_GAP_EVT_PHY_UPDATE with the current PHYs set and will not initiate the"]
    #[doc = "            procedure in the Link Layer."]
    #[doc = ""]
    #[doc = "            If @ref ble_gap_phys_t::tx_phys or @ref ble_gap_phys_t::rx_phys is @ref BLE_GAP_PHY_AUTO,"]
    #[doc = "            then the stack will select PHYs based on the peer's PHY preferences and the local link"]
    #[doc = "            configuration. The PHY Update procedure will for this case result in a PHY combination"]
    #[doc = "            that respects the time constraints configured with @ref sd_ble_cfg_set and the current"]
    #[doc = "            link layer data length."]
    #[doc = ""]
    #[doc = "            If the peer does not support the PHY Update Procedure, then the resulting"]
    #[doc = "            @ref BLE_GAP_EVT_PHY_UPDATE event will have a status set to"]
    #[doc = "            @ref BLE_HCI_UNSUPPORTED_REMOTE_FEATURE."]
    #[doc = ""]
    #[doc = "            If the PHY Update procedure was rejected by the peer due to a procedure collision, the status"]
    #[doc = "            will be @ref BLE_HCI_STATUS_CODE_LMP_ERROR_TRANSACTION_COLLISION or"]
    #[doc = "            @ref BLE_HCI_DIFFERENT_TRANSACTION_COLLISION."]
    #[doc = "            If the peer responds to the PHY Update procedure with invalid parameters, the status"]
    #[doc = "            will be @ref BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS."]
    #[doc = "            If the PHY Update procedure was rejected by the peer for a different reason, the status will"]
    #[doc = "            contain the reason as specified by the peer."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GAP_EVT_PHY_UPDATE, Result of the PHY Update Procedure.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_PERIPHERAL_PHY_UPDATE}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle   Connection handle to indicate the connection for which the PHY Update is requested."]
    #[doc = " @param[in] p_gap_phys    Pointer to PHY structure."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully requested a PHY Update."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Unsupported PHYs supplied to the call."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE No link has been established."]
    #[doc = " @retval ::NRF_ERROR_BUSY Procedure is already in progress or not allowed at this time. Process pending events and wait for the pending procedure to complete and retry."]
    #[doc = ""]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_phy_update(conn_handle: u16, p_gap_phys: *const ble_gap_phys_t) -> u32 {
    let ret: u32;
    asm!("svc 143",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_gap_phys) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Initiate or respond to a Data Length Update Procedure."]
    #[doc = ""]
    #[doc = " @note If the application uses @ref BLE_GAP_DATA_LENGTH_AUTO for one or more members of"]
    #[doc = "       p_dl_params, the SoftDevice will choose the highest value supported in current"]
    #[doc = "       configuration and connection parameters."]
    #[doc = ""]
    #[doc = " @param[in]   conn_handle       Connection handle."]
    #[doc = " @param[in]   p_dl_params       Pointer to local parameters to be used in Data Length Update"]
    #[doc = "                                Procedure. Set any member to @ref BLE_GAP_DATA_LENGTH_AUTO to let"]
    #[doc = "                                the SoftDevice automatically decide the value for that member."]
    #[doc = "                                Set to NULL to use automatic values for all members."]
    #[doc = " @param[out]  p_dl_limitation   Pointer to limitation to be written when local device does not"]
    #[doc = "                                have enough resources or does not support the requested Data Length"]
    #[doc = "                                Update parameters. Ignored if NULL."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GAP_DATA_LENGTH_UPDATE_PROCEDURE_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully set Data Length Extension initiation/response parameters."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE No link has been established."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied."]
    #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED The requested parameters are not supported by the SoftDevice. Inspect"]
    #[doc = "                                   p_dl_limitation to see which parameter is not supported."]
    #[doc = " @retval ::NRF_ERROR_RESOURCES The connection event length configured for this link is not sufficient for the requested parameters."]
    #[doc = "                               Use @ref sd_ble_cfg_set with @ref BLE_CONN_CFG_GAP to increase the connection event length."]
    #[doc = "                               Inspect p_dl_limitation to see where the limitation is."]
    #[doc = " @retval ::NRF_ERROR_BUSY Peer has already initiated a Data Length Update Procedure. Process the"]
    #[doc = "                          pending @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST event to respond."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_data_length_update(
        conn_handle: u16,
        p_dl_params: *const ble_gap_data_length_params_t,
        p_dl_limitation: *mut ble_gap_data_length_limitation_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 144",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_dl_params) => _,
        inout("r2") to_asm(p_dl_limitation) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief   Obtain the next connection event counter value."]
    #[doc = ""]
    #[doc = " @details The connection event counter is initialized to zero on the first connection event. The value is incremented"]
    #[doc = "          by one for each connection event. For more information see Bluetooth Core Specification v5.0, Vol 6, Part B,"]
    #[doc = "          Section 4.5.1."]
    #[doc = ""]
    #[doc = " @note    The connection event counter obtained through this API will be outdated if this API is called"]
    #[doc = "          at the same time as the connection event counter is incremented."]
    #[doc = ""]
    #[doc = " @note    This API will always return the last connection event counter + 1."]
    #[doc = "          The actual connection event may be multiple connection events later if:"]
    #[doc = "           - Slave latency is enabled and there is no data to transmit or receive."]
    #[doc = "           - Another role is scheduled with a higher priority at the same time as the next connection event."]
    #[doc = ""]
    #[doc = " @param[in]   conn_handle       Connection handle."]
    #[doc = " @param[out]  p_counter         Pointer to the variable where the next connection event counter will be written."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                   The connection event counter was successfully retrieved."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR        Invalid pointer supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_next_conn_evt_counter_get(conn_handle: u16, p_counter: *mut u16) -> u32 {
    let ret: u32;
    asm!("svc 148",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_counter) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief   Start triggering a given task on connection event start."]
    #[doc = ""]
    #[doc = " @details When enabled, this feature will trigger a PPI task at the start of connection events."]
    #[doc = "          The application can configure the SoftDevice to trigger every N connection events starting from"]
    #[doc = "          a given connection event counter. See also @ref ble_gap_conn_event_trigger_t."]
    #[doc = ""]
    #[doc = " @param[in]   conn_handle   Connection handle."]
    #[doc = " @param[in]   p_params      Connection event trigger parameters."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                   Success."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR        Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM       Invalid parameter supplied. See @ref ble_gap_conn_event_trigger_t."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE       Either:"]
    #[doc = "                                         - Trying to start connection event triggering when it is already ongoing."]
    #[doc = "                                         - @ref ble_gap_conn_event_trigger_t::conn_evt_counter_start is in the past."]
    #[doc = "                                           Use @ref sd_ble_gap_next_conn_evt_counter_get to find a new value"]
    #[doc = "to be used as ble_gap_conn_event_trigger_t::conn_evt_counter_start."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_conn_evt_trigger_start(
        conn_handle: u16,
        p_params: *const ble_gap_conn_event_trigger_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 149",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_params) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief   Stop triggering the task configured using @ref sd_ble_gap_conn_evt_trigger_start."]
    #[doc = ""]
    #[doc = " @param[in]   conn_handle   Connection handle."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                   Success."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE       Trying to stop connection event triggering when it is not enabled."]
    
#[inline(always)]
pub unsafe fn sd_ble_gap_conn_evt_trigger_stop(conn_handle: u16) -> u32 {
    let ret: u32;
    asm!("svc 150",
        inout("r0") to_asm(conn_handle) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}

#[doc = "< Set up an L2CAP channel."]
pub const BLE_L2CAP_SVCS_SD_BLE_L2CAP_CH_SETUP: BLE_L2CAP_SVCS = 184;
#[doc = "< Release an L2CAP channel."]
pub const BLE_L2CAP_SVCS_SD_BLE_L2CAP_CH_RELEASE: BLE_L2CAP_SVCS = 185;
#[doc = "< Receive an SDU on an L2CAP channel."]
pub const BLE_L2CAP_SVCS_SD_BLE_L2CAP_CH_RX: BLE_L2CAP_SVCS = 186;
#[doc = "< Transmit an SDU on an L2CAP channel."]
pub const BLE_L2CAP_SVCS_SD_BLE_L2CAP_CH_TX: BLE_L2CAP_SVCS = 187;
#[doc = "< Advanced SDU reception flow control."]
pub const BLE_L2CAP_SVCS_SD_BLE_L2CAP_CH_FLOW_CONTROL: BLE_L2CAP_SVCS = 188;
#[doc = "@brief L2CAP API SVC numbers."]
pub type BLE_L2CAP_SVCS = u32;
#[doc = "< L2CAP Channel Setup Request event."]
#[doc = "\\n See @ref ble_l2cap_evt_ch_setup_request_t."]
pub const BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_SETUP_REQUEST: BLE_L2CAP_EVTS = 112;
#[doc = "< L2CAP Channel Setup Refused event."]
#[doc = "\\n See @ref ble_l2cap_evt_ch_setup_refused_t."]
pub const BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_SETUP_REFUSED: BLE_L2CAP_EVTS = 113;
#[doc = "< L2CAP Channel Setup Completed event."]
#[doc = "\\n See @ref ble_l2cap_evt_ch_setup_t."]
pub const BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_SETUP: BLE_L2CAP_EVTS = 114;
#[doc = "< L2CAP Channel Released event."]
#[doc = "\\n No additional event structure applies."]
pub const BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_RELEASED: BLE_L2CAP_EVTS = 115;
#[doc = "< L2CAP Channel SDU data buffer released event."]
#[doc = "\\n See @ref ble_l2cap_evt_ch_sdu_buf_released_t."]
pub const BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_SDU_BUF_RELEASED: BLE_L2CAP_EVTS = 116;
#[doc = "< L2CAP Channel Credit received."]
#[doc = "\\n See @ref ble_l2cap_evt_ch_credit_t."]
pub const BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_CREDIT: BLE_L2CAP_EVTS = 117;
#[doc = "< L2CAP Channel SDU received."]
#[doc = "\\n See @ref ble_l2cap_evt_ch_rx_t."]
pub const BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_RX: BLE_L2CAP_EVTS = 118;
#[doc = "< L2CAP Channel SDU transmitted."]
#[doc = "\\n See @ref ble_l2cap_evt_ch_tx_t."]
pub const BLE_L2CAP_EVTS_BLE_L2CAP_EVT_CH_TX: BLE_L2CAP_EVTS = 119;
#[doc = "@brief L2CAP Event IDs."]
pub type BLE_L2CAP_EVTS = u32;
#[doc = " @brief BLE L2CAP connection configuration parameters, set with @ref sd_ble_cfg_set."]
#[doc = ""]
#[doc = " @note  These parameters are set per connection, so all L2CAP channels created on this connection"]
#[doc = "        will have the same parameters."]
#[doc = ""]
#[doc = " @retval ::NRF_ERROR_INVALID_PARAM  One or more of the following is true:"]
#[doc = "                                    - rx_mps is smaller than @ref BLE_L2CAP_MPS_MIN."]
#[doc = "                                    - tx_mps is smaller than @ref BLE_L2CAP_MPS_MIN."]
#[doc = "                                    - ch_count is greater than @ref BLE_L2CAP_CH_COUNT_MAX."]
#[doc = " @retval ::NRF_ERROR_NO_MEM         rx_mps or tx_mps is set too high."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_conn_cfg_t {
    #[doc = "< The maximum L2CAP PDU payload size, in bytes, that L2CAP shall"]
    #[doc = "be able to receive on L2CAP channels on connections with this"]
    #[doc = "configuration. The minimum value is @ref BLE_L2CAP_MPS_MIN."]
    pub rx_mps: u16,
    #[doc = "< The maximum L2CAP PDU payload size, in bytes, that L2CAP shall"]
    #[doc = "be able to transmit on L2CAP channels on connections with this"]
    #[doc = "configuration. The minimum value is @ref BLE_L2CAP_MPS_MIN."]
    pub tx_mps: u16,
    #[doc = "< Number of SDU data buffers that can be queued for reception per"]
    #[doc = "L2CAP channel. The minimum value is one."]
    pub rx_queue_size: u8,
    #[doc = "< Number of SDU data buffers that can be queued for transmission"]
    #[doc = "per L2CAP channel. The minimum value is one."]
    pub tx_queue_size: u8,
    #[doc = "< Number of L2CAP channels the application can create per connection"]
    #[doc = "with this configuration. The default value is zero, the maximum"]
    #[doc = "value is @ref BLE_L2CAP_CH_COUNT_MAX."]
    #[doc = "@note if this parameter is set to zero, all other parameters in"]
    #[doc = "@ref ble_l2cap_conn_cfg_t are ignored."]
    pub ch_count: u8,
}
#[test]
fn bindgen_test_layout_ble_l2cap_conn_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_conn_cfg_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_l2cap_conn_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_conn_cfg_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_l2cap_conn_cfg_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_l2cap_conn_cfg_t>())).rx_mps as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_conn_cfg_t),
            "::",
            stringify!(rx_mps)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_l2cap_conn_cfg_t>())).tx_mps as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_conn_cfg_t),
            "::",
            stringify!(tx_mps)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_conn_cfg_t>())).rx_queue_size as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_conn_cfg_t),
            "::",
            stringify!(rx_queue_size)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_conn_cfg_t>())).tx_queue_size as *const _ as usize
        },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_conn_cfg_t),
            "::",
            stringify!(tx_queue_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_l2cap_conn_cfg_t>())).ch_count as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_conn_cfg_t),
            "::",
            stringify!(ch_count)
        )
    );
}
#[doc = "@brief L2CAP channel RX parameters."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_ch_rx_params_t {
    #[doc = "< The maximum L2CAP SDU size, in bytes, that L2CAP shall be able to"]
    #[doc = "receive on this L2CAP channel."]
    #[doc = "- Must be equal to or greater than @ref BLE_L2CAP_MTU_MIN."]
    pub rx_mtu: u16,
    #[doc = "< The maximum L2CAP PDU payload size, in bytes, that L2CAP shall be"]
    #[doc = "able to receive on this L2CAP channel."]
    #[doc = "- Must be equal to or greater than @ref BLE_L2CAP_MPS_MIN."]
    #[doc = "- Must be equal to or less than @ref ble_l2cap_conn_cfg_t::rx_mps."]
    pub rx_mps: u16,
    #[doc = "< SDU data buffer for reception."]
    #[doc = "- If @ref ble_data_t::p_data is non-NULL, initial credits are"]
    #[doc = "issued to the peer."]
    #[doc = "- If @ref ble_data_t::p_data is NULL, no initial credits are"]
    #[doc = "issued to the peer."]
    pub sdu_buf: ble_data_t,
}
#[test]
fn bindgen_test_layout_ble_l2cap_ch_rx_params_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_ch_rx_params_t>(),
        12usize,
        concat!("Size of: ", stringify!(ble_l2cap_ch_rx_params_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_ch_rx_params_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_l2cap_ch_rx_params_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_ch_rx_params_t>())).rx_mtu as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_ch_rx_params_t),
            "::",
            stringify!(rx_mtu)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_ch_rx_params_t>())).rx_mps as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_ch_rx_params_t),
            "::",
            stringify!(rx_mps)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_ch_rx_params_t>())).sdu_buf as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_ch_rx_params_t),
            "::",
            stringify!(sdu_buf)
        )
    );
}
#[doc = "@brief L2CAP channel setup parameters."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_ch_setup_params_t {
    #[doc = "< L2CAP channel RX parameters."]
    pub rx_params: ble_l2cap_ch_rx_params_t,
    #[doc = "< LE Protocol/Service Multiplexer. Used when requesting"]
    #[doc = "setup of an L2CAP channel, ignored otherwise."]
    pub le_psm: u16,
    #[doc = "< Status code, see @ref BLE_L2CAP_CH_STATUS_CODES."]
    #[doc = "Used when replying to a setup request of an L2CAP"]
    #[doc = "channel, ignored otherwise."]
    pub status: u16,
}
#[test]
fn bindgen_test_layout_ble_l2cap_ch_setup_params_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_ch_setup_params_t>(),
        16usize,
        concat!("Size of: ", stringify!(ble_l2cap_ch_setup_params_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_ch_setup_params_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_l2cap_ch_setup_params_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_ch_setup_params_t>())).rx_params as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_ch_setup_params_t),
            "::",
            stringify!(rx_params)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_ch_setup_params_t>())).le_psm as *const _ as usize
        },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_ch_setup_params_t),
            "::",
            stringify!(le_psm)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_ch_setup_params_t>())).status as *const _ as usize
        },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_ch_setup_params_t),
            "::",
            stringify!(status)
        )
    );
}
#[doc = "@brief L2CAP channel TX parameters."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_ch_tx_params_t {
    #[doc = "< The maximum L2CAP SDU size, in bytes, that L2CAP is able to"]
    #[doc = "transmit on this L2CAP channel."]
    pub tx_mtu: u16,
    #[doc = "< The maximum L2CAP PDU payload size, in bytes, that the peer is"]
    #[doc = "able to receive on this L2CAP channel."]
    pub peer_mps: u16,
    #[doc = "< The maximum L2CAP PDU payload size, in bytes, that L2CAP is able"]
    #[doc = "to transmit on this L2CAP channel. This is effective tx_mps,"]
    #[doc = "selected by the SoftDevice as"]
    #[doc = "MIN( @ref ble_l2cap_ch_tx_params_t::peer_mps, @ref ble_l2cap_conn_cfg_t::tx_mps )"]
    pub tx_mps: u16,
    #[doc = "< Initial credits given by the peer."]
    pub credits: u16,
}
#[test]
fn bindgen_test_layout_ble_l2cap_ch_tx_params_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_ch_tx_params_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_l2cap_ch_tx_params_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_ch_tx_params_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_l2cap_ch_tx_params_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_ch_tx_params_t>())).tx_mtu as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_ch_tx_params_t),
            "::",
            stringify!(tx_mtu)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_ch_tx_params_t>())).peer_mps as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_ch_tx_params_t),
            "::",
            stringify!(peer_mps)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_ch_tx_params_t>())).tx_mps as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_ch_tx_params_t),
            "::",
            stringify!(tx_mps)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_ch_tx_params_t>())).credits as *const _ as usize
        },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_ch_tx_params_t),
            "::",
            stringify!(credits)
        )
    );
}
#[doc = "@brief L2CAP Channel Setup Request event."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_evt_ch_setup_request_t {
    #[doc = "< L2CAP channel TX parameters."]
    pub tx_params: ble_l2cap_ch_tx_params_t,
    #[doc = "< LE Protocol/Service Multiplexer."]
    pub le_psm: u16,
}
#[test]
fn bindgen_test_layout_ble_l2cap_evt_ch_setup_request_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_evt_ch_setup_request_t>(),
        10usize,
        concat!("Size of: ", stringify!(ble_l2cap_evt_ch_setup_request_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_evt_ch_setup_request_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_l2cap_evt_ch_setup_request_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_ch_setup_request_t>())).tx_params as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_ch_setup_request_t),
            "::",
            stringify!(tx_params)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_ch_setup_request_t>())).le_psm as *const _
                as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_ch_setup_request_t),
            "::",
            stringify!(le_psm)
        )
    );
}
#[doc = "@brief L2CAP Channel Setup Refused event."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_evt_ch_setup_refused_t {
    #[doc = "< Source, see @ref BLE_L2CAP_CH_SETUP_REFUSED_SRCS"]
    pub source: u8,
    #[doc = "< Status code, see @ref BLE_L2CAP_CH_STATUS_CODES"]
    pub status: u16,
}
#[test]
fn bindgen_test_layout_ble_l2cap_evt_ch_setup_refused_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_evt_ch_setup_refused_t>(),
        4usize,
        concat!("Size of: ", stringify!(ble_l2cap_evt_ch_setup_refused_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_evt_ch_setup_refused_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_l2cap_evt_ch_setup_refused_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_ch_setup_refused_t>())).source as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_ch_setup_refused_t),
            "::",
            stringify!(source)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_ch_setup_refused_t>())).status as *const _
                as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_ch_setup_refused_t),
            "::",
            stringify!(status)
        )
    );
}
#[doc = "@brief L2CAP Channel Setup Completed event."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_evt_ch_setup_t {
    #[doc = "< L2CAP channel TX parameters."]
    pub tx_params: ble_l2cap_ch_tx_params_t,
}
#[test]
fn bindgen_test_layout_ble_l2cap_evt_ch_setup_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_evt_ch_setup_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_l2cap_evt_ch_setup_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_evt_ch_setup_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_setup_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_ch_setup_t>())).tx_params as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_ch_setup_t),
            "::",
            stringify!(tx_params)
        )
    );
}
#[doc = "@brief L2CAP Channel SDU Data Buffer Released event."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_evt_ch_sdu_buf_released_t {
    #[doc = "< Returned reception or transmission SDU data buffer. The SoftDevice"]
    #[doc = "returns SDU data buffers supplied by the application, which have"]
    #[doc = "not yet been returned previously via a @ref BLE_L2CAP_EVT_CH_RX or"]
    #[doc = "@ref BLE_L2CAP_EVT_CH_TX event."]
    pub sdu_buf: ble_data_t,
}
#[test]
fn bindgen_test_layout_ble_l2cap_evt_ch_sdu_buf_released_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_evt_ch_sdu_buf_released_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_l2cap_evt_ch_sdu_buf_released_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_evt_ch_sdu_buf_released_t>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(ble_l2cap_evt_ch_sdu_buf_released_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_ch_sdu_buf_released_t>())).sdu_buf as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_ch_sdu_buf_released_t),
            "::",
            stringify!(sdu_buf)
        )
    );
}
#[doc = "@brief L2CAP Channel Credit received event."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_evt_ch_credit_t {
    #[doc = "< Additional credits given by the peer."]
    pub credits: u16,
}
#[test]
fn bindgen_test_layout_ble_l2cap_evt_ch_credit_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_evt_ch_credit_t>(),
        2usize,
        concat!("Size of: ", stringify!(ble_l2cap_evt_ch_credit_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_evt_ch_credit_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_credit_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_ch_credit_t>())).credits as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_ch_credit_t),
            "::",
            stringify!(credits)
        )
    );
}
#[doc = "@brief L2CAP Channel received SDU event."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_evt_ch_rx_t {
    #[doc = "< Total SDU length, in bytes."]
    pub sdu_len: u16,
    #[doc = "< SDU data buffer."]
    #[doc = "@note If there is not enough space in the buffer"]
    #[doc = "(sdu_buf.len < sdu_len) then the rest of the SDU will be"]
    #[doc = "silently discarded by the SoftDevice."]
    pub sdu_buf: ble_data_t,
}
#[test]
fn bindgen_test_layout_ble_l2cap_evt_ch_rx_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_evt_ch_rx_t>(),
        12usize,
        concat!("Size of: ", stringify!(ble_l2cap_evt_ch_rx_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_evt_ch_rx_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_rx_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_l2cap_evt_ch_rx_t>())).sdu_len as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_ch_rx_t),
            "::",
            stringify!(sdu_len)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_l2cap_evt_ch_rx_t>())).sdu_buf as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_ch_rx_t),
            "::",
            stringify!(sdu_buf)
        )
    );
}
#[doc = "@brief L2CAP Channel transmitted SDU event."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_l2cap_evt_ch_tx_t {
    #[doc = "< SDU data buffer."]
    pub sdu_buf: ble_data_t,
}
#[test]
fn bindgen_test_layout_ble_l2cap_evt_ch_tx_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_evt_ch_tx_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_l2cap_evt_ch_tx_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_evt_ch_tx_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_l2cap_evt_ch_tx_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_l2cap_evt_ch_tx_t>())).sdu_buf as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_ch_tx_t),
            "::",
            stringify!(sdu_buf)
        )
    );
}
#[doc = "@brief L2CAP event structure."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_l2cap_evt_t {
    #[doc = "< Connection Handle on which the event occured."]
    pub conn_handle: u16,
    #[doc = "< Local Channel ID of the L2CAP channel, or"]
    #[doc = "@ref BLE_L2CAP_CID_INVALID if not present."]
    pub local_cid: u16,
    #[doc = "< Event Parameters."]
    pub params: ble_l2cap_evt_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_l2cap_evt_t__bindgen_ty_1 {
    #[doc = "< L2CAP Channel Setup Request Event Parameters."]
    pub ch_setup_request: ble_l2cap_evt_ch_setup_request_t,
    #[doc = "< L2CAP Channel Setup Refused Event Parameters."]
    pub ch_setup_refused: ble_l2cap_evt_ch_setup_refused_t,
    #[doc = "< L2CAP Channel Setup Completed Event Parameters."]
    pub ch_setup: ble_l2cap_evt_ch_setup_t,
    #[doc = "< L2CAP Channel SDU Data Buffer Released Event Parameters."]
    pub ch_sdu_buf_released: ble_l2cap_evt_ch_sdu_buf_released_t,
    #[doc = "< L2CAP Channel Credit Received Event Parameters."]
    pub credit: ble_l2cap_evt_ch_credit_t,
    #[doc = "< L2CAP Channel SDU Received Event Parameters."]
    pub rx: ble_l2cap_evt_ch_rx_t,
    #[doc = "< L2CAP Channel SDU Transmitted Event Parameters."]
    pub tx: ble_l2cap_evt_ch_tx_t,
    _bindgen_union_align: [u32; 3usize],
}
#[test]
fn bindgen_test_layout_ble_l2cap_evt_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_evt_t__bindgen_ty_1>(),
        12usize,
        concat!("Size of: ", stringify!(ble_l2cap_evt_t__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_evt_t__bindgen_ty_1>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_l2cap_evt_t__bindgen_ty_1))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_t__bindgen_ty_1>())).ch_setup_request as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_t__bindgen_ty_1),
            "::",
            stringify!(ch_setup_request)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_t__bindgen_ty_1>())).ch_setup_refused as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_t__bindgen_ty_1),
            "::",
            stringify!(ch_setup_refused)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_t__bindgen_ty_1>())).ch_setup as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_t__bindgen_ty_1),
            "::",
            stringify!(ch_setup)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_t__bindgen_ty_1>())).ch_sdu_buf_released
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_t__bindgen_ty_1),
            "::",
            stringify!(ch_sdu_buf_released)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_t__bindgen_ty_1>())).credit as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_t__bindgen_ty_1),
            "::",
            stringify!(credit)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_t__bindgen_ty_1>())).rx as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_t__bindgen_ty_1),
            "::",
            stringify!(rx)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_l2cap_evt_t__bindgen_ty_1>())).tx as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_t__bindgen_ty_1),
            "::",
            stringify!(tx)
        )
    );
}
#[test]
fn bindgen_test_layout_ble_l2cap_evt_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_l2cap_evt_t>(),
        16usize,
        concat!("Size of: ", stringify!(ble_l2cap_evt_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_l2cap_evt_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_l2cap_evt_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_l2cap_evt_t>())).conn_handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_t),
            "::",
            stringify!(conn_handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_l2cap_evt_t>())).local_cid as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_t),
            "::",
            stringify!(local_cid)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_l2cap_evt_t>())).params as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_l2cap_evt_t),
            "::",
            stringify!(params)
        )
    );
}

    #[doc = "@brief Set up an L2CAP channel."]
    #[doc = ""]
    #[doc = " @details This function is used to:"]
    #[doc = "          - Request setup of an L2CAP channel: sends an LE Credit Based Connection Request packet to a peer."]
    #[doc = "          - Reply to a setup request of an L2CAP channel (if called in response to a"]
    #[doc = "            @ref BLE_L2CAP_EVT_CH_SETUP_REQUEST event): sends an LE Credit Based Connection"]
    #[doc = "            Response packet to a peer."]
    #[doc = ""]
    #[doc = " @note    A call to this function will require the application to keep the SDU data buffer alive"]
    #[doc = "          until the SDU data buffer is returned in @ref BLE_L2CAP_EVT_CH_RX or"]
    #[doc = "          @ref BLE_L2CAP_EVT_CH_SDU_BUF_RELEASED event."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_L2CAP_EVT_CH_SETUP, Setup successful.}"]
    #[doc = " @event{@ref BLE_L2CAP_EVT_CH_SETUP_REFUSED, Setup failed.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_L2CAP_CH_SETUP_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle      Connection Handle."]
    #[doc = " @param[in,out] p_local_cid  Pointer to a uint16_t containing Local Channel ID of the L2CAP channel:"]
    #[doc = "                             - As input: @ref BLE_L2CAP_CID_INVALID when requesting setup of an L2CAP"]
    #[doc = "                               channel or local_cid provided in the @ref BLE_L2CAP_EVT_CH_SETUP_REQUEST"]
    #[doc = "                               event when replying to a setup request of an L2CAP channel."]
    #[doc = "                             - As output: local_cid for this channel."]
    #[doc = " @param[in] p_params         L2CAP channel parameters."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                    Successfully queued request or response for transmission."]
    #[doc = " @retval ::NRF_ERROR_BUSY                 The stack is busy, process pending events and retry."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR         Invalid pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE  Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM        Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_LENGTH       Supplied higher rx_mps than has been configured on this link."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE        Invalid State to perform operation (L2CAP channel already set up)."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND            CID not found."]
    #[doc = " @retval ::NRF_ERROR_RESOURCES            The limit has been reached for available L2CAP channels,"]
    #[doc = "                                          see @ref ble_l2cap_conn_cfg_t::ch_count."]
    
#[inline(always)]
pub unsafe fn sd_ble_l2cap_ch_setup(
        conn_handle: u16,
        p_local_cid: *mut u16,
        p_params: *const ble_l2cap_ch_setup_params_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 184",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_local_cid) => _,
        inout("r2") to_asm(p_params) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Release an L2CAP channel."]
    #[doc = ""]
    #[doc = " @details This sends a Disconnection Request packet to a peer."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_L2CAP_EVT_CH_RELEASED, Release complete.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_L2CAP_CH_RELEASE_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle   Connection Handle."]
    #[doc = " @param[in] local_cid     Local Channel ID of the L2CAP channel."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                    Successfully queued request for transmission."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE  Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE        Invalid State to perform operation (Setup or release is"]
    #[doc = "                                          in progress for the L2CAP channel)."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND            CID not found."]
    
#[inline(always)]
pub unsafe fn sd_ble_l2cap_ch_release(conn_handle: u16, local_cid: u16) -> u32 {
    let ret: u32;
    asm!("svc 185",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(local_cid) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Receive an SDU on an L2CAP channel."]
    #[doc = ""]
    #[doc = " @details This may issue additional credits to the peer using an LE Flow Control Credit packet."]
    #[doc = ""]
    #[doc = " @note    A call to this function will require the application to keep the memory pointed by"]
    #[doc = "          @ref ble_data_t::p_data alive until the SDU data buffer is returned in @ref BLE_L2CAP_EVT_CH_RX"]
    #[doc = "          or @ref BLE_L2CAP_EVT_CH_SDU_BUF_RELEASED event."]
    #[doc = ""]
    #[doc = " @note    The SoftDevice can queue up to @ref ble_l2cap_conn_cfg_t::rx_queue_size SDU data buffers"]
    #[doc = "          for reception per L2CAP channel."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_L2CAP_EVT_CH_RX, The SDU is received.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_L2CAP_CH_RX_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection Handle."]
    #[doc = " @param[in] local_cid   Local Channel ID of the L2CAP channel."]
    #[doc = " @param[in] p_sdu_buf   Pointer to the SDU data buffer."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                    Buffer accepted."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR         Invalid pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE  Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE        Invalid State to perform operation (Setup or release is"]
    #[doc = "                                          in progress for an L2CAP channel)."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND            CID not found."]
    #[doc = " @retval ::NRF_ERROR_RESOURCES            Too many SDU data buffers supplied. Wait for a"]
    #[doc = "                                          @ref BLE_L2CAP_EVT_CH_RX event and retry."]
    
#[inline(always)]
pub unsafe fn sd_ble_l2cap_ch_rx(
        conn_handle: u16,
        local_cid: u16,
        p_sdu_buf: *const ble_data_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 186",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(local_cid) => _,
        inout("r2") to_asm(p_sdu_buf) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Transmit an SDU on an L2CAP channel."]
    #[doc = ""]
    #[doc = " @note    A call to this function will require the application to keep the memory pointed by"]
    #[doc = "          @ref ble_data_t::p_data alive until the SDU data buffer is returned in @ref BLE_L2CAP_EVT_CH_TX"]
    #[doc = "          or @ref BLE_L2CAP_EVT_CH_SDU_BUF_RELEASED event."]
    #[doc = ""]
    #[doc = " @note    The SoftDevice can queue up to @ref ble_l2cap_conn_cfg_t::tx_queue_size SDUs for"]
    #[doc = "          transmission per L2CAP channel."]
    #[doc = ""]
    #[doc = " @note    The application can keep track of the available credits for transmission by following"]
    #[doc = "          the procedure below:"]
    #[doc = "          - Store initial credits given by the peer in a variable."]
    #[doc = "            (Initial credits are provided in a @ref BLE_L2CAP_EVT_CH_SETUP event.)"]
    #[doc = "          - Decrement the variable, which stores the currently available credits, by"]
    #[doc = "            ceiling((@ref ble_data_t::len + 2) / tx_mps) when a call to this function returns"]
    #[doc = "            @ref NRF_SUCCESS. (tx_mps is provided in a @ref BLE_L2CAP_EVT_CH_SETUP event.)"]
    #[doc = "          - Increment the variable, which stores the currently available credits, by additional"]
    #[doc = "            credits given by the peer in a @ref BLE_L2CAP_EVT_CH_CREDIT event."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_L2CAP_EVT_CH_TX, The SDU is transmitted.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_L2CAP_CH_TX_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection Handle."]
    #[doc = " @param[in] local_cid   Local Channel ID of the L2CAP channel."]
    #[doc = " @param[in] p_sdu_buf   Pointer to the SDU data buffer."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                    Successfully queued L2CAP SDU for transmission."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR         Invalid pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE  Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE        Invalid State to perform operation (Setup or release is"]
    #[doc = "                                          in progress for the L2CAP channel)."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND            CID not found."]
    #[doc = " @retval ::NRF_ERROR_DATA_SIZE            Invalid SDU length supplied, must not be more than"]
    #[doc = "                                          @ref ble_l2cap_ch_tx_params_t::tx_mtu provided in"]
    #[doc = "                                          @ref BLE_L2CAP_EVT_CH_SETUP event."]
    #[doc = " @retval ::NRF_ERROR_RESOURCES            Too many SDUs queued for transmission. Wait for a"]
    #[doc = "                                          @ref BLE_L2CAP_EVT_CH_TX event and retry."]
    
#[inline(always)]
pub unsafe fn sd_ble_l2cap_ch_tx(
        conn_handle: u16,
        local_cid: u16,
        p_sdu_buf: *const ble_data_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 187",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(local_cid) => _,
        inout("r2") to_asm(p_sdu_buf) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Advanced SDU reception flow control."]
    #[doc = ""]
    #[doc = " @details Adjust the way the SoftDevice issues credits to the peer."]
    #[doc = "          This may issue additional credits to the peer using an LE Flow Control Credit packet."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_L2CAP_CH_FLOW_CONTROL_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection Handle."]
    #[doc = " @param[in] local_cid   Local Channel ID of the L2CAP channel or @ref BLE_L2CAP_CID_INVALID to set"]
    #[doc = "                        the value that will be used for newly created channels."]
    #[doc = " @param[in] credits     Number of credits that the SoftDevice will make sure the peer has every"]
    #[doc = "                        time it starts using a new reception buffer."]
    #[doc = "                        - @ref BLE_L2CAP_CREDITS_DEFAULT is the default value the SoftDevice will"]
    #[doc = "                          use if this function is not called."]
    #[doc = "                        - If set to zero, the SoftDevice will stop issuing credits for new reception"]
    #[doc = "                          buffers the application provides or has provided. SDU reception that is"]
    #[doc = "                          currently ongoing will be allowed to complete."]
    #[doc = " @param[out] p_credits  NULL or pointer to a uint16_t. If a valid pointer is provided, it will be"]
    #[doc = "                        written by the SoftDevice with the number of credits that is or will be"]
    #[doc = "                        available to the peer. If the value written by the SoftDevice is 0 when"]
    #[doc = "                        credits parameter was set to 0, the peer will not be able to send more"]
    #[doc = "                        data until more credits are provided by calling this function again with"]
    #[doc = "                        credits > 0. This parameter is ignored when local_cid is set to"]
    #[doc = "                        @ref BLE_L2CAP_CID_INVALID."]
    #[doc = ""]
    #[doc = " @note Application should take care when setting number of credits higher than default value. In"]
    #[doc = "       this case the application must make sure that the SoftDevice always has reception buffers"]
    #[doc = "       available (see @ref sd_ble_l2cap_ch_rx) for that channel. If the SoftDevice does not have"]
    #[doc = "       such buffers available, packets may be NACKed on the Link Layer and all Bluetooth traffic"]
    #[doc = "       on the connection handle may be stalled until the SoftDevice again has an available"]
    #[doc = "       reception buffer. This applies even if the application has used this call to set the"]
    #[doc = "       credits back to default, or zero."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS                    Flow control parameters accepted."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR         Invalid pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE  Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE        Invalid State to perform operation (Setup or release is"]
    #[doc = "                                          in progress for an L2CAP channel)."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND            CID not found."]
    
#[inline(always)]
pub unsafe fn sd_ble_l2cap_ch_flow_control(
        conn_handle: u16,
        local_cid: u16,
        credits: u16,
        p_credits: *mut u16,
    ) -> u32 {
    let ret: u32;
    asm!("svc 188",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(local_cid) => _,
        inout("r2") to_asm(credits) => _,
        inout("r3") to_asm(p_credits) => _,
        lateout("r12") _,
    );
    ret
}

#[doc = "< Primary Service Discovery."]
pub const BLE_GATTC_SVCS_SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER: BLE_GATTC_SVCS = 155;
#[doc = "< Relationship Discovery."]
pub const BLE_GATTC_SVCS_SD_BLE_GATTC_RELATIONSHIPS_DISCOVER: BLE_GATTC_SVCS = 156;
#[doc = "< Characteristic Discovery."]
pub const BLE_GATTC_SVCS_SD_BLE_GATTC_CHARACTERISTICS_DISCOVER: BLE_GATTC_SVCS = 157;
#[doc = "< Characteristic Descriptor Discovery."]
pub const BLE_GATTC_SVCS_SD_BLE_GATTC_DESCRIPTORS_DISCOVER: BLE_GATTC_SVCS = 158;
#[doc = "< Attribute Information Discovery."]
pub const BLE_GATTC_SVCS_SD_BLE_GATTC_ATTR_INFO_DISCOVER: BLE_GATTC_SVCS = 159;
#[doc = "< Read Characteristic Value by UUID."]
pub const BLE_GATTC_SVCS_SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ: BLE_GATTC_SVCS = 160;
#[doc = "< Generic read."]
pub const BLE_GATTC_SVCS_SD_BLE_GATTC_READ: BLE_GATTC_SVCS = 161;
#[doc = "< Read multiple Characteristic Values."]
pub const BLE_GATTC_SVCS_SD_BLE_GATTC_CHAR_VALUES_READ: BLE_GATTC_SVCS = 162;
#[doc = "< Generic write."]
pub const BLE_GATTC_SVCS_SD_BLE_GATTC_WRITE: BLE_GATTC_SVCS = 163;
#[doc = "< Handle Value Confirmation."]
pub const BLE_GATTC_SVCS_SD_BLE_GATTC_HV_CONFIRM: BLE_GATTC_SVCS = 164;
#[doc = "< Exchange MTU Request."]
pub const BLE_GATTC_SVCS_SD_BLE_GATTC_EXCHANGE_MTU_REQUEST: BLE_GATTC_SVCS = 165;
#[doc = "@brief GATTC API SVC numbers."]
pub type BLE_GATTC_SVCS = u32;
#[doc = "< Primary Service Discovery Response event.          \\n See @ref ble_gattc_evt_prim_srvc_disc_rsp_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP: BLE_GATTC_EVTS = 48;
#[doc = "< Relationship Discovery Response event.             \\n See @ref ble_gattc_evt_rel_disc_rsp_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_REL_DISC_RSP: BLE_GATTC_EVTS = 49;
#[doc = "< Characteristic Discovery Response event.           \\n See @ref ble_gattc_evt_char_disc_rsp_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_CHAR_DISC_RSP: BLE_GATTC_EVTS = 50;
#[doc = "< Descriptor Discovery Response event.               \\n See @ref ble_gattc_evt_desc_disc_rsp_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_DESC_DISC_RSP: BLE_GATTC_EVTS = 51;
#[doc = "< Attribute Information Response event.              \\n See @ref ble_gattc_evt_attr_info_disc_rsp_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_ATTR_INFO_DISC_RSP: BLE_GATTC_EVTS = 52;
#[doc = "< Read By UUID Response event.                       \\n See @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP: BLE_GATTC_EVTS = 53;
#[doc = "< Read Response event.                               \\n See @ref ble_gattc_evt_read_rsp_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_READ_RSP: BLE_GATTC_EVTS = 54;
#[doc = "< Read multiple Response event.                      \\n See @ref ble_gattc_evt_char_vals_read_rsp_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_CHAR_VALS_READ_RSP: BLE_GATTC_EVTS = 55;
#[doc = "< Write Response event.                              \\n See @ref ble_gattc_evt_write_rsp_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_WRITE_RSP: BLE_GATTC_EVTS = 56;
#[doc = "< Handle Value Notification or Indication event.     \\n Confirm indication with @ref sd_ble_gattc_hv_confirm.  \\n See @ref ble_gattc_evt_hvx_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_HVX: BLE_GATTC_EVTS = 57;
#[doc = "< Exchange MTU Response event.                       \\n See @ref ble_gattc_evt_exchange_mtu_rsp_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_EXCHANGE_MTU_RSP: BLE_GATTC_EVTS = 58;
#[doc = "< Timeout event.                                     \\n See @ref ble_gattc_evt_timeout_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_TIMEOUT: BLE_GATTC_EVTS = 59;
#[doc = "< Write without Response transmission complete.      \\n See @ref ble_gattc_evt_write_cmd_tx_complete_t."]
pub const BLE_GATTC_EVTS_BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE: BLE_GATTC_EVTS = 60;
#[doc = " @brief GATT Client Event IDs."]
pub type BLE_GATTC_EVTS = u32;
#[doc = " @brief BLE GATTC connection configuration parameters, set with @ref sd_ble_cfg_set."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_conn_cfg_t {
    #[doc = "< The guaranteed minimum number of Write without Response that can be queued for transmission."]
    #[doc = "The default value is @ref BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT"]
    pub write_cmd_tx_queue_size: u8,
}
#[test]
fn bindgen_test_layout_ble_gattc_conn_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_conn_cfg_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gattc_conn_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_conn_cfg_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gattc_conn_cfg_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_conn_cfg_t>())).write_cmd_tx_queue_size as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_conn_cfg_t),
            "::",
            stringify!(write_cmd_tx_queue_size)
        )
    );
}
#[doc = "@brief Operation Handle Range."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_handle_range_t {
    #[doc = "< Start Handle."]
    pub start_handle: u16,
    #[doc = "< End Handle."]
    pub end_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_gattc_handle_range_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_handle_range_t>(),
        4usize,
        concat!("Size of: ", stringify!(ble_gattc_handle_range_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_handle_range_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_handle_range_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_handle_range_t>())).start_handle as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_handle_range_t),
            "::",
            stringify!(start_handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_handle_range_t>())).end_handle as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_handle_range_t),
            "::",
            stringify!(end_handle)
        )
    );
}
#[doc = "@brief GATT service."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_service_t {
    #[doc = "< Service UUID."]
    pub uuid: ble_uuid_t,
    #[doc = "< Service Handle Range."]
    pub handle_range: ble_gattc_handle_range_t,
}
#[test]
fn bindgen_test_layout_ble_gattc_service_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_service_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gattc_service_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_service_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_service_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_service_t>())).uuid as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_service_t),
            "::",
            stringify!(uuid)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_service_t>())).handle_range as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_service_t),
            "::",
            stringify!(handle_range)
        )
    );
}
#[doc = "@brief  GATT include."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_include_t {
    #[doc = "< Include Handle."]
    pub handle: u16,
    #[doc = "< Handle of the included service."]
    pub included_srvc: ble_gattc_service_t,
}
#[test]
fn bindgen_test_layout_ble_gattc_include_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_include_t>(),
        10usize,
        concat!("Size of: ", stringify!(ble_gattc_include_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_include_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_include_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_include_t>())).handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_include_t),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_include_t>())).included_srvc as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_include_t),
            "::",
            stringify!(included_srvc)
        )
    );
}
#[doc = "@brief GATT characteristic."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_char_t {
    #[doc = "< Characteristic UUID."]
    pub uuid: ble_uuid_t,
    #[doc = "< Characteristic Properties."]
    pub char_props: ble_gatt_char_props_t,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    #[doc = "< Handle of the Characteristic Declaration."]
    pub handle_decl: u16,
    #[doc = "< Handle of the Characteristic Value."]
    pub handle_value: u16,
}
#[test]
fn bindgen_test_layout_ble_gattc_char_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_char_t>(),
        10usize,
        concat!("Size of: ", stringify!(ble_gattc_char_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_char_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_char_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_char_t>())).uuid as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_char_t),
            "::",
            stringify!(uuid)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_char_t>())).char_props as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_char_t),
            "::",
            stringify!(char_props)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_char_t>())).handle_decl as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_char_t),
            "::",
            stringify!(handle_decl)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_char_t>())).handle_value as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_char_t),
            "::",
            stringify!(handle_value)
        )
    );
}
impl ble_gattc_char_t {
    #[inline]
    pub fn char_ext_props(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_char_ext_props(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(char_ext_props: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let char_ext_props: u8 = unsafe { ::core::mem::transmute(char_ext_props) };
            char_ext_props as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief GATT descriptor."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_desc_t {
    #[doc = "< Descriptor Handle."]
    pub handle: u16,
    #[doc = "< Descriptor UUID."]
    pub uuid: ble_uuid_t,
}
#[test]
fn bindgen_test_layout_ble_gattc_desc_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_desc_t>(),
        6usize,
        concat!("Size of: ", stringify!(ble_gattc_desc_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_desc_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_desc_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_desc_t>())).handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_desc_t),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_desc_t>())).uuid as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_desc_t),
            "::",
            stringify!(uuid)
        )
    );
}
#[doc = "@brief Write Parameters."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_write_params_t {
    #[doc = "< Write Operation to be performed, see @ref BLE_GATT_WRITE_OPS."]
    pub write_op: u8,
    #[doc = "< Flags, see @ref BLE_GATT_EXEC_WRITE_FLAGS."]
    pub flags: u8,
    #[doc = "< Handle to the attribute to be written."]
    pub handle: u16,
    #[doc = "< Offset in bytes. @note For WRITE_CMD and WRITE_REQ, offset must be 0."]
    pub offset: u16,
    #[doc = "< Length of data in bytes."]
    pub len: u16,
    #[doc = "< Pointer to the value data."]
    pub p_value: *const u8,
}
#[test]
fn bindgen_test_layout_ble_gattc_write_params_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_write_params_t>(),
        12usize,
        concat!("Size of: ", stringify!(ble_gattc_write_params_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_write_params_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gattc_write_params_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_write_params_t>())).write_op as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_write_params_t),
            "::",
            stringify!(write_op)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_write_params_t>())).flags as *const _ as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_write_params_t),
            "::",
            stringify!(flags)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_write_params_t>())).handle as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_write_params_t),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_write_params_t>())).offset as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_write_params_t),
            "::",
            stringify!(offset)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_write_params_t>())).len as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_write_params_t),
            "::",
            stringify!(len)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_write_params_t>())).p_value as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_write_params_t),
            "::",
            stringify!(p_value)
        )
    );
}
#[doc = "@brief Attribute Information for 16-bit Attribute UUID."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_attr_info16_t {
    #[doc = "< Attribute handle."]
    pub handle: u16,
    #[doc = "< 16-bit Attribute UUID."]
    pub uuid: ble_uuid_t,
}
#[test]
fn bindgen_test_layout_ble_gattc_attr_info16_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_attr_info16_t>(),
        6usize,
        concat!("Size of: ", stringify!(ble_gattc_attr_info16_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_attr_info16_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_attr_info16_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_attr_info16_t>())).handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_attr_info16_t),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_attr_info16_t>())).uuid as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_attr_info16_t),
            "::",
            stringify!(uuid)
        )
    );
}
#[doc = "@brief Attribute Information for 128-bit Attribute UUID."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_attr_info128_t {
    #[doc = "< Attribute handle."]
    pub handle: u16,
    #[doc = "< 128-bit Attribute UUID."]
    pub uuid: ble_uuid128_t,
}
#[test]
fn bindgen_test_layout_ble_gattc_attr_info128_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_attr_info128_t>(),
        18usize,
        concat!("Size of: ", stringify!(ble_gattc_attr_info128_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_attr_info128_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_attr_info128_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_attr_info128_t>())).handle as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_attr_info128_t),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_attr_info128_t>())).uuid as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_attr_info128_t),
            "::",
            stringify!(uuid)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_evt_prim_srvc_disc_rsp_t {
    #[doc = "< Service count."]
    pub count: u16,
    #[doc = "< Service data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation."]
    #[doc = "See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members."]
    pub services: [ble_gattc_service_t; 1usize],
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_prim_srvc_disc_rsp_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_prim_srvc_disc_rsp_t>(),
        10usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_prim_srvc_disc_rsp_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_prim_srvc_disc_rsp_t>())).count as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t),
            "::",
            stringify!(count)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_prim_srvc_disc_rsp_t>())).services as *const _
                as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_prim_srvc_disc_rsp_t),
            "::",
            stringify!(services)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_REL_DISC_RSP."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_evt_rel_disc_rsp_t {
    #[doc = "< Include count."]
    pub count: u16,
    #[doc = "< Include data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation."]
    #[doc = "See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members."]
    pub includes: [ble_gattc_include_t; 1usize],
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_rel_disc_rsp_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_rel_disc_rsp_t>(),
        12usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_rel_disc_rsp_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_rel_disc_rsp_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_evt_rel_disc_rsp_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_rel_disc_rsp_t>())).count as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_rel_disc_rsp_t),
            "::",
            stringify!(count)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_rel_disc_rsp_t>())).includes as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_rel_disc_rsp_t),
            "::",
            stringify!(includes)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_CHAR_DISC_RSP."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_evt_char_disc_rsp_t {
    #[doc = "< Characteristic count."]
    pub count: u16,
    #[doc = "< Characteristic data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation."]
    #[doc = "See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members."]
    pub chars: [ble_gattc_char_t; 1usize],
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_char_disc_rsp_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_char_disc_rsp_t>(),
        12usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_char_disc_rsp_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_char_disc_rsp_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_evt_char_disc_rsp_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_char_disc_rsp_t>())).count as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_char_disc_rsp_t),
            "::",
            stringify!(count)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_char_disc_rsp_t>())).chars as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_char_disc_rsp_t),
            "::",
            stringify!(chars)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_DESC_DISC_RSP."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_evt_desc_disc_rsp_t {
    #[doc = "< Descriptor count."]
    pub count: u16,
    #[doc = "< Descriptor data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation."]
    #[doc = "See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members."]
    pub descs: [ble_gattc_desc_t; 1usize],
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_desc_disc_rsp_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_desc_disc_rsp_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_desc_disc_rsp_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_desc_disc_rsp_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_evt_desc_disc_rsp_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_desc_disc_rsp_t>())).count as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_desc_disc_rsp_t),
            "::",
            stringify!(count)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_desc_disc_rsp_t>())).descs as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_desc_disc_rsp_t),
            "::",
            stringify!(descs)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_ATTR_INFO_DISC_RSP."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gattc_evt_attr_info_disc_rsp_t {
    #[doc = "< Attribute count."]
    pub count: u16,
    #[doc = "< Attribute information format, see @ref BLE_GATTC_ATTR_INFO_FORMAT."]
    pub format: u8,
    #[doc = "< Attribute information union."]
    pub info: ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1 {
    #[doc = "< Attribute information for 16-bit Attribute UUID."]
    #[doc = "@note This is a variable length array. The size of 1 indicated is only a placeholder for compilation."]
    #[doc = "See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members."]
    pub attr_info16: [ble_gattc_attr_info16_t; 1usize],
    #[doc = "< Attribute information for 128-bit Attribute UUID."]
    #[doc = "@note This is a variable length array. The size of 1 indicated is only a placeholder for compilation."]
    #[doc = "See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members."]
    pub attr_info128: [ble_gattc_attr_info128_t; 1usize],
    _bindgen_union_align: [u16; 9usize],
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1>(),
        18usize,
        concat!(
            "Size of: ",
            stringify!(ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1>()))
                .attr_info16 as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1),
            "::",
            stringify!(attr_info16)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1>()))
                .attr_info128 as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_attr_info_disc_rsp_t__bindgen_ty_1),
            "::",
            stringify!(attr_info128)
        )
    );
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_attr_info_disc_rsp_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_attr_info_disc_rsp_t>(),
        22usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_attr_info_disc_rsp_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_attr_info_disc_rsp_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gattc_evt_attr_info_disc_rsp_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_attr_info_disc_rsp_t>())).count as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_attr_info_disc_rsp_t),
            "::",
            stringify!(count)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_attr_info_disc_rsp_t>())).format as *const _
                as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_attr_info_disc_rsp_t),
            "::",
            stringify!(format)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_attr_info_disc_rsp_t>())).info as *const _
                as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_attr_info_disc_rsp_t),
            "::",
            stringify!(info)
        )
    );
}
#[doc = "@brief GATT read by UUID handle value pair."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_handle_value_t {
    #[doc = "< Attribute Handle."]
    pub handle: u16,
    #[doc = "< Pointer to the Attribute Value, length is available in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t::value_len."]
    pub p_value: *mut u8,
}
#[test]
fn bindgen_test_layout_ble_gattc_handle_value_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_handle_value_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gattc_handle_value_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_handle_value_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gattc_handle_value_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_handle_value_t>())).handle as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_handle_value_t),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_handle_value_t>())).p_value as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_handle_value_t),
            "::",
            stringify!(p_value)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_evt_char_val_by_uuid_read_rsp_t {
    #[doc = "< Handle-Value Pair Count."]
    pub count: u16,
    #[doc = "< Length of the value in Handle-Value(s) list."]
    pub value_len: u16,
    #[doc = "< Handle-Value(s) list. To iterate through the list use @ref sd_ble_gattc_evt_char_val_by_uuid_read_rsp_iter."]
    #[doc = "@note This is a variable length array. The size of 1 indicated is only a placeholder for compilation."]
    #[doc = "See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members."]
    pub handle_value: [u8; 1usize],
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_char_val_by_uuid_read_rsp_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_char_val_by_uuid_read_rsp_t>(),
        6usize,
        concat!(
            "Size of: ",
            stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_char_val_by_uuid_read_rsp_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_char_val_by_uuid_read_rsp_t>())).count as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t),
            "::",
            stringify!(count)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_char_val_by_uuid_read_rsp_t>())).value_len
                as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t),
            "::",
            stringify!(value_len)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_char_val_by_uuid_read_rsp_t>())).handle_value
                as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_char_val_by_uuid_read_rsp_t),
            "::",
            stringify!(handle_value)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_READ_RSP."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_evt_read_rsp_t {
    #[doc = "< Attribute Handle."]
    pub handle: u16,
    #[doc = "< Offset of the attribute data."]
    pub offset: u16,
    #[doc = "< Attribute data length."]
    pub len: u16,
    #[doc = "< Attribute data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation."]
    #[doc = "See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members."]
    pub data: [u8; 1usize],
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_read_rsp_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_read_rsp_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_read_rsp_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_read_rsp_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_evt_read_rsp_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_read_rsp_t>())).handle as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_read_rsp_t),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_read_rsp_t>())).offset as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_read_rsp_t),
            "::",
            stringify!(offset)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_read_rsp_t>())).len as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_read_rsp_t),
            "::",
            stringify!(len)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_read_rsp_t>())).data as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_read_rsp_t),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_evt_char_vals_read_rsp_t {
    #[doc = "< Concatenated Attribute values length."]
    pub len: u16,
    #[doc = "< Attribute values. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation."]
    #[doc = "See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members."]
    pub values: [u8; 1usize],
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_char_vals_read_rsp_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_char_vals_read_rsp_t>(),
        4usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_char_vals_read_rsp_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_char_vals_read_rsp_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gattc_evt_char_vals_read_rsp_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_char_vals_read_rsp_t>())).len as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_char_vals_read_rsp_t),
            "::",
            stringify!(len)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_char_vals_read_rsp_t>())).values as *const _
                as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_char_vals_read_rsp_t),
            "::",
            stringify!(values)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_WRITE_RSP."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_evt_write_rsp_t {
    #[doc = "< Attribute Handle."]
    pub handle: u16,
    #[doc = "< Type of write operation, see @ref BLE_GATT_WRITE_OPS."]
    pub write_op: u8,
    #[doc = "< Data offset."]
    pub offset: u16,
    #[doc = "< Data length."]
    pub len: u16,
    #[doc = "< Data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation."]
    #[doc = "See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members."]
    pub data: [u8; 1usize],
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_write_rsp_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_write_rsp_t>(),
        10usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_write_rsp_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_write_rsp_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_evt_write_rsp_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_write_rsp_t>())).handle as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_write_rsp_t),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_write_rsp_t>())).write_op as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_write_rsp_t),
            "::",
            stringify!(write_op)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_write_rsp_t>())).offset as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_write_rsp_t),
            "::",
            stringify!(offset)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_write_rsp_t>())).len as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_write_rsp_t),
            "::",
            stringify!(len)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_write_rsp_t>())).data as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_write_rsp_t),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_HVX."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_evt_hvx_t {
    #[doc = "< Handle to which the HVx operation applies."]
    pub handle: u16,
    #[doc = "< Indication or Notification, see @ref BLE_GATT_HVX_TYPES."]
    pub type_: u8,
    #[doc = "< Attribute data length."]
    pub len: u16,
    #[doc = "< Attribute data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation."]
    #[doc = "See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members."]
    pub data: [u8; 1usize],
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_hvx_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_hvx_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_hvx_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_hvx_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_evt_hvx_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_hvx_t>())).handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_hvx_t),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_hvx_t>())).type_ as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_hvx_t),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_hvx_t>())).len as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_hvx_t),
            "::",
            stringify!(len)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_hvx_t>())).data as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_hvx_t),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_EXCHANGE_MTU_RSP."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_evt_exchange_mtu_rsp_t {
    #[doc = "< Server RX MTU size."]
    pub server_rx_mtu: u16,
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_exchange_mtu_rsp_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_exchange_mtu_rsp_t>(),
        2usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_exchange_mtu_rsp_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_exchange_mtu_rsp_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gattc_evt_exchange_mtu_rsp_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_exchange_mtu_rsp_t>())).server_rx_mtu as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_exchange_mtu_rsp_t),
            "::",
            stringify!(server_rx_mtu)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_TIMEOUT."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_evt_timeout_t {
    #[doc = "< Timeout source, see @ref BLE_GATT_TIMEOUT_SOURCES."]
    pub src: u8,
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_timeout_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_timeout_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_timeout_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_timeout_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gattc_evt_timeout_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_timeout_t>())).src as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_timeout_t),
            "::",
            stringify!(src)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gattc_evt_write_cmd_tx_complete_t {
    #[doc = "< Number of write without response transmissions completed."]
    pub count: u8,
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_write_cmd_tx_complete_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_write_cmd_tx_complete_t>(),
        1usize,
        concat!(
            "Size of: ",
            stringify!(ble_gattc_evt_write_cmd_tx_complete_t)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_write_cmd_tx_complete_t>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gattc_evt_write_cmd_tx_complete_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_write_cmd_tx_complete_t>())).count as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_write_cmd_tx_complete_t),
            "::",
            stringify!(count)
        )
    );
}
#[doc = "@brief GATTC event structure."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gattc_evt_t {
    #[doc = "< Connection Handle on which event occurred."]
    pub conn_handle: u16,
    #[doc = "< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES."]
    pub gatt_status: u16,
    #[doc = "< In case of error: The handle causing the error. In all other cases @ref BLE_GATT_HANDLE_INVALID."]
    pub error_handle: u16,
    #[doc = "< Event Parameters. @note Only valid if @ref gatt_status == @ref BLE_GATT_STATUS_SUCCESS."]
    pub params: ble_gattc_evt_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_gattc_evt_t__bindgen_ty_1 {
    #[doc = "< Primary Service Discovery Response Event Parameters."]
    pub prim_srvc_disc_rsp: ble_gattc_evt_prim_srvc_disc_rsp_t,
    #[doc = "< Relationship Discovery Response Event Parameters."]
    pub rel_disc_rsp: ble_gattc_evt_rel_disc_rsp_t,
    #[doc = "< Characteristic Discovery Response Event Parameters."]
    pub char_disc_rsp: ble_gattc_evt_char_disc_rsp_t,
    #[doc = "< Descriptor Discovery Response Event Parameters."]
    pub desc_disc_rsp: ble_gattc_evt_desc_disc_rsp_t,
    #[doc = "< Characteristic Value Read by UUID Response Event Parameters."]
    pub char_val_by_uuid_read_rsp: ble_gattc_evt_char_val_by_uuid_read_rsp_t,
    #[doc = "< Read Response Event Parameters."]
    pub read_rsp: ble_gattc_evt_read_rsp_t,
    #[doc = "< Characteristic Values Read Response Event Parameters."]
    pub char_vals_read_rsp: ble_gattc_evt_char_vals_read_rsp_t,
    #[doc = "< Write Response Event Parameters."]
    pub write_rsp: ble_gattc_evt_write_rsp_t,
    #[doc = "< Handle Value Notification/Indication Event Parameters."]
    pub hvx: ble_gattc_evt_hvx_t,
    #[doc = "< Exchange MTU Response Event Parameters."]
    pub exchange_mtu_rsp: ble_gattc_evt_exchange_mtu_rsp_t,
    #[doc = "< Timeout Event Parameters."]
    pub timeout: ble_gattc_evt_timeout_t,
    #[doc = "< Attribute Information Discovery Event Parameters."]
    pub attr_info_disc_rsp: ble_gattc_evt_attr_info_disc_rsp_t,
    #[doc = "< Write without Response transmission complete Event Parameters."]
    pub write_cmd_tx_complete: ble_gattc_evt_write_cmd_tx_complete_t,
    _bindgen_union_align: [u16; 11usize],
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_t__bindgen_ty_1>(),
        22usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_t__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_t__bindgen_ty_1>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_evt_t__bindgen_ty_1))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).prim_srvc_disc_rsp
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(prim_srvc_disc_rsp)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).rel_disc_rsp as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(rel_disc_rsp)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).char_disc_rsp as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(char_disc_rsp)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).desc_disc_rsp as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(desc_disc_rsp)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).char_val_by_uuid_read_rsp
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(char_val_by_uuid_read_rsp)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).read_rsp as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(read_rsp)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).char_vals_read_rsp
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(char_vals_read_rsp)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).write_rsp as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(write_rsp)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).hvx as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(hvx)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).exchange_mtu_rsp as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(exchange_mtu_rsp)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).timeout as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(timeout)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).attr_info_disc_rsp
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(attr_info_disc_rsp)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gattc_evt_t__bindgen_ty_1>())).write_cmd_tx_complete
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t__bindgen_ty_1),
            "::",
            stringify!(write_cmd_tx_complete)
        )
    );
}
#[test]
fn bindgen_test_layout_ble_gattc_evt_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gattc_evt_t>(),
        28usize,
        concat!("Size of: ", stringify!(ble_gattc_evt_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gattc_evt_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gattc_evt_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_t>())).conn_handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t),
            "::",
            stringify!(conn_handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_t>())).gatt_status as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t),
            "::",
            stringify!(gatt_status)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_t>())).error_handle as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t),
            "::",
            stringify!(error_handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gattc_evt_t>())).params as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gattc_evt_t),
            "::",
            stringify!(params)
        )
    );
}

    #[doc = "@brief Initiate or continue a GATT Primary Service Discovery procedure."]
    #[doc = ""]
    #[doc = " @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle."]
    #[doc = "          If the last service has not been reached, this function must be called again with an updated start handle value to continue the search."]
    #[doc = ""]
    #[doc = " @note If any of the discovered services have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with"]
    #[doc = "       type @ref BLE_UUID_TYPE_UNKNOWN will be received in the corresponding event."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTC_PRIM_SRVC_DISC_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle The connection handle identifying the connection to perform this procedure on."]
    #[doc = " @param[in] start_handle Handle to start searching from."]
    #[doc = " @param[in] p_srvc_uuid Pointer to the service UUID to be found. If it is NULL, all primary services will be returned."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully started or resumed the Primary Service Discovery procedure."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gattc_primary_services_discover(
        conn_handle: u16,
        start_handle: u16,
        p_srvc_uuid: *const ble_uuid_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 155",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(start_handle) => _,
        inout("r2") to_asm(p_srvc_uuid) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Initiate or continue a GATT Relationship Discovery procedure."]
    #[doc = ""]
    #[doc = " @details This function initiates or resumes the Find Included Services sub-procedure. If the last included service has not been reached,"]
    #[doc = "          this must be called again with an updated handle range to continue the search."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GATTC_EVT_REL_DISC_RSP}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTC_REL_DISC_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle The connection handle identifying the connection to perform this procedure on."]
    #[doc = " @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully started or resumed the Relationship Discovery procedure."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gattc_relationships_discover(
        conn_handle: u16,
        p_handle_range: *const ble_gattc_handle_range_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 156",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_handle_range) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Initiate or continue a GATT Characteristic Discovery procedure."]
    #[doc = ""]
    #[doc = " @details This function initiates or resumes a Characteristic discovery procedure. If the last Characteristic has not been reached,"]
    #[doc = "          this must be called again with an updated handle range to continue the discovery."]
    #[doc = ""]
    #[doc = " @note If any of the discovered characteristics have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with"]
    #[doc = "       type @ref BLE_UUID_TYPE_UNKNOWN will be received in the corresponding event."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GATTC_EVT_CHAR_DISC_RSP}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTC_CHAR_DISC_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle The connection handle identifying the connection to perform this procedure on."]
    #[doc = " @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully started or resumed the Characteristic Discovery procedure."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gattc_characteristics_discover(
        conn_handle: u16,
        p_handle_range: *const ble_gattc_handle_range_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 157",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_handle_range) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Initiate or continue a GATT Characteristic Descriptor Discovery procedure."]
    #[doc = ""]
    #[doc = " @details This function initiates or resumes a Characteristic Descriptor discovery procedure. If the last Descriptor has not been reached,"]
    #[doc = "          this must be called again with an updated handle range to continue the discovery."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GATTC_EVT_DESC_DISC_RSP}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTC_DESC_DISC_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle The connection handle identifying the connection to perform this procedure on."]
    #[doc = " @param[in] p_handle_range A pointer to the range of handles of the Characteristic to perform this procedure on."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully started or resumed the Descriptor Discovery procedure."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gattc_descriptors_discover(
        conn_handle: u16,
        p_handle_range: *const ble_gattc_handle_range_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 158",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_handle_range) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Initiate or continue a GATT Read using Characteristic UUID procedure."]
    #[doc = ""]
    #[doc = " @details This function initiates or resumes a Read using Characteristic UUID procedure. If the last Characteristic has not been reached,"]
    #[doc = "          this must be called again with an updated handle range to continue the discovery."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTC_READ_UUID_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle The connection handle identifying the connection to perform this procedure on."]
    #[doc = " @param[in] p_uuid Pointer to a Characteristic value UUID to read."]
    #[doc = " @param[in] p_handle_range A pointer to the range of handles to perform this procedure on."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully started or resumed the Read using Characteristic UUID procedure."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gattc_char_value_by_uuid_read(
        conn_handle: u16,
        p_uuid: *const ble_uuid_t,
        p_handle_range: *const ble_gattc_handle_range_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 160",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_uuid) => _,
        inout("r2") to_asm(p_handle_range) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Initiate or continue a GATT Read (Long) Characteristic or Descriptor procedure."]
    #[doc = ""]
    #[doc = " @details This function initiates or resumes a GATT Read (Long) Characteristic or Descriptor procedure. If the Characteristic or Descriptor"]
    #[doc = "          to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the"]
    #[doc = "          complete value."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GATTC_EVT_READ_RSP}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTC_VALUE_READ_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle The connection handle identifying the connection to perform this procedure on."]
    #[doc = " @param[in] handle The handle of the attribute to be read."]
    #[doc = " @param[in] offset Offset into the attribute value to be read."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully started or resumed the Read (Long) procedure."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State."]
    #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gattc_read(conn_handle: u16, handle: u16, offset: u16) -> u32 {
    let ret: u32;
    asm!("svc 161",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(handle) => _,
        inout("r2") to_asm(offset) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Initiate a GATT Read Multiple Characteristic Values procedure."]
    #[doc = ""]
    #[doc = " @details This function initiates a GATT Read Multiple Characteristic Values procedure."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTC_READ_MULT_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle The connection handle identifying the connection to perform this procedure on."]
    #[doc = " @param[in] p_handles A pointer to the handle(s) of the attribute(s) to be read."]
    #[doc = " @param[in] handle_count The number of handles in p_handles."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully started the Read Multiple Characteristic Values procedure."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gattc_char_values_read(
        conn_handle: u16,
        p_handles: *const u16,
        handle_count: u16,
    ) -> u32 {
    let ret: u32;
    asm!("svc 162",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_handles) => _,
        inout("r2") to_asm(handle_count) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Perform a Write (Characteristic Value or Descriptor, with or without response, signed or not, long or reliable) procedure."]
    #[doc = ""]
    #[doc = " @details This function can perform all write procedures described in GATT."]
    #[doc = ""]
    #[doc = " @note    Only one write with response procedure can be ongoing per connection at a time."]
    #[doc = "          If the application tries to write with response while another write with response procedure is ongoing,"]
    #[doc = "          the function call will return @ref NRF_ERROR_BUSY."]
    #[doc = "          A @ref BLE_GATTC_EVT_WRITE_RSP event will be issued as soon as the write response arrives from the peer."]
    #[doc = ""]
    #[doc = " @note    The number of Write without Response that can be queued is configured by @ref ble_gattc_conn_cfg_t::write_cmd_tx_queue_size"]
    #[doc = "          When the queue is full, the function call will return @ref NRF_ERROR_RESOURCES."]
    #[doc = "          A @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event will be issued as soon as the transmission of the write without response is complete."]
    #[doc = ""]
    #[doc = " @note    The application can keep track of the available queue element count for writes without responses by following the procedure below:"]
    #[doc = "          - Store initial queue element count in a variable."]
    #[doc = "          - Decrement the variable, which stores the currently available queue element count, by one when a call to this function returns @ref NRF_SUCCESS."]
    #[doc = "          - Increment the variable, which stores the current available queue element count, by the count variable in @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE, Write without response transmission complete.}"]
    #[doc = " @event{@ref BLE_GATTC_EVT_WRITE_RSP, Write response received from the peer.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTC_VALUE_WRITE_WITHOUT_RESP_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTC_VALUE_WRITE_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTC_VALUE_LONG_WRITE_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTC_VALUE_RELIABLE_WRITE_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle The connection handle identifying the connection to perform this procedure on."]
    #[doc = " @param[in] p_write_params A pointer to a write parameters structure."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully started the Write procedure."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY For write with response, procedure already in progress. Wait for a @ref BLE_GATTC_EVT_WRITE_RSP event and retry."]
    #[doc = " @retval ::NRF_ERROR_RESOURCES Too many writes without responses queued."]
    #[doc = "                               Wait for a @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event and retry."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gattc_write(
        conn_handle: u16,
        p_write_params: *const ble_gattc_write_params_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 163",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_write_params) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Send a Handle Value Confirmation to the GATT Server."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTC_HVI_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle The connection handle identifying the connection to perform this procedure on."]
    #[doc = " @param[in] handle The handle of the attribute in the indication."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully queued the Handle Value Confirmation for transmission."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no Indication pending to be confirmed."]
    #[doc = " @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gattc_hv_confirm(conn_handle: u16, handle: u16) -> u32 {
    let ret: u32;
    asm!("svc 164",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(handle) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Discovers information about a range of attributes on a GATT server."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GATTC_EVT_ATTR_INFO_DISC_RSP, Generated when information about a range of attributes has been received.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle    The connection handle identifying the connection to perform this procedure on."]
    #[doc = " @param[in] p_handle_range The range of handles to request information about."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully started an attribute information discovery procedure."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid connection state"]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR  Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gattc_attr_info_discover(
        conn_handle: u16,
        p_handle_range: *const ble_gattc_handle_range_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 159",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_handle_range) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Start an ATT_MTU exchange by sending an Exchange MTU Request to the server."]
    #[doc = ""]
    #[doc = " @details The SoftDevice sets ATT_MTU to the minimum of:"]
    #[doc = "          - The Client RX MTU value, and"]
    #[doc = "          - The Server RX MTU value from @ref BLE_GATTC_EVT_EXCHANGE_MTU_RSP."]
    #[doc = ""]
    #[doc = "          However, the SoftDevice never sets ATT_MTU lower than @ref BLE_GATT_ATT_MTU_DEFAULT."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GATTC_EVT_EXCHANGE_MTU_RSP}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTC_MTU_EXCHANGE}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle    The connection handle identifying the connection to perform this procedure on."]
    #[doc = " @param[in] client_rx_mtu  Client RX MTU size."]
    #[doc = "                           - The minimum value is @ref BLE_GATT_ATT_MTU_DEFAULT."]
    #[doc = "                           - The maximum value is @ref ble_gatt_conn_cfg_t::att_mtu in the connection configuration"]
    #[doc = "used for this connection."]
    #[doc = "                           - The value must be equal to Server RX MTU size given in @ref sd_ble_gatts_exchange_mtu_reply"]
    #[doc = "                             if an ATT_MTU exchange has already been performed in the other direction."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully sent request to the server."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid connection state or an ATT_MTU exchange was already requested once."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid Client RX MTU size supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY Client procedure already in progress."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gattc_exchange_mtu_request(conn_handle: u16, client_rx_mtu: u16) -> u32 {
    let ret: u32;
    asm!("svc 165",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(client_rx_mtu) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


#[doc = "< Add a service."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_SERVICE_ADD: BLE_GATTS_SVCS = 168;
#[doc = "< Add an included service."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_INCLUDE_ADD: BLE_GATTS_SVCS = 169;
#[doc = "< Add a characteristic."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_CHARACTERISTIC_ADD: BLE_GATTS_SVCS = 170;
#[doc = "< Add a generic attribute."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_DESCRIPTOR_ADD: BLE_GATTS_SVCS = 171;
#[doc = "< Set an attribute value."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_VALUE_SET: BLE_GATTS_SVCS = 172;
#[doc = "< Get an attribute value."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_VALUE_GET: BLE_GATTS_SVCS = 173;
#[doc = "< Handle Value Notification or Indication."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_HVX: BLE_GATTS_SVCS = 174;
#[doc = "< Perform a Service Changed Indication to one or more peers."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_SERVICE_CHANGED: BLE_GATTS_SVCS = 175;
#[doc = "< Reply to an authorization request for a read or write operation on one or more attributes."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_RW_AUTHORIZE_REPLY: BLE_GATTS_SVCS = 176;
#[doc = "< Set the persistent system attributes for a connection."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_SYS_ATTR_SET: BLE_GATTS_SVCS = 177;
#[doc = "< Retrieve the persistent system attributes."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_SYS_ATTR_GET: BLE_GATTS_SVCS = 178;
#[doc = "< Retrieve the first valid user handle."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_INITIAL_USER_HANDLE_GET: BLE_GATTS_SVCS = 179;
#[doc = "< Retrieve the UUID and/or metadata of an attribute."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_ATTR_GET: BLE_GATTS_SVCS = 180;
#[doc = "< Reply to Exchange MTU Request."]
pub const BLE_GATTS_SVCS_SD_BLE_GATTS_EXCHANGE_MTU_REPLY: BLE_GATTS_SVCS = 181;
#[doc = " @brief GATTS API SVC numbers."]
pub type BLE_GATTS_SVCS = u32;
#[doc = "< Write operation performed.                                           \\n See @ref ble_gatts_evt_write_t."]
pub const BLE_GATTS_EVTS_BLE_GATTS_EVT_WRITE: BLE_GATTS_EVTS = 80;
#[doc = "< Read/Write Authorization request.                                    \\n Reply with @ref sd_ble_gatts_rw_authorize_reply. \\n See @ref ble_gatts_evt_rw_authorize_request_t."]
pub const BLE_GATTS_EVTS_BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST: BLE_GATTS_EVTS = 81;
#[doc = "< A persistent system attribute access is pending.                     \\n Respond with @ref sd_ble_gatts_sys_attr_set.     \\n See @ref ble_gatts_evt_sys_attr_missing_t."]
pub const BLE_GATTS_EVTS_BLE_GATTS_EVT_SYS_ATTR_MISSING: BLE_GATTS_EVTS = 82;
#[doc = "< Handle Value Confirmation.                                           \\n See @ref ble_gatts_evt_hvc_t."]
pub const BLE_GATTS_EVTS_BLE_GATTS_EVT_HVC: BLE_GATTS_EVTS = 83;
#[doc = "< Service Changed Confirmation.                                        \\n No additional event structure applies."]
pub const BLE_GATTS_EVTS_BLE_GATTS_EVT_SC_CONFIRM: BLE_GATTS_EVTS = 84;
#[doc = "< Exchange MTU Request.                                                \\n Reply with @ref sd_ble_gatts_exchange_mtu_reply. \\n See @ref ble_gatts_evt_exchange_mtu_request_t."]
pub const BLE_GATTS_EVTS_BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST: BLE_GATTS_EVTS = 85;
#[doc = "< Peer failed to respond to an ATT request in time.                    \\n See @ref ble_gatts_evt_timeout_t."]
pub const BLE_GATTS_EVTS_BLE_GATTS_EVT_TIMEOUT: BLE_GATTS_EVTS = 86;
#[doc = "< Handle Value Notification transmission complete.                     \\n See @ref ble_gatts_evt_hvn_tx_complete_t."]
pub const BLE_GATTS_EVTS_BLE_GATTS_EVT_HVN_TX_COMPLETE: BLE_GATTS_EVTS = 87;
#[doc = " @brief GATT Server Event IDs."]
pub type BLE_GATTS_EVTS = u32;
#[doc = "< Service changed configuration."]
pub const BLE_GATTS_CFGS_BLE_GATTS_CFG_SERVICE_CHANGED: BLE_GATTS_CFGS = 160;
#[doc = "< Attribute table size configuration."]
pub const BLE_GATTS_CFGS_BLE_GATTS_CFG_ATTR_TAB_SIZE: BLE_GATTS_CFGS = 161;
#[doc = "@brief GATTS Configuration IDs."]
#[doc = ""]
#[doc = " IDs that uniquely identify a GATTS configuration."]
pub type BLE_GATTS_CFGS = u32;
#[doc = " @brief BLE GATTS connection configuration parameters, set with @ref sd_ble_cfg_set."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_conn_cfg_t {
    #[doc = "< Minimum guaranteed number of Handle Value Notifications that can be queued for transmission."]
    #[doc = "The default value is @ref BLE_GATTS_HVN_TX_QUEUE_SIZE_DEFAULT"]
    pub hvn_tx_queue_size: u8,
}
#[test]
fn bindgen_test_layout_ble_gatts_conn_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_conn_cfg_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gatts_conn_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_conn_cfg_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gatts_conn_cfg_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_conn_cfg_t>())).hvn_tx_queue_size as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_conn_cfg_t),
            "::",
            stringify!(hvn_tx_queue_size)
        )
    );
}
#[doc = "@brief Attribute metadata."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_attr_md_t {
    #[doc = "< Read permissions."]
    pub read_perm: ble_gap_conn_sec_mode_t,
    #[doc = "< Write permissions."]
    pub write_perm: ble_gap_conn_sec_mode_t,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gatts_attr_md_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_attr_md_t>(),
        3usize,
        concat!("Size of: ", stringify!(ble_gatts_attr_md_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_attr_md_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gatts_attr_md_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_attr_md_t>())).read_perm as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_attr_md_t),
            "::",
            stringify!(read_perm)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_attr_md_t>())).write_perm as *const _ as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_attr_md_t),
            "::",
            stringify!(write_perm)
        )
    );
}
impl ble_gatts_attr_md_t {
    #[inline]
    pub fn vlen(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_vlen(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn vloc(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u8) }
    }
    #[inline]
    pub fn set_vloc(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(1usize, 2u8, val as u64)
        }
    }
    #[inline]
    pub fn rd_auth(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_rd_auth(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn wr_auth(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_wr_auth(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(4usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        vlen: u8,
        vloc: u8,
        rd_auth: u8,
        wr_auth: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let vlen: u8 = unsafe { ::core::mem::transmute(vlen) };
            vlen as u64
        });
        __bindgen_bitfield_unit.set(1usize, 2u8, {
            let vloc: u8 = unsafe { ::core::mem::transmute(vloc) };
            vloc as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let rd_auth: u8 = unsafe { ::core::mem::transmute(rd_auth) };
            rd_auth as u64
        });
        __bindgen_bitfield_unit.set(4usize, 1u8, {
            let wr_auth: u8 = unsafe { ::core::mem::transmute(wr_auth) };
            wr_auth as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief GATT Attribute."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_attr_t {
    #[doc = "< Pointer to the attribute UUID."]
    pub p_uuid: *const ble_uuid_t,
    #[doc = "< Pointer to the attribute metadata structure."]
    pub p_attr_md: *const ble_gatts_attr_md_t,
    #[doc = "< Initial attribute value length in bytes."]
    pub init_len: u16,
    #[doc = "< Initial attribute value offset in bytes. If different from zero, the first init_offs bytes of the attribute value will be left uninitialized."]
    pub init_offs: u16,
    #[doc = "< Maximum attribute value length in bytes, see @ref BLE_GATTS_ATTR_LENS_MAX for maximum values."]
    pub max_len: u16,
    #[doc = "< Pointer to the attribute data. Please note that if the @ref BLE_GATTS_VLOC_USER value location is selected in the attribute metadata, this will have to point to a buffer"]
    #[doc = "that remains valid through the lifetime of the attribute. This excludes usage of automatic variables that may go out of scope or any other temporary location."]
    #[doc = "The stack may access that memory directly without the application's knowledge. For writable characteristics, this value must not be a location in flash memory."]
    pub p_value: *mut u8,
}
#[test]
fn bindgen_test_layout_ble_gatts_attr_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_attr_t>(),
        20usize,
        concat!("Size of: ", stringify!(ble_gatts_attr_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_attr_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gatts_attr_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_attr_t>())).p_uuid as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_attr_t),
            "::",
            stringify!(p_uuid)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_attr_t>())).p_attr_md as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_attr_t),
            "::",
            stringify!(p_attr_md)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_attr_t>())).init_len as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_attr_t),
            "::",
            stringify!(init_len)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_attr_t>())).init_offs as *const _ as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_attr_t),
            "::",
            stringify!(init_offs)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_attr_t>())).max_len as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_attr_t),
            "::",
            stringify!(max_len)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_attr_t>())).p_value as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_attr_t),
            "::",
            stringify!(p_value)
        )
    );
}
#[doc = "@brief GATT Attribute Value."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_value_t {
    #[doc = "< Length in bytes to be written or read. Length in bytes written or read after successful return."]
    pub len: u16,
    #[doc = "< Attribute value offset."]
    pub offset: u16,
    #[doc = "< Pointer to where value is stored or will be stored."]
    #[doc = "If value is stored in user memory, only the attribute length is updated when p_value == NULL."]
    #[doc = "Set to NULL when reading to obtain the complete length of the attribute value"]
    pub p_value: *mut u8,
}
#[test]
fn bindgen_test_layout_ble_gatts_value_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_value_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gatts_value_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_value_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gatts_value_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_value_t>())).len as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_value_t),
            "::",
            stringify!(len)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_value_t>())).offset as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_value_t),
            "::",
            stringify!(offset)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_value_t>())).p_value as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_value_t),
            "::",
            stringify!(p_value)
        )
    );
}
#[doc = "@brief GATT Characteristic Presentation Format."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_char_pf_t {
    #[doc = "< Format of the value, see @ref BLE_GATT_CPF_FORMATS."]
    pub format: u8,
    #[doc = "< Exponent for integer data types."]
    pub exponent: i8,
    #[doc = "< Unit from Bluetooth Assigned Numbers."]
    pub unit: u16,
    #[doc = "< Namespace from Bluetooth Assigned Numbers, see @ref BLE_GATT_CPF_NAMESPACES."]
    pub name_space: u8,
    #[doc = "< Namespace description from Bluetooth Assigned Numbers, see @ref BLE_GATT_CPF_NAMESPACES."]
    pub desc: u16,
}
#[test]
fn bindgen_test_layout_ble_gatts_char_pf_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_char_pf_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gatts_char_pf_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_char_pf_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gatts_char_pf_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_char_pf_t>())).format as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_pf_t),
            "::",
            stringify!(format)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_char_pf_t>())).exponent as *const _ as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_pf_t),
            "::",
            stringify!(exponent)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_char_pf_t>())).unit as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_pf_t),
            "::",
            stringify!(unit)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_char_pf_t>())).name_space as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_pf_t),
            "::",
            stringify!(name_space)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_char_pf_t>())).desc as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_pf_t),
            "::",
            stringify!(desc)
        )
    );
}
#[doc = "@brief GATT Characteristic metadata."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_char_md_t {
    #[doc = "< Characteristic Properties."]
    pub char_props: ble_gatt_char_props_t,
    #[doc = "< Characteristic Extended Properties."]
    pub char_ext_props: ble_gatt_char_ext_props_t,
    #[doc = "< Pointer to a UTF-8 encoded string (non-NULL terminated), NULL if the descriptor is not required."]
    pub p_char_user_desc: *const u8,
    #[doc = "< The maximum size in bytes of the user description descriptor."]
    pub char_user_desc_max_size: u16,
    #[doc = "< The size of the user description, must be smaller or equal to char_user_desc_max_size."]
    pub char_user_desc_size: u16,
    #[doc = "< Pointer to a presentation format structure or NULL if the CPF descriptor is not required."]
    pub p_char_pf: *const ble_gatts_char_pf_t,
    #[doc = "< Attribute metadata for the User Description descriptor, or NULL for default values."]
    pub p_user_desc_md: *const ble_gatts_attr_md_t,
    #[doc = "< Attribute metadata for the Client Characteristic Configuration Descriptor, or NULL for default values."]
    pub p_cccd_md: *const ble_gatts_attr_md_t,
    #[doc = "< Attribute metadata for the Server Characteristic Configuration Descriptor, or NULL for default values."]
    pub p_sccd_md: *const ble_gatts_attr_md_t,
}
#[test]
fn bindgen_test_layout_ble_gatts_char_md_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_char_md_t>(),
        28usize,
        concat!("Size of: ", stringify!(ble_gatts_char_md_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_char_md_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gatts_char_md_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_char_md_t>())).char_props as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_md_t),
            "::",
            stringify!(char_props)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_char_md_t>())).char_ext_props as *const _ as usize
        },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_md_t),
            "::",
            stringify!(char_ext_props)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_char_md_t>())).p_char_user_desc as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_md_t),
            "::",
            stringify!(p_char_user_desc)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_char_md_t>())).char_user_desc_max_size as *const _
                as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_md_t),
            "::",
            stringify!(char_user_desc_max_size)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_char_md_t>())).char_user_desc_size as *const _
                as usize
        },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_md_t),
            "::",
            stringify!(char_user_desc_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_char_md_t>())).p_char_pf as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_md_t),
            "::",
            stringify!(p_char_pf)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_char_md_t>())).p_user_desc_md as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_md_t),
            "::",
            stringify!(p_user_desc_md)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_char_md_t>())).p_cccd_md as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_md_t),
            "::",
            stringify!(p_cccd_md)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_char_md_t>())).p_sccd_md as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_md_t),
            "::",
            stringify!(p_sccd_md)
        )
    );
}
#[doc = "@brief GATT Characteristic Definition Handles."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_char_handles_t {
    #[doc = "< Handle to the characteristic value."]
    pub value_handle: u16,
    #[doc = "< Handle to the User Description descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present."]
    pub user_desc_handle: u16,
    #[doc = "< Handle to the Client Characteristic Configuration Descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present."]
    pub cccd_handle: u16,
    #[doc = "< Handle to the Server Characteristic Configuration Descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present."]
    pub sccd_handle: u16,
}
#[test]
fn bindgen_test_layout_ble_gatts_char_handles_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_char_handles_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gatts_char_handles_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_char_handles_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gatts_char_handles_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_char_handles_t>())).value_handle as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_handles_t),
            "::",
            stringify!(value_handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_char_handles_t>())).user_desc_handle as *const _
                as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_handles_t),
            "::",
            stringify!(user_desc_handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_char_handles_t>())).cccd_handle as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_handles_t),
            "::",
            stringify!(cccd_handle)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_char_handles_t>())).sccd_handle as *const _ as usize
        },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_char_handles_t),
            "::",
            stringify!(sccd_handle)
        )
    );
}
#[doc = "@brief GATT HVx parameters."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_hvx_params_t {
    #[doc = "< Characteristic Value Handle."]
    pub handle: u16,
    #[doc = "< Indication or Notification, see @ref BLE_GATT_HVX_TYPES."]
    pub type_: u8,
    #[doc = "< Offset within the attribute value."]
    pub offset: u16,
    #[doc = "< Length in bytes to be written, length in bytes written after return."]
    pub p_len: *mut u16,
    #[doc = "< Actual data content, use NULL to use the current attribute value."]
    pub p_data: *const u8,
}
#[test]
fn bindgen_test_layout_ble_gatts_hvx_params_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_hvx_params_t>(),
        16usize,
        concat!("Size of: ", stringify!(ble_gatts_hvx_params_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_hvx_params_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gatts_hvx_params_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_hvx_params_t>())).handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_hvx_params_t),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_hvx_params_t>())).type_ as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_hvx_params_t),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_hvx_params_t>())).offset as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_hvx_params_t),
            "::",
            stringify!(offset)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_hvx_params_t>())).p_len as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_hvx_params_t),
            "::",
            stringify!(p_len)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_hvx_params_t>())).p_data as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_hvx_params_t),
            "::",
            stringify!(p_data)
        )
    );
}
#[doc = "@brief GATT Authorization parameters."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_authorize_params_t {
    #[doc = "< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES."]
    pub gatt_status: u16,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
    #[doc = "< Offset of the attribute value being updated."]
    pub offset: u16,
    #[doc = "< Length in bytes of the value in p_data pointer, see @ref BLE_GATTS_ATTR_LENS_MAX."]
    pub len: u16,
    #[doc = "< Pointer to new value used to update the attribute value."]
    pub p_data: *const u8,
}
#[test]
fn bindgen_test_layout_ble_gatts_authorize_params_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_authorize_params_t>(),
        12usize,
        concat!("Size of: ", stringify!(ble_gatts_authorize_params_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_authorize_params_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gatts_authorize_params_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_authorize_params_t>())).gatt_status as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_authorize_params_t),
            "::",
            stringify!(gatt_status)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_authorize_params_t>())).offset as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_authorize_params_t),
            "::",
            stringify!(offset)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_authorize_params_t>())).len as *const _ as usize
        },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_authorize_params_t),
            "::",
            stringify!(len)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_authorize_params_t>())).p_data as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_authorize_params_t),
            "::",
            stringify!(p_data)
        )
    );
}
impl ble_gatts_authorize_params_t {
    #[inline]
    pub fn update(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_update(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(update: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let update: u8 = unsafe { ::core::mem::transmute(update) };
            update as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief GATT Read or Write Authorize Reply parameters."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gatts_rw_authorize_reply_params_t {
    #[doc = "< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES."]
    pub type_: u8,
    #[doc = "< Reply Parameters."]
    pub params: ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1 {
    #[doc = "< Read authorization parameters."]
    pub read: ble_gatts_authorize_params_t,
    #[doc = "< Write authorization parameters."]
    pub write: ble_gatts_authorize_params_t,
    _bindgen_union_align: [u32; 3usize],
}
#[test]
fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1>(),
        12usize,
        concat!(
            "Size of: ",
            stringify!(ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1>())).read
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1),
            "::",
            stringify!(read)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1>())).write
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_rw_authorize_reply_params_t__bindgen_ty_1),
            "::",
            stringify!(write)
        )
    );
}
#[test]
fn bindgen_test_layout_ble_gatts_rw_authorize_reply_params_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_rw_authorize_reply_params_t>(),
        16usize,
        concat!(
            "Size of: ",
            stringify!(ble_gatts_rw_authorize_reply_params_t)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_rw_authorize_reply_params_t>(),
        4usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gatts_rw_authorize_reply_params_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_rw_authorize_reply_params_t>())).type_ as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_rw_authorize_reply_params_t),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_rw_authorize_reply_params_t>())).params as *const _
                as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_rw_authorize_reply_params_t),
            "::",
            stringify!(params)
        )
    );
}
#[doc = "@brief Service Changed Inclusion configuration parameters, set with @ref sd_ble_cfg_set."]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_cfg_service_changed_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_gatts_cfg_service_changed_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_cfg_service_changed_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gatts_cfg_service_changed_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_cfg_service_changed_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gatts_cfg_service_changed_t))
    );
}
impl ble_gatts_cfg_service_changed_t {
    #[inline]
    pub fn service_changed(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_service_changed(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(service_changed: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let service_changed: u8 = unsafe { ::core::mem::transmute(service_changed) };
            service_changed as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief Attribute table size configuration parameters, set with @ref sd_ble_cfg_set."]
#[doc = ""]
#[doc = " @retval ::NRF_ERROR_INVALID_LENGTH One or more of the following is true:"]
#[doc = "                                    - The specified Attribute Table size is too small."]
#[doc = "                                      The minimum acceptable size is defined by @ref BLE_GATTS_ATTR_TAB_SIZE_MIN."]
#[doc = "                                    - The specified Attribute Table size is not a multiple of 4."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_cfg_attr_tab_size_t {
    #[doc = "< Attribute table size. Default is @ref BLE_GATTS_ATTR_TAB_SIZE_DEFAULT, minimum is @ref BLE_GATTS_ATTR_TAB_SIZE_MIN."]
    pub attr_tab_size: u32,
}
#[test]
fn bindgen_test_layout_ble_gatts_cfg_attr_tab_size_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_cfg_attr_tab_size_t>(),
        4usize,
        concat!("Size of: ", stringify!(ble_gatts_cfg_attr_tab_size_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_cfg_attr_tab_size_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gatts_cfg_attr_tab_size_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_cfg_attr_tab_size_t>())).attr_tab_size as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_cfg_attr_tab_size_t),
            "::",
            stringify!(attr_tab_size)
        )
    );
}
#[doc = "@brief Config structure for GATTS configurations."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_gatts_cfg_t {
    #[doc = "< Include service changed characteristic, cfg_id is @ref BLE_GATTS_CFG_SERVICE_CHANGED."]
    pub service_changed: ble_gatts_cfg_service_changed_t,
    #[doc = "< Attribute table size, cfg_id is @ref BLE_GATTS_CFG_ATTR_TAB_SIZE."]
    pub attr_tab_size: ble_gatts_cfg_attr_tab_size_t,
    _bindgen_union_align: u32,
}
#[test]
fn bindgen_test_layout_ble_gatts_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_cfg_t>(),
        4usize,
        concat!("Size of: ", stringify!(ble_gatts_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_cfg_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_gatts_cfg_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_cfg_t>())).service_changed as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_cfg_t),
            "::",
            stringify!(service_changed)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_cfg_t>())).attr_tab_size as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_cfg_t),
            "::",
            stringify!(attr_tab_size)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTS_EVT_WRITE."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_evt_write_t {
    #[doc = "< Attribute Handle."]
    pub handle: u16,
    #[doc = "< Attribute UUID."]
    pub uuid: ble_uuid_t,
    #[doc = "< Type of write operation, see @ref BLE_GATTS_OPS."]
    pub op: u8,
    #[doc = "< Writing operation deferred due to authorization requirement. Application may use @ref sd_ble_gatts_value_set to finalize the writing operation."]
    pub auth_required: u8,
    #[doc = "< Offset for the write operation."]
    pub offset: u16,
    #[doc = "< Length of the received data."]
    pub len: u16,
    #[doc = "< Received data. @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation."]
    #[doc = "See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members."]
    pub data: [u8; 1usize],
}
#[test]
fn bindgen_test_layout_ble_gatts_evt_write_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_evt_write_t>(),
        14usize,
        concat!("Size of: ", stringify!(ble_gatts_evt_write_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_evt_write_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gatts_evt_write_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_write_t>())).handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_write_t),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_write_t>())).uuid as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_write_t),
            "::",
            stringify!(uuid)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_write_t>())).op as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_write_t),
            "::",
            stringify!(op)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_write_t>())).auth_required as *const _ as usize
        },
        7usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_write_t),
            "::",
            stringify!(auth_required)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_write_t>())).offset as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_write_t),
            "::",
            stringify!(offset)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_write_t>())).len as *const _ as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_write_t),
            "::",
            stringify!(len)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_write_t>())).data as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_write_t),
            "::",
            stringify!(data)
        )
    );
}
#[doc = "@brief Event substructure for authorized read requests, see @ref ble_gatts_evt_rw_authorize_request_t."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_evt_read_t {
    #[doc = "< Attribute Handle."]
    pub handle: u16,
    #[doc = "< Attribute UUID."]
    pub uuid: ble_uuid_t,
    #[doc = "< Offset for the read operation."]
    pub offset: u16,
}
#[test]
fn bindgen_test_layout_ble_gatts_evt_read_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_evt_read_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_gatts_evt_read_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_evt_read_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gatts_evt_read_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_read_t>())).handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_read_t),
            "::",
            stringify!(handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_read_t>())).uuid as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_read_t),
            "::",
            stringify!(uuid)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_read_t>())).offset as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_read_t),
            "::",
            stringify!(offset)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gatts_evt_rw_authorize_request_t {
    #[doc = "< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES."]
    pub type_: u8,
    #[doc = "< Request Parameters."]
    pub request: ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1 {
    #[doc = "< Attribute Read Parameters."]
    pub read: ble_gatts_evt_read_t,
    #[doc = "< Attribute Write Parameters."]
    pub write: ble_gatts_evt_write_t,
    _bindgen_union_align: [u16; 7usize],
}
#[test]
fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1>(),
        14usize,
        concat!(
            "Size of: ",
            stringify!(ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1>())).read
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1),
            "::",
            stringify!(read)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1>())).write
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_rw_authorize_request_t__bindgen_ty_1),
            "::",
            stringify!(write)
        )
    );
}
#[test]
fn bindgen_test_layout_ble_gatts_evt_rw_authorize_request_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_evt_rw_authorize_request_t>(),
        16usize,
        concat!(
            "Size of: ",
            stringify!(ble_gatts_evt_rw_authorize_request_t)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_evt_rw_authorize_request_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gatts_evt_rw_authorize_request_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_rw_authorize_request_t>())).type_ as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_rw_authorize_request_t),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_rw_authorize_request_t>())).request as *const _
                as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_rw_authorize_request_t),
            "::",
            stringify!(request)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTS_EVT_SYS_ATTR_MISSING."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_evt_sys_attr_missing_t {
    #[doc = "< Hint (currently unused)."]
    pub hint: u8,
}
#[test]
fn bindgen_test_layout_ble_gatts_evt_sys_attr_missing_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_evt_sys_attr_missing_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gatts_evt_sys_attr_missing_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_evt_sys_attr_missing_t>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gatts_evt_sys_attr_missing_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_sys_attr_missing_t>())).hint as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_sys_attr_missing_t),
            "::",
            stringify!(hint)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTS_EVT_HVC."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_evt_hvc_t {
    #[doc = "< Attribute Handle."]
    pub handle: u16,
}
#[test]
fn bindgen_test_layout_ble_gatts_evt_hvc_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_evt_hvc_t>(),
        2usize,
        concat!("Size of: ", stringify!(ble_gatts_evt_hvc_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_evt_hvc_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gatts_evt_hvc_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_hvc_t>())).handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_hvc_t),
            "::",
            stringify!(handle)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_evt_exchange_mtu_request_t {
    #[doc = "< Client RX MTU size."]
    pub client_rx_mtu: u16,
}
#[test]
fn bindgen_test_layout_ble_gatts_evt_exchange_mtu_request_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_evt_exchange_mtu_request_t>(),
        2usize,
        concat!(
            "Size of: ",
            stringify!(ble_gatts_evt_exchange_mtu_request_t)
        )
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_evt_exchange_mtu_request_t>(),
        2usize,
        concat!(
            "Alignment of ",
            stringify!(ble_gatts_evt_exchange_mtu_request_t)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_exchange_mtu_request_t>())).client_rx_mtu
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_exchange_mtu_request_t),
            "::",
            stringify!(client_rx_mtu)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTS_EVT_TIMEOUT."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_evt_timeout_t {
    #[doc = "< Timeout source, see @ref BLE_GATT_TIMEOUT_SOURCES."]
    pub src: u8,
}
#[test]
fn bindgen_test_layout_ble_gatts_evt_timeout_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_evt_timeout_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gatts_evt_timeout_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_evt_timeout_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gatts_evt_timeout_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_timeout_t>())).src as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_timeout_t),
            "::",
            stringify!(src)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_GATTS_EVT_HVN_TX_COMPLETE."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_gatts_evt_hvn_tx_complete_t {
    #[doc = "< Number of notification transmissions completed."]
    pub count: u8,
}
#[test]
fn bindgen_test_layout_ble_gatts_evt_hvn_tx_complete_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_evt_hvn_tx_complete_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_gatts_evt_hvn_tx_complete_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_evt_hvn_tx_complete_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_gatts_evt_hvn_tx_complete_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_hvn_tx_complete_t>())).count as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_hvn_tx_complete_t),
            "::",
            stringify!(count)
        )
    );
}
#[doc = "@brief GATTS event structure."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_gatts_evt_t {
    #[doc = "< Connection Handle on which the event occurred."]
    pub conn_handle: u16,
    #[doc = "< Event Parameters."]
    pub params: ble_gatts_evt_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_gatts_evt_t__bindgen_ty_1 {
    #[doc = "< Write Event Parameters."]
    pub write: ble_gatts_evt_write_t,
    #[doc = "< Read or Write Authorize Request Parameters."]
    pub authorize_request: ble_gatts_evt_rw_authorize_request_t,
    #[doc = "< System attributes missing."]
    pub sys_attr_missing: ble_gatts_evt_sys_attr_missing_t,
    #[doc = "< Handle Value Confirmation Event Parameters."]
    pub hvc: ble_gatts_evt_hvc_t,
    #[doc = "< Exchange MTU Request Event Parameters."]
    pub exchange_mtu_request: ble_gatts_evt_exchange_mtu_request_t,
    #[doc = "< Timeout Event."]
    pub timeout: ble_gatts_evt_timeout_t,
    #[doc = "< Handle Value Notification transmission complete Event Parameters."]
    pub hvn_tx_complete: ble_gatts_evt_hvn_tx_complete_t,
    _bindgen_union_align: [u16; 8usize],
}
#[test]
fn bindgen_test_layout_ble_gatts_evt_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_evt_t__bindgen_ty_1>(),
        16usize,
        concat!("Size of: ", stringify!(ble_gatts_evt_t__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_evt_t__bindgen_ty_1>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gatts_evt_t__bindgen_ty_1))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_t__bindgen_ty_1>())).write as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_t__bindgen_ty_1),
            "::",
            stringify!(write)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_t__bindgen_ty_1>())).authorize_request as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_t__bindgen_ty_1),
            "::",
            stringify!(authorize_request)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_t__bindgen_ty_1>())).sys_attr_missing as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_t__bindgen_ty_1),
            "::",
            stringify!(sys_attr_missing)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_t__bindgen_ty_1>())).hvc as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_t__bindgen_ty_1),
            "::",
            stringify!(hvc)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_t__bindgen_ty_1>())).exchange_mtu_request
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_t__bindgen_ty_1),
            "::",
            stringify!(exchange_mtu_request)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_t__bindgen_ty_1>())).timeout as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_t__bindgen_ty_1),
            "::",
            stringify!(timeout)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_gatts_evt_t__bindgen_ty_1>())).hvn_tx_complete as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_t__bindgen_ty_1),
            "::",
            stringify!(hvn_tx_complete)
        )
    );
}
#[test]
fn bindgen_test_layout_ble_gatts_evt_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_gatts_evt_t>(),
        18usize,
        concat!("Size of: ", stringify!(ble_gatts_evt_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_gatts_evt_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_gatts_evt_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_t>())).conn_handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_t),
            "::",
            stringify!(conn_handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_gatts_evt_t>())).params as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_gatts_evt_t),
            "::",
            stringify!(params)
        )
    );
}

    #[doc = "@brief Add a service declaration to the Attribute Table."]
    #[doc = ""]
    #[doc = " @note Secondary Services are only relevant in the context of the entity that references them, it is therefore forbidden to"]
    #[doc = "       add a secondary service declaration that is not referenced by another service later in the Attribute Table."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] type      Toggles between primary and secondary services, see @ref BLE_GATTS_SRVC_TYPES."]
    #[doc = " @param[in] p_uuid    Pointer to service UUID."]
    #[doc = " @param[out] p_handle Pointer to a 16-bit word where the assigned handle will be stored."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully added a service declaration."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, Vendor Specific UUIDs need to be present in the table."]
    #[doc = " @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack."]
    #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_service_add(
        type_: u8,
        p_uuid: *const ble_uuid_t,
        p_handle: *mut u16,
    ) -> u32 {
    let ret: u32;
    asm!("svc 168",
        inout("r0") to_asm(type_) => ret,
        inout("r1") to_asm(p_uuid) => _,
        inout("r2") to_asm(p_handle) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Add an include declaration to the Attribute Table."]
    #[doc = ""]
    #[doc = " @note It is currently only possible to add an include declaration to the last added service (i.e. only sequential population is supported at this time)."]
    #[doc = ""]
    #[doc = " @note The included service must already be present in the Attribute Table prior to this call."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] service_handle    Handle of the service where the included service is to be placed, if @ref BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially."]
    #[doc = " @param[in] inc_srvc_handle   Handle of the included service."]
    #[doc = " @param[out] p_include_handle Pointer to a 16-bit word where the assigned handle will be stored."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully added an include declaration."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, handle values need to match previously added services."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a service context is required."]
    #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Feature is not supported, service_handle must be that of the last added service."]
    #[doc = " @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, self inclusions are not allowed."]
    #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute not found."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_include_add(
        service_handle: u16,
        inc_srvc_handle: u16,
        p_include_handle: *mut u16,
    ) -> u32 {
    let ret: u32;
    asm!("svc 169",
        inout("r0") to_asm(service_handle) => ret,
        inout("r1") to_asm(inc_srvc_handle) => _,
        inout("r2") to_asm(p_include_handle) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Add a characteristic declaration, a characteristic value declaration and optional characteristic descriptor declarations to the Attribute Table."]
    #[doc = ""]
    #[doc = " @note It is currently only possible to add a characteristic to the last added service (i.e. only sequential population is supported at this time)."]
    #[doc = ""]
    #[doc = " @note Several restrictions apply to the parameters, such as matching permissions between the user description descriptor and the writable auxiliaries bits,"]
    #[doc = "       readable (no security) and writable (selectable) CCCDs and SCCDs and valid presentation format values."]
    #[doc = ""]
    #[doc = " @note If no metadata is provided for the optional descriptors, their permissions will be derived from the characteristic permissions."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] service_handle    Handle of the service where the characteristic is to be placed, if @ref BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially."]
    #[doc = " @param[in] p_char_md         Characteristic metadata."]
    #[doc = " @param[in] p_attr_char_value Pointer to the attribute structure corresponding to the characteristic value."]
    #[doc = " @param[out] p_handles        Pointer to the structure where the assigned handles will be stored."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully added a characteristic."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, service handle, Vendor Specific UUIDs, lengths, and permissions need to adhere to the constraints."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a service context is required."]
    #[doc = " @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack."]
    #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."]
    #[doc = " @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_characteristic_add(
        service_handle: u16,
        p_char_md: *const ble_gatts_char_md_t,
        p_attr_char_value: *const ble_gatts_attr_t,
        p_handles: *mut ble_gatts_char_handles_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 170",
        inout("r0") to_asm(service_handle) => ret,
        inout("r1") to_asm(p_char_md) => _,
        inout("r2") to_asm(p_attr_char_value) => _,
        inout("r3") to_asm(p_handles) => _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Add a descriptor to the Attribute Table."]
    #[doc = ""]
    #[doc = " @note It is currently only possible to add a descriptor to the last added characteristic (i.e. only sequential population is supported at this time)."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] char_handle   Handle of the characteristic where the descriptor is to be placed, if @ref BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially."]
    #[doc = " @param[in] p_attr        Pointer to the attribute structure."]
    #[doc = " @param[out] p_handle     Pointer to a 16-bit word where the assigned handle will be stored."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully added a descriptor."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, characteristic handle, Vendor Specific UUIDs, lengths, and permissions need to adhere to the constraints."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a characteristic context is required."]
    #[doc = " @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack."]
    #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."]
    #[doc = " @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_descriptor_add(
        char_handle: u16,
        p_attr: *const ble_gatts_attr_t,
        p_handle: *mut u16,
    ) -> u32 {
    let ret: u32;
    asm!("svc 171",
        inout("r0") to_asm(char_handle) => ret,
        inout("r1") to_asm(p_attr) => _,
        inout("r2") to_asm(p_handle) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Set the value of a given attribute."]
    #[doc = ""]
    #[doc = " @note Values other than system attributes can be set at any time, regardless of whether any active connections exist."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle  Connection handle. Ignored if the value does not belong to a system attribute."]
    #[doc = " @param[in] handle       Attribute handle."]
    #[doc = " @param[in,out] p_value  Attribute value information."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully set the value of the attribute."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute not found."]
    #[doc = " @retval ::NRF_ERROR_FORBIDDEN Forbidden handle supplied, certain attributes are not modifiable by the application."]
    #[doc = " @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_value_set(
        conn_handle: u16,
        handle: u16,
        p_value: *mut ble_gatts_value_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 172",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(handle) => _,
        inout("r2") to_asm(p_value) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get the value of a given attribute."]
    #[doc = ""]
    #[doc = " @note                 If the attribute value is longer than the size of the supplied buffer,"]
    #[doc = "                       @ref ble_gatts_value_t::len will return the total attribute value length (excluding offset),"]
    #[doc = "                       and not the number of bytes actually returned in @ref ble_gatts_value_t::p_value."]
    #[doc = "                       The application may use this information to allocate a suitable buffer size."]
    #[doc = ""]
    #[doc = " @note                 When retrieving system attribute values with this function, the connection handle"]
    #[doc = "                       may refer to an already disconnected connection. Refer to the documentation of"]
    #[doc = "                       @ref sd_ble_gatts_sys_attr_get for further information."]
    #[doc = ""]
    #[doc = " @param[in] conn_handle  Connection handle. Ignored if the value does not belong to a system attribute."]
    #[doc = " @param[in] handle       Attribute handle."]
    #[doc = " @param[in,out] p_value  Attribute value information."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully retrieved the value of the attribute."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute not found."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid attribute offset supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute."]
    #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_value_get(
        conn_handle: u16,
        handle: u16,
        p_value: *mut ble_gatts_value_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 173",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(handle) => _,
        inout("r2") to_asm(p_value) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Notify or Indicate an attribute value."]
    #[doc = ""]
    #[doc = " @details This function checks for the relevant Client Characteristic Configuration descriptor value to verify that the relevant operation"]
    #[doc = "          (notification or indication) has been enabled by the client. It is also able to update the attribute value before issuing the PDU, so that"]
    #[doc = "          the application can atomically perform a value update and a server initiated transaction with a single API call."]
    #[doc = ""]
    #[doc = " @note    The local attribute value may be updated even if an outgoing packet is not sent to the peer due to an error during execution."]
    #[doc = "          The Attribute Table has been updated if one of the following error codes is returned: @ref NRF_ERROR_INVALID_STATE, @ref NRF_ERROR_BUSY,"]
    #[doc = "          @ref NRF_ERROR_FORBIDDEN, @ref BLE_ERROR_GATTS_SYS_ATTR_MISSING and @ref NRF_ERROR_RESOURCES."]
    #[doc = "          The caller can check whether the value has been updated by looking at the contents of *(@ref ble_gatts_hvx_params_t::p_len)."]
    #[doc = ""]
    #[doc = " @note    Only one indication procedure can be ongoing per connection at a time."]
    #[doc = "          If the application tries to indicate an attribute value while another indication procedure is ongoing,"]
    #[doc = "          the function call will return @ref NRF_ERROR_BUSY."]
    #[doc = "          A @ref BLE_GATTS_EVT_HVC event will be issued as soon as the confirmation arrives from the peer."]
    #[doc = ""]
    #[doc = " @note    The number of Handle Value Notifications that can be queued is configured by @ref ble_gatts_conn_cfg_t::hvn_tx_queue_size"]
    #[doc = "          When the queue is full, the function call will return @ref NRF_ERROR_RESOURCES."]
    #[doc = "          A @ref BLE_GATTS_EVT_HVN_TX_COMPLETE event will be issued as soon as the transmission of the notification is complete."]
    #[doc = ""]
    #[doc = " @note    The application can keep track of the available queue element count for notifications by following the procedure below:"]
    #[doc = "          - Store initial queue element count in a variable."]
    #[doc = "          - Decrement the variable, which stores the currently available queue element count, by one when a call to this function returns @ref NRF_SUCCESS."]
    #[doc = "          - Increment the variable, which stores the current available queue element count, by the count variable in @ref BLE_GATTS_EVT_HVN_TX_COMPLETE event."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GATTS_EVT_HVN_TX_COMPLETE, Notification transmission complete.}"]
    #[doc = " @event{@ref BLE_GATTS_EVT_HVC, Confirmation received from the peer.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTS_HVX_SYS_ATTRS_MISSING_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_HVN_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_HVI_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_HVX_DISABLED_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle      Connection handle."]
    #[doc = " @param[in,out] p_hvx_params Pointer to an HVx parameters structure. If @ref ble_gatts_hvx_params_t::p_data"]
    #[doc = "                             contains a non-NULL pointer the attribute value will be updated with the contents"]
    #[doc = "                             pointed by it before sending the notification or indication. If the attribute value"]
    #[doc = "                             is updated, @ref ble_gatts_hvx_params_t::p_len is updated by the SoftDevice to"]
    #[doc = "                             contain the number of actual bytes written, else it will be set to 0."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully queued a notification or indication for transmission, and optionally updated the attribute value."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE One or more of the following is true:"]
    #[doc = "                                   - Invalid Connection State"]
    #[doc = "                                   - Notifications and/or indications not enabled in the CCCD"]
    #[doc = "                                   - An ATT_MTU exchange is ongoing"]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle(s) supplied. Only attributes added directly by the application are available to notify and indicate."]
    #[doc = " @retval ::BLE_ERROR_GATTS_INVALID_ATTR_TYPE Invalid attribute type(s) supplied, only characteristic values may be notified and indicated."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute not found."]
    #[doc = " @retval ::NRF_ERROR_FORBIDDEN The connection's current security level is lower than the one required by the write permissions of the CCCD associated with this characteristic."]
    #[doc = " @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY For @ref BLE_GATT_HVX_INDICATION Procedure already in progress. Wait for a @ref BLE_GATTS_EVT_HVC event and retry."]
    #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."]
    #[doc = " @retval ::NRF_ERROR_RESOURCES Too many notifications queued."]
    #[doc = "                               Wait for a @ref BLE_GATTS_EVT_HVN_TX_COMPLETE event and retry."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_hvx(conn_handle: u16, p_hvx_params: *const ble_gatts_hvx_params_t) -> u32 {
    let ret: u32;
    asm!("svc 174",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_hvx_params) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Indicate the Service Changed attribute value."]
    #[doc = ""]
    #[doc = " @details This call will send a Handle Value Indication to one or more peers connected to inform them that the Attribute"]
    #[doc = "          Table layout has changed. As soon as the peer has confirmed the indication, a @ref BLE_GATTS_EVT_SC_CONFIRM event will"]
    #[doc = "          be issued."]
    #[doc = ""]
    #[doc = " @note    Some of the restrictions and limitations that apply to @ref sd_ble_gatts_hvx also apply here."]
    #[doc = ""]
    #[doc = " @events"]
    #[doc = " @event{@ref BLE_GATTS_EVT_SC_CONFIRM, Confirmation of attribute table change received from peer.}"]
    #[doc = " @endevents"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTS_SC_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle  Connection handle."]
    #[doc = " @param[in] start_handle Start of affected attribute handle range."]
    #[doc = " @param[in] end_handle   End of affected attribute handle range."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully queued the Service Changed indication for transmission."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED Service Changed not enabled at initialization. See @ref"]
    #[doc = "                                   sd_ble_cfg_set and @ref ble_gatts_cfg_service_changed_t."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE One or more of the following is true:"]
    #[doc = "                                   - Invalid Connection State"]
    #[doc = "                                   - Notifications and/or indications not enabled in the CCCD"]
    #[doc = "                                   - An ATT_MTU exchange is ongoing"]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle(s) supplied, handles must be in the range populated by the application."]
    #[doc = " @retval ::NRF_ERROR_BUSY Procedure already in progress."]
    #[doc = " @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known value."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_service_changed(
        conn_handle: u16,
        start_handle: u16,
        end_handle: u16,
    ) -> u32 {
    let ret: u32;
    asm!("svc 175",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(start_handle) => _,
        inout("r2") to_asm(end_handle) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Respond to a Read/Write authorization request."]
    #[doc = ""]
    #[doc = " @note This call should only be used as a response to a @ref BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event issued to the application."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_AUTH_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_AUTH_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_READ_REQ_AUTH_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_WRITE_REQ_AUTH_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_PEER_CANCEL_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle                 Connection handle."]
    #[doc = " @param[in] p_rw_authorize_reply_params Pointer to a structure with the attribute provided by the application."]
    #[doc = ""]
    #[doc = " @note @ref ble_gatts_authorize_params_t::p_data is ignored when this function is used to respond"]
    #[doc = "       to a @ref BLE_GATTS_AUTHORIZE_TYPE_READ event if @ref ble_gatts_authorize_params_t::update"]
    #[doc = "       is set to 0."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS               Successfully queued a response to the peer, and in the case of a write operation, Attribute Table updated."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_BUSY            The stack is busy, process pending events and retry."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR    Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE   Invalid Connection State or no authorization request pending."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM   Authorization op invalid,"]
    #[doc = "                                         handle supplied does not match requested handle,"]
    #[doc = "                                         or invalid data to be written provided by the application."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_rw_authorize_reply(
        conn_handle: u16,
        p_rw_authorize_reply_params: *const ble_gatts_rw_authorize_reply_params_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 176",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_rw_authorize_reply_params) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Update persistent system attribute information."]
    #[doc = ""]
    #[doc = " @details Supply information about persistent system attributes to the stack,"]
    #[doc = "          previously obtained using @ref sd_ble_gatts_sys_attr_get."]
    #[doc = "          This call is only allowed for active connections, and is usually"]
    #[doc = "          made immediately after a connection is established with an known bonded device,"]
    #[doc = "          often as a response to a @ref BLE_GATTS_EVT_SYS_ATTR_MISSING."]
    #[doc = ""]
    #[doc = "          p_sysattrs may point directly to the application's stored copy of the system attributes"]
    #[doc = "          obtained using @ref sd_ble_gatts_sys_attr_get."]
    #[doc = "          If the pointer is NULL, the system attribute info is initialized, assuming that"]
    #[doc = "          the application does not have any previously saved system attribute data for this device."]
    #[doc = ""]
    #[doc = " @note The state of persistent system attributes is reset upon connection establishment and then remembered for its duration."]
    #[doc = ""]
    #[doc = " @note If this call returns with an error code different from @ref NRF_SUCCESS, the storage of persistent system attributes may have been completed only partially."]
    #[doc = "       This means that the state of the attribute table is undefined, and the application should either provide a new set of attributes using this same call or"]
    #[doc = "       reset the SoftDevice to return to a known state."]
    #[doc = ""]
    #[doc = " @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS is used with this function, only the system attributes included in system services will be modified."]
    #[doc = " @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS is used with this function, only the system attributes included in user services will be modified."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTS_HVX_SYS_ATTRS_MISSING_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_SYS_ATTRS_UNK_PEER_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_SYS_ATTRS_BONDED_PEER_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in]  conn_handle        Connection handle."]
    #[doc = " @param[in]  p_sys_attr_data    Pointer to a saved copy of system attributes supplied to the stack, or NULL."]
    #[doc = " @param[in]  len                Size of data pointed by p_sys_attr_data, in octets."]
    #[doc = " @param[in]  flags              Optional additional flags, see @ref BLE_GATTS_SYS_ATTR_FLAGS"]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully set the system attribute information."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid flags supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_DATA Invalid data supplied, the data should be exactly the same as retrieved with @ref sd_ble_gatts_sys_attr_get."]
    #[doc = " @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_sys_attr_set(
        conn_handle: u16,
        p_sys_attr_data: *const u8,
        len: u16,
        flags: u32,
    ) -> u32 {
    let ret: u32;
    asm!("svc 177",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_sys_attr_data) => _,
        inout("r2") to_asm(len) => _,
        inout("r3") to_asm(flags) => _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Retrieve persistent system attribute information from the stack."]
    #[doc = ""]
    #[doc = " @details This call is used to retrieve information about values to be stored persistently by the application"]
    #[doc = "          during the lifetime of a connection or after it has been terminated. When a new connection is established with the same bonded device,"]
    #[doc = "          the system attribute information retrieved with this function should be restored using using @ref sd_ble_gatts_sys_attr_set."]
    #[doc = "          If retrieved after disconnection, the data should be read before a new connection established. The connection handle for"]
    #[doc = "          the previous, now disconnected, connection will remain valid until a new one is created to allow this API call to refer to it."]
    #[doc = "          Connection handles belonging to active connections can be used as well, but care should be taken since the system attributes"]
    #[doc = "          may be written to at any time by the peer during a connection's lifetime."]
    #[doc = ""]
    #[doc = " @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS is used with this function, only the system attributes included in system services will be returned."]
    #[doc = " @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS is used with this function, only the system attributes included in user services will be returned."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTS_SYS_ATTRS_BONDED_PEER_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in]     conn_handle       Connection handle of the recently terminated connection."]
    #[doc = " @param[out]    p_sys_attr_data   Pointer to a buffer where updated information about system attributes will be filled in. The format of the data is described"]
    #[doc = "                                  in @ref BLE_GATTS_SYS_ATTRS_FORMAT. NULL can be provided to obtain the length of the data."]
    #[doc = " @param[in,out] p_len             Size of application buffer if p_sys_attr_data is not NULL. Unconditionally updated to actual length of system attribute data."]
    #[doc = " @param[in]     flags             Optional additional flags, see @ref BLE_GATTS_SYS_ATTR_FLAGS"]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully retrieved the system attribute information."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid flags supplied."]
    #[doc = " @retval ::NRF_ERROR_DATA_SIZE The system attribute information did not fit into the provided buffer."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND No system attributes found."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_sys_attr_get(
        conn_handle: u16,
        p_sys_attr_data: *mut u8,
        p_len: *mut u16,
        flags: u32,
    ) -> u32 {
    let ret: u32;
    asm!("svc 178",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_sys_attr_data) => _,
        inout("r2") to_asm(p_len) => _,
        inout("r3") to_asm(flags) => _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Retrieve the first valid user attribute handle."]
    #[doc = ""]
    #[doc = " @param[out] p_handle   Pointer to an integer where the handle will be stored."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully retrieved the handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_initial_user_handle_get(p_handle: *mut u16) -> u32 {
    let ret: u32;
    asm!("svc 179",
        inout("r0") to_asm(p_handle) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Retrieve the attribute UUID and/or metadata."]
    #[doc = ""]
    #[doc = " @param[in]  handle Attribute handle"]
    #[doc = " @param[out] p_uuid UUID of the attribute. Use NULL to omit this field."]
    #[doc = " @param[out] p_md Metadata of the attribute. Use NULL to omit this field."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully retrieved the attribute metadata,"]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied. Returned when both @c p_uuid and @c p_md are NULL."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND Attribute was not found."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_attr_get(
        handle: u16,
        p_uuid: *mut ble_uuid_t,
        p_md: *mut ble_gatts_attr_md_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 180",
        inout("r0") to_asm(handle) => ret,
        inout("r1") to_asm(p_uuid) => _,
        inout("r2") to_asm(p_md) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Reply to an ATT_MTU exchange request by sending an Exchange MTU Response to the client."]
    #[doc = ""]
    #[doc = " @details This function is only used to reply to a @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST event."]
    #[doc = ""]
    #[doc = " @details The SoftDevice sets ATT_MTU to the minimum of:"]
    #[doc = "          - The Client RX MTU value from @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST, and"]
    #[doc = "          - The Server RX MTU value."]
    #[doc = ""]
    #[doc = "          However, the SoftDevice never sets ATT_MTU lower than @ref BLE_GATT_ATT_MTU_DEFAULT."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTS_MTU_EXCHANGE}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @param[in] conn_handle    The connection handle identifying the connection to perform this procedure on."]
    #[doc = " @param[in] server_rx_mtu  Server RX MTU size."]
    #[doc = "                           - The minimum value is @ref BLE_GATT_ATT_MTU_DEFAULT."]
    #[doc = "                           - The maximum value is @ref ble_gatt_conn_cfg_t::att_mtu in the connection configuration"]
    #[doc = "                             used for this connection."]
    #[doc = "                           - The value must be equal to Client RX MTU size given in @ref sd_ble_gattc_exchange_mtu_request"]
    #[doc = "                             if an ATT_MTU exchange has already been performed in the other direction."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully sent response to the client."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no ATT_MTU exchange request pending."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid Server RX MTU size supplied."]
    #[doc = " @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection."]
    
#[inline(always)]
pub unsafe fn sd_ble_gatts_exchange_mtu_reply(conn_handle: u16, server_rx_mtu: u16) -> u32 {
    let ret: u32;
    asm!("svc 181",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(server_rx_mtu) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}

#[doc = "< Enable and initialize the BLE stack"]
pub const BLE_COMMON_SVCS_SD_BLE_ENABLE: BLE_COMMON_SVCS = 96;
#[doc = "< Get an event from the pending events queue."]
pub const BLE_COMMON_SVCS_SD_BLE_EVT_GET: BLE_COMMON_SVCS = 97;
#[doc = "< Add a Vendor Specific base UUID."]
pub const BLE_COMMON_SVCS_SD_BLE_UUID_VS_ADD: BLE_COMMON_SVCS = 98;
#[doc = "< Decode UUID bytes."]
pub const BLE_COMMON_SVCS_SD_BLE_UUID_DECODE: BLE_COMMON_SVCS = 99;
#[doc = "< Encode UUID bytes."]
pub const BLE_COMMON_SVCS_SD_BLE_UUID_ENCODE: BLE_COMMON_SVCS = 100;
#[doc = "< Get the local version information (company ID, Link Layer Version, Link Layer Subversion)."]
pub const BLE_COMMON_SVCS_SD_BLE_VERSION_GET: BLE_COMMON_SVCS = 101;
#[doc = "< User Memory Reply."]
pub const BLE_COMMON_SVCS_SD_BLE_USER_MEM_REPLY: BLE_COMMON_SVCS = 102;
#[doc = "< Set a BLE option."]
pub const BLE_COMMON_SVCS_SD_BLE_OPT_SET: BLE_COMMON_SVCS = 103;
#[doc = "< Get a BLE option."]
pub const BLE_COMMON_SVCS_SD_BLE_OPT_GET: BLE_COMMON_SVCS = 104;
#[doc = "< Add a configuration to the BLE stack."]
pub const BLE_COMMON_SVCS_SD_BLE_CFG_SET: BLE_COMMON_SVCS = 105;
#[doc = "< Remove a Vendor Specific base UUID."]
pub const BLE_COMMON_SVCS_SD_BLE_UUID_VS_REMOVE: BLE_COMMON_SVCS = 106;
#[doc = " @brief Common API SVC numbers."]
pub type BLE_COMMON_SVCS = u32;
#[doc = "< User Memory request. @ref ble_evt_user_mem_request_t"]
pub const BLE_COMMON_EVTS_BLE_EVT_USER_MEM_REQUEST: BLE_COMMON_EVTS = 1;
#[doc = "< User Memory release. @ref ble_evt_user_mem_release_t"]
pub const BLE_COMMON_EVTS_BLE_EVT_USER_MEM_RELEASE: BLE_COMMON_EVTS = 2;
#[doc = " @brief BLE Module Independent Event IDs."]
pub type BLE_COMMON_EVTS = u32;
#[doc = "< BLE GAP specific connection configuration."]
pub const BLE_CONN_CFGS_BLE_CONN_CFG_GAP: BLE_CONN_CFGS = 32;
#[doc = "< BLE GATTC specific connection configuration."]
pub const BLE_CONN_CFGS_BLE_CONN_CFG_GATTC: BLE_CONN_CFGS = 33;
#[doc = "< BLE GATTS specific connection configuration."]
pub const BLE_CONN_CFGS_BLE_CONN_CFG_GATTS: BLE_CONN_CFGS = 34;
#[doc = "< BLE GATT specific connection configuration."]
pub const BLE_CONN_CFGS_BLE_CONN_CFG_GATT: BLE_CONN_CFGS = 35;
#[doc = "< BLE L2CAP specific connection configuration."]
pub const BLE_CONN_CFGS_BLE_CONN_CFG_L2CAP: BLE_CONN_CFGS = 36;
#[doc = "@brief BLE Connection Configuration IDs."]
#[doc = ""]
#[doc = " IDs that uniquely identify a connection configuration."]
pub type BLE_CONN_CFGS = u32;
#[doc = "< Vendor specific base UUID configuration"]
pub const BLE_COMMON_CFGS_BLE_COMMON_CFG_VS_UUID: BLE_COMMON_CFGS = 1;
#[doc = "@brief BLE Common Configuration IDs."]
#[doc = ""]
#[doc = " IDs that uniquely identify a common configuration."]
pub type BLE_COMMON_CFGS = u32;
#[doc = "< PA and LNA options"]
pub const BLE_COMMON_OPTS_BLE_COMMON_OPT_PA_LNA: BLE_COMMON_OPTS = 1;
#[doc = "< Extended connection events option"]
pub const BLE_COMMON_OPTS_BLE_COMMON_OPT_CONN_EVT_EXT: BLE_COMMON_OPTS = 2;
#[doc = "< Extended RC calibration option"]
pub const BLE_COMMON_OPTS_BLE_COMMON_OPT_EXTENDED_RC_CAL: BLE_COMMON_OPTS = 3;
#[doc = "@brief Common Option IDs."]
#[doc = " IDs that uniquely identify a common option."]
pub type BLE_COMMON_OPTS = u32;
#[doc = "@brief User Memory Block."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_user_mem_block_t {
    #[doc = "< Pointer to the start of the user memory block."]
    pub p_mem: *mut u8,
    #[doc = "< Length in bytes of the user memory block."]
    pub len: u16,
}
#[test]
fn bindgen_test_layout_ble_user_mem_block_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_user_mem_block_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_user_mem_block_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_user_mem_block_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_user_mem_block_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_user_mem_block_t>())).p_mem as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_user_mem_block_t),
            "::",
            stringify!(p_mem)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_user_mem_block_t>())).len as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_user_mem_block_t),
            "::",
            stringify!(len)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_EVT_USER_MEM_REQUEST."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_evt_user_mem_request_t {
    #[doc = "< User memory type, see @ref BLE_USER_MEM_TYPES."]
    pub type_: u8,
}
#[test]
fn bindgen_test_layout_ble_evt_user_mem_request_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_evt_user_mem_request_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_evt_user_mem_request_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_evt_user_mem_request_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_evt_user_mem_request_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_evt_user_mem_request_t>())).type_ as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_evt_user_mem_request_t),
            "::",
            stringify!(type_)
        )
    );
}
#[doc = "@brief Event structure for @ref BLE_EVT_USER_MEM_RELEASE."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_evt_user_mem_release_t {
    #[doc = "< User memory type, see @ref BLE_USER_MEM_TYPES."]
    pub type_: u8,
    #[doc = "< User memory block"]
    pub mem_block: ble_user_mem_block_t,
}
#[test]
fn bindgen_test_layout_ble_evt_user_mem_release_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_evt_user_mem_release_t>(),
        12usize,
        concat!("Size of: ", stringify!(ble_evt_user_mem_release_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_evt_user_mem_release_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_evt_user_mem_release_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_evt_user_mem_release_t>())).type_ as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_evt_user_mem_release_t),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_evt_user_mem_release_t>())).mem_block as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_evt_user_mem_release_t),
            "::",
            stringify!(mem_block)
        )
    );
}
#[doc = "@brief Event structure for events not associated with a specific function module."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_common_evt_t {
    #[doc = "< Connection Handle on which this event occurred."]
    pub conn_handle: u16,
    #[doc = "< Event parameter union."]
    pub params: ble_common_evt_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_common_evt_t__bindgen_ty_1 {
    #[doc = "< User Memory Request Event Parameters."]
    pub user_mem_request: ble_evt_user_mem_request_t,
    #[doc = "< User Memory Release Event Parameters."]
    pub user_mem_release: ble_evt_user_mem_release_t,
    _bindgen_union_align: [u32; 3usize],
}
#[test]
fn bindgen_test_layout_ble_common_evt_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<ble_common_evt_t__bindgen_ty_1>(),
        12usize,
        concat!("Size of: ", stringify!(ble_common_evt_t__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_common_evt_t__bindgen_ty_1>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_common_evt_t__bindgen_ty_1))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_common_evt_t__bindgen_ty_1>())).user_mem_request as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_evt_t__bindgen_ty_1),
            "::",
            stringify!(user_mem_request)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_common_evt_t__bindgen_ty_1>())).user_mem_release as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_evt_t__bindgen_ty_1),
            "::",
            stringify!(user_mem_release)
        )
    );
}
#[test]
fn bindgen_test_layout_ble_common_evt_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_common_evt_t>(),
        16usize,
        concat!("Size of: ", stringify!(ble_common_evt_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_common_evt_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_common_evt_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_common_evt_t>())).conn_handle as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_evt_t),
            "::",
            stringify!(conn_handle)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_common_evt_t>())).params as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_evt_t),
            "::",
            stringify!(params)
        )
    );
}
#[doc = "@brief BLE Event header."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_evt_hdr_t {
    #[doc = "< Value from a BLE_<module>_EVT series."]
    pub evt_id: u16,
    #[doc = "< Length in octets including this header."]
    pub evt_len: u16,
}
#[test]
fn bindgen_test_layout_ble_evt_hdr_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_evt_hdr_t>(),
        4usize,
        concat!("Size of: ", stringify!(ble_evt_hdr_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_evt_hdr_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_evt_hdr_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_evt_hdr_t>())).evt_id as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_evt_hdr_t),
            "::",
            stringify!(evt_id)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_evt_hdr_t>())).evt_len as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_evt_hdr_t),
            "::",
            stringify!(evt_len)
        )
    );
}
#[doc = "@brief Common BLE Event type, wrapping the module specific event reports."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_evt_t {
    #[doc = "< Event header."]
    pub header: ble_evt_hdr_t,
    #[doc = "< Event union."]
    pub evt: ble_evt_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_evt_t__bindgen_ty_1 {
    #[doc = "< Common Event, evt_id in BLE_EVT_* series."]
    pub common_evt: ble_common_evt_t,
    #[doc = "< GAP originated event, evt_id in BLE_GAP_EVT_* series."]
    pub gap_evt: ble_gap_evt_t,
    #[doc = "< GATT client originated event, evt_id in BLE_GATTC_EVT* series."]
    pub gattc_evt: ble_gattc_evt_t,
    #[doc = "< GATT server originated event, evt_id in BLE_GATTS_EVT* series."]
    pub gatts_evt: ble_gatts_evt_t,
    #[doc = "< L2CAP originated event, evt_id in BLE_L2CAP_EVT* series."]
    pub l2cap_evt: ble_l2cap_evt_t,
    _bindgen_union_align: [u32; 10usize],
}
#[test]
fn bindgen_test_layout_ble_evt_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<ble_evt_t__bindgen_ty_1>(),
        40usize,
        concat!("Size of: ", stringify!(ble_evt_t__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_evt_t__bindgen_ty_1>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_evt_t__bindgen_ty_1))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_evt_t__bindgen_ty_1>())).common_evt as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_evt_t__bindgen_ty_1),
            "::",
            stringify!(common_evt)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_evt_t__bindgen_ty_1>())).gap_evt as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_evt_t__bindgen_ty_1),
            "::",
            stringify!(gap_evt)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_evt_t__bindgen_ty_1>())).gattc_evt as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_evt_t__bindgen_ty_1),
            "::",
            stringify!(gattc_evt)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_evt_t__bindgen_ty_1>())).gatts_evt as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_evt_t__bindgen_ty_1),
            "::",
            stringify!(gatts_evt)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_evt_t__bindgen_ty_1>())).l2cap_evt as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_evt_t__bindgen_ty_1),
            "::",
            stringify!(l2cap_evt)
        )
    );
}
#[test]
fn bindgen_test_layout_ble_evt_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_evt_t>(),
        44usize,
        concat!("Size of: ", stringify!(ble_evt_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_evt_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_evt_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_evt_t>())).header as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_evt_t),
            "::",
            stringify!(header)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_evt_t>())).evt as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_evt_t),
            "::",
            stringify!(evt)
        )
    );
}
#[doc = " @brief Version Information."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_version_t {
    #[doc = "< Link Layer Version number. See https://www.bluetooth.org/en-us/specification/assigned-numbers/link-layer for assigned values."]
    pub version_number: u8,
    #[doc = "< Company ID, Nordic Semiconductor's company ID is 89 (0x0059) (https://www.bluetooth.org/apps/content/Default.aspx?doc_id=49708)."]
    pub company_id: u16,
    #[doc = "< Link Layer Sub Version number, corresponds to the SoftDevice Config ID or Firmware ID (FWID)."]
    pub subversion_number: u16,
}
#[test]
fn bindgen_test_layout_ble_version_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_version_t>(),
        6usize,
        concat!("Size of: ", stringify!(ble_version_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_version_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_version_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_version_t>())).version_number as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_version_t),
            "::",
            stringify!(version_number)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_version_t>())).company_id as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_version_t),
            "::",
            stringify!(company_id)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_version_t>())).subversion_number as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_version_t),
            "::",
            stringify!(subversion_number)
        )
    );
}
#[doc = " @brief Configuration parameters for the PA and LNA."]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_pa_lna_cfg_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_pa_lna_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_pa_lna_cfg_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_pa_lna_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_pa_lna_cfg_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_pa_lna_cfg_t))
    );
}
impl ble_pa_lna_cfg_t {
    #[inline]
    pub fn enable(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enable(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn active_high(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_active_high(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn gpio_pin(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u8) }
    }
    #[inline]
    pub fn set_gpio_pin(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(2usize, 6u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        enable: u8,
        active_high: u8,
        gpio_pin: u8,
    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let enable: u8 = unsafe { ::core::mem::transmute(enable) };
            enable as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let active_high: u8 = unsafe { ::core::mem::transmute(active_high) };
            active_high as u64
        });
        __bindgen_bitfield_unit.set(2usize, 6u8, {
            let gpio_pin: u8 = unsafe { ::core::mem::transmute(gpio_pin) };
            gpio_pin as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = " @brief PA & LNA GPIO toggle configuration"]
#[doc = ""]
#[doc = " This option configures the SoftDevice to toggle pins when the radio is active for use with a power amplifier and/or"]
#[doc = " a low noise amplifier."]
#[doc = ""]
#[doc = " Toggling the pins is achieved by using two PPI channels and a GPIOTE channel. The hardware channel IDs are provided"]
#[doc = " by the application and should be regarded as reserved as long as any PA/LNA toggling is enabled."]
#[doc = ""]
#[doc = " @note  @ref sd_ble_opt_get is not supported for this option."]
#[doc = " @note  Setting this option while the radio is in use (i.e. any of the roles are active) may have undefined consequences"]
#[doc = " and must be avoided by the application."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_common_opt_pa_lna_t {
    #[doc = "< Power Amplifier configuration"]
    pub pa_cfg: ble_pa_lna_cfg_t,
    #[doc = "< Low Noise Amplifier configuration"]
    pub lna_cfg: ble_pa_lna_cfg_t,
    #[doc = "< PPI channel used for radio pin setting"]
    pub ppi_ch_id_set: u8,
    #[doc = "< PPI channel used for radio pin clearing"]
    pub ppi_ch_id_clr: u8,
    #[doc = "< GPIOTE channel used for radio pin toggling"]
    pub gpiote_ch_id: u8,
}
#[test]
fn bindgen_test_layout_ble_common_opt_pa_lna_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_common_opt_pa_lna_t>(),
        5usize,
        concat!("Size of: ", stringify!(ble_common_opt_pa_lna_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_common_opt_pa_lna_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_common_opt_pa_lna_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_common_opt_pa_lna_t>())).pa_cfg as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_opt_pa_lna_t),
            "::",
            stringify!(pa_cfg)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_common_opt_pa_lna_t>())).lna_cfg as *const _ as usize
        },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_opt_pa_lna_t),
            "::",
            stringify!(lna_cfg)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_common_opt_pa_lna_t>())).ppi_ch_id_set as *const _ as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_opt_pa_lna_t),
            "::",
            stringify!(ppi_ch_id_set)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_common_opt_pa_lna_t>())).ppi_ch_id_clr as *const _ as usize
        },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_opt_pa_lna_t),
            "::",
            stringify!(ppi_ch_id_clr)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_common_opt_pa_lna_t>())).gpiote_ch_id as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_opt_pa_lna_t),
            "::",
            stringify!(gpiote_ch_id)
        )
    );
}
#[doc = " @brief Configuration of extended BLE connection events."]
#[doc = ""]
#[doc = " When enabled the SoftDevice will dynamically extend the connection event when possible."]
#[doc = ""]
#[doc = " The connection event length is controlled by the connection configuration as set by @ref ble_gap_conn_cfg_t::event_length."]
#[doc = " The connection event can be extended if there is time to send another packet pair before the start of the next connection interval,"]
#[doc = " and if there are no conflicts with other BLE roles requesting radio time."]
#[doc = ""]
#[doc = " @note @ref sd_ble_opt_get is not supported for this option."]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_common_opt_conn_evt_ext_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_common_opt_conn_evt_ext_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_common_opt_conn_evt_ext_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_common_opt_conn_evt_ext_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_common_opt_conn_evt_ext_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_common_opt_conn_evt_ext_t))
    );
}
impl ble_common_opt_conn_evt_ext_t {
    #[inline]
    pub fn enable(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enable(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let enable: u8 = unsafe { ::core::mem::transmute(enable) };
            enable as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = " @brief Enable/disable extended RC calibration."]
#[doc = ""]
#[doc = " If extended RC calibration is enabled and the internal RC oscillator (@ref NRF_CLOCK_LF_SRC_RC) is used as the SoftDevice"]
#[doc = " LFCLK source, the SoftDevice as a peripheral will by default try to increase the receive window if two consecutive packets"]
#[doc = " are not received. If it turns out that the packets were not received due to clock drift, the RC calibration is started."]
#[doc = " This calibration comes in addition to the periodic calibration that is configured by @ref sd_softdevice_enable(). When"]
#[doc = " using only peripheral connections, the periodic calibration can therefore be configured with a much longer interval as the"]
#[doc = " peripheral will be able to detect and adjust automatically to clock drift, and calibrate on demand."]
#[doc = ""]
#[doc = " If extended RC calibration is disabled and the internal RC oscillator is used as the SoftDevice LFCLK source, the"]
#[doc = " RC oscillator is calibrated periodically as configured by @ref sd_softdevice_enable()."]
#[doc = ""]
#[doc = " @note @ref sd_ble_opt_get is not supported for this option."]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ble_common_opt_extended_rc_cal_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
}
#[test]
fn bindgen_test_layout_ble_common_opt_extended_rc_cal_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_common_opt_extended_rc_cal_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_common_opt_extended_rc_cal_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_common_opt_extended_rc_cal_t>(),
        1usize,
        concat!(
            "Alignment of ",
            stringify!(ble_common_opt_extended_rc_cal_t)
        )
    );
}
impl ble_common_opt_extended_rc_cal_t {
    #[inline]
    pub fn enable(&self) -> u8 {
        unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_enable(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::core::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(enable: u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let enable: u8 = unsafe { ::core::mem::transmute(enable) };
            enable as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "@brief Option structure for common options."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_common_opt_t {
    #[doc = "< Parameters for controlling PA and LNA pin toggling."]
    pub pa_lna: ble_common_opt_pa_lna_t,
    #[doc = "< Parameters for enabling extended connection events."]
    pub conn_evt_ext: ble_common_opt_conn_evt_ext_t,
    #[doc = "< Parameters for enabling extended RC calibration."]
    pub extended_rc_cal: ble_common_opt_extended_rc_cal_t,
    _bindgen_union_align: [u8; 5usize],
}
#[test]
fn bindgen_test_layout_ble_common_opt_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_common_opt_t>(),
        5usize,
        concat!("Size of: ", stringify!(ble_common_opt_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_common_opt_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_common_opt_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_common_opt_t>())).pa_lna as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_opt_t),
            "::",
            stringify!(pa_lna)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_common_opt_t>())).conn_evt_ext as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_opt_t),
            "::",
            stringify!(conn_evt_ext)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_common_opt_t>())).extended_rc_cal as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_opt_t),
            "::",
            stringify!(extended_rc_cal)
        )
    );
}
#[doc = "@brief Common BLE Option type, wrapping the module specific options."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_opt_t {
    #[doc = "< COMMON options, opt_id in @ref BLE_COMMON_OPTS series."]
    pub common_opt: ble_common_opt_t,
    #[doc = "< GAP option, opt_id in @ref BLE_GAP_OPTS series."]
    pub gap_opt: ble_gap_opt_t,
    _bindgen_union_align: [u32; 2usize],
}
#[test]
fn bindgen_test_layout_ble_opt_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_opt_t>(),
        8usize,
        concat!("Size of: ", stringify!(ble_opt_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_opt_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_opt_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_opt_t>())).common_opt as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_opt_t),
            "::",
            stringify!(common_opt)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_opt_t>())).gap_opt as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_opt_t),
            "::",
            stringify!(gap_opt)
        )
    );
}
#[doc = "@brief BLE connection configuration type, wrapping the module specific configurations, set with"]
#[doc = " @ref sd_ble_cfg_set."]
#[doc = ""]
#[doc = " @note Connection configurations don't have to be set."]
#[doc = " In the case that no configurations has been set, or fewer connection configurations has been set than enabled connections,"]
#[doc = " the default connection configuration will be automatically added for the remaining connections."]
#[doc = " When creating connections with the default configuration, @ref BLE_CONN_CFG_TAG_DEFAULT should be used in"]
#[doc = " place of @ref ble_conn_cfg_t::conn_cfg_tag."]
#[doc = ""]
#[doc = " @sa sd_ble_gap_adv_start()"]
#[doc = ""]
#[doc = " @mscs"]
#[doc = " @mmsc{@ref BLE_CONN_CFG}"]
#[doc = " @endmscs"]
#[doc = ""]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ble_conn_cfg_t {
    #[doc = "< The application chosen tag it can use with the"]
    #[doc = "@ref sd_ble_gap_adv_start() call"]
    #[doc = "to select this configuration when creating a connection."]
    #[doc = "Must be different for all connection configurations added and not @ref BLE_CONN_CFG_TAG_DEFAULT."]
    pub conn_cfg_tag: u8,
    #[doc = "< Connection configuration union."]
    pub params: ble_conn_cfg_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_conn_cfg_t__bindgen_ty_1 {
    #[doc = "< GAP connection configuration, cfg_id is @ref BLE_CONN_CFG_GAP."]
    pub gap_conn_cfg: ble_gap_conn_cfg_t,
    #[doc = "< GATTC connection configuration, cfg_id is @ref BLE_CONN_CFG_GATTC."]
    pub gattc_conn_cfg: ble_gattc_conn_cfg_t,
    #[doc = "< GATTS connection configuration, cfg_id is @ref BLE_CONN_CFG_GATTS."]
    pub gatts_conn_cfg: ble_gatts_conn_cfg_t,
    #[doc = "< GATT connection configuration, cfg_id is @ref BLE_CONN_CFG_GATT."]
    pub gatt_conn_cfg: ble_gatt_conn_cfg_t,
    #[doc = "< L2CAP connection configuration, cfg_id is @ref BLE_CONN_CFG_L2CAP."]
    pub l2cap_conn_cfg: ble_l2cap_conn_cfg_t,
    _bindgen_union_align: [u16; 4usize],
}
#[test]
fn bindgen_test_layout_ble_conn_cfg_t__bindgen_ty_1() {
    assert_eq!(
        ::core::mem::size_of::<ble_conn_cfg_t__bindgen_ty_1>(),
        8usize,
        concat!("Size of: ", stringify!(ble_conn_cfg_t__bindgen_ty_1))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_conn_cfg_t__bindgen_ty_1>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_conn_cfg_t__bindgen_ty_1))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_conn_cfg_t__bindgen_ty_1>())).gap_conn_cfg as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_conn_cfg_t__bindgen_ty_1),
            "::",
            stringify!(gap_conn_cfg)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_conn_cfg_t__bindgen_ty_1>())).gattc_conn_cfg as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_conn_cfg_t__bindgen_ty_1),
            "::",
            stringify!(gattc_conn_cfg)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_conn_cfg_t__bindgen_ty_1>())).gatts_conn_cfg as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_conn_cfg_t__bindgen_ty_1),
            "::",
            stringify!(gatts_conn_cfg)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_conn_cfg_t__bindgen_ty_1>())).gatt_conn_cfg as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_conn_cfg_t__bindgen_ty_1),
            "::",
            stringify!(gatt_conn_cfg)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_conn_cfg_t__bindgen_ty_1>())).l2cap_conn_cfg as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_conn_cfg_t__bindgen_ty_1),
            "::",
            stringify!(l2cap_conn_cfg)
        )
    );
}
#[test]
fn bindgen_test_layout_ble_conn_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_conn_cfg_t>(),
        10usize,
        concat!("Size of: ", stringify!(ble_conn_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_conn_cfg_t>(),
        2usize,
        concat!("Alignment of ", stringify!(ble_conn_cfg_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_conn_cfg_t>())).conn_cfg_tag as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_conn_cfg_t),
            "::",
            stringify!(conn_cfg_tag)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_conn_cfg_t>())).params as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_conn_cfg_t),
            "::",
            stringify!(params)
        )
    );
}
#[doc = " @brief Configuration of Vendor Specific base UUIDs, set with @ref sd_ble_cfg_set."]
#[doc = ""]
#[doc = " @retval ::NRF_ERROR_INVALID_PARAM Too many UUIDs configured."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ble_common_cfg_vs_uuid_t {
    #[doc = "< Number of 128-bit Vendor Specific base UUID bases to allocate memory for."]
    #[doc = "Default value is @ref BLE_UUID_VS_COUNT_DEFAULT. Maximum value is"]
    #[doc = "@ref BLE_UUID_VS_COUNT_MAX."]
    pub vs_uuid_count: u8,
}
#[test]
fn bindgen_test_layout_ble_common_cfg_vs_uuid_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_common_cfg_vs_uuid_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_common_cfg_vs_uuid_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_common_cfg_vs_uuid_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_common_cfg_vs_uuid_t))
    );
    assert_eq!(
        unsafe {
            &(*(::core::ptr::null::<ble_common_cfg_vs_uuid_t>())).vs_uuid_count as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_cfg_vs_uuid_t),
            "::",
            stringify!(vs_uuid_count)
        )
    );
}
#[doc = "@brief Common BLE Configuration type, wrapping the common configurations."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_common_cfg_t {
    #[doc = "< Vendor Specific base UUID configuration, cfg_id is @ref BLE_COMMON_CFG_VS_UUID."]
    pub vs_uuid_cfg: ble_common_cfg_vs_uuid_t,
    _bindgen_union_align: u8,
}
#[test]
fn bindgen_test_layout_ble_common_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_common_cfg_t>(),
        1usize,
        concat!("Size of: ", stringify!(ble_common_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_common_cfg_t>(),
        1usize,
        concat!("Alignment of ", stringify!(ble_common_cfg_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_common_cfg_t>())).vs_uuid_cfg as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_common_cfg_t),
            "::",
            stringify!(vs_uuid_cfg)
        )
    );
}
#[doc = "@brief BLE Configuration type, wrapping the module specific configurations."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ble_cfg_t {
    #[doc = "< Connection specific configurations, cfg_id in @ref BLE_CONN_CFGS series."]
    pub conn_cfg: ble_conn_cfg_t,
    #[doc = "< Global common configurations, cfg_id in @ref BLE_COMMON_CFGS series."]
    pub common_cfg: ble_common_cfg_t,
    #[doc = "< Global GAP configurations, cfg_id in @ref BLE_GAP_CFGS series."]
    pub gap_cfg: ble_gap_cfg_t,
    #[doc = "< Global GATTS configuration, cfg_id in @ref BLE_GATTS_CFGS series."]
    pub gatts_cfg: ble_gatts_cfg_t,
    _bindgen_union_align: [u32; 3usize],
}
#[test]
fn bindgen_test_layout_ble_cfg_t() {
    assert_eq!(
        ::core::mem::size_of::<ble_cfg_t>(),
        12usize,
        concat!("Size of: ", stringify!(ble_cfg_t))
    );
    assert_eq!(
        ::core::mem::align_of::<ble_cfg_t>(),
        4usize,
        concat!("Alignment of ", stringify!(ble_cfg_t))
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_cfg_t>())).conn_cfg as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_cfg_t),
            "::",
            stringify!(conn_cfg)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_cfg_t>())).common_cfg as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_cfg_t),
            "::",
            stringify!(common_cfg)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_cfg_t>())).gap_cfg as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_cfg_t),
            "::",
            stringify!(gap_cfg)
        )
    );
    assert_eq!(
        unsafe { &(*(::core::ptr::null::<ble_cfg_t>())).gatts_cfg as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ble_cfg_t),
            "::",
            stringify!(gatts_cfg)
        )
    );
}

    #[doc = "@brief Enable the BLE stack"]
    #[doc = ""]
    #[doc = " @param[in, out] p_app_ram_base   Pointer to a variable containing the start address of the"]
    #[doc = "                                  application RAM region (APP_RAM_BASE). On return, this will"]
    #[doc = "                                  contain the minimum start address of the application RAM region"]
    #[doc = "                                  required by the SoftDevice for this configuration."]
    #[doc = ""]
    #[doc = " @note The memory requirement for a specific configuration will not increase between SoftDevices"]
    #[doc = "       with the same major version number."]
    #[doc = ""]
    #[doc = " @note At runtime the IC's RAM is split into 2 regions: The SoftDevice RAM region is located"]
    #[doc = "       between 0x20000000 and APP_RAM_BASE-1 and the application's RAM region is located between"]
    #[doc = "       APP_RAM_BASE and the start of the call stack."]
    #[doc = ""]
    #[doc = " @details This call initializes the BLE stack, no BLE related function other than @ref"]
    #[doc = "          sd_ble_cfg_set can be called before this one."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_COMMON_ENABLE}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS              The BLE stack has been initialized successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE  The BLE stack had already been initialized and cannot be reinitialized."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR   Invalid or not sufficiently aligned pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_NO_MEM         One or more of the following is true:"]
    #[doc = "                                    - The amount of memory assigned to the SoftDevice by *p_app_ram_base is not"]
    #[doc = "                                      large enough to fit this configuration's memory requirement. Check *p_app_ram_base"]
    #[doc = "                                      and set the start address of the application RAM region accordingly."]
    #[doc = "                                    - Dynamic part of the SoftDevice RAM region is larger then 64 kB which"]
    #[doc = "                                      is currently not supported."]
    #[doc = " @retval ::NRF_ERROR_RESOURCES      The total number of L2CAP Channels configured using @ref sd_ble_cfg_set is too large."]
    
#[inline(always)]
pub unsafe fn sd_ble_enable(p_app_ram_base: *mut u32) -> u32 {
    let ret: u32;
    asm!("svc 96",
        inout("r0") to_asm(p_app_ram_base) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Add configurations for the BLE stack"]
    #[doc = ""]
    #[doc = " @param[in] cfg_id              Config ID, see @ref BLE_CONN_CFGS, @ref BLE_COMMON_CFGS, @ref"]
    #[doc = "                                BLE_GAP_CFGS or @ref BLE_GATTS_CFGS."]
    #[doc = " @param[in] p_cfg               Pointer to a ble_cfg_t structure containing the configuration value."]
    #[doc = " @param[in] app_ram_base        The start address of the application RAM region (APP_RAM_BASE)."]
    #[doc = "                                See @ref sd_ble_enable for details about APP_RAM_BASE."]
    #[doc = ""]
    #[doc = " @note The memory requirement for a specific configuration will not increase between SoftDevices"]
    #[doc = "       with the same major version number."]
    #[doc = ""]
    #[doc = " @note If a configuration is set more than once, the last one set is the one that takes effect on"]
    #[doc = "       @ref sd_ble_enable."]
    #[doc = ""]
    #[doc = " @note Any part of the BLE stack that is NOT configured with @ref sd_ble_cfg_set will have default"]
    #[doc = "       configuration."]
    #[doc = ""]
    #[doc = " @note @ref sd_ble_cfg_set may be called at any time when the SoftDevice is enabled (see @ref"]
    #[doc = "       sd_softdevice_enable) while the BLE part of the SoftDevice is not enabled (see @ref"]
    #[doc = "       sd_ble_enable)."]
    #[doc = ""]
    #[doc = " @note Error codes for the configurations are described in the configuration structs."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_COMMON_ENABLE}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS              The configuration has been added successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE  The BLE stack had already been initialized."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR   Invalid or not sufficiently aligned pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM  Invalid cfg_id supplied."]
    #[doc = " @retval ::NRF_ERROR_NO_MEM         The amount of memory assigned to the SoftDevice by app_ram_base is not"]
    #[doc = "                                    large enough to fit this configuration's memory requirement."]
    
#[inline(always)]
pub unsafe fn sd_ble_cfg_set(cfg_id: u32, p_cfg: *const ble_cfg_t, app_ram_base: u32) -> u32 {
    let ret: u32;
    asm!("svc 105",
        inout("r0") to_asm(cfg_id) => ret,
        inout("r1") to_asm(p_cfg) => _,
        inout("r2") to_asm(app_ram_base) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get an event from the pending events queue."]
    #[doc = ""]
    #[doc = " @param[out] p_dest Pointer to buffer to be filled in with an event, or NULL to retrieve the event length."]
    #[doc = "                    This buffer <b>must be aligned to the extend defined by @ref BLE_EVT_PTR_ALIGNMENT</b>."]
    #[doc = "                    The buffer should be interpreted as a @ref ble_evt_t struct."]
    #[doc = " @param[in, out] p_len Pointer the length of the buffer, on return it is filled with the event length."]
    #[doc = ""]
    #[doc = " @details This call allows the application to pull a BLE event from the BLE stack. The application is signaled that"]
    #[doc = " an event is available from the BLE stack by the triggering of the SD_EVT_IRQn interrupt."]
    #[doc = " The application is free to choose whether to call this function from thread mode (main context) or directly from the"]
    #[doc = " Interrupt Service Routine that maps to SD_EVT_IRQn. In any case however, and because the BLE stack runs at a higher"]
    #[doc = " priority than the application, this function should be called in a loop (until @ref NRF_ERROR_NOT_FOUND is returned)"]
    #[doc = " every time SD_EVT_IRQn is raised to ensure that all available events are pulled from the BLE stack. Failure to do so"]
    #[doc = " could potentially leave events in the internal queue without the application being aware of this fact."]
    #[doc = ""]
    #[doc = " Sizing the p_dest buffer is equally important, since the application needs to provide all the memory necessary for the event to"]
    #[doc = " be copied into application memory. If the buffer provided is not large enough to fit the entire contents of the event,"]
    #[doc = " @ref NRF_ERROR_DATA_SIZE will be returned and the application can then call again with a larger buffer size."]
    #[doc = " The maximum possible event length is defined by @ref BLE_EVT_LEN_MAX. The application may also \"peek\" the event length"]
    #[doc = " by providing p_dest as a NULL pointer and inspecting the value of *p_len upon return:"]
    #[doc = ""]
    #[doc = "     \\code"]
    #[doc = "     uint16_t len;"]
    #[doc = "     errcode = sd_ble_evt_get(NULL, &len);"]
    #[doc = "     \\endcode"]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_COMMON_IRQ_EVT_MSC}"]
    #[doc = " @mmsc{@ref BLE_COMMON_THREAD_EVT_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Event pulled and stored into the supplied buffer."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND No events ready to be pulled."]
    #[doc = " @retval ::NRF_ERROR_DATA_SIZE Event ready but could not fit into the supplied buffer."]
    
#[inline(always)]
pub unsafe fn sd_ble_evt_get(p_dest: *mut u8, p_len: *mut u16) -> u32 {
    let ret: u32;
    asm!("svc 97",
        inout("r0") to_asm(p_dest) => ret,
        inout("r1") to_asm(p_len) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Add a Vendor Specific base UUID."]
    #[doc = ""]
    #[doc = " @details This call enables the application to add a Vendor Specific base UUID to the BLE stack's table, for later"]
    #[doc = " use with all other modules and APIs. This then allows the application to use the shorter, 24-bit @ref ble_uuid_t"]
    #[doc = " format when dealing with both 16-bit and 128-bit UUIDs without having to check for lengths and having split code"]
    #[doc = " paths. This is accomplished by extending the grouping mechanism that the Bluetooth SIG standard base UUID uses"]
    #[doc = " for all other 128-bit UUIDs. The type field in the @ref ble_uuid_t structure is an index (relative to"]
    #[doc = " @ref BLE_UUID_TYPE_VENDOR_BEGIN) to the table populated by multiple calls to this function, and the UUID field"]
    #[doc = " in the same structure contains the 2 bytes at indexes 12 and 13. The number of possible 128-bit UUIDs available to"]
    #[doc = " the application is therefore the number of Vendor Specific UUIDs added with the help of this function times 65536,"]
    #[doc = " although restricted to modifying bytes 12 and 13 for each of the entries in the supplied array."]
    #[doc = ""]
    #[doc = " @note Bytes 12 and 13 of the provided UUID will not be used internally, since those are always replaced by"]
    #[doc = " the 16-bit uuid field in @ref ble_uuid_t."]
    #[doc = ""]
    #[doc = " @note If a UUID is already present in the BLE stack's internal table, the corresponding index will be returned in"]
    #[doc = " p_uuid_type along with an @ref NRF_SUCCESS error code."]
    #[doc = ""]
    #[doc = " @param[in]  p_vs_uuid    Pointer to a 16-octet (128-bit) little endian Vendor Specific base UUID disregarding"]
    #[doc = "                          bytes 12 and 13."]
    #[doc = " @param[out] p_uuid_type  Pointer to a uint8_t where the type field in @ref ble_uuid_t corresponding to this UUID will be stored."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully added the Vendor Specific base UUID."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR If p_vs_uuid or p_uuid_type is NULL or invalid."]
    #[doc = " @retval ::NRF_ERROR_NO_MEM If there are no more free slots for VS UUIDs."]
    
#[inline(always)]
pub unsafe fn sd_ble_uuid_vs_add(p_vs_uuid: *const ble_uuid128_t, p_uuid_type: *mut u8) -> u32 {
    let ret: u32;
    asm!("svc 98",
        inout("r0") to_asm(p_vs_uuid) => ret,
        inout("r1") to_asm(p_uuid_type) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Remove a Vendor Specific base UUID."]
    #[doc = ""]
    #[doc = " @details This call removes a Vendor Specific base UUID that has been added with @ref sd_ble_uuid_vs_add. This function allows"]
    #[doc = " the application to reuse memory allocated for Vendor Specific base UUIDs."]
    #[doc = ""]
    #[doc = " @note Currently this function can only be called with a p_uuid_type set to @ref BLE_UUID_TYPE_UNKNOWN or the last added UUID type."]
    #[doc = ""]
    #[doc = " @param[inout] p_uuid_type Pointer to a uint8_t where its value matches the UUID type in @ref ble_uuid_t::type to be removed."]
    #[doc = "                           If the type is set to @ref BLE_UUID_TYPE_UNKNOWN, or the pointer is NULL, the last Vendor Specific"]
    #[doc = "                           base UUID will be removed. If the function returns successfully, the UUID type that was removed will"]
    #[doc = "                           be written back to @p p_uuid_type. If function returns with a failure, it contains the last type that"]
    #[doc = "                           is in use by the ATT Server."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully removed the Vendor Specific base UUID."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR If p_uuid_type is invalid."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM If p_uuid_type points to a non-valid UUID type."]
    #[doc = " @retval ::NRF_ERROR_FORBIDDEN If the Vendor Specific base UUID is in use by the ATT Server."]
    
#[inline(always)]
pub unsafe fn sd_ble_uuid_vs_remove(p_uuid_type: *mut u8) -> u32 {
    let ret: u32;
    asm!("svc 106",
        inout("r0") to_asm(p_uuid_type) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = " @brief Decode little endian raw UUID bytes (16-bit or 128-bit) into a 24 bit @ref ble_uuid_t structure."]
    #[doc = ""]
    #[doc = " @details The raw UUID bytes excluding bytes 12 and 13 (i.e. bytes 0-11 and 14-15) of p_uuid_le are compared"]
    #[doc = " to the corresponding ones in each entry of the table of Vendor Specific base UUIDs populated with @ref sd_ble_uuid_vs_add"]
    #[doc = " to look for a match. If there is such a match, bytes 12 and 13 are returned as p_uuid->uuid and the index"]
    #[doc = " relative to @ref BLE_UUID_TYPE_VENDOR_BEGIN as p_uuid->type."]
    #[doc = ""]
    #[doc = " @note If the UUID length supplied is 2, then the type set by this call will always be @ref BLE_UUID_TYPE_BLE."]
    #[doc = ""]
    #[doc = " @param[in]   uuid_le_len Length in bytes of the buffer pointed to by p_uuid_le (must be 2 or 16 bytes)."]
    #[doc = " @param[in]   p_uuid_le   Pointer pointing to little endian raw UUID bytes."]
    #[doc = " @param[out]  p_uuid      Pointer to a @ref ble_uuid_t structure to be filled in."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully decoded into the @ref ble_uuid_t structure."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_LENGTH Invalid UUID length."]
    #[doc = " @retval ::NRF_ERROR_NOT_FOUND For a 128-bit UUID, no match in the populated table of UUIDs."]
    
#[inline(always)]
pub unsafe fn sd_ble_uuid_decode(
        uuid_le_len: u8,
        p_uuid_le: *const u8,
        p_uuid: *mut ble_uuid_t,
    ) -> u32 {
    let ret: u32;
    asm!("svc 99",
        inout("r0") to_asm(uuid_le_len) => ret,
        inout("r1") to_asm(p_uuid_le) => _,
        inout("r2") to_asm(p_uuid) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = " @brief Encode a @ref ble_uuid_t structure into little endian raw UUID bytes (16-bit or 128-bit)."]
    #[doc = ""]
    #[doc = " @note The pointer to the destination buffer p_uuid_le may be NULL, in which case only the validity and size of p_uuid is computed."]
    #[doc = ""]
    #[doc = " @param[in]   p_uuid        Pointer to a @ref ble_uuid_t structure that will be encoded into bytes."]
    #[doc = " @param[out]  p_uuid_le_len Pointer to a uint8_t that will be filled with the encoded length (2 or 16 bytes)."]
    #[doc = " @param[out]  p_uuid_le     Pointer to a buffer where the little endian raw UUID bytes (2 or 16) will be stored."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully encoded into the buffer."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid UUID type."]
    
#[inline(always)]
pub unsafe fn sd_ble_uuid_encode(
        p_uuid: *const ble_uuid_t,
        p_uuid_le_len: *mut u8,
        p_uuid_le: *mut u8,
    ) -> u32 {
    let ret: u32;
    asm!("svc 100",
        inout("r0") to_asm(p_uuid) => ret,
        inout("r1") to_asm(p_uuid_le_len) => _,
        inout("r2") to_asm(p_uuid_le) => _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get Version Information."]
    #[doc = ""]
    #[doc = " @details This call allows the application to get the BLE stack version information."]
    #[doc = ""]
    #[doc = " @param[out] p_version Pointer to a ble_version_t structure to be filled in."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS  Version information stored successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY The BLE stack is busy (typically doing a locally-initiated disconnection procedure)."]
    
#[inline(always)]
pub unsafe fn sd_ble_version_get(p_version: *mut ble_version_t) -> u32 {
    let ret: u32;
    asm!("svc 101",
        inout("r0") to_asm(p_version) => ret,
        lateout("r1") _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Provide a user memory block."]
    #[doc = ""]
    #[doc = " @note This call can only be used as a response to a @ref BLE_EVT_USER_MEM_REQUEST event issued to the application."]
    #[doc = ""]
    #[doc = " @param[in] conn_handle Connection handle."]
    #[doc = " @param[in] p_block Pointer to a user memory block structure or NULL if memory is managed by the application."]
    #[doc = ""]
    #[doc = " @mscs"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_PEER_CANCEL_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_AUTH_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_AUTH_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_NOAUTH_MSC}"]
    #[doc = " @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC}"]
    #[doc = " @endmscs"]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS Successfully queued a response to the peer."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_LENGTH Invalid user memory block length supplied."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Invalid Connection state or no user memory request pending."]
    
#[inline(always)]
pub unsafe fn sd_ble_user_mem_reply(conn_handle: u16, p_block: *const ble_user_mem_block_t) -> u32 {
    let ret: u32;
    asm!("svc 102",
        inout("r0") to_asm(conn_handle) => ret,
        inout("r1") to_asm(p_block) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Set a BLE option."]
    #[doc = ""]
    #[doc = " @details This call allows the application to set the value of an option."]
    #[doc = ""]
    #[doc = " @param[in] opt_id Option ID, see @ref BLE_COMMON_OPTS and @ref BLE_GAP_OPTS."]
    #[doc = " @param[in] p_opt Pointer to a ble_opt_t structure containing the option value."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS  Option set successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Unable to set the parameter at this time."]
    #[doc = " @retval ::NRF_ERROR_BUSY The BLE stack is busy or the previous procedure has not completed."]
    
#[inline(always)]
pub unsafe fn sd_ble_opt_set(opt_id: u32, p_opt: *const ble_opt_t) -> u32 {
    let ret: u32;
    asm!("svc 103",
        inout("r0") to_asm(opt_id) => ret,
        inout("r1") to_asm(p_opt) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}


    #[doc = "@brief Get a BLE option."]
    #[doc = ""]
    #[doc = " @details This call allows the application to retrieve the value of an option."]
    #[doc = ""]
    #[doc = " @param[in] opt_id Option ID, see @ref BLE_COMMON_OPTS and @ref BLE_GAP_OPTS."]
    #[doc = " @param[out] p_opt Pointer to a ble_opt_t structure to be filled in."]
    #[doc = ""]
    #[doc = " @retval ::NRF_SUCCESS  Option retrieved successfully."]
    #[doc = " @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied."]
    #[doc = " @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle."]
    #[doc = " @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints."]
    #[doc = " @retval ::NRF_ERROR_INVALID_STATE Unable to retrieve the parameter at this time."]
    #[doc = " @retval ::NRF_ERROR_BUSY The BLE stack is busy or the previous procedure has not completed."]
    #[doc = " @retval ::NRF_ERROR_NOT_SUPPORTED This option is not supported."]
    #[doc = ""]
    
#[inline(always)]
pub unsafe fn sd_ble_opt_get(opt_id: u32, p_opt: *mut ble_opt_t) -> u32 {
    let ret: u32;
    asm!("svc 104",
        inout("r0") to_asm(opt_id) => ret,
        inout("r1") to_asm(p_opt) => _,
        lateout("r2") _,
        lateout("r3") _,
        lateout("r12") _,
    );
    ret
}