cc2650 0.1.1

Device support for TI CC2650 microcontrollers
Documentation
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
#[doc = r" Value read from the register"]
pub struct R {
    bits: u32,
}
#[doc = r" Value to write to the register"]
pub struct W {
    bits: u32,
}
impl super::IOCFG4 {
    #[doc = r" Modifies the contents of the register"]
    #[inline]
    pub fn modify<F>(&self, f: F)
    where
        for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
    {
        let bits = self.register.get();
        let r = R { bits: bits };
        let mut w = W { bits: bits };
        f(&r, &mut w);
        self.register.set(w.bits);
    }
    #[doc = r" Reads the contents of the register"]
    #[inline]
    pub fn read(&self) -> R {
        R { bits: self.register.get() }
    }
    #[doc = r" Writes to the register"]
    #[inline]
    pub fn write<F>(&self, f: F)
    where
        F: FnOnce(&mut W) -> &mut W,
    {
        let mut w = W::reset_value();
        f(&mut w);
        self.register.set(w.bits);
    }
    #[doc = r" Writes the reset value to the register"]
    #[inline]
    pub fn reset(&self) {
        self.write(|w| w)
    }
}
#[doc = r" Value of the field"]
pub struct RESERVED31R {
    bits: bool,
}
impl RESERVED31R {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[doc = r" Returns `true` if the bit is clear (0)"]
    #[inline]
    pub fn bit_is_clear(&self) -> bool {
        !self.bit()
    }
    #[doc = r" Returns `true` if the bit is set (1)"]
    #[inline]
    pub fn bit_is_set(&self) -> bool {
        self.bit()
    }
}
#[doc = r" Value of the field"]
pub struct HYST_ENR {
    bits: bool,
}
impl HYST_ENR {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[doc = r" Returns `true` if the bit is clear (0)"]
    #[inline]
    pub fn bit_is_clear(&self) -> bool {
        !self.bit()
    }
    #[doc = r" Returns `true` if the bit is set (1)"]
    #[inline]
    pub fn bit_is_set(&self) -> bool {
        self.bit()
    }
}
#[doc = r" Value of the field"]
pub struct IER {
    bits: bool,
}
impl IER {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[doc = r" Returns `true` if the bit is clear (0)"]
    #[inline]
    pub fn bit_is_clear(&self) -> bool {
        !self.bit()
    }
    #[doc = r" Returns `true` if the bit is set (1)"]
    #[inline]
    pub fn bit_is_set(&self) -> bool {
        self.bit()
    }
}
#[doc = r" Value of the field"]
pub struct WU_CFGR {
    bits: u8,
}
impl WU_CFGR {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bits(&self) -> u8 {
        self.bits
    }
}
#[doc = "Possible values of the field `IOMODE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IOMODER {
    #[doc = "Open Source\nInverted input / output\n\n"]
    OPENSRC_INV,
    #[doc = "Open Source\nNormal input / output\n\n"]
    OPENSRC,
    #[doc = "Open Drain\nInverted input / output\n\n"]
    OPENDR_INV,
    #[doc = "Open Drain, \nNormal input / output\n\n"]
    OPENDR,
    #[doc = "Inverted input / ouput\n\n"]
    INV,
    #[doc = "Normal input / output\n\n"]
    NORMAL,
    #[doc = r" Reserved"]
    _Reserved(u8),
}
impl IOMODER {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bits(&self) -> u8 {
        match *self {
            IOMODER::OPENSRC_INV => 7,
            IOMODER::OPENSRC => 6,
            IOMODER::OPENDR_INV => 5,
            IOMODER::OPENDR => 4,
            IOMODER::INV => 1,
            IOMODER::NORMAL => 0,
            IOMODER::_Reserved(bits) => bits,
        }
    }
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _from(value: u8) -> IOMODER {
        match value {
            7 => IOMODER::OPENSRC_INV,
            6 => IOMODER::OPENSRC,
            5 => IOMODER::OPENDR_INV,
            4 => IOMODER::OPENDR,
            1 => IOMODER::INV,
            0 => IOMODER::NORMAL,
            i => IOMODER::_Reserved(i),
        }
    }
    #[doc = "Checks if the value of the field is `OPENSRC_INV`"]
    #[inline]
    pub fn is_opensrc_inv(&self) -> bool {
        *self == IOMODER::OPENSRC_INV
    }
    #[doc = "Checks if the value of the field is `OPENSRC`"]
    #[inline]
    pub fn is_opensrc(&self) -> bool {
        *self == IOMODER::OPENSRC
    }
    #[doc = "Checks if the value of the field is `OPENDR_INV`"]
    #[inline]
    pub fn is_opendr_inv(&self) -> bool {
        *self == IOMODER::OPENDR_INV
    }
    #[doc = "Checks if the value of the field is `OPENDR`"]
    #[inline]
    pub fn is_opendr(&self) -> bool {
        *self == IOMODER::OPENDR
    }
    #[doc = "Checks if the value of the field is `INV`"]
    #[inline]
    pub fn is_inv(&self) -> bool {
        *self == IOMODER::INV
    }
    #[doc = "Checks if the value of the field is `NORMAL`"]
    #[inline]
    pub fn is_normal(&self) -> bool {
        *self == IOMODER::NORMAL
    }
}
#[doc = r" Value of the field"]
pub struct RESERVED19R {
    bits: u8,
}
impl RESERVED19R {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bits(&self) -> u8 {
        self.bits
    }
}
#[doc = r" Value of the field"]
pub struct EDGE_IRQ_ENR {
    bits: bool,
}
impl EDGE_IRQ_ENR {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[doc = r" Returns `true` if the bit is clear (0)"]
    #[inline]
    pub fn bit_is_clear(&self) -> bool {
        !self.bit()
    }
    #[doc = r" Returns `true` if the bit is set (1)"]
    #[inline]
    pub fn bit_is_set(&self) -> bool {
        self.bit()
    }
}
#[doc = "Possible values of the field `EDGE_DET`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EDGE_DETR {
    #[doc = "Positive and negative edge detection"]
    BOTH,
    #[doc = "Positive edge detection"]
    POS,
    #[doc = "Negative edge detection"]
    NEG,
    #[doc = "No edge detection"]
    NONE,
}
impl EDGE_DETR {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bits(&self) -> u8 {
        match *self {
            EDGE_DETR::BOTH => 3,
            EDGE_DETR::POS => 2,
            EDGE_DETR::NEG => 1,
            EDGE_DETR::NONE => 0,
        }
    }
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _from(value: u8) -> EDGE_DETR {
        match value {
            3 => EDGE_DETR::BOTH,
            2 => EDGE_DETR::POS,
            1 => EDGE_DETR::NEG,
            0 => EDGE_DETR::NONE,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `BOTH`"]
    #[inline]
    pub fn is_both(&self) -> bool {
        *self == EDGE_DETR::BOTH
    }
    #[doc = "Checks if the value of the field is `POS`"]
    #[inline]
    pub fn is_pos(&self) -> bool {
        *self == EDGE_DETR::POS
    }
    #[doc = "Checks if the value of the field is `NEG`"]
    #[inline]
    pub fn is_neg(&self) -> bool {
        *self == EDGE_DETR::NEG
    }
    #[doc = "Checks if the value of the field is `NONE`"]
    #[inline]
    pub fn is_none(&self) -> bool {
        *self == EDGE_DETR::NONE
    }
}
#[doc = r" Value of the field"]
pub struct RESERVED15R {
    bits: bool,
}
impl RESERVED15R {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[doc = r" Returns `true` if the bit is clear (0)"]
    #[inline]
    pub fn bit_is_clear(&self) -> bool {
        !self.bit()
    }
    #[doc = r" Returns `true` if the bit is set (1)"]
    #[inline]
    pub fn bit_is_set(&self) -> bool {
        self.bit()
    }
}
#[doc = "Possible values of the field `PULL_CTL`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PULL_CTLR {
    #[doc = "No pull"]
    DIS,
    #[doc = "Pull up"]
    UP,
    #[doc = "Pull down"]
    DWN,
    #[doc = r" Reserved"]
    _Reserved(u8),
}
impl PULL_CTLR {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bits(&self) -> u8 {
        match *self {
            PULL_CTLR::DIS => 3,
            PULL_CTLR::UP => 2,
            PULL_CTLR::DWN => 1,
            PULL_CTLR::_Reserved(bits) => bits,
        }
    }
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _from(value: u8) -> PULL_CTLR {
        match value {
            3 => PULL_CTLR::DIS,
            2 => PULL_CTLR::UP,
            1 => PULL_CTLR::DWN,
            i => PULL_CTLR::_Reserved(i),
        }
    }
    #[doc = "Checks if the value of the field is `DIS`"]
    #[inline]
    pub fn is_dis(&self) -> bool {
        *self == PULL_CTLR::DIS
    }
    #[doc = "Checks if the value of the field is `UP`"]
    #[inline]
    pub fn is_up(&self) -> bool {
        *self == PULL_CTLR::UP
    }
    #[doc = "Checks if the value of the field is `DWN`"]
    #[inline]
    pub fn is_dwn(&self) -> bool {
        *self == PULL_CTLR::DWN
    }
}
#[doc = r" Value of the field"]
pub struct SLEW_REDR {
    bits: bool,
}
impl SLEW_REDR {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bit(&self) -> bool {
        self.bits
    }
    #[doc = r" Returns `true` if the bit is clear (0)"]
    #[inline]
    pub fn bit_is_clear(&self) -> bool {
        !self.bit()
    }
    #[doc = r" Returns `true` if the bit is set (1)"]
    #[inline]
    pub fn bit_is_set(&self) -> bool {
        self.bit()
    }
}
#[doc = "Possible values of the field `IOCURR`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IOCURRR {
    #[doc = "Extended-Current (EC) mode: Min 8 mA for double drive strength IOs (min 4 mA for normal IOs) when IOSTR is set to AUTO"]
    _4_8MA,
    #[doc = "High-Current (HC) mode: Min 4 mA when IOSTR is set to AUTO"]
    _4MA,
    #[doc = "Low-Current (LC) mode: Min 2 mA when IOSTR is set to AUTO"]
    _2MA,
    #[doc = r" Reserved"]
    _Reserved(u8),
}
impl IOCURRR {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bits(&self) -> u8 {
        match *self {
            IOCURRR::_4_8MA => 2,
            IOCURRR::_4MA => 1,
            IOCURRR::_2MA => 0,
            IOCURRR::_Reserved(bits) => bits,
        }
    }
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _from(value: u8) -> IOCURRR {
        match value {
            2 => IOCURRR::_4_8MA,
            1 => IOCURRR::_4MA,
            0 => IOCURRR::_2MA,
            i => IOCURRR::_Reserved(i),
        }
    }
    #[doc = "Checks if the value of the field is `_4_8MA`"]
    #[inline]
    pub fn is_4_8ma(&self) -> bool {
        *self == IOCURRR::_4_8MA
    }
    #[doc = "Checks if the value of the field is `_4MA`"]
    #[inline]
    pub fn is_4ma(&self) -> bool {
        *self == IOCURRR::_4MA
    }
    #[doc = "Checks if the value of the field is `_2MA`"]
    #[inline]
    pub fn is_2ma(&self) -> bool {
        *self == IOCURRR::_2MA
    }
}
#[doc = "Possible values of the field `IOSTR`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IOSTRR {
    #[doc = "Maximum drive strength, controlled by AON_IOC:IOSTRMAX (min 2 mA @1.8V with default values)"]
    MAX,
    #[doc = "Medium drive strength, controlled by AON_IOC:IOSTRMED (min 2 mA @2.5V with default values)"]
    MED,
    #[doc = "Minimum drive strength, controlled by AON_IOC:IOSTRMIN (min 2 mA @3.3V with default values)"]
    MIN,
    #[doc = "Automatic drive strength, controlled by AON BATMON based on battery voltage. (min 2 mA @VDDS)"]
    AUTO,
}
impl IOSTRR {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bits(&self) -> u8 {
        match *self {
            IOSTRR::MAX => 3,
            IOSTRR::MED => 2,
            IOSTRR::MIN => 1,
            IOSTRR::AUTO => 0,
        }
    }
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _from(value: u8) -> IOSTRR {
        match value {
            3 => IOSTRR::MAX,
            2 => IOSTRR::MED,
            1 => IOSTRR::MIN,
            0 => IOSTRR::AUTO,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `MAX`"]
    #[inline]
    pub fn is_max(&self) -> bool {
        *self == IOSTRR::MAX
    }
    #[doc = "Checks if the value of the field is `MED`"]
    #[inline]
    pub fn is_med(&self) -> bool {
        *self == IOSTRR::MED
    }
    #[doc = "Checks if the value of the field is `MIN`"]
    #[inline]
    pub fn is_min(&self) -> bool {
        *self == IOSTRR::MIN
    }
    #[doc = "Checks if the value of the field is `AUTO`"]
    #[inline]
    pub fn is_auto(&self) -> bool {
        *self == IOSTRR::AUTO
    }
}
#[doc = r" Value of the field"]
pub struct RESERVED6R {
    bits: u8,
}
impl RESERVED6R {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bits(&self) -> u8 {
        self.bits
    }
}
#[doc = "Possible values of the field `PORT_ID`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PORT_IDR {
    #[doc = "RF Core SMI Command Link In"]
    RFC_SMI_CL_IN,
    #[doc = "RF Core SMI Command Link Out"]
    RFC_SMI_CL_OUT,
    #[doc = "RF Core SMI Data Link In"]
    RFC_SMI_DL_IN,
    #[doc = "RF Core SMI Data Link Out"]
    RFC_SMI_DL_OUT,
    #[doc = "RF Core Data In 1"]
    RFC_GPI1,
    #[doc = "RF Core Data In 0"]
    RFC_GPI0,
    #[doc = "RF Core Data Out 3"]
    RFC_GPO3,
    #[doc = "RF Core Data Out 2"]
    RFC_GPO2,
    #[doc = "RF Core Data Out 1"]
    RFC_GPO1,
    #[doc = "RF Core Data Out 0"]
    RFC_GPO0,
    #[doc = "RF Core Trace"]
    RFC_TRC,
    #[doc = "I2S MCLK "]
    I2S_MCLK,
    #[doc = "I2S BCLK "]
    I2S_BCLK,
    #[doc = "I2S WCLK "]
    I2S_WCLK,
    #[doc = "I2S Data 1"]
    I2S_AD1,
    #[doc = "I2S Data 0"]
    I2S_AD0,
    #[doc = "SSI1 CLK"]
    SSI1_CLK,
    #[doc = "SSI1 FSS "]
    SSI1_FSS,
    #[doc = "SSI1 TX "]
    SSI1_TX,
    #[doc = "SSI1 RX "]
    SSI1_RX,
    #[doc = "CPU SWV "]
    CPU_SWV,
    #[doc = "PORT EVENT 7\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT7,
    #[doc = "PORT EVENT 6\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT6,
    #[doc = "PORT EVENT 5\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT5,
    #[doc = "PORT EVENT 4\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT4,
    #[doc = "PORT EVENT 3\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT3,
    #[doc = "PORT EVENT 2\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT2,
    #[doc = "PORT EVENT 1\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT1,
    #[doc = "PORT EVENT 0\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT0,
    #[doc = "UART0 RTS "]
    UART0_RTS,
    #[doc = "UART0 CTS "]
    UART0_CTS,
    #[doc = "UART0 TX "]
    UART0_TX,
    #[doc = "UART0 RX "]
    UART0_RX,
    #[doc = "I2C Clock"]
    I2C_MSSCL,
    #[doc = "I2C Data"]
    I2C_MSSDA,
    #[doc = "SSI0 CLK"]
    SSI0_CLK,
    #[doc = "SSI0 FSS "]
    SSI0_FSS,
    #[doc = "SSI0 TX "]
    SSI0_TX,
    #[doc = "SSI0 RX "]
    SSI0_RX,
    #[doc = "AUX IO "]
    AUX_IO,
    #[doc = "AON 32 KHz clock (SCLK_LF)"]
    AON_CLK32K,
    #[doc = "General Purpose IO "]
    GPIO,
    #[doc = r" Reserved"]
    _Reserved(u8),
}
impl PORT_IDR {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bits(&self) -> u8 {
        match *self {
            PORT_IDR::RFC_SMI_CL_IN => 56,
            PORT_IDR::RFC_SMI_CL_OUT => 55,
            PORT_IDR::RFC_SMI_DL_IN => 54,
            PORT_IDR::RFC_SMI_DL_OUT => 53,
            PORT_IDR::RFC_GPI1 => 52,
            PORT_IDR::RFC_GPI0 => 51,
            PORT_IDR::RFC_GPO3 => 50,
            PORT_IDR::RFC_GPO2 => 49,
            PORT_IDR::RFC_GPO1 => 48,
            PORT_IDR::RFC_GPO0 => 47,
            PORT_IDR::RFC_TRC => 46,
            PORT_IDR::I2S_MCLK => 41,
            PORT_IDR::I2S_BCLK => 40,
            PORT_IDR::I2S_WCLK => 39,
            PORT_IDR::I2S_AD1 => 38,
            PORT_IDR::I2S_AD0 => 37,
            PORT_IDR::SSI1_CLK => 36,
            PORT_IDR::SSI1_FSS => 35,
            PORT_IDR::SSI1_TX => 34,
            PORT_IDR::SSI1_RX => 33,
            PORT_IDR::CPU_SWV => 32,
            PORT_IDR::PORT_EVENT7 => 30,
            PORT_IDR::PORT_EVENT6 => 29,
            PORT_IDR::PORT_EVENT5 => 28,
            PORT_IDR::PORT_EVENT4 => 27,
            PORT_IDR::PORT_EVENT3 => 26,
            PORT_IDR::PORT_EVENT2 => 25,
            PORT_IDR::PORT_EVENT1 => 24,
            PORT_IDR::PORT_EVENT0 => 23,
            PORT_IDR::UART0_RTS => 18,
            PORT_IDR::UART0_CTS => 17,
            PORT_IDR::UART0_TX => 16,
            PORT_IDR::UART0_RX => 15,
            PORT_IDR::I2C_MSSCL => 14,
            PORT_IDR::I2C_MSSDA => 13,
            PORT_IDR::SSI0_CLK => 12,
            PORT_IDR::SSI0_FSS => 11,
            PORT_IDR::SSI0_TX => 10,
            PORT_IDR::SSI0_RX => 9,
            PORT_IDR::AUX_IO => 8,
            PORT_IDR::AON_CLK32K => 7,
            PORT_IDR::GPIO => 0,
            PORT_IDR::_Reserved(bits) => bits,
        }
    }
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _from(value: u8) -> PORT_IDR {
        match value {
            56 => PORT_IDR::RFC_SMI_CL_IN,
            55 => PORT_IDR::RFC_SMI_CL_OUT,
            54 => PORT_IDR::RFC_SMI_DL_IN,
            53 => PORT_IDR::RFC_SMI_DL_OUT,
            52 => PORT_IDR::RFC_GPI1,
            51 => PORT_IDR::RFC_GPI0,
            50 => PORT_IDR::RFC_GPO3,
            49 => PORT_IDR::RFC_GPO2,
            48 => PORT_IDR::RFC_GPO1,
            47 => PORT_IDR::RFC_GPO0,
            46 => PORT_IDR::RFC_TRC,
            41 => PORT_IDR::I2S_MCLK,
            40 => PORT_IDR::I2S_BCLK,
            39 => PORT_IDR::I2S_WCLK,
            38 => PORT_IDR::I2S_AD1,
            37 => PORT_IDR::I2S_AD0,
            36 => PORT_IDR::SSI1_CLK,
            35 => PORT_IDR::SSI1_FSS,
            34 => PORT_IDR::SSI1_TX,
            33 => PORT_IDR::SSI1_RX,
            32 => PORT_IDR::CPU_SWV,
            30 => PORT_IDR::PORT_EVENT7,
            29 => PORT_IDR::PORT_EVENT6,
            28 => PORT_IDR::PORT_EVENT5,
            27 => PORT_IDR::PORT_EVENT4,
            26 => PORT_IDR::PORT_EVENT3,
            25 => PORT_IDR::PORT_EVENT2,
            24 => PORT_IDR::PORT_EVENT1,
            23 => PORT_IDR::PORT_EVENT0,
            18 => PORT_IDR::UART0_RTS,
            17 => PORT_IDR::UART0_CTS,
            16 => PORT_IDR::UART0_TX,
            15 => PORT_IDR::UART0_RX,
            14 => PORT_IDR::I2C_MSSCL,
            13 => PORT_IDR::I2C_MSSDA,
            12 => PORT_IDR::SSI0_CLK,
            11 => PORT_IDR::SSI0_FSS,
            10 => PORT_IDR::SSI0_TX,
            9 => PORT_IDR::SSI0_RX,
            8 => PORT_IDR::AUX_IO,
            7 => PORT_IDR::AON_CLK32K,
            0 => PORT_IDR::GPIO,
            i => PORT_IDR::_Reserved(i),
        }
    }
    #[doc = "Checks if the value of the field is `RFC_SMI_CL_IN`"]
    #[inline]
    pub fn is_rfc_smi_cl_in(&self) -> bool {
        *self == PORT_IDR::RFC_SMI_CL_IN
    }
    #[doc = "Checks if the value of the field is `RFC_SMI_CL_OUT`"]
    #[inline]
    pub fn is_rfc_smi_cl_out(&self) -> bool {
        *self == PORT_IDR::RFC_SMI_CL_OUT
    }
    #[doc = "Checks if the value of the field is `RFC_SMI_DL_IN`"]
    #[inline]
    pub fn is_rfc_smi_dl_in(&self) -> bool {
        *self == PORT_IDR::RFC_SMI_DL_IN
    }
    #[doc = "Checks if the value of the field is `RFC_SMI_DL_OUT`"]
    #[inline]
    pub fn is_rfc_smi_dl_out(&self) -> bool {
        *self == PORT_IDR::RFC_SMI_DL_OUT
    }
    #[doc = "Checks if the value of the field is `RFC_GPI1`"]
    #[inline]
    pub fn is_rfc_gpi1(&self) -> bool {
        *self == PORT_IDR::RFC_GPI1
    }
    #[doc = "Checks if the value of the field is `RFC_GPI0`"]
    #[inline]
    pub fn is_rfc_gpi0(&self) -> bool {
        *self == PORT_IDR::RFC_GPI0
    }
    #[doc = "Checks if the value of the field is `RFC_GPO3`"]
    #[inline]
    pub fn is_rfc_gpo3(&self) -> bool {
        *self == PORT_IDR::RFC_GPO3
    }
    #[doc = "Checks if the value of the field is `RFC_GPO2`"]
    #[inline]
    pub fn is_rfc_gpo2(&self) -> bool {
        *self == PORT_IDR::RFC_GPO2
    }
    #[doc = "Checks if the value of the field is `RFC_GPO1`"]
    #[inline]
    pub fn is_rfc_gpo1(&self) -> bool {
        *self == PORT_IDR::RFC_GPO1
    }
    #[doc = "Checks if the value of the field is `RFC_GPO0`"]
    #[inline]
    pub fn is_rfc_gpo0(&self) -> bool {
        *self == PORT_IDR::RFC_GPO0
    }
    #[doc = "Checks if the value of the field is `RFC_TRC`"]
    #[inline]
    pub fn is_rfc_trc(&self) -> bool {
        *self == PORT_IDR::RFC_TRC
    }
    #[doc = "Checks if the value of the field is `I2S_MCLK`"]
    #[inline]
    pub fn is_i2s_mclk(&self) -> bool {
        *self == PORT_IDR::I2S_MCLK
    }
    #[doc = "Checks if the value of the field is `I2S_BCLK`"]
    #[inline]
    pub fn is_i2s_bclk(&self) -> bool {
        *self == PORT_IDR::I2S_BCLK
    }
    #[doc = "Checks if the value of the field is `I2S_WCLK`"]
    #[inline]
    pub fn is_i2s_wclk(&self) -> bool {
        *self == PORT_IDR::I2S_WCLK
    }
    #[doc = "Checks if the value of the field is `I2S_AD1`"]
    #[inline]
    pub fn is_i2s_ad1(&self) -> bool {
        *self == PORT_IDR::I2S_AD1
    }
    #[doc = "Checks if the value of the field is `I2S_AD0`"]
    #[inline]
    pub fn is_i2s_ad0(&self) -> bool {
        *self == PORT_IDR::I2S_AD0
    }
    #[doc = "Checks if the value of the field is `SSI1_CLK`"]
    #[inline]
    pub fn is_ssi1_clk(&self) -> bool {
        *self == PORT_IDR::SSI1_CLK
    }
    #[doc = "Checks if the value of the field is `SSI1_FSS`"]
    #[inline]
    pub fn is_ssi1_fss(&self) -> bool {
        *self == PORT_IDR::SSI1_FSS
    }
    #[doc = "Checks if the value of the field is `SSI1_TX`"]
    #[inline]
    pub fn is_ssi1_tx(&self) -> bool {
        *self == PORT_IDR::SSI1_TX
    }
    #[doc = "Checks if the value of the field is `SSI1_RX`"]
    #[inline]
    pub fn is_ssi1_rx(&self) -> bool {
        *self == PORT_IDR::SSI1_RX
    }
    #[doc = "Checks if the value of the field is `CPU_SWV`"]
    #[inline]
    pub fn is_cpu_swv(&self) -> bool {
        *self == PORT_IDR::CPU_SWV
    }
    #[doc = "Checks if the value of the field is `PORT_EVENT7`"]
    #[inline]
    pub fn is_port_event7(&self) -> bool {
        *self == PORT_IDR::PORT_EVENT7
    }
    #[doc = "Checks if the value of the field is `PORT_EVENT6`"]
    #[inline]
    pub fn is_port_event6(&self) -> bool {
        *self == PORT_IDR::PORT_EVENT6
    }
    #[doc = "Checks if the value of the field is `PORT_EVENT5`"]
    #[inline]
    pub fn is_port_event5(&self) -> bool {
        *self == PORT_IDR::PORT_EVENT5
    }
    #[doc = "Checks if the value of the field is `PORT_EVENT4`"]
    #[inline]
    pub fn is_port_event4(&self) -> bool {
        *self == PORT_IDR::PORT_EVENT4
    }
    #[doc = "Checks if the value of the field is `PORT_EVENT3`"]
    #[inline]
    pub fn is_port_event3(&self) -> bool {
        *self == PORT_IDR::PORT_EVENT3
    }
    #[doc = "Checks if the value of the field is `PORT_EVENT2`"]
    #[inline]
    pub fn is_port_event2(&self) -> bool {
        *self == PORT_IDR::PORT_EVENT2
    }
    #[doc = "Checks if the value of the field is `PORT_EVENT1`"]
    #[inline]
    pub fn is_port_event1(&self) -> bool {
        *self == PORT_IDR::PORT_EVENT1
    }
    #[doc = "Checks if the value of the field is `PORT_EVENT0`"]
    #[inline]
    pub fn is_port_event0(&self) -> bool {
        *self == PORT_IDR::PORT_EVENT0
    }
    #[doc = "Checks if the value of the field is `UART0_RTS`"]
    #[inline]
    pub fn is_uart0_rts(&self) -> bool {
        *self == PORT_IDR::UART0_RTS
    }
    #[doc = "Checks if the value of the field is `UART0_CTS`"]
    #[inline]
    pub fn is_uart0_cts(&self) -> bool {
        *self == PORT_IDR::UART0_CTS
    }
    #[doc = "Checks if the value of the field is `UART0_TX`"]
    #[inline]
    pub fn is_uart0_tx(&self) -> bool {
        *self == PORT_IDR::UART0_TX
    }
    #[doc = "Checks if the value of the field is `UART0_RX`"]
    #[inline]
    pub fn is_uart0_rx(&self) -> bool {
        *self == PORT_IDR::UART0_RX
    }
    #[doc = "Checks if the value of the field is `I2C_MSSCL`"]
    #[inline]
    pub fn is_i2c_msscl(&self) -> bool {
        *self == PORT_IDR::I2C_MSSCL
    }
    #[doc = "Checks if the value of the field is `I2C_MSSDA`"]
    #[inline]
    pub fn is_i2c_mssda(&self) -> bool {
        *self == PORT_IDR::I2C_MSSDA
    }
    #[doc = "Checks if the value of the field is `SSI0_CLK`"]
    #[inline]
    pub fn is_ssi0_clk(&self) -> bool {
        *self == PORT_IDR::SSI0_CLK
    }
    #[doc = "Checks if the value of the field is `SSI0_FSS`"]
    #[inline]
    pub fn is_ssi0_fss(&self) -> bool {
        *self == PORT_IDR::SSI0_FSS
    }
    #[doc = "Checks if the value of the field is `SSI0_TX`"]
    #[inline]
    pub fn is_ssi0_tx(&self) -> bool {
        *self == PORT_IDR::SSI0_TX
    }
    #[doc = "Checks if the value of the field is `SSI0_RX`"]
    #[inline]
    pub fn is_ssi0_rx(&self) -> bool {
        *self == PORT_IDR::SSI0_RX
    }
    #[doc = "Checks if the value of the field is `AUX_IO`"]
    #[inline]
    pub fn is_aux_io(&self) -> bool {
        *self == PORT_IDR::AUX_IO
    }
    #[doc = "Checks if the value of the field is `AON_CLK32K`"]
    #[inline]
    pub fn is_aon_clk32k(&self) -> bool {
        *self == PORT_IDR::AON_CLK32K
    }
    #[doc = "Checks if the value of the field is `GPIO`"]
    #[inline]
    pub fn is_gpio(&self) -> bool {
        *self == PORT_IDR::GPIO
    }
}
#[doc = r" Proxy"]
pub struct _HYST_ENW<'a> {
    w: &'a mut W,
}
impl<'a> _HYST_ENW<'a> {
    #[doc = r" Sets the field bit"]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r" Clears the field bit"]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub fn bit(self, value: bool) -> &'a mut W {
        const MASK: bool = true;
        const OFFSET: u8 = 30;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = r" Proxy"]
pub struct _IEW<'a> {
    w: &'a mut W,
}
impl<'a> _IEW<'a> {
    #[doc = r" Sets the field bit"]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r" Clears the field bit"]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub fn bit(self, value: bool) -> &'a mut W {
        const MASK: bool = true;
        const OFFSET: u8 = 29;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = r" Proxy"]
pub struct _WU_CFGW<'a> {
    w: &'a mut W,
}
impl<'a> _WU_CFGW<'a> {
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        const MASK: u8 = 3;
        const OFFSET: u8 = 27;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = "Values that can be written to the field `IOMODE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IOMODEW {
    #[doc = "Open Source\nInverted input / output\n\n"]
    OPENSRC_INV,
    #[doc = "Open Source\nNormal input / output\n\n"]
    OPENSRC,
    #[doc = "Open Drain\nInverted input / output\n\n"]
    OPENDR_INV,
    #[doc = "Open Drain, \nNormal input / output\n\n"]
    OPENDR,
    #[doc = "Inverted input / ouput\n\n"]
    INV,
    #[doc = "Normal input / output\n\n"]
    NORMAL,
}
impl IOMODEW {
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _bits(&self) -> u8 {
        match *self {
            IOMODEW::OPENSRC_INV => 7,
            IOMODEW::OPENSRC => 6,
            IOMODEW::OPENDR_INV => 5,
            IOMODEW::OPENDR => 4,
            IOMODEW::INV => 1,
            IOMODEW::NORMAL => 0,
        }
    }
}
#[doc = r" Proxy"]
pub struct _IOMODEW<'a> {
    w: &'a mut W,
}
impl<'a> _IOMODEW<'a> {
    #[doc = r" Writes `variant` to the field"]
    #[inline]
    pub fn variant(self, variant: IOMODEW) -> &'a mut W {
        unsafe { self.bits(variant._bits()) }
    }
    #[doc = "Open Source Inverted input / output"]
    #[inline]
    pub fn opensrc_inv(self) -> &'a mut W {
        self.variant(IOMODEW::OPENSRC_INV)
    }
    #[doc = "Open Source Normal input / output"]
    #[inline]
    pub fn opensrc(self) -> &'a mut W {
        self.variant(IOMODEW::OPENSRC)
    }
    #[doc = "Open Drain Inverted input / output"]
    #[inline]
    pub fn opendr_inv(self) -> &'a mut W {
        self.variant(IOMODEW::OPENDR_INV)
    }
    #[doc = "Open Drain, Normal input / output"]
    #[inline]
    pub fn opendr(self) -> &'a mut W {
        self.variant(IOMODEW::OPENDR)
    }
    #[doc = "Inverted input / ouput"]
    #[inline]
    pub fn inv(self) -> &'a mut W {
        self.variant(IOMODEW::INV)
    }
    #[doc = "Normal input / output"]
    #[inline]
    pub fn normal(self) -> &'a mut W {
        self.variant(IOMODEW::NORMAL)
    }
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        const MASK: u8 = 7;
        const OFFSET: u8 = 24;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = r" Proxy"]
pub struct _RESERVED19W<'a> {
    w: &'a mut W,
}
impl<'a> _RESERVED19W<'a> {
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        const MASK: u8 = 31;
        const OFFSET: u8 = 19;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = r" Proxy"]
pub struct _EDGE_IRQ_ENW<'a> {
    w: &'a mut W,
}
impl<'a> _EDGE_IRQ_ENW<'a> {
    #[doc = r" Sets the field bit"]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r" Clears the field bit"]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub fn bit(self, value: bool) -> &'a mut W {
        const MASK: bool = true;
        const OFFSET: u8 = 18;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = "Values that can be written to the field `EDGE_DET`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EDGE_DETW {
    #[doc = "Positive and negative edge detection"]
    BOTH,
    #[doc = "Positive edge detection"]
    POS,
    #[doc = "Negative edge detection"]
    NEG,
    #[doc = "No edge detection"]
    NONE,
}
impl EDGE_DETW {
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _bits(&self) -> u8 {
        match *self {
            EDGE_DETW::BOTH => 3,
            EDGE_DETW::POS => 2,
            EDGE_DETW::NEG => 1,
            EDGE_DETW::NONE => 0,
        }
    }
}
#[doc = r" Proxy"]
pub struct _EDGE_DETW<'a> {
    w: &'a mut W,
}
impl<'a> _EDGE_DETW<'a> {
    #[doc = r" Writes `variant` to the field"]
    #[inline]
    pub fn variant(self, variant: EDGE_DETW) -> &'a mut W {
        {
            self.bits(variant._bits())
        }
    }
    #[doc = "Positive and negative edge detection"]
    #[inline]
    pub fn both(self) -> &'a mut W {
        self.variant(EDGE_DETW::BOTH)
    }
    #[doc = "Positive edge detection"]
    #[inline]
    pub fn pos(self) -> &'a mut W {
        self.variant(EDGE_DETW::POS)
    }
    #[doc = "Negative edge detection"]
    #[inline]
    pub fn neg(self) -> &'a mut W {
        self.variant(EDGE_DETW::NEG)
    }
    #[doc = "No edge detection"]
    #[inline]
    pub fn none(self) -> &'a mut W {
        self.variant(EDGE_DETW::NONE)
    }
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub fn bits(self, value: u8) -> &'a mut W {
        const MASK: u8 = 3;
        const OFFSET: u8 = 16;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = "Values that can be written to the field `PULL_CTL`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PULL_CTLW {
    #[doc = "No pull"]
    DIS,
    #[doc = "Pull up"]
    UP,
    #[doc = "Pull down"]
    DWN,
}
impl PULL_CTLW {
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _bits(&self) -> u8 {
        match *self {
            PULL_CTLW::DIS => 3,
            PULL_CTLW::UP => 2,
            PULL_CTLW::DWN => 1,
        }
    }
}
#[doc = r" Proxy"]
pub struct _PULL_CTLW<'a> {
    w: &'a mut W,
}
impl<'a> _PULL_CTLW<'a> {
    #[doc = r" Writes `variant` to the field"]
    #[inline]
    pub fn variant(self, variant: PULL_CTLW) -> &'a mut W {
        unsafe { self.bits(variant._bits()) }
    }
    #[doc = "No pull"]
    #[inline]
    pub fn dis(self) -> &'a mut W {
        self.variant(PULL_CTLW::DIS)
    }
    #[doc = "Pull up"]
    #[inline]
    pub fn up(self) -> &'a mut W {
        self.variant(PULL_CTLW::UP)
    }
    #[doc = "Pull down"]
    #[inline]
    pub fn dwn(self) -> &'a mut W {
        self.variant(PULL_CTLW::DWN)
    }
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        const MASK: u8 = 3;
        const OFFSET: u8 = 13;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = r" Proxy"]
pub struct _SLEW_REDW<'a> {
    w: &'a mut W,
}
impl<'a> _SLEW_REDW<'a> {
    #[doc = r" Sets the field bit"]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r" Clears the field bit"]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub fn bit(self, value: bool) -> &'a mut W {
        const MASK: bool = true;
        const OFFSET: u8 = 12;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = "Values that can be written to the field `IOCURR`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IOCURRW {
    #[doc = "Extended-Current (EC) mode: Min 8 mA for double drive strength IOs (min 4 mA for normal IOs) when IOSTR is set to AUTO"]
    _4_8MA,
    #[doc = "High-Current (HC) mode: Min 4 mA when IOSTR is set to AUTO"]
    _4MA,
    #[doc = "Low-Current (LC) mode: Min 2 mA when IOSTR is set to AUTO"]
    _2MA,
}
impl IOCURRW {
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _bits(&self) -> u8 {
        match *self {
            IOCURRW::_4_8MA => 2,
            IOCURRW::_4MA => 1,
            IOCURRW::_2MA => 0,
        }
    }
}
#[doc = r" Proxy"]
pub struct _IOCURRW<'a> {
    w: &'a mut W,
}
impl<'a> _IOCURRW<'a> {
    #[doc = r" Writes `variant` to the field"]
    #[inline]
    pub fn variant(self, variant: IOCURRW) -> &'a mut W {
        unsafe { self.bits(variant._bits()) }
    }
    #[doc = "Extended-Current (EC) mode: Min 8 mA for double drive strength IOs (min 4 mA for normal IOs) when IOSTR is set to AUTO"]
    #[inline]
    pub fn _4_8ma(self) -> &'a mut W {
        self.variant(IOCURRW::_4_8MA)
    }
    #[doc = "High-Current (HC) mode: Min 4 mA when IOSTR is set to AUTO"]
    #[inline]
    pub fn _4ma(self) -> &'a mut W {
        self.variant(IOCURRW::_4MA)
    }
    #[doc = "Low-Current (LC) mode: Min 2 mA when IOSTR is set to AUTO"]
    #[inline]
    pub fn _2ma(self) -> &'a mut W {
        self.variant(IOCURRW::_2MA)
    }
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        const MASK: u8 = 3;
        const OFFSET: u8 = 10;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = "Values that can be written to the field `IOSTR`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IOSTRW {
    #[doc = "Maximum drive strength, controlled by AON_IOC:IOSTRMAX (min 2 mA @1.8V with default values)"]
    MAX,
    #[doc = "Medium drive strength, controlled by AON_IOC:IOSTRMED (min 2 mA @2.5V with default values)"]
    MED,
    #[doc = "Minimum drive strength, controlled by AON_IOC:IOSTRMIN (min 2 mA @3.3V with default values)"]
    MIN,
    #[doc = "Automatic drive strength, controlled by AON BATMON based on battery voltage. (min 2 mA @VDDS)"]
    AUTO,
}
impl IOSTRW {
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _bits(&self) -> u8 {
        match *self {
            IOSTRW::MAX => 3,
            IOSTRW::MED => 2,
            IOSTRW::MIN => 1,
            IOSTRW::AUTO => 0,
        }
    }
}
#[doc = r" Proxy"]
pub struct _IOSTRW<'a> {
    w: &'a mut W,
}
impl<'a> _IOSTRW<'a> {
    #[doc = r" Writes `variant` to the field"]
    #[inline]
    pub fn variant(self, variant: IOSTRW) -> &'a mut W {
        {
            self.bits(variant._bits())
        }
    }
    #[doc = "Maximum drive strength, controlled by AON_IOC:IOSTRMAX (min 2 mA @1.8V with default values)"]
    #[inline]
    pub fn max(self) -> &'a mut W {
        self.variant(IOSTRW::MAX)
    }
    #[doc = "Medium drive strength, controlled by AON_IOC:IOSTRMED (min 2 mA @2.5V with default values)"]
    #[inline]
    pub fn med(self) -> &'a mut W {
        self.variant(IOSTRW::MED)
    }
    #[doc = "Minimum drive strength, controlled by AON_IOC:IOSTRMIN (min 2 mA @3.3V with default values)"]
    #[inline]
    pub fn min(self) -> &'a mut W {
        self.variant(IOSTRW::MIN)
    }
    #[doc = "Automatic drive strength, controlled by AON BATMON based on battery voltage. (min 2 mA @VDDS)"]
    #[inline]
    pub fn auto(self) -> &'a mut W {
        self.variant(IOSTRW::AUTO)
    }
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub fn bits(self, value: u8) -> &'a mut W {
        const MASK: u8 = 3;
        const OFFSET: u8 = 8;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
#[doc = "Values that can be written to the field `PORT_ID`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PORT_IDW {
    #[doc = "RF Core SMI Command Link In"]
    RFC_SMI_CL_IN,
    #[doc = "RF Core SMI Command Link Out"]
    RFC_SMI_CL_OUT,
    #[doc = "RF Core SMI Data Link In"]
    RFC_SMI_DL_IN,
    #[doc = "RF Core SMI Data Link Out"]
    RFC_SMI_DL_OUT,
    #[doc = "RF Core Data In 1"]
    RFC_GPI1,
    #[doc = "RF Core Data In 0"]
    RFC_GPI0,
    #[doc = "RF Core Data Out 3"]
    RFC_GPO3,
    #[doc = "RF Core Data Out 2"]
    RFC_GPO2,
    #[doc = "RF Core Data Out 1"]
    RFC_GPO1,
    #[doc = "RF Core Data Out 0"]
    RFC_GPO0,
    #[doc = "RF Core Trace"]
    RFC_TRC,
    #[doc = "I2S MCLK "]
    I2S_MCLK,
    #[doc = "I2S BCLK "]
    I2S_BCLK,
    #[doc = "I2S WCLK "]
    I2S_WCLK,
    #[doc = "I2S Data 1"]
    I2S_AD1,
    #[doc = "I2S Data 0"]
    I2S_AD0,
    #[doc = "SSI1 CLK"]
    SSI1_CLK,
    #[doc = "SSI1 FSS "]
    SSI1_FSS,
    #[doc = "SSI1 TX "]
    SSI1_TX,
    #[doc = "SSI1 RX "]
    SSI1_RX,
    #[doc = "CPU SWV "]
    CPU_SWV,
    #[doc = "PORT EVENT 7\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT7,
    #[doc = "PORT EVENT 6\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT6,
    #[doc = "PORT EVENT 5\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT5,
    #[doc = "PORT EVENT 4\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT4,
    #[doc = "PORT EVENT 3\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT3,
    #[doc = "PORT EVENT 2\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT2,
    #[doc = "PORT EVENT 1\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT1,
    #[doc = "PORT EVENT 0\nCan be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    PORT_EVENT0,
    #[doc = "UART0 RTS "]
    UART0_RTS,
    #[doc = "UART0 CTS "]
    UART0_CTS,
    #[doc = "UART0 TX "]
    UART0_TX,
    #[doc = "UART0 RX "]
    UART0_RX,
    #[doc = "I2C Clock"]
    I2C_MSSCL,
    #[doc = "I2C Data"]
    I2C_MSSDA,
    #[doc = "SSI0 CLK"]
    SSI0_CLK,
    #[doc = "SSI0 FSS "]
    SSI0_FSS,
    #[doc = "SSI0 TX "]
    SSI0_TX,
    #[doc = "SSI0 RX "]
    SSI0_RX,
    #[doc = "AUX IO "]
    AUX_IO,
    #[doc = "AON 32 KHz clock (SCLK_LF)"]
    AON_CLK32K,
    #[doc = "General Purpose IO "]
    GPIO,
}
impl PORT_IDW {
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _bits(&self) -> u8 {
        match *self {
            PORT_IDW::RFC_SMI_CL_IN => 56,
            PORT_IDW::RFC_SMI_CL_OUT => 55,
            PORT_IDW::RFC_SMI_DL_IN => 54,
            PORT_IDW::RFC_SMI_DL_OUT => 53,
            PORT_IDW::RFC_GPI1 => 52,
            PORT_IDW::RFC_GPI0 => 51,
            PORT_IDW::RFC_GPO3 => 50,
            PORT_IDW::RFC_GPO2 => 49,
            PORT_IDW::RFC_GPO1 => 48,
            PORT_IDW::RFC_GPO0 => 47,
            PORT_IDW::RFC_TRC => 46,
            PORT_IDW::I2S_MCLK => 41,
            PORT_IDW::I2S_BCLK => 40,
            PORT_IDW::I2S_WCLK => 39,
            PORT_IDW::I2S_AD1 => 38,
            PORT_IDW::I2S_AD0 => 37,
            PORT_IDW::SSI1_CLK => 36,
            PORT_IDW::SSI1_FSS => 35,
            PORT_IDW::SSI1_TX => 34,
            PORT_IDW::SSI1_RX => 33,
            PORT_IDW::CPU_SWV => 32,
            PORT_IDW::PORT_EVENT7 => 30,
            PORT_IDW::PORT_EVENT6 => 29,
            PORT_IDW::PORT_EVENT5 => 28,
            PORT_IDW::PORT_EVENT4 => 27,
            PORT_IDW::PORT_EVENT3 => 26,
            PORT_IDW::PORT_EVENT2 => 25,
            PORT_IDW::PORT_EVENT1 => 24,
            PORT_IDW::PORT_EVENT0 => 23,
            PORT_IDW::UART0_RTS => 18,
            PORT_IDW::UART0_CTS => 17,
            PORT_IDW::UART0_TX => 16,
            PORT_IDW::UART0_RX => 15,
            PORT_IDW::I2C_MSSCL => 14,
            PORT_IDW::I2C_MSSDA => 13,
            PORT_IDW::SSI0_CLK => 12,
            PORT_IDW::SSI0_FSS => 11,
            PORT_IDW::SSI0_TX => 10,
            PORT_IDW::SSI0_RX => 9,
            PORT_IDW::AUX_IO => 8,
            PORT_IDW::AON_CLK32K => 7,
            PORT_IDW::GPIO => 0,
        }
    }
}
#[doc = r" Proxy"]
pub struct _PORT_IDW<'a> {
    w: &'a mut W,
}
impl<'a> _PORT_IDW<'a> {
    #[doc = r" Writes `variant` to the field"]
    #[inline]
    pub fn variant(self, variant: PORT_IDW) -> &'a mut W {
        unsafe { self.bits(variant._bits()) }
    }
    #[doc = "RF Core SMI Command Link In"]
    #[inline]
    pub fn rfc_smi_cl_in(self) -> &'a mut W {
        self.variant(PORT_IDW::RFC_SMI_CL_IN)
    }
    #[doc = "RF Core SMI Command Link Out"]
    #[inline]
    pub fn rfc_smi_cl_out(self) -> &'a mut W {
        self.variant(PORT_IDW::RFC_SMI_CL_OUT)
    }
    #[doc = "RF Core SMI Data Link In"]
    #[inline]
    pub fn rfc_smi_dl_in(self) -> &'a mut W {
        self.variant(PORT_IDW::RFC_SMI_DL_IN)
    }
    #[doc = "RF Core SMI Data Link Out"]
    #[inline]
    pub fn rfc_smi_dl_out(self) -> &'a mut W {
        self.variant(PORT_IDW::RFC_SMI_DL_OUT)
    }
    #[doc = "RF Core Data In 1"]
    #[inline]
    pub fn rfc_gpi1(self) -> &'a mut W {
        self.variant(PORT_IDW::RFC_GPI1)
    }
    #[doc = "RF Core Data In 0"]
    #[inline]
    pub fn rfc_gpi0(self) -> &'a mut W {
        self.variant(PORT_IDW::RFC_GPI0)
    }
    #[doc = "RF Core Data Out 3"]
    #[inline]
    pub fn rfc_gpo3(self) -> &'a mut W {
        self.variant(PORT_IDW::RFC_GPO3)
    }
    #[doc = "RF Core Data Out 2"]
    #[inline]
    pub fn rfc_gpo2(self) -> &'a mut W {
        self.variant(PORT_IDW::RFC_GPO2)
    }
    #[doc = "RF Core Data Out 1"]
    #[inline]
    pub fn rfc_gpo1(self) -> &'a mut W {
        self.variant(PORT_IDW::RFC_GPO1)
    }
    #[doc = "RF Core Data Out 0"]
    #[inline]
    pub fn rfc_gpo0(self) -> &'a mut W {
        self.variant(PORT_IDW::RFC_GPO0)
    }
    #[doc = "RF Core Trace"]
    #[inline]
    pub fn rfc_trc(self) -> &'a mut W {
        self.variant(PORT_IDW::RFC_TRC)
    }
    #[doc = "I2S MCLK"]
    #[inline]
    pub fn i2s_mclk(self) -> &'a mut W {
        self.variant(PORT_IDW::I2S_MCLK)
    }
    #[doc = "I2S BCLK"]
    #[inline]
    pub fn i2s_bclk(self) -> &'a mut W {
        self.variant(PORT_IDW::I2S_BCLK)
    }
    #[doc = "I2S WCLK"]
    #[inline]
    pub fn i2s_wclk(self) -> &'a mut W {
        self.variant(PORT_IDW::I2S_WCLK)
    }
    #[doc = "I2S Data 1"]
    #[inline]
    pub fn i2s_ad1(self) -> &'a mut W {
        self.variant(PORT_IDW::I2S_AD1)
    }
    #[doc = "I2S Data 0"]
    #[inline]
    pub fn i2s_ad0(self) -> &'a mut W {
        self.variant(PORT_IDW::I2S_AD0)
    }
    #[doc = "SSI1 CLK"]
    #[inline]
    pub fn ssi1_clk(self) -> &'a mut W {
        self.variant(PORT_IDW::SSI1_CLK)
    }
    #[doc = "SSI1 FSS"]
    #[inline]
    pub fn ssi1_fss(self) -> &'a mut W {
        self.variant(PORT_IDW::SSI1_FSS)
    }
    #[doc = "SSI1 TX"]
    #[inline]
    pub fn ssi1_tx(self) -> &'a mut W {
        self.variant(PORT_IDW::SSI1_TX)
    }
    #[doc = "SSI1 RX"]
    #[inline]
    pub fn ssi1_rx(self) -> &'a mut W {
        self.variant(PORT_IDW::SSI1_RX)
    }
    #[doc = "CPU SWV"]
    #[inline]
    pub fn cpu_swv(self) -> &'a mut W {
        self.variant(PORT_IDW::CPU_SWV)
    }
    #[doc = "PORT EVENT 7 Can be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    #[inline]
    pub fn port_event7(self) -> &'a mut W {
        self.variant(PORT_IDW::PORT_EVENT7)
    }
    #[doc = "PORT EVENT 6 Can be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    #[inline]
    pub fn port_event6(self) -> &'a mut W {
        self.variant(PORT_IDW::PORT_EVENT6)
    }
    #[doc = "PORT EVENT 5 Can be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    #[inline]
    pub fn port_event5(self) -> &'a mut W {
        self.variant(PORT_IDW::PORT_EVENT5)
    }
    #[doc = "PORT EVENT 4 Can be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    #[inline]
    pub fn port_event4(self) -> &'a mut W {
        self.variant(PORT_IDW::PORT_EVENT4)
    }
    #[doc = "PORT EVENT 3 Can be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    #[inline]
    pub fn port_event3(self) -> &'a mut W {
        self.variant(PORT_IDW::PORT_EVENT3)
    }
    #[doc = "PORT EVENT 2 Can be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    #[inline]
    pub fn port_event2(self) -> &'a mut W {
        self.variant(PORT_IDW::PORT_EVENT2)
    }
    #[doc = "PORT EVENT 1 Can be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    #[inline]
    pub fn port_event1(self) -> &'a mut W {
        self.variant(PORT_IDW::PORT_EVENT1)
    }
    #[doc = "PORT EVENT 0 Can be used as a general purpose IO event by selecting it via registers in the EVENT module, e.g. EVENT:GPT0ACAPTSEL.EV, EVENT:UDMACH14BSEL.EV, etc"]
    #[inline]
    pub fn port_event0(self) -> &'a mut W {
        self.variant(PORT_IDW::PORT_EVENT0)
    }
    #[doc = "UART0 RTS"]
    #[inline]
    pub fn uart0_rts(self) -> &'a mut W {
        self.variant(PORT_IDW::UART0_RTS)
    }
    #[doc = "UART0 CTS"]
    #[inline]
    pub fn uart0_cts(self) -> &'a mut W {
        self.variant(PORT_IDW::UART0_CTS)
    }
    #[doc = "UART0 TX"]
    #[inline]
    pub fn uart0_tx(self) -> &'a mut W {
        self.variant(PORT_IDW::UART0_TX)
    }
    #[doc = "UART0 RX"]
    #[inline]
    pub fn uart0_rx(self) -> &'a mut W {
        self.variant(PORT_IDW::UART0_RX)
    }
    #[doc = "I2C Clock"]
    #[inline]
    pub fn i2c_msscl(self) -> &'a mut W {
        self.variant(PORT_IDW::I2C_MSSCL)
    }
    #[doc = "I2C Data"]
    #[inline]
    pub fn i2c_mssda(self) -> &'a mut W {
        self.variant(PORT_IDW::I2C_MSSDA)
    }
    #[doc = "SSI0 CLK"]
    #[inline]
    pub fn ssi0_clk(self) -> &'a mut W {
        self.variant(PORT_IDW::SSI0_CLK)
    }
    #[doc = "SSI0 FSS"]
    #[inline]
    pub fn ssi0_fss(self) -> &'a mut W {
        self.variant(PORT_IDW::SSI0_FSS)
    }
    #[doc = "SSI0 TX"]
    #[inline]
    pub fn ssi0_tx(self) -> &'a mut W {
        self.variant(PORT_IDW::SSI0_TX)
    }
    #[doc = "SSI0 RX"]
    #[inline]
    pub fn ssi0_rx(self) -> &'a mut W {
        self.variant(PORT_IDW::SSI0_RX)
    }
    #[doc = "AUX IO"]
    #[inline]
    pub fn aux_io(self) -> &'a mut W {
        self.variant(PORT_IDW::AUX_IO)
    }
    #[doc = "AON 32 KHz clock (SCLK_LF)"]
    #[inline]
    pub fn aon_clk32k(self) -> &'a mut W {
        self.variant(PORT_IDW::AON_CLK32K)
    }
    #[doc = "General Purpose IO"]
    #[inline]
    pub fn gpio(self) -> &'a mut W {
        self.variant(PORT_IDW::GPIO)
    }
    #[doc = r" Writes raw bits to the field"]
    #[inline]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        const MASK: u8 = 63;
        const OFFSET: u8 = 0;
        self.w.bits &= !((MASK as u32) << OFFSET);
        self.w.bits |= ((value & MASK) as u32) << OFFSET;
        self.w
    }
}
impl R {
    #[doc = r" Value of the register as raw bits"]
    #[inline]
    pub fn bits(&self) -> u32 {
        self.bits
    }
    #[doc = "Bit 31 - Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline]
    pub fn reserved31(&self) -> RESERVED31R {
        let bits = {
            const MASK: bool = true;
            const OFFSET: u8 = 31;
            ((self.bits >> OFFSET) & MASK as u32) != 0
        };
        RESERVED31R { bits }
    }
    #[doc = "Bit 30 - 0: Input hysteresis disable 1: Input hysteresis enable"]
    #[inline]
    pub fn hyst_en(&self) -> HYST_ENR {
        let bits = {
            const MASK: bool = true;
            const OFFSET: u8 = 30;
            ((self.bits >> OFFSET) & MASK as u32) != 0
        };
        HYST_ENR { bits }
    }
    #[doc = "Bit 29 - 0: Input disabled 1: Input enabled Note: If IO is configured for AUX ie. PORT_ID = 0x08, the enable will be ignored."]
    #[inline]
    pub fn ie(&self) -> IER {
        let bits = {
            const MASK: bool = true;
            const OFFSET: u8 = 29;
            ((self.bits >> OFFSET) & MASK as u32) != 0
        };
        IER { bits }
    }
    #[doc = "Bits 27:28 - If DIO is configured GPIO or non-AON peripheral signals, i.e. PORT_ID 0x00 or >0x08: 00: No wake-up 01: No wake-up 10: Wakes up from shutdown if this pad is going low. 11: Wakes up from shutdown if this pad is going high. If IO is configured for AON peripheral signals or AUX ie. PORT_ID 0x01-0x08, this register only sets wakeup enable or not. 00, 01: Wakeup disabled 10, 11: Wakeup enabled Polarity is controlled from AON registers. Note:When the MSB is set, the IOC will deactivate the output enable for the DIO."]
    #[inline]
    pub fn wu_cfg(&self) -> WU_CFGR {
        let bits = {
            const MASK: u8 = 3;
            const OFFSET: u8 = 27;
            ((self.bits >> OFFSET) & MASK as u32) as u8
        };
        WU_CFGR { bits }
    }
    #[doc = "Bits 24:26 - IO Mode N/A for IO configured for AON periph. signals and AUX ie. PORT_ID 0x01-0x08 AUX has its own open_source/drain configuration. 0x2: Reserved. Undefined behavior. 0x3: Reserved. Undefined behavior."]
    #[inline]
    pub fn iomode(&self) -> IOMODER {
        IOMODER::_from({
            const MASK: u8 = 7;
            const OFFSET: u8 = 24;
            ((self.bits >> OFFSET) & MASK as u32) as u8
        })
    }
    #[doc = "Bits 19:23 - Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline]
    pub fn reserved19(&self) -> RESERVED19R {
        let bits = {
            const MASK: u8 = 31;
            const OFFSET: u8 = 19;
            ((self.bits >> OFFSET) & MASK as u32) as u8
        };
        RESERVED19R { bits }
    }
    #[doc = "Bit 18 - 0: No interrupt generation 1: Enable interrupt generation for this IO (Only effective if EDGE_DET is enabled)"]
    #[inline]
    pub fn edge_irq_en(&self) -> EDGE_IRQ_ENR {
        let bits = {
            const MASK: bool = true;
            const OFFSET: u8 = 18;
            ((self.bits >> OFFSET) & MASK as u32) != 0
        };
        EDGE_IRQ_ENR { bits }
    }
    #[doc = "Bits 16:17 - Enable generation of edge detection events on this IO"]
    #[inline]
    pub fn edge_det(&self) -> EDGE_DETR {
        EDGE_DETR::_from({
            const MASK: u8 = 3;
            const OFFSET: u8 = 16;
            ((self.bits >> OFFSET) & MASK as u32) as u8
        })
    }
    #[doc = "Bit 15 - Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline]
    pub fn reserved15(&self) -> RESERVED15R {
        let bits = {
            const MASK: bool = true;
            const OFFSET: u8 = 15;
            ((self.bits >> OFFSET) & MASK as u32) != 0
        };
        RESERVED15R { bits }
    }
    #[doc = "Bits 13:14 - Pull control"]
    #[inline]
    pub fn pull_ctl(&self) -> PULL_CTLR {
        PULL_CTLR::_from({
            const MASK: u8 = 3;
            const OFFSET: u8 = 13;
            ((self.bits >> OFFSET) & MASK as u32) as u8
        })
    }
    #[doc = "Bit 12 - 0: Normal slew rate 1: Enables reduced slew rate in output driver."]
    #[inline]
    pub fn slew_red(&self) -> SLEW_REDR {
        let bits = {
            const MASK: bool = true;
            const OFFSET: u8 = 12;
            ((self.bits >> OFFSET) & MASK as u32) != 0
        };
        SLEW_REDR { bits }
    }
    #[doc = "Bits 10:11 - Selects IO current mode of this IO."]
    #[inline]
    pub fn iocurr(&self) -> IOCURRR {
        IOCURRR::_from({
            const MASK: u8 = 3;
            const OFFSET: u8 = 10;
            ((self.bits >> OFFSET) & MASK as u32) as u8
        })
    }
    #[doc = "Bits 8:9 - Select source for drive strength control of this IO. This setting controls the drive strength of the Low-Current (LC) mode. Higher drive strength can be selected in IOCURR"]
    #[inline]
    pub fn iostr(&self) -> IOSTRR {
        IOSTRR::_from({
            const MASK: u8 = 3;
            const OFFSET: u8 = 8;
            ((self.bits >> OFFSET) & MASK as u32) as u8
        })
    }
    #[doc = "Bits 6:7 - Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline]
    pub fn reserved6(&self) -> RESERVED6R {
        let bits = {
            const MASK: u8 = 3;
            const OFFSET: u8 = 6;
            ((self.bits >> OFFSET) & MASK as u32) as u8
        };
        RESERVED6R { bits }
    }
    #[doc = "Bits 0:5 - Selects usage for DIO4"]
    #[inline]
    pub fn port_id(&self) -> PORT_IDR {
        PORT_IDR::_from({
            const MASK: u8 = 63;
            const OFFSET: u8 = 0;
            ((self.bits >> OFFSET) & MASK as u32) as u8
        })
    }
}
impl W {
    #[doc = r" Reset value of the register"]
    #[inline]
    pub fn reset_value() -> W {
        W { bits: 0 }
    }
    #[doc = r" Writes raw bits to the register"]
    #[inline]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.bits = bits;
        self
    }
    #[doc = "Bit 30 - 0: Input hysteresis disable 1: Input hysteresis enable"]
    #[inline]
    pub fn hyst_en(&mut self) -> _HYST_ENW {
        _HYST_ENW { w: self }
    }
    #[doc = "Bit 29 - 0: Input disabled 1: Input enabled Note: If IO is configured for AUX ie. PORT_ID = 0x08, the enable will be ignored."]
    #[inline]
    pub fn ie(&mut self) -> _IEW {
        _IEW { w: self }
    }
    #[doc = "Bits 27:28 - If DIO is configured GPIO or non-AON peripheral signals, i.e. PORT_ID 0x00 or >0x08: 00: No wake-up 01: No wake-up 10: Wakes up from shutdown if this pad is going low. 11: Wakes up from shutdown if this pad is going high. If IO is configured for AON peripheral signals or AUX ie. PORT_ID 0x01-0x08, this register only sets wakeup enable or not. 00, 01: Wakeup disabled 10, 11: Wakeup enabled Polarity is controlled from AON registers. Note:When the MSB is set, the IOC will deactivate the output enable for the DIO."]
    #[inline]
    pub fn wu_cfg(&mut self) -> _WU_CFGW {
        _WU_CFGW { w: self }
    }
    #[doc = "Bits 24:26 - IO Mode N/A for IO configured for AON periph. signals and AUX ie. PORT_ID 0x01-0x08 AUX has its own open_source/drain configuration. 0x2: Reserved. Undefined behavior. 0x3: Reserved. Undefined behavior."]
    #[inline]
    pub fn iomode(&mut self) -> _IOMODEW {
        _IOMODEW { w: self }
    }
    #[doc = "Bits 19:23 - Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
    #[inline]
    pub fn reserved19(&mut self) -> _RESERVED19W {
        _RESERVED19W { w: self }
    }
    #[doc = "Bit 18 - 0: No interrupt generation 1: Enable interrupt generation for this IO (Only effective if EDGE_DET is enabled)"]
    #[inline]
    pub fn edge_irq_en(&mut self) -> _EDGE_IRQ_ENW {
        _EDGE_IRQ_ENW { w: self }
    }
    #[doc = "Bits 16:17 - Enable generation of edge detection events on this IO"]
    #[inline]
    pub fn edge_det(&mut self) -> _EDGE_DETW {
        _EDGE_DETW { w: self }
    }
    #[doc = "Bits 13:14 - Pull control"]
    #[inline]
    pub fn pull_ctl(&mut self) -> _PULL_CTLW {
        _PULL_CTLW { w: self }
    }
    #[doc = "Bit 12 - 0: Normal slew rate 1: Enables reduced slew rate in output driver."]
    #[inline]
    pub fn slew_red(&mut self) -> _SLEW_REDW {
        _SLEW_REDW { w: self }
    }
    #[doc = "Bits 10:11 - Selects IO current mode of this IO."]
    #[inline]
    pub fn iocurr(&mut self) -> _IOCURRW {
        _IOCURRW { w: self }
    }
    #[doc = "Bits 8:9 - Select source for drive strength control of this IO. This setting controls the drive strength of the Low-Current (LC) mode. Higher drive strength can be selected in IOCURR"]
    #[inline]
    pub fn iostr(&mut self) -> _IOSTRW {
        _IOSTRW { w: self }
    }
    #[doc = "Bits 0:5 - Selects usage for DIO4"]
    #[inline]
    pub fn port_id(&mut self) -> _PORT_IDW {
        _PORT_IDW { w: self }
    }
}