da14683-pac 0.2.0

Peripheral Access Crate (PAC) for DA14683.
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
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
/*
DISCLAIMER
This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
applicable laws, including copyright laws.
THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
of this software. By using this software, you agree to the additional terms and conditions found by accessing the
following link:
http://www.renesas.com/disclaimer

*/
// Generated from SVD 1.2, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:45:17 +0000

#![allow(clippy::identity_op)]
#![allow(clippy::module_inception)]
#![allow(clippy::derivable_impls)]
#[allow(unused_imports)]
use crate::common::sealed;
#[allow(unused_imports)]
use crate::common::*;
#[doc = r"USB registers"]
unsafe impl ::core::marker::Send for super::Usb {}
unsafe impl ::core::marker::Sync for super::Usb {}
impl super::Usb {
    #[allow(unused)]
    #[inline(always)]
    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
        self.ptr
    }

    #[doc = "Alternate Event Register"]
    #[inline(always)]
    pub const fn usb_altev_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbAltevReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbAltevReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(16usize),
            )
        }
    }

    #[doc = "Alternate Mask Register"]
    #[inline(always)]
    pub const fn usb_altmsk_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbAltmskReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbAltmskReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(18usize),
            )
        }
    }

    #[doc = "USB Charger Control Register"]
    #[inline(always)]
    pub const fn usb_charger_ctrl_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbChargerCtrlReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbChargerCtrlReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(212usize),
            )
        }
    }

    #[doc = "USB Charger Status Register"]
    #[inline(always)]
    pub const fn usb_charger_stat_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbChargerStatReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbChargerStatReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(214usize),
            )
        }
    }

    #[doc = "USB DMA control register"]
    #[inline(always)]
    pub const fn usb_dma_ctrl_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbDmaCtrlReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbDmaCtrlReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(208usize),
            )
        }
    }

    #[doc = "EP0 INNAK and OUTNAK Register"]
    #[inline(always)]
    pub const fn usb_ep0_nak_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbEp0NakReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbEp0NakReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(72usize),
            )
        }
    }

    #[doc = "Endpoint Control 0 Register"]
    #[inline(always)]
    pub const fn usb_epc0_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbEpc0Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbEpc0Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(64usize),
            )
        }
    }

    #[doc = "Endpoint Control Register 1"]
    #[inline(always)]
    pub const fn usb_epc1_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbEpc1Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbEpc1Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(80usize),
            )
        }
    }

    #[doc = "Endpoint Control Register 2"]
    #[inline(always)]
    pub const fn usb_epc2_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbEpc2Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbEpc2Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(88usize),
            )
        }
    }

    #[doc = "Endpoint Control Register 3"]
    #[inline(always)]
    pub const fn usb_epc3_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbEpc3Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbEpc3Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(96usize),
            )
        }
    }

    #[doc = "Endpoint Control Register 4"]
    #[inline(always)]
    pub const fn usb_epc4_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbEpc4Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbEpc4Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(104usize),
            )
        }
    }

    #[doc = "Endpoint Control Register 5"]
    #[inline(always)]
    pub const fn usb_epc5_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbEpc5Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbEpc5Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(112usize),
            )
        }
    }

    #[doc = "Endpoint Control Register 6"]
    #[inline(always)]
    pub const fn usb_epc6_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbEpc6Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbEpc6Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(120usize),
            )
        }
    }

    #[doc = "Function Address Register"]
    #[inline(always)]
    pub const fn usb_far_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbFarReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbFarReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(8usize),
            )
        }
    }

    #[doc = "Frame Number High Byte Register"]
    #[inline(always)]
    pub const fn usb_fnh_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbFnhReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbFnhReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(36usize),
            )
        }
    }

    #[doc = "Frame Number Low Byte Register"]
    #[inline(always)]
    pub const fn usb_fnl_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbFnlReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbFnlReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(38usize),
            )
        }
    }

    #[doc = "FIFO Warning Event Register"]
    #[inline(always)]
    pub const fn usb_fwev_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbFwevReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbFwevReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(32usize),
            )
        }
    }

    #[doc = "FIFO Warning Mask Register"]
    #[inline(always)]
    pub const fn usb_fwmsk_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbFwmskReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbFwmskReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(34usize),
            )
        }
    }

    #[doc = "Main Event Register"]
    #[inline(always)]
    pub const fn usb_maev_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbMaevReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbMaevReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(12usize),
            )
        }
    }

    #[doc = "Main Mask Register"]
    #[inline(always)]
    pub const fn usb_mamsk_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbMamskReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbMamskReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(14usize),
            )
        }
    }

    #[doc = "Main Control Register)"]
    #[inline(always)]
    pub const fn usb_mctrl_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbMctrlReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbMctrlReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(0usize),
            )
        }
    }

    #[doc = "NAK Event Register"]
    #[inline(always)]
    pub const fn usb_nakev_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbNakevReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbNakevReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(28usize),
            )
        }
    }

    #[doc = "NAK Mask Register"]
    #[inline(always)]
    pub const fn usb_nakmsk_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbNakmskReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbNakmskReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(30usize),
            )
        }
    }

    #[doc = "Node Functional State Register"]
    #[inline(always)]
    pub const fn usb_nfsr_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbNfsrReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbNfsrReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(10usize),
            )
        }
    }

    #[doc = "Receive Command 0 Register"]
    #[inline(always)]
    pub const fn usb_rxc0_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxc0Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxc0Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(78usize),
            )
        }
    }

    #[doc = "Receive Command Register 1"]
    #[inline(always)]
    pub const fn usb_rxc1_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxc1Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxc1Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(94usize),
            )
        }
    }

    #[doc = "Receive Command Register 2"]
    #[inline(always)]
    pub const fn usb_rxc2_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxc2Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxc2Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(110usize),
            )
        }
    }

    #[doc = "Receive Command Register 3"]
    #[inline(always)]
    pub const fn usb_rxc3_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxc3Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxc3Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(126usize),
            )
        }
    }

    #[doc = "Receive Data 0 Register"]
    #[inline(always)]
    pub const fn usb_rxd0_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxd0Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxd0Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(74usize),
            )
        }
    }

    #[doc = "Receive Data Register,1"]
    #[inline(always)]
    pub const fn usb_rxd1_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxd1Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxd1Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(90usize),
            )
        }
    }

    #[doc = "Receive Data Register 2"]
    #[inline(always)]
    pub const fn usb_rxd2_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxd2Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxd2Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(106usize),
            )
        }
    }

    #[doc = "Receive Data Register 3"]
    #[inline(always)]
    pub const fn usb_rxd3_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxd3Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxd3Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(122usize),
            )
        }
    }

    #[doc = "Receive Event Register"]
    #[inline(always)]
    pub const fn usb_rxev_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxevReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxevReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(24usize),
            )
        }
    }

    #[doc = "Receive Mask Register"]
    #[inline(always)]
    pub const fn usb_rxmsk_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxmskReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxmskReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(26usize),
            )
        }
    }

    #[doc = "Receive Status 0 Register"]
    #[inline(always)]
    pub const fn usb_rxs0_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxs0Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxs0Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(76usize),
            )
        }
    }

    #[doc = "Receive Status Register 1"]
    #[inline(always)]
    pub const fn usb_rxs1_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxs1Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxs1Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(92usize),
            )
        }
    }

    #[doc = "Receive Status Register 2"]
    #[inline(always)]
    pub const fn usb_rxs2_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxs2Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxs2Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(108usize),
            )
        }
    }

    #[doc = "Receive Status Register 3"]
    #[inline(always)]
    pub const fn usb_rxs3_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbRxs3Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbRxs3Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(124usize),
            )
        }
    }

    #[doc = "Transceiver configuration Register"]
    #[inline(always)]
    pub const fn usb_tcr_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTcrReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTcrReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(4usize),
            )
        }
    }

    #[doc = "Transmit command 0 Register"]
    #[inline(always)]
    pub const fn usb_txc0_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxc0Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxc0Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(70usize),
            )
        }
    }

    #[doc = "Transmit Command Register 1"]
    #[inline(always)]
    pub const fn usb_txc1_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxc1Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxc1Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(86usize),
            )
        }
    }

    #[doc = "Transmit Command Register 2"]
    #[inline(always)]
    pub const fn usb_txc2_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxc2Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxc2Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(102usize),
            )
        }
    }

    #[doc = "Transmit Command Register 3"]
    #[inline(always)]
    pub const fn usb_txc3_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxc3Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxc3Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(118usize),
            )
        }
    }

    #[doc = "Transmit Data 0 Register"]
    #[inline(always)]
    pub const fn usb_txd0_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxd0Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxd0Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(66usize),
            )
        }
    }

    #[doc = "Transmit Data Register 1"]
    #[inline(always)]
    pub const fn usb_txd1_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxd1Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxd1Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(82usize),
            )
        }
    }

    #[doc = "Transmit Data Register 2"]
    #[inline(always)]
    pub const fn usb_txd2_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxd2Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxd2Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(98usize),
            )
        }
    }

    #[doc = "Transmit Data Register 3"]
    #[inline(always)]
    pub const fn usb_txd3_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxd3Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxd3Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(114usize),
            )
        }
    }

    #[doc = "Transmit Event Register"]
    #[inline(always)]
    pub const fn usb_txev_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxevReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxevReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(20usize),
            )
        }
    }

    #[doc = "Transmit Mask Register"]
    #[inline(always)]
    pub const fn usb_txmsk_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxmskReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxmskReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(22usize),
            )
        }
    }

    #[doc = "Transmit Status 0 Register"]
    #[inline(always)]
    pub const fn usb_txs0_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxs0Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxs0Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(68usize),
            )
        }
    }

    #[doc = "Transmit Status Register 1"]
    #[inline(always)]
    pub const fn usb_txs1_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxs1Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxs1Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(84usize),
            )
        }
    }

    #[doc = "Transmit Status Register 2"]
    #[inline(always)]
    pub const fn usb_txs2_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxs2Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxs2Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(100usize),
            )
        }
    }

    #[doc = "Transmit Status Register 3"]
    #[inline(always)]
    pub const fn usb_txs3_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbTxs3Reg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbTxs3Reg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(116usize),
            )
        }
    }

    #[doc = "USB test Register (for test purpose only)"]
    #[inline(always)]
    pub const fn usb_utr_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbUtrReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbUtrReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(6usize),
            )
        }
    }

    #[doc = "Transceiver 2.0 Configuration and Diagnostics Register(for test purpose only)"]
    #[inline(always)]
    pub const fn usb_ux20cdr_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbUx20CdrReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbUx20CdrReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(62usize),
            )
        }
    }

    #[doc = "Transceiver diagnostic Register (for test purpose only)"]
    #[inline(always)]
    pub const fn usb_xcvdiag_reg(
        &self,
    ) -> &'static crate::common::Reg<self::UsbXcvdiagReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::UsbXcvdiagReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(2usize),
            )
        }
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbAltevReg_SPEC;
impl crate::sealed::RegSpec for UsbAltevReg_SPEC {
    type DataType = u16;
}

#[doc = "Alternate Event Register"]
pub type UsbAltevReg = crate::RegValueT<UsbAltevReg_SPEC>;

impl UsbAltevReg {
    #[doc = "Resume\nResume signalling is detected on the USB when the device is in Suspend state (NFS in the NFSR register is set to SUSPEND), and a non IDLE signal is present on the USB, indicating that this device should begin it\'s wake-up sequence and enter Operational state. This bit is cleared when the register is read."]
    #[inline(always)]
    pub fn usb_resume(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbAltevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbAltevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Reset\nThis bit is set to 1, when 2.5 us of SEO have been detected on the upstream port. In response, the functional state should be reset (NFS in the NFSR register is set to RESET), where it must remain for at least 100 us. The functional state can then return to Operational state. This bit is cleared when the register is read"]
    #[inline(always)]
    pub fn usb_reset(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbAltevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<6,1,0,UsbAltevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Suspend Detect 5 ms\nThis bit is set to 1 after 5 ms of IDLE have been detected on the upstream port, indicating that this device is permitted to perform a remote wake-up operation. The resume may be initiated under firmware control by writing the resume value to the NFSR register. This bit is cleared when the register is read."]
    #[inline(always)]
    pub fn usb_sd5(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbAltevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbAltevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Suspend Detect 3 ms\nThis bit is set to 1 after 3 ms of IDLE have been detected on the upstream port, indicating that the device should be suspended. The suspend occurs under firmware control by writing the suspend value to the Node Functional State (NFSR) register. This bit is cleared when the register is read."]
    #[inline(always)]
    pub fn usb_sd3(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbAltevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbAltevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "End of Packet\nA valid EOP sequence was been detected on the USB. It is used when this device has initiated a Remote wake-up sequence to indicate that the Resume sequence has been acknowledged and completed by the host. This bit is cleared when the register is read."]
    #[inline(always)]
    pub fn usb_eop(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbAltevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbAltevReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbAltevReg {
    #[inline(always)]
    fn default() -> UsbAltevReg {
        <crate::RegValueT<UsbAltevReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbAltmskReg_SPEC;
impl crate::sealed::RegSpec for UsbAltmskReg_SPEC {
    type DataType = u16;
}

#[doc = "Alternate Mask Register"]
pub type UsbAltmskReg = crate::RegValueT<UsbAltmskReg_SPEC>;

impl UsbAltmskReg {
    #[doc = "A bit set to 1 in this register enables automatic setting of the ALT bit in the MAEV register when the respective event in the ALTEV register occurs. Otherwise, setting MAEV.ALT bit is disabled.\nSame Bit Definition as ALTEV Register"]
    #[inline(always)]
    pub fn usb_m_resume(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbAltmskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbAltmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as ALTEV Register"]
    #[inline(always)]
    pub fn usb_m_reset(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbAltmskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<6,1,0,UsbAltmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as ALTEV Register"]
    #[inline(always)]
    pub fn usb_m_sd5(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbAltmskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbAltmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as ALTEV Register"]
    #[inline(always)]
    pub fn usb_m_sd3(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbAltmskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbAltmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as ALTEV Register"]
    #[inline(always)]
    pub fn usb_m_eop(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbAltmskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbAltmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbAltmskReg {
    #[inline(always)]
    fn default() -> UsbAltmskReg {
        <crate::RegValueT<UsbAltmskReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbChargerCtrlReg_SPEC;
impl crate::sealed::RegSpec for UsbChargerCtrlReg_SPEC {
    type DataType = u16;
}

#[doc = "USB Charger Control Register"]
pub type UsbChargerCtrlReg = crate::RegValueT<UsbChargerCtrlReg_SPEC>;

impl UsbChargerCtrlReg {
    #[doc = "0 = Disable\n1 = Enable the Idm_sink to USBm"]
    #[inline(always)]
    pub fn idm_sink_on(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbChargerCtrlReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbChargerCtrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "0 = Disable\n1 = Enable the Idp_sink to USBp"]
    #[inline(always)]
    pub fn idp_sink_on(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbChargerCtrlReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbChargerCtrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "0 = Disable\n1 = Enable Vdm_src to USBm and USB_DCP_DET status bit."]
    #[inline(always)]
    pub fn vdm_src_on(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbChargerCtrlReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbChargerCtrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "0 = Disable\n1 = Enable the Vdp_src to USB_CHG_DET status bit."]
    #[inline(always)]
    pub fn vdp_src_on(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbChargerCtrlReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbChargerCtrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "0 = Disable\n1 = Enable the Idp_src and Rdm_dwn."]
    #[inline(always)]
    pub fn idp_src_on(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, UsbChargerCtrlReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,UsbChargerCtrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "0 = Disable USB charger detect circuit.\n1 = Enable USB charger detect circuit."]
    #[inline(always)]
    pub fn usb_charge_on(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbChargerCtrlReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbChargerCtrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbChargerCtrlReg {
    #[inline(always)]
    fn default() -> UsbChargerCtrlReg {
        <crate::RegValueT<UsbChargerCtrlReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbChargerStatReg_SPEC;
impl crate::sealed::RegSpec for UsbChargerStatReg_SPEC {
    type DataType = u16;
}

#[doc = "USB Charger Status Register"]
pub type UsbChargerStatReg = crate::RegValueT<UsbChargerStatReg_SPEC>;

impl UsbChargerStatReg {
    #[doc = "0 = USBm <2.3V\n1 = USBm >2.5V"]
    #[inline(always)]
    pub fn usb_dm_val2(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbChargerStatReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5,1,0,UsbChargerStatReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "0: USBp < 2.3V\n1: USBp > 2.5V"]
    #[inline(always)]
    pub fn usb_dp_val2(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbChargerStatReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<4,1,0,UsbChargerStatReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "0 = USBm < 0.8V\n1 = USBm > 1.5V (PS2 or Proprietary Charger)"]
    #[inline(always)]
    pub fn usb_dm_val(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbChargerStatReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<3,1,0,UsbChargerStatReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "0 = USBp < 0.8V\n1 = USBp > 1.5V"]
    #[inline(always)]
    pub fn usb_dp_val(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbChargerStatReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<2,1,0,UsbChargerStatReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "0 = Standard downstream or nothing connected.\n1 = Charging Downstream Port (CDP) or Dedicated Charging."]
    #[inline(always)]
    pub fn usb_chg_det(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, UsbChargerStatReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<1,1,0,UsbChargerStatReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "0 = Charging downstream port is detected.\n1 = Dedicated charger is detected.\nControl bit VDM_SRC_ON must be set to validate this status bit.\nNote: This register shows the actual status."]
    #[inline(always)]
    pub fn usb_dcp_det(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbChargerStatReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<0,1,0,UsbChargerStatReg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbChargerStatReg {
    #[inline(always)]
    fn default() -> UsbChargerStatReg {
        <crate::RegValueT<UsbChargerStatReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbDmaCtrlReg_SPEC;
impl crate::sealed::RegSpec for UsbDmaCtrlReg_SPEC {
    type DataType = u16;
}

#[doc = "USB DMA control register"]
pub type UsbDmaCtrlReg = crate::RegValueT<UsbDmaCtrlReg_SPEC>;

impl UsbDmaCtrlReg {
    #[doc = "0 = USB DMA control off. (Normal operation)\n1 = USB_DMA on. DMA channels 0 and 1 are connected by\nUSB Endpoint according bits USB_DMA_TX and USB_DMA_RX"]
    #[inline(always)]
    pub fn usb_dma_en(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbDmaCtrlReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<6,1,0,UsbDmaCtrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "000 = DMA channels 1 is connected Tx USB Endpoint 1\n001 = DMA channels 1 is connected Tx USB Endpoint 3\n010 = DMA channels 1 is connected Tx USB Endpoint 5\n100, 1xx = Reserved"]
    #[inline(always)]
    pub fn usb_dma_tx(
        self,
    ) -> crate::common::RegisterField<3, 0x7, 1, 0, u8, u8, UsbDmaCtrlReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<3,0x7,1,0,u8,u8,UsbDmaCtrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "000 = DMA channels 0 is connected Rx USB Endpoint 2\n001 = DMA channels 0 is connected Rx USB Endpoint 4\n010 = DMA channels 0 is connected Rx USB Endpoint 6\n100, 1xx = Reserved"]
    #[inline(always)]
    pub fn usb_dma_rx(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, UsbDmaCtrlReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,UsbDmaCtrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbDmaCtrlReg {
    #[inline(always)]
    fn default() -> UsbDmaCtrlReg {
        <crate::RegValueT<UsbDmaCtrlReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbEp0NakReg_SPEC;
impl crate::sealed::RegSpec for UsbEp0NakReg_SPEC {
    type DataType = u16;
}

#[doc = "EP0 INNAK and OUTNAK Register"]
pub type UsbEp0NakReg = crate::RegValueT<UsbEp0NakReg_SPEC>;

impl UsbEp0NakReg {
    #[doc = "End point 0 OUT NAK\nThis bit n is set to 1 when a NAK handshake is generated for an enabled address/endpoint combination (AD_EN in the FAR register is set to 1) in response to an OUT token. This bit is not set if NAK is generated as result of an overrun condition. It is cleared when the register is read."]
    #[inline(always)]
    pub fn usb_ep0_outnak(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, UsbEp0NakReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<1,1,0,UsbEp0NakReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "End point 0 IN NAK\nThis bit is set to 1 when a NAK handshake is generated for an enabled address/endpoint combination (AD_EN in the FAR register is set to 1) in response to an IN token. This bit is cleared when the register is read."]
    #[inline(always)]
    pub fn usb_ep0_innak(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbEp0NakReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<0,1,0,UsbEp0NakReg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbEp0NakReg {
    #[inline(always)]
    fn default() -> UsbEp0NakReg {
        <crate::RegValueT<UsbEp0NakReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbEpc0Reg_SPEC;
impl crate::sealed::RegSpec for UsbEpc0Reg_SPEC {
    type DataType = u16;
}

#[doc = "Endpoint Control 0 Register"]
pub type UsbEpc0Reg = crate::RegValueT<UsbEpc0Reg_SPEC>;

impl UsbEpc0Reg {
    #[doc = "Stall\nSetting this bit to 1 causes the chip to generate STALL handshakes under the following conditions:\n- The transmit FIFO is enabled and an IN token is received.\n- The receive FIFO is enabled and an OUT token is received.\nNote: A SETUP token does not cause a STALL handshake to be generated when this bit is set.\nUpon transmitting the STALL handshake, the RX_LAST and the TX_DONE bits in the respective Receive/Transmit Status registers are set to 1."]
    #[inline(always)]
    pub fn usb_stall(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbEpc0Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbEpc0Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Default Address\nWhen set to 1, the device responds to the default address regardless of the contents of FAR6-0/EP03-0 fields. When an IN packet is transmitted for the endpoint, the DEF bit is automatically cleared to 0.\nThis bit aids in the transition from default address to assigned address. The transition from the default address 00000000000b to an address assigned during bus enumeration may not occur in the middle of the SET_ADDRESS control sequence. This is necessary to complete the control sequence. However, the address must change immediately after this sequence finishes in order to avoid errors when another control sequence immediately follows the SET_ADDRESS command.\nOn USB reset, the firmware has 10 ms for set-up, and should write 8016 to the FAR register and 0016 to the EPC0 register. On receipt of a SET_ADDRESS command, the firmware must write 4016 to the EPC0 register and (8016 or <assigned_function_address>) to the FAR register. It must then queue a zero length IN packet to complete the status phase of the SET_ADDRESS control sequence."]
    #[inline(always)]
    pub fn usb_def(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbEpc0Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<6,1,0,UsbEpc0Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Address\nThis field holds the 4-bit Endpoint address. For Endpoint 0, these bits are hardwired to 0000b. Writing a 1 to any of the EP bits is ignored."]
    #[inline(always)]
    pub fn usb_ep(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, UsbEpc0Reg_SPEC, crate::common::R> {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,UsbEpc0Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbEpc0Reg {
    #[inline(always)]
    fn default() -> UsbEpc0Reg {
        <crate::RegValueT<UsbEpc0Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbEpc1Reg_SPEC;
impl crate::sealed::RegSpec for UsbEpc1Reg_SPEC {
    type DataType = u16;
}

#[doc = "Endpoint Control Register 1"]
pub type UsbEpc1Reg = crate::RegValueT<UsbEpc1Reg_SPEC>;

impl UsbEpc1Reg {
    #[doc = "Stall\nSetting this bit to 1 causes the chip to generate STALL handshakes under the following conditions:\nThe transmit FIFO is enabled and an IN token is received.\nThe receive FIFO is enabled and an OUT token is received.\nSetting this bit to 1 does not generate a STALL handshake in response to a SETUP token"]
    #[inline(always)]
    pub fn usb_stall(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbEpc1Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbEpc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Isochronous\nWhen this bit is set to 1, the endpoint is isochronous. This implies that no NAK is sent if the endpoint is not ready but enabled; i.e. If an IN token is received and no data is available in the FIFO to transmit, or if an OUT token is received and the FIFO is full since there is no USB handshake for isochronous transfers."]
    #[inline(always)]
    pub fn usb_iso(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbEpc1Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbEpc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Enable\nWhen this bit is set to 1, the EP\\[3:0\\] field is used in address comparison, together with the AD\\[6:0\\] field in the FAR register. When cleared to 0, the endpoint does not respond to any token on the USB bus."]
    #[inline(always)]
    pub fn usb_ep_en(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbEpc1Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbEpc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Address\nThis 4-bit field holds the endpoint address."]
    #[inline(always)]
    pub fn usb_ep(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, UsbEpc1Reg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,UsbEpc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbEpc1Reg {
    #[inline(always)]
    fn default() -> UsbEpc1Reg {
        <crate::RegValueT<UsbEpc1Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbEpc2Reg_SPEC;
impl crate::sealed::RegSpec for UsbEpc2Reg_SPEC {
    type DataType = u16;
}

#[doc = "Endpoint Control Register 2"]
pub type UsbEpc2Reg = crate::RegValueT<UsbEpc2Reg_SPEC>;

impl UsbEpc2Reg {
    #[doc = "Stall\nSetting this bit to 1 causes the chip to generate STALL handshakes under the following conditions:\nThe transmit FIFO is enabled and an IN token is received.\nThe receive FIFO is enabled and an OUT token is received.\nSetting this bit to 1 does not generate a STALL handshake in response to a SETUP token"]
    #[inline(always)]
    pub fn usb_stall(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbEpc2Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbEpc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Isochronous\nWhen this bit is set to 1, the endpoint is isochronous. This implies that no NAK is sent if the endpoint is not ready but enabled; i.e. If an IN token is received and no data is available in the FIFO to transmit, or if an OUT token is received and the FIFO is full since there is no USB handshake for isochronous transfers."]
    #[inline(always)]
    pub fn usb_iso(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbEpc2Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbEpc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Enable\nWhen this bit is set to 1, the EP\\[3:0\\] field is used in address comparison, together with the AD\\[6:0\\] field in the FAR register. When cleared to 0, the endpoint does not respond to any token on the USB bus."]
    #[inline(always)]
    pub fn usb_ep_en(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbEpc2Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbEpc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Address\nThis 4-bit field holds the endpoint address."]
    #[inline(always)]
    pub fn usb_ep(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, UsbEpc2Reg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,UsbEpc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbEpc2Reg {
    #[inline(always)]
    fn default() -> UsbEpc2Reg {
        <crate::RegValueT<UsbEpc2Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbEpc3Reg_SPEC;
impl crate::sealed::RegSpec for UsbEpc3Reg_SPEC {
    type DataType = u16;
}

#[doc = "Endpoint Control Register 3"]
pub type UsbEpc3Reg = crate::RegValueT<UsbEpc3Reg_SPEC>;

impl UsbEpc3Reg {
    #[doc = "Stall\nSetting this bit to 1 causes the chip to generate STALL handshakes under the following conditions:\nThe transmit FIFO is enabled and an IN token is received.\nThe receive FIFO is enabled and an OUT token is received.\nSetting this bit to 1 does not generate a STALL handshake in response to a SETUP token"]
    #[inline(always)]
    pub fn usb_stall(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbEpc3Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbEpc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Isochronous\nWhen this bit is set to 1, the endpoint is isochronous. This implies that no NAK is sent if the endpoint is not ready but enabled; i.e. If an IN token is received and no data is available in the FIFO to transmit, or if an OUT token is received and the FIFO is full since there is no USB handshake for isochronous transfers."]
    #[inline(always)]
    pub fn usb_iso(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbEpc3Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbEpc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Enable\nWhen this bit is set to 1, the EP\\[3:0\\] field is used in address comparison, together with the AD\\[6:0\\] field in the FAR register. When cleared to 0, the endpoint does not respond to any token on the USB bus."]
    #[inline(always)]
    pub fn usb_ep_en(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbEpc3Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbEpc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Address\nThis 4-bit field holds the endpoint address."]
    #[inline(always)]
    pub fn usb_ep(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, UsbEpc3Reg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,UsbEpc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbEpc3Reg {
    #[inline(always)]
    fn default() -> UsbEpc3Reg {
        <crate::RegValueT<UsbEpc3Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbEpc4Reg_SPEC;
impl crate::sealed::RegSpec for UsbEpc4Reg_SPEC {
    type DataType = u16;
}

#[doc = "Endpoint Control Register 4"]
pub type UsbEpc4Reg = crate::RegValueT<UsbEpc4Reg_SPEC>;

impl UsbEpc4Reg {
    #[doc = "Stall\nSetting this bit to 1 causes the chip to generate STALL handshakes under the following conditions:\nThe transmit FIFO is enabled and an IN token is received.\nThe receive FIFO is enabled and an OUT token is received.\nSetting this bit to 1 does not generate a STALL handshake in response to a SETUP token"]
    #[inline(always)]
    pub fn usb_stall(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbEpc4Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbEpc4Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Isochronous\nWhen this bit is set to 1, the endpoint is isochronous. This implies that no NAK is sent if the endpoint is not ready but enabled; i.e. If an IN token is received and no data is available in the FIFO to transmit, or if an OUT token is received and the FIFO is full since there is no USB handshake for isochronous transfers."]
    #[inline(always)]
    pub fn usb_iso(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbEpc4Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbEpc4Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Enable\nWhen this bit is set to 1, the EP\\[3:0\\] field is used in address comparison, together with the AD\\[6:0\\] field in the FAR register. When cleared to 0, the endpoint does not respond to any token on the USB bus."]
    #[inline(always)]
    pub fn usb_ep_en(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbEpc4Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbEpc4Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Address\nThis 4-bit field holds the endpoint address."]
    #[inline(always)]
    pub fn usb_ep(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, UsbEpc4Reg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,UsbEpc4Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbEpc4Reg {
    #[inline(always)]
    fn default() -> UsbEpc4Reg {
        <crate::RegValueT<UsbEpc4Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbEpc5Reg_SPEC;
impl crate::sealed::RegSpec for UsbEpc5Reg_SPEC {
    type DataType = u16;
}

#[doc = "Endpoint Control Register 5"]
pub type UsbEpc5Reg = crate::RegValueT<UsbEpc5Reg_SPEC>;

impl UsbEpc5Reg {
    #[doc = "Stall\nSetting this bit to 1 causes the chip to generate STALL handshakes under the following conditions:\nThe transmit FIFO is enabled and an IN token is received.\nThe receive FIFO is enabled and an OUT token is received.\nSetting this bit to 1 does not generate a STALL handshake in response to a SETUP token"]
    #[inline(always)]
    pub fn usb_stall(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbEpc5Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbEpc5Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Isochronous\nWhen this bit is set to 1, the endpoint is isochronous. This implies that no NAK is sent if the endpoint is not ready but enabled; i.e. If an IN token is received and no data is available in the FIFO to transmit, or if an OUT token is received and the FIFO is full since there is no USB handshake for isochronous transfers."]
    #[inline(always)]
    pub fn usb_iso(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbEpc5Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbEpc5Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Enable\nWhen this bit is set to 1, the EP\\[3:0\\] field is used in address comparison, together with the AD\\[6:0\\] field in the FAR register. When cleared to 0, the endpoint does not respond to any token on the USB bus."]
    #[inline(always)]
    pub fn usb_ep_en(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbEpc5Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbEpc5Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Address\nThis 4-bit field holds the endpoint address."]
    #[inline(always)]
    pub fn usb_ep(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, UsbEpc5Reg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,UsbEpc5Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbEpc5Reg {
    #[inline(always)]
    fn default() -> UsbEpc5Reg {
        <crate::RegValueT<UsbEpc5Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbEpc6Reg_SPEC;
impl crate::sealed::RegSpec for UsbEpc6Reg_SPEC {
    type DataType = u16;
}

#[doc = "Endpoint Control Register 6"]
pub type UsbEpc6Reg = crate::RegValueT<UsbEpc6Reg_SPEC>;

impl UsbEpc6Reg {
    #[doc = "Stall\nSetting this bit to 1 causes the chip to generate STALL handshakes under the following conditions:\nThe transmit FIFO is enabled and an IN token is received.\nThe receive FIFO is enabled and an OUT token is received.\nSetting this bit to 1 does not generate a STALL handshake in response to a SETUP token"]
    #[inline(always)]
    pub fn usb_stall(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbEpc6Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbEpc6Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Isochronous\nWhen this bit is set to 1, the endpoint is isochronous. This implies that no NAK is sent if the endpoint is not ready but enabled; i.e. If an IN token is received and no data is available in the FIFO to transmit, or if an OUT token is received and the FIFO is full since there is no USB handshake for isochronous transfers."]
    #[inline(always)]
    pub fn usb_iso(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbEpc6Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbEpc6Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Enable\nWhen this bit is set to 1, the EP\\[3:0\\] field is used in address comparison, together with the AD\\[6:0\\] field in the FAR register. When cleared to 0, the endpoint does not respond to any token on the USB bus."]
    #[inline(always)]
    pub fn usb_ep_en(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbEpc6Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbEpc6Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint Address\nThis 4-bit field holds the endpoint address."]
    #[inline(always)]
    pub fn usb_ep(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, UsbEpc6Reg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,UsbEpc6Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbEpc6Reg {
    #[inline(always)]
    fn default() -> UsbEpc6Reg {
        <crate::RegValueT<UsbEpc6Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbFarReg_SPEC;
impl crate::sealed::RegSpec for UsbFarReg_SPEC {
    type DataType = u16;
}

#[doc = "Function Address Register"]
pub type UsbFarReg = crate::RegValueT<UsbFarReg_SPEC>;

impl UsbFarReg {
    #[doc = "Address Enable\nWhen set to 1, USB address field bits 6-0 are used in address comparison\nWhen cleared to 0, the device does not respond to any token on the USB bus.\nNote: If the DEF bit in the Endpoint Control 0 register is set, Endpoint 0 responds to the default address."]
    #[inline(always)]
    pub fn usb_ad_en(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbFarReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbFarReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Address\nThis field holds the 7-bit function address used to transmit and receive all tokens addressed to this device."]
    #[inline(always)]
    pub fn usb_ad(
        self,
    ) -> crate::common::RegisterField<0, 0x7f, 1, 0, u8, u8, UsbFarReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x7f,1,0,u8,u8,UsbFarReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbFarReg {
    #[inline(always)]
    fn default() -> UsbFarReg {
        <crate::RegValueT<UsbFarReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbFnhReg_SPEC;
impl crate::sealed::RegSpec for UsbFnhReg_SPEC {
    type DataType = u16;
}

#[doc = "Frame Number High Byte Register"]
pub type UsbFnhReg = crate::RegValueT<UsbFnhReg_SPEC>;

impl UsbFnhReg {
    #[doc = "Missed SOF Flag\nThis flag is set to 1, when the frame number in a valid received SOF does not match the expected next value, or when an SOF is not received within 12060 bit times. This bit is set by the hardware and is cleared by reading the FNH register."]
    #[inline(always)]
    pub fn usb_mf(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbFnhReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<7, 1, 0, UsbFnhReg_SPEC, crate::common::R>::from_register(
            self, 0,
        )
    }

    #[doc = "Unlock Flag\nThis bit indicates that at least two frames were received without an expected frame number, or that no valid SOF was received within 12060 bit times. If this bit is set, the frame number from the next valid SOF packet is loaded in FN. This bit is set by the hardware and is cleared by reading the FNH register."]
    #[inline(always)]
    pub fn usb_ul(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbFnhReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<6, 1, 0, UsbFnhReg_SPEC, crate::common::R>::from_register(
            self, 0,
        )
    }

    #[doc = "Reset Frame Count\nWriting a 1 to this bit resets the frame number to 00016, after which this bit clears itself to 0 again. This bit always reads 0."]
    #[inline(always)]
    pub fn usb_rfc(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbFnhReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5, 1, 0, UsbFnhReg_SPEC, crate::common::R>::from_register(
            self, 0,
        )
    }

    #[doc = "Frame Number\nThis 3-bit field contains the three most significant bits (MSB) of the current frame number, received in the last SOF packet. If a valid frame number is not received within 12060 bit times (Frame Length Maximum, FLMAX, with tolerance) of the previous change, the frame number is incremented artificially. If two successive frames are missed or are incorrect, the current FN is frozen and loaded with the next frame number from a valid SOF packet.\nIf the frame number low byte was read by firmware before reading the FNH register, the user actually reads the contents of a buffer register which holds the value of the three frame number bits of this register when the low byte was read. Therefore, the correct sequence to read the frame number is: FNL, FNH. Read operations to the FNH register, without first reading the Frame Number Low Byte (FNL) register directly, read the actual value of the three MSBs of the frame number."]
    #[inline(always)]
    pub fn usb_fn_10_8(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, UsbFnhReg_SPEC, crate::common::R> {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,UsbFnhReg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbFnhReg {
    #[inline(always)]
    fn default() -> UsbFnhReg {
        <crate::RegValueT<UsbFnhReg_SPEC> as RegisterValue<_>>::new(192)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbFnlReg_SPEC;
impl crate::sealed::RegSpec for UsbFnlReg_SPEC {
    type DataType = u16;
}

#[doc = "Frame Number Low Byte Register"]
pub type UsbFnlReg = crate::RegValueT<UsbFnlReg_SPEC>;

impl UsbFnlReg {
    #[doc = "The Frame Number Low Byte Register holds the low byte of the frame number. To ensure consistency, reading this low byte causes the three frame number bits in the FNH register to be locked until this register is read. The correct sequence to read the frame number is: FNL, FNH."]
    #[inline(always)]
    pub fn usb_fn(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, UsbFnlReg_SPEC, crate::common::R> {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,UsbFnlReg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbFnlReg {
    #[inline(always)]
    fn default() -> UsbFnlReg {
        <crate::RegValueT<UsbFnlReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbFwevReg_SPEC;
impl crate::sealed::RegSpec for UsbFwevReg_SPEC {
    type DataType = u16;
}

#[doc = "FIFO Warning Event Register"]
pub type UsbFwevReg = crate::RegValueT<UsbFwevReg_SPEC>;

impl UsbFwevReg {
    #[doc = "Receive Warning n: 3:1\nThe bit n is set to 1 when the respective receive endpoint FIFO reaches the warning limit, as specified by the RFWL bits of the respective EPCx register. This bit is cleared when the warning condition is cleared by either reading data from the FIFO or when the FIFO is flushed."]
    #[inline(always)]
    pub fn usb_rxwarn31(
        self,
    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, UsbFwevReg_SPEC, crate::common::R> {
        crate::common::RegisterField::<4,0x7,1,0,u8,u8,UsbFwevReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Transmit Warning n: 3:1\nThe bit n is set to 1 when the respective transmit endpoint FIFO reaches the warning limit, as specified by the TFWL bits of the respective TXCn register, and transmission from the respective endpoint is enabled. This bit is cleared when the warning condition is cleared by either writing new data to the FIFO when the FIFO is flushed, or when transmission is done, as indicated by the TX_DONE bit in the TXSn register."]
    #[inline(always)]
    pub fn usb_txwarn31(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, UsbFwevReg_SPEC, crate::common::R> {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,UsbFwevReg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbFwevReg {
    #[inline(always)]
    fn default() -> UsbFwevReg {
        <crate::RegValueT<UsbFwevReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbFwmskReg_SPEC;
impl crate::sealed::RegSpec for UsbFwmskReg_SPEC {
    type DataType = u16;
}

#[doc = "FIFO Warning Mask Register"]
pub type UsbFwmskReg = crate::RegValueT<UsbFwmskReg_SPEC>;

impl UsbFwmskReg {
    #[doc = "The FIFO Warning Mask Register selects, which FWEV bits are reported in the MAEV register. A bit set to 1 and the corresponding bit in the FWEV register is set 1, causes the WARN bit in the MAEV register to be set to 1. When cleared to 0, the corresponding bit in the FWEV register does not cause WARN to be set to 1. Same Bit Definition as FWEV Register"]
    #[inline(always)]
    pub fn usb_m_rxwarn31(
        self,
    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, UsbFwmskReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<4,0x7,1,0,u8,u8,UsbFwmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "The FIFO Warning Mask Register selects, which FWEV bits are reported in the MAEV register. A bit set to 1 and the corresponding bit in the FWEV register is set 1, causes the WARN bit in the MAEV register to be set to 1. When cleared to 0, the corresponding bit in the FWEV register does not cause WARN to be set to 1. Same Bit Definition as FWEV Register"]
    #[inline(always)]
    pub fn usb_m_txwarn31(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, UsbFwmskReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,UsbFwmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbFwmskReg {
    #[inline(always)]
    fn default() -> UsbFwmskReg {
        <crate::RegValueT<UsbFwmskReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbMaevReg_SPEC;
impl crate::sealed::RegSpec for UsbMaevReg_SPEC {
    type DataType = u16;
}

#[doc = "Main Event Register"]
pub type UsbMaevReg = crate::RegValueT<UsbMaevReg_SPEC>;

impl UsbMaevReg {
    #[doc = "USB Charger event\nThis bit is set if one of the bits in USB_CHARGER_STAT_REG\\[2-0\\] change. This bit is cleared to 0 when if USB_CHARGER_STAT_REG is read."]
    #[inline(always)]
    pub fn usb_ch_ev(
        self,
    ) -> crate::common::RegisterFieldBool<11, 1, 0, UsbMaevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<11,1,0,UsbMaevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint 0 NAK Event\nThis bit is an OR of EP0_NAK_REG\\[EP0_OUTNAK\\] and EP0_NAK_REG\\[EP0_INNAK\\] bits. USB_EP0_NAK is cleared to 0 when EP0_NAK_REG is read."]
    #[inline(always)]
    pub fn usb_ep0_nak(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, UsbMaevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<10,1,0,UsbMaevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint 0 Receive Event\nThis bit is a copy of the RXS0\\[RX_LAST\\] and is cleared to 0 when this RXS0 register is read.\nNote: Since Endpoint 0 implements a store and forward principle, an overrun condition for FIFO0 cannot occur"]
    #[inline(always)]
    pub fn usb_ep0_rx(
        self,
    ) -> crate::common::RegisterFieldBool<9, 1, 0, UsbMaevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<9,1,0,UsbMaevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Endpoint 0 Transmit Event\nThis bit is a copy of the TXS0\\[TX_DONE\\] bit and is cleared to 0 when the TXS0 register is read.\nNote: Since Endpoint 0 implements a store and forward principle, an underrun condition for FIFO0 cannot occur."]
    #[inline(always)]
    pub fn usb_ep0_tx(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, UsbMaevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<8,1,0,UsbMaevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Master Interrupt Enable\nThis bit is hardwired to 0 in the Main Event (MAEV) register; bit 7 in the Main Mask (MAMSK) register is the Master Interrupt Enable."]
    #[inline(always)]
    pub fn usb_intr(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbMaevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbMaevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Receive Event\nThis bit is set to 1 if any of the unmasked bits in the Receive Event (RXEV) register is set to 1. It indicates that a SETUP or OUT transaction has been completed. This bit is cleared to 0 when all of the RX_LAST bits in each Receive Status (RXSn) register and all RXOVRRN bits in the RXEV register are cleared to 0."]
    #[inline(always)]
    pub fn usb_rx_ev(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbMaevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<6,1,0,UsbMaevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Unlocked/Locked Detected\nThis bit is set to 1, when the frame timer has either entered unlocked condition from a locked condition, or has re-entered a locked condition from an unlocked condition as determined by the UL bit in the Frame Number (FNH or FNL) register. This bit is cleared to 0 when the register is read."]
    #[inline(always)]
    pub fn usb_uld(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbMaevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbMaevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Negative Acknowledge Event\nThis bit indicates that one of the unmasked NAK Event (NAKEV) register bits has been set to 1. This bit is cleared to 0 when the NAKEV register is read."]
    #[inline(always)]
    pub fn usb_nak(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbMaevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbMaevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Frame Event\nThis bit is set to 1, if the frame counter is updated with a new value. This can be due to the receipt of a valid SOF packet on the USB or to an artificial update if the frame counter was unlocked or a frame was missed. This bit is cleared to 0 when the register is read."]
    #[inline(always)]
    pub fn usb_frame(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbMaevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbMaevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Transmit Event\nThis bit is set to 1, if any of the unmasked bits in the Transmit Event (TXEV) register (TXFIFOn or TXUNDRNn) is set to 1. Therefore, it indicates that an IN transaction has been completed. This bit is cleared to 0 when all the TX_DONE bits and the TXUNDRN bits in each Transmit Status (TXSn) register are cleared to 0."]
    #[inline(always)]
    pub fn usb_tx_ev(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbMaevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbMaevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Alternate Event\nThis bit indicates that one of the unmasked ALTEV register bits has been set to 1. This bit is cleared to 0 by reading the ALTEV register."]
    #[inline(always)]
    pub fn usb_alt(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, UsbMaevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,UsbMaevReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Warning Event\nThis bit indicates that one of the unmasked bits in the FIFO Warning Event (FWEV) register has been set to 1. This bit is cleared to 0 by reading the FWEV register."]
    #[inline(always)]
    pub fn usb_warn(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbMaevReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbMaevReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbMaevReg {
    #[inline(always)]
    fn default() -> UsbMaevReg {
        <crate::RegValueT<UsbMaevReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbMamskReg_SPEC;
impl crate::sealed::RegSpec for UsbMamskReg_SPEC {
    type DataType = u16;
}

#[doc = "Main Mask Register"]
pub type UsbMamskReg = crate::RegValueT<UsbMamskReg_SPEC>;

impl UsbMamskReg {
    #[doc = "The Main Mask Register masks out events reported in the MAEV registers. A bit set to 1, enables the interrupts for the respective event in the MAEV register. If the corresponding bit is cleared to 0, interrupt generation for this event is disabled. Same Bit Definition as MAEV Register"]
    #[inline(always)]
    pub fn usb_m_ch_ev(
        self,
    ) -> crate::common::RegisterFieldBool<11, 1, 0, UsbMamskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<11,1,0,UsbMamskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as MAEV Register"]
    #[inline(always)]
    pub fn usb_m_ep0_nak(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, UsbMamskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<10,1,0,UsbMamskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as MAEV Register"]
    #[inline(always)]
    pub fn usb_m_ep0_rx(
        self,
    ) -> crate::common::RegisterFieldBool<9, 1, 0, UsbMamskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<9,1,0,UsbMamskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as MAEV Register"]
    #[inline(always)]
    pub fn usb_m_ep0_tx(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, UsbMamskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<8,1,0,UsbMamskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as MAEV Register"]
    #[inline(always)]
    pub fn usb_m_intr(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbMamskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbMamskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as MAEV Register"]
    #[inline(always)]
    pub fn usb_m_rx_ev(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbMamskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<6,1,0,UsbMamskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as MAEV Register"]
    #[inline(always)]
    pub fn usb_m_uld(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbMamskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbMamskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as MAEV Register"]
    #[inline(always)]
    pub fn usb_m_nak(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbMamskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbMamskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as MAEV Register"]
    #[inline(always)]
    pub fn usb_m_frame(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbMamskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbMamskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as MAEV Register"]
    #[inline(always)]
    pub fn usb_m_tx_ev(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbMamskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbMamskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as MAEV Register"]
    #[inline(always)]
    pub fn usb_m_alt(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, UsbMamskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,UsbMamskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as MAEV Register"]
    #[inline(always)]
    pub fn usb_m_warn(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbMamskReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbMamskReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbMamskReg {
    #[inline(always)]
    fn default() -> UsbMamskReg {
        <crate::RegValueT<UsbMamskReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbMctrlReg_SPEC;
impl crate::sealed::RegSpec for UsbMctrlReg_SPEC {
    type DataType = u16;
}

#[doc = "Main Control Register)"]
pub type UsbMctrlReg = crate::RegValueT<UsbMctrlReg_SPEC>;

impl UsbMctrlReg {
    #[doc = "Low Speed Mode\nThis bit enables USB 1.5 Mbit/s low speed and swaps D+ and D- pull-up resistors. Changing speed may only be done if USBEN is set to 0.\nAlso D+ and D- rise and fall times are adjusted according to the USB specification."]
    #[inline(always)]
    pub fn lsmode(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbMctrlReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbMctrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Node Attached\nThis bit indicates that this node is ready to be detected as attached to USB. When cleared to 0 the transceiver forces SE0 on the USB port to prevent the hub (to which this node is connected to) from detecting an attach event. After reset or when the USB node is disabled, this bit is cleared to 0 to give the device time before it must respond to commands. After this bit has been set to 1, the device no longer drives the USB and should be ready to receive Reset signalling from the hub.\nNote: This bit can only be set is USBEN is \'1\'"]
    #[inline(always)]
    pub fn usb_nat(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbMctrlReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbMctrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Debug Mode.\nWhen this bit is set, the following registers are writable: Main Event (MAEV), Alternate Event (ALTEV), NAK Event (NAKEV), Transmit Status and Receive Status. Setting the DBG bit forces the node into a locked state. The node states can be read out of the transceiver diagnostic register (XCVDIAG) at location 0xFF6802 by setting the DIAG bit in the Test Control register (UTR).\nNote: The operation of CoR bits is not effected by entering Debug mode) Note: This bit can only be set is USBEN is \'1\'"]
    #[inline(always)]
    pub fn usb_dbg(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, UsbMctrlReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,UsbMctrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "USB EnableSetting this bit to 1 enables the Full/Low Speed USB node. If the USBEN bit is cleared to 0, the USB is disabled and the 48 MHz clock within the USB node is stopped. In addition, all USB registers are set to their reset state.\nNote that the transceiver forces SE0 on the bus to prevent the hub to detected the USB node, when it is disabled (not attached).\nThe USBEN bit is cleared to 0 after reset"]
    #[inline(always)]
    pub fn usben(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbMctrlReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbMctrlReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbMctrlReg {
    #[inline(always)]
    fn default() -> UsbMctrlReg {
        <crate::RegValueT<UsbMctrlReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbNakevReg_SPEC;
impl crate::sealed::RegSpec for UsbNakevReg_SPEC {
    type DataType = u16;
}

#[doc = "NAK Event Register"]
pub type UsbNakevReg = crate::RegValueT<UsbNakevReg_SPEC>;

impl UsbNakevReg {
    #[doc = "OUT n: 3:1\nThe bit n is set to 1 when a NAK handshake is generated for an enabled address/endpoint combination (AD_EN in the FAR register is set to 1 and EP_EN in the EPCx register is set to 1) in response to an OUT token. This bit is not set if NAK is generated as result of an overrun condition. It is cleared when the register is read."]
    #[inline(always)]
    pub fn usb_out31(
        self,
    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, UsbNakevReg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<4,0x7,1,0,u8,u8,UsbNakevReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "IN n: 3:1\nThe bit n is set to 1 when a NAK handshake is generated for an enabled address/endpoint combination (AD_EN in the Function Address, FAR, register is set to 1 and EP_EN in the Endpoint Control, EPCx, register is set to 1) in response to an IN token. This bit is cleared when the register is read."]
    #[inline(always)]
    pub fn usb_in31(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, UsbNakevReg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,UsbNakevReg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbNakevReg {
    #[inline(always)]
    fn default() -> UsbNakevReg {
        <crate::RegValueT<UsbNakevReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbNakmskReg_SPEC;
impl crate::sealed::RegSpec for UsbNakmskReg_SPEC {
    type DataType = u16;
}

#[doc = "NAK Mask Register"]
pub type UsbNakmskReg = crate::RegValueT<UsbNakmskReg_SPEC>;

impl UsbNakmskReg {
    #[doc = "When set and the corresponding bit in the NAKEV register is set, the NAK bit in the MAEV register is set. When cleared, the corresponding bit in the NAKEV register does not cause NAK to be set. Same Bit Definition as NAKEV Register"]
    #[inline(always)]
    pub fn usb_m_out31(
        self,
    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, UsbNakmskReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<4,0x7,1,0,u8,u8,UsbNakmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as NAKEV Register"]
    #[inline(always)]
    pub fn usb_m_in31(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, UsbNakmskReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,UsbNakmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbNakmskReg {
    #[inline(always)]
    fn default() -> UsbNakmskReg {
        <crate::RegValueT<UsbNakmskReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbNfsrReg_SPEC;
impl crate::sealed::RegSpec for UsbNfsrReg_SPEC {
    type DataType = u16;
}

#[doc = "Node Functional State Register"]
pub type UsbNfsrReg = crate::RegValueT<UsbNfsrReg_SPEC>;

impl UsbNfsrReg {
    #[doc = "The Node Functional State Register reports and controls the current functional state of the USB node.\n00: NodeReset.\nThis is the USB Reset state. This is entered upon a module reset or by software upon detection of a USB Reset. Upon entry, all endpoint pipes are disabled. DEF in the Endpoint Control 0 (EPC0) register and AD_EN in the Function Address (FAR) register should be cleared by software on entry to this state. On exit, DEF should be reset so the device responds to the default address.\n01: NodeResume\nIn this state, resume signalling is generated. This state should be entered by firmware to initiate a remote wake-up sequence by the device. The node must remain in this state for at least 1 ms and no more than 15 ms.\n10: NodeOperational\nThis is the normal operational state. In this state the node is configured for operation on the USB bus.\n11: NodeSuspend\nSuspend state should be entered by firmware on detection of a Suspend event while in Operational state. While in Suspend state, the transceivers operate in their low-power suspend mode. All endpoint controllers and the bits TX_EN, LAST and RX_EN are reset, while all other internal states are frozen. On detection of bus activity, the RESUME bit in the ALTEV register is set. In response, software can cause entry to NodeOperational state."]
    #[inline(always)]
    pub fn usb_nfs(
        self,
    ) -> crate::common::RegisterField<0, 0x3, 1, 0, u8, u8, UsbNfsrReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x3,1,0,u8,u8,UsbNfsrReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbNfsrReg {
    #[inline(always)]
    fn default() -> UsbNfsrReg {
        <crate::RegValueT<UsbNfsrReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxc0Reg_SPEC;
impl crate::sealed::RegSpec for UsbRxc0Reg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Command 0 Register"]
pub type UsbRxc0Reg = crate::RegValueT<UsbRxc0Reg_SPEC>;

impl UsbRxc0Reg {
    #[doc = "Flush\nWriting a 1 to this bit flushes all data from the control endpoint FIFOs, resets the endpoint to Idle state, clears the FIFO read and write pointer, and then clears itself. If the endpoint is currently using FIFO0 to transfer data on USB, flushing is delayed until after the transfer is done. This bit is cleared to 0 on reset. This bit is equivalent to FLUSH in the TXC0 register."]
    #[inline(always)]
    pub fn usb_flush(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbRxc0Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbRxc0Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Ignore SETUP Tokens\nWhen this bit is set to 1, the endpoint ignores any SETUP tokens directed to its configured address."]
    #[inline(always)]
    pub fn usb_ign_setup(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbRxc0Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbRxc0Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Ignore OUT Tokens\nWhen this bit is set to 1, the endpoint ignores any OUT tokens directed to its configured address."]
    #[inline(always)]
    pub fn usb_ign_out(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, UsbRxc0Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,UsbRxc0Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Receive Enable\nOUT packet reception is disabled after every data packet is received, or when a STALL handshake is returned in response to an OUT token. A 1 must be written to this bit to re-enable data reception. Reception of SETUP packets is always enabled. In the case of back-to-back SETUP packets (for a given endpoint) where a valid SETUP packet is received with no other intervening non-SETUP tokens, the Endpoint Controller discards the new SETUP packet and returns an ACK handshake. If any other reasons prevent the Endpoint Controller from accepting the SETUP packet, it must not generate a handshake. This allows recovery from a condition where the ACK of the first SETUP token was lost by the host."]
    #[inline(always)]
    pub fn usb_rx_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbRxc0Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbRxc0Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxc0Reg {
    #[inline(always)]
    fn default() -> UsbRxc0Reg {
        <crate::RegValueT<UsbRxc0Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxc1Reg_SPEC;
impl crate::sealed::RegSpec for UsbRxc1Reg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Command Register 1"]
pub type UsbRxc1Reg = crate::RegValueT<UsbRxc1Reg_SPEC>;

impl UsbRxc1Reg {
    #[doc = "Receive FIFO Warning Limit\nThese bits specify how many more bytes can be received to the respective FIFO before an overrun condition occurs. If the number of empty bytes remaining in the FIFO is equal to or less than the selected warning limit, the RXWARN bit in the FWEV register is set to 1.RFWL\\[1:0\\] :\n00: RFWL disabled\n01: Less than 5 bytes remaining in FIFO\n10: Less than 9 bytes remaining in FIFO\n11: Less than 17 bytes remaining in FIFO"]
    #[inline(always)]
    pub fn usb_rfwl(
        self,
    ) -> crate::common::RegisterField<5, 0x3, 1, 0, u8, u8, UsbRxc1Reg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<5,0x3,1,0,u8,u8,UsbRxc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Flush FIFO\nWriting a 1 to this bit flushes all data from the corresponding receive FIFO, resets the endpoint to Idle state, and resets both the FIFO read and write pointers. If the MAC is currently using the FIFO to receive data, flushing is delayed until after receiving is completed."]
    #[inline(always)]
    pub fn usb_flush(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbRxc1Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbRxc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Ignore SETUP Tokens\nWhen this bit is set to 1, the endpoint ignores any SETUP tokens directed to its configured address."]
    #[inline(always)]
    pub fn usb_ign_setup(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbRxc1Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbRxc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Receive Enable\nOUT packet cannot be received after every data packet is received, or when a STALL handshake is returned in response to an OUT token. This bit must be written with a 1 to re-enable data reception. SETUP packets can always be received. In the case of back-to-back SETUP packets (for a given endpoint) where a valid SETUP packet has been received with no other intervening non-SETUP tokens, the receive state machine discards the new SETUP packet and returns an ACK handshake. If, for any other reason, the receive state machine cannot accept the SETUP packet, no HANDSHAKE should be generated."]
    #[inline(always)]
    pub fn usb_rx_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbRxc1Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbRxc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxc1Reg {
    #[inline(always)]
    fn default() -> UsbRxc1Reg {
        <crate::RegValueT<UsbRxc1Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxc2Reg_SPEC;
impl crate::sealed::RegSpec for UsbRxc2Reg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Command Register 2"]
pub type UsbRxc2Reg = crate::RegValueT<UsbRxc2Reg_SPEC>;

impl UsbRxc2Reg {
    #[doc = "Receive FIFO Warning Limit\nThese bits specify how many more bytes can be received to the respective FIFO before an overrun condition occurs. If the number of empty bytes remaining in the FIFO is equal to or less than the selected warning limit, the RXWARN bit in the FWEV register is set to 1.RFWL\\[1:0\\] :\n00: RFWL disabled\n01: Less than 5 bytes remaining in FIFO\n10: Less than 9 bytes remaining in FIFO\n11: Less than 17 bytes remaining in FIFO"]
    #[inline(always)]
    pub fn usb_rfwl(
        self,
    ) -> crate::common::RegisterField<5, 0x3, 1, 0, u8, u8, UsbRxc2Reg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<5,0x3,1,0,u8,u8,UsbRxc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Flush FIFO\nWriting a 1 to this bit flushes all data from the corresponding receive FIFO, resets the endpoint to Idle state, and resets both the FIFO read and write pointers. If the MAC is currently using the FIFO to receive data, flushing is delayed until after receiving is completed."]
    #[inline(always)]
    pub fn usb_flush(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbRxc2Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbRxc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Ignore SETUP Tokens\nWhen this bit is set to 1, the endpoint ignores any SETUP tokens directed to its configured address."]
    #[inline(always)]
    pub fn usb_ign_setup(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbRxc2Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbRxc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Receive Enable\nOUT packet cannot be received after every data packet is received, or when a STALL handshake is returned in response to an OUT token. This bit must be written with a 1 to re-enable data reception. SETUP packets can always be received. In the case of back-to-back SETUP packets (for a given endpoint) where a valid SETUP packet has been received with no other intervening non-SETUP tokens, the receive state machine discards the new SETUP packet and returns an ACK handshake. If, for any other reason, the receive state machine cannot accept the SETUP packet, no HANDSHAKE should be generated."]
    #[inline(always)]
    pub fn usb_rx_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbRxc2Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbRxc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxc2Reg {
    #[inline(always)]
    fn default() -> UsbRxc2Reg {
        <crate::RegValueT<UsbRxc2Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxc3Reg_SPEC;
impl crate::sealed::RegSpec for UsbRxc3Reg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Command Register 3"]
pub type UsbRxc3Reg = crate::RegValueT<UsbRxc3Reg_SPEC>;

impl UsbRxc3Reg {
    #[doc = "Receive FIFO Warning Limit\nThese bits specify how many more bytes can be received to the respective FIFO before an overrun condition occurs. If the number of empty bytes remaining in the FIFO is equal to or less than the selected warning limit, the RXWARN bit in the FWEV register is set to 1.RFWL\\[1:0\\] :\n00: RFWL disabled\n01: Less than 5 bytes remaining in FIFO\n10: Less than 9 bytes remaining in FIFO\n11: Less than 17 bytes remaining in FIFO"]
    #[inline(always)]
    pub fn usb_rfwl(
        self,
    ) -> crate::common::RegisterField<5, 0x3, 1, 0, u8, u8, UsbRxc3Reg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<5,0x3,1,0,u8,u8,UsbRxc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Flush FIFO\nWriting a 1 to this bit flushes all data from the corresponding receive FIFO, resets the endpoint to Idle state, and resets both the FIFO read and write pointers. If the MAC is currently using the FIFO to receive data, flushing is delayed until after receiving is completed."]
    #[inline(always)]
    pub fn usb_flush(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbRxc3Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbRxc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Ignore SETUP Tokens\nWhen this bit is set to 1, the endpoint ignores any SETUP tokens directed to its configured address."]
    #[inline(always)]
    pub fn usb_ign_setup(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbRxc3Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbRxc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Receive Enable\nOUT packet cannot be received after every data packet is received, or when a STALL handshake is returned in response to an OUT token. This bit must be written with a 1 to re-enable data reception. SETUP packets can always be received. In the case of back-to-back SETUP packets (for a given endpoint) where a valid SETUP packet has been received with no other intervening non-SETUP tokens, the receive state machine discards the new SETUP packet and returns an ACK handshake. If, for any other reason, the receive state machine cannot accept the SETUP packet, no HANDSHAKE should be generated."]
    #[inline(always)]
    pub fn usb_rx_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbRxc3Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbRxc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxc3Reg {
    #[inline(always)]
    fn default() -> UsbRxc3Reg {
        <crate::RegValueT<UsbRxc3Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxd0Reg_SPEC;
impl crate::sealed::RegSpec for UsbRxd0Reg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Data 0 Register"]
pub type UsbRxd0Reg = crate::RegValueT<UsbRxd0Reg_SPEC>;

impl UsbRxd0Reg {
    #[doc = "Receive FIFO Data Byte\nThe firmware should expect to read only the packet payload data. The PID and CRC16 are removed from the incoming data stream automatically.\nIn TEST mode this register allow read/write access."]
    #[inline(always)]
    pub fn usb_rxfd(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, UsbRxd0Reg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,UsbRxd0Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxd0Reg {
    #[inline(always)]
    fn default() -> UsbRxd0Reg {
        <crate::RegValueT<UsbRxd0Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxd1Reg_SPEC;
impl crate::sealed::RegSpec for UsbRxd1Reg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Data Register,1"]
pub type UsbRxd1Reg = crate::RegValueT<UsbRxd1Reg_SPEC>;

impl UsbRxd1Reg {
    #[doc = "Receive FIFO Data Byte\nThe firmware should expect to read only the packet payload data. The PID and CRC16 are terminated by the receive state machine.\nIn TEST mode this register allow read/write access via the core bus."]
    #[inline(always)]
    pub fn usb_rxfd(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, UsbRxd1Reg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,UsbRxd1Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxd1Reg {
    #[inline(always)]
    fn default() -> UsbRxd1Reg {
        <crate::RegValueT<UsbRxd1Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxd2Reg_SPEC;
impl crate::sealed::RegSpec for UsbRxd2Reg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Data Register 2"]
pub type UsbRxd2Reg = crate::RegValueT<UsbRxd2Reg_SPEC>;

impl UsbRxd2Reg {
    #[doc = "Receive FIFO Data Byte\nThe firmware should expect to read only the packet payload data. The PID and CRC16 are terminated by the receive state machine.\nIn TEST mode this register allow read/write access via the core bus."]
    #[inline(always)]
    pub fn usb_rxfd(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, UsbRxd2Reg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,UsbRxd2Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxd2Reg {
    #[inline(always)]
    fn default() -> UsbRxd2Reg {
        <crate::RegValueT<UsbRxd2Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxd3Reg_SPEC;
impl crate::sealed::RegSpec for UsbRxd3Reg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Data Register 3"]
pub type UsbRxd3Reg = crate::RegValueT<UsbRxd3Reg_SPEC>;

impl UsbRxd3Reg {
    #[doc = "Receive FIFO Data Byte\nThe firmware should expect to read only the packet payload data. The PID and CRC16 are terminated by the receive state machine.\nIn TEST mode this register allow read/write access via the core bus."]
    #[inline(always)]
    pub fn usb_rxfd(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, UsbRxd3Reg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,UsbRxd3Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxd3Reg {
    #[inline(always)]
    fn default() -> UsbRxd3Reg {
        <crate::RegValueT<UsbRxd3Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxevReg_SPEC;
impl crate::sealed::RegSpec for UsbRxevReg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Event Register"]
pub type UsbRxevReg = crate::RegValueT<UsbRxevReg_SPEC>;

impl UsbRxevReg {
    #[doc = "Receive Overrun n: 3:1\nThe bit n is set to 1 in the event of an overrun condition in the corresponding receive FIFO n. They are cleared to 0 when the register is read. The firmware must check the respective RX_ERR bits that packets received for the other receive endpoints (EP2, EP4 and EP6, ) are not corrupted by errors, as these endpoints support data streaming (packets which are longer than the actual FIFO depth)."]
    #[inline(always)]
    pub fn usb_rxovrrn31(
        self,
    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, UsbRxevReg_SPEC, crate::common::R> {
        crate::common::RegisterField::<4,0x7,1,0,u8,u8,UsbRxevReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Receive FIFO n: 3:1\nThe bit n is set to 1 whenever either RX_ERR or RX_LAST in the respective Receive Status register (RXSn) is set to 1. Reading the corresponding RXSn register automatically clears these bits.The CoR function is disabled, when the Freeze signal is asserted.The USB node discards all packets for Endpoint 0 received with errors. This is necessary in case of retransmission due to media errors, ensuring that a good copy of a SETUP packet is captured. Otherwise, the FIFO may potentially be tied up, holding corrupted data and unable to receive a retransmission of the same packet.\nIf data streaming is used for the receive endpoints (EP2, EP4 and EP6, EP8) the firmware must check the respective RX_ERR bits to ensure the packets received are not corrupted by errors."]
    #[inline(always)]
    pub fn usb_rxfifo31(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, UsbRxevReg_SPEC, crate::common::R> {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,UsbRxevReg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxevReg {
    #[inline(always)]
    fn default() -> UsbRxevReg {
        <crate::RegValueT<UsbRxevReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxmskReg_SPEC;
impl crate::sealed::RegSpec for UsbRxmskReg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Mask Register"]
pub type UsbRxmskReg = crate::RegValueT<UsbRxmskReg_SPEC>;

impl UsbRxmskReg {
    #[doc = "The Receive Mask Register is used to select the bits of the RXEV registers, which causes the RX_EV bit in the MAEV register to be set to 1. When set to 1 and the corresponding bit in the RXEV register is set to 1, RX_EV bit in the MAEV register is set to1. When cleared to 0, the corresponding bit in the RXEV register does not cause RX_EV to be set to1. Same Bit Definition as RXEV Register"]
    #[inline(always)]
    pub fn usb_m_rxovrrn31(
        self,
    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, UsbRxmskReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<4,0x7,1,0,u8,u8,UsbRxmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as RXEV Register"]
    #[inline(always)]
    pub fn usb_m_rxfifo31(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, UsbRxmskReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,UsbRxmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxmskReg {
    #[inline(always)]
    fn default() -> UsbRxmskReg {
        <crate::RegValueT<UsbRxmskReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxs0Reg_SPEC;
impl crate::sealed::RegSpec for UsbRxs0Reg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Status 0 Register"]
pub type UsbRxs0Reg = crate::RegValueT<UsbRxs0Reg_SPEC>;

impl UsbRxs0Reg {
    #[doc = "Setup\nThis bit indicates that the setup packet has been received. This bit is unchanged for zero length packets. It is cleared to 0 when this register is read."]
    #[inline(always)]
    pub fn usb_setup(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbRxs0Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<6,1,0,UsbRxs0Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Toggle\nThis bit specified the PID used when receiving the packet. A value of 0 indicates that the last successfully received packet had a DATA0 PID, while a value of 1 indicates that this packet had a DATA1 PID. This bit is unchanged for zero length packets. It is cleared to 0 when this register is read."]
    #[inline(always)]
    pub fn usb_toggle_rx0(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbRxs0Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5,1,0,UsbRxs0Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Receive Last Bytes\nThis bit indicates that an ACK was sent upon completion of a successful receive operation. This bit is unchanged for zero length packets. It is cleared to 0 when this register is read."]
    #[inline(always)]
    pub fn usb_rx_last(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbRxs0Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<4,1,0,UsbRxs0Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Receive Count\nThis 4-bit field contains the number of bytes presently in the RX FIFO. This number is never larger than 8 for Endpoint 0."]
    #[inline(always)]
    pub fn usb_rcount(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, UsbRxs0Reg_SPEC, crate::common::R> {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,UsbRxs0Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxs0Reg {
    #[inline(always)]
    fn default() -> UsbRxs0Reg {
        <crate::RegValueT<UsbRxs0Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxs1Reg_SPEC;
impl crate::sealed::RegSpec for UsbRxs1Reg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Status Register 1"]
pub type UsbRxs1Reg = crate::RegValueT<UsbRxs1Reg_SPEC>;

impl UsbRxs1Reg {
    #[doc = "Receive Error\nWhen set to 1, this bit indicates a media error, such as bit-stuffing or CRC. If this bit is set to 1, the firmware must flush the respective FIFO."]
    #[inline(always)]
    pub fn usb_rx_err(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbRxs1Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<7,1,0,UsbRxs1Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Setup\nThis bit indicates that the setup packet has been received. It is cleared when this register is read."]
    #[inline(always)]
    pub fn usb_setup(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbRxs1Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<6,1,0,UsbRxs1Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Toggle\nThe function of this bit differs depending on whether ISO (ISO in the EPCn register is set) or non-ISO operation (ISO is reset) is used.\nFor non-ISO operation, a value of 0 indicates that the last successfully received packet had a DATA0 PID, while a value of 1 indicates that this packet had a DATA1 PID.\nFor ISO operation, this bit reflects the LSB of the frame number (FNL0) after a packet was successfully received for this endpoint.\nThis bit is reset to 0 by reading the RXSn register."]
    #[inline(always)]
    pub fn usb_toggle_rx(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbRxs1Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5,1,0,UsbRxs1Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Receive Last\nThis bit indicates that an ACK was sent upon completion of a successful receive operation. This bit is cleared to 0 when this register is read."]
    #[inline(always)]
    pub fn usb_rx_last(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbRxs1Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<4,1,0,UsbRxs1Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Receive Counter\nThis 4-bit field contains the number of bytes presently in the endpoint receive FIFO. If this number is greater than 15, a value of 15 is actually reported."]
    #[inline(always)]
    pub fn usb_rcount(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, UsbRxs1Reg_SPEC, crate::common::R> {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,UsbRxs1Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxs1Reg {
    #[inline(always)]
    fn default() -> UsbRxs1Reg {
        <crate::RegValueT<UsbRxs1Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxs2Reg_SPEC;
impl crate::sealed::RegSpec for UsbRxs2Reg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Status Register 2"]
pub type UsbRxs2Reg = crate::RegValueT<UsbRxs2Reg_SPEC>;

impl UsbRxs2Reg {
    #[doc = "Receive Error\nWhen set to 1, this bit indicates a media error, such as bit-stuffing or CRC. If this bit is set to 1, the firmware must flush the respective FIFO."]
    #[inline(always)]
    pub fn usb_rx_err(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbRxs2Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<7,1,0,UsbRxs2Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Setup\nThis bit indicates that the setup packet has been received. It is cleared when this register is read."]
    #[inline(always)]
    pub fn usb_setup(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbRxs2Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<6,1,0,UsbRxs2Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Toggle\nThe function of this bit differs depending on whether ISO (ISO in the EPCn register is set) or non-ISO operation (ISO is reset) is used.\nFor non-ISO operation, a value of 0 indicates that the last successfully received packet had a DATA0 PID, while a value of 1 indicates that this packet had a DATA1 PID.\nFor ISO operation, this bit reflects the LSB of the frame number (FNL0) after a packet was successfully received for this endpoint.\nThis bit is reset to 0 by reading the RXSn register."]
    #[inline(always)]
    pub fn usb_toggle_rx(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbRxs2Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5,1,0,UsbRxs2Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Receive Last\nThis bit indicates that an ACK was sent upon completion of a successful receive operation. This bit is cleared to 0 when this register is read."]
    #[inline(always)]
    pub fn usb_rx_last(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbRxs2Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<4,1,0,UsbRxs2Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Receive Counter\nThis 4-bit field contains the number of bytes presently in the endpoint receive FIFO. If this number is greater than 15, a value of 15 is actually reported."]
    #[inline(always)]
    pub fn usb_rcount(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, UsbRxs2Reg_SPEC, crate::common::R> {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,UsbRxs2Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxs2Reg {
    #[inline(always)]
    fn default() -> UsbRxs2Reg {
        <crate::RegValueT<UsbRxs2Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbRxs3Reg_SPEC;
impl crate::sealed::RegSpec for UsbRxs3Reg_SPEC {
    type DataType = u16;
}

#[doc = "Receive Status Register 3"]
pub type UsbRxs3Reg = crate::RegValueT<UsbRxs3Reg_SPEC>;

impl UsbRxs3Reg {
    #[doc = "Receive Error\nWhen set to 1, this bit indicates a media error, such as bit-stuffing or CRC. If this bit is set to 1, the firmware must flush the respective FIFO."]
    #[inline(always)]
    pub fn usb_rx_err(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbRxs3Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<7,1,0,UsbRxs3Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Setup\nThis bit indicates that the setup packet has been received. It is cleared when this register is read."]
    #[inline(always)]
    pub fn usb_setup(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbRxs3Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<6,1,0,UsbRxs3Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Toggle\nThe function of this bit differs depending on whether ISO (ISO in the EPCn register is set) or non-ISO operation (ISO is reset) is used.\nFor non-ISO operation, a value of 0 indicates that the last successfully received packet had a DATA0 PID, while a value of 1 indicates that this packet had a DATA1 PID.\nFor ISO operation, this bit reflects the LSB of the frame number (FNL0) after a packet was successfully received for this endpoint.\nThis bit is reset to 0 by reading the RXSn register."]
    #[inline(always)]
    pub fn usb_toggle_rx(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbRxs3Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5,1,0,UsbRxs3Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Receive Last\nThis bit indicates that an ACK was sent upon completion of a successful receive operation. This bit is cleared to 0 when this register is read."]
    #[inline(always)]
    pub fn usb_rx_last(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbRxs3Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<4,1,0,UsbRxs3Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Receive Counter\nThis 4-bit field contains the number of bytes presently in the endpoint receive FIFO. If this number is greater than 15, a value of 15 is actually reported."]
    #[inline(always)]
    pub fn usb_rcount(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, UsbRxs3Reg_SPEC, crate::common::R> {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,UsbRxs3Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbRxs3Reg {
    #[inline(always)]
    fn default() -> UsbRxs3Reg {
        <crate::RegValueT<UsbRxs3Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTcrReg_SPEC;
impl crate::sealed::RegSpec for UsbTcrReg_SPEC {
    type DataType = u16;
}

#[doc = "Transceiver configuration Register"]
pub type UsbTcrReg = crate::RegValueT<UsbTcrReg_SPEC>;

impl UsbTcrReg {
    #[doc = "Reference Voltage/ Threshold voltage AdjustControls the single-ended receiver threshold.\nShall not be modified unless instructed by Dialog Semiconductor\nOnly enabled if USB_UTR_REG\\[7\\] = 1"]
    #[inline(always)]
    pub fn usb_vadj(
        self,
    ) -> crate::common::RegisterField<5, 0x7, 1, 0, u8, u8, UsbTcrReg_SPEC, crate::common::RW> {
        crate::common::RegisterField::<5,0x7,1,0,u8,u8,UsbTcrReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Transmitter Current Adjust\nControls the driver edge rate control current.\nShall not be modified unless instructed by Dialog Semiconductor\nOnly enabled if USB_UTR_REG\\[7\\] = 1"]
    #[inline(always)]
    pub fn usb_cadj(
        self,
    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, UsbTcrReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,UsbTcrReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTcrReg {
    #[inline(always)]
    fn default() -> UsbTcrReg {
        <crate::RegValueT<UsbTcrReg_SPEC> as RegisterValue<_>>::new(144)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxc0Reg_SPEC;
impl crate::sealed::RegSpec for UsbTxc0Reg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit command 0 Register"]
pub type UsbTxc0Reg = crate::RegValueT<UsbTxc0Reg_SPEC>;

impl UsbTxc0Reg {
    #[doc = "Ignore IN Tokens\nWhen this bit is set to 1, the endpoint will ignore any IN tokens directed to its configured address."]
    #[inline(always)]
    pub fn usb_ign_in(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbTxc0Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbTxc0Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Flush FIFO\nWriting a 1 to this bit flushes all data from the control endpoint FIFOs, resets the endpoint to Idle state, clears the FIFO read and write pointer, and then clears itself. If the endpoint is currently using the FIFO0 to transfer data on USB, flushing is delayed until after the transfer is done. It is equivalent to the FLUSH bit in the RXC0 register."]
    #[inline(always)]
    pub fn usb_flush(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbTxc0Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbTxc0Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Toggle\nThis bit specifies the PID used when transmitting the packet. A value of 0 causes a DATA0 PID to be generated, while a value of 1 causes a DATA1 PID to be generated. This bit is not altered by the hardware."]
    #[inline(always)]
    pub fn usb_toggle_tx0(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbTxc0Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbTxc0Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Transmission Enable\nThis bit enables data transmission from the FIFO. It is cleared to 0 by hardware after transmitting a single packet, or a STALL handshake, in response to an IN token. It must be set to 1 by firmware to start packet transmission. The RX_EN bit in the Receive Command 0 (RXC0) register takes precedence over this bit; i.e. if RX_EN is set, TX_EN bit is ignored until RX_EN is reset.\nZero length packets are indicated by setting this bit without writing any data to the FIFO."]
    #[inline(always)]
    pub fn usb_tx_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbTxc0Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbTxc0Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxc0Reg {
    #[inline(always)]
    fn default() -> UsbTxc0Reg {
        <crate::RegValueT<UsbTxc0Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxc1Reg_SPEC;
impl crate::sealed::RegSpec for UsbTxc1Reg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Command Register 1"]
pub type UsbTxc1Reg = crate::RegValueT<UsbTxc1Reg_SPEC>;

impl UsbTxc1Reg {
    #[doc = "Ignore ISO Mask\nThis bit has an effect only if the endpoint is set to be isochronous. If set to 1, this bit disables locking of specific frame numbers with the alternate function of the TOGGLE bit. Thus data is transmitted upon reception of the next IN token. If cleared to 0, data is only transmitted when FNL0 matches TOGGLE. This bit is cleared to 0 after reset."]
    #[inline(always)]
    pub fn usb_ign_isomsk(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbTxc1Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbTxc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Transmit FIFO Warning Limit\nThese bits specify how many more bytes can be transmitted from the respective FIFO before an underrun condition occurs. If the number of bytes remaining in the FIFO is equal to or less than the selected warning limit, the TXWARN bit in the FWEV register is set. To avoid interrupts caused by setting this bit while the FIFO is being filled before a transmission begins, TXWARN is only set when transmission from the endpoint is enabled (TX_ENn in the TXCn register is set).\nTFWL\\[1:0\\] :\n00: TFWL disabled\n01: Less than 5 bytes remaining in FIFO\n10: Less than 9 bytes remaining in FIFO\n11: Less than 17 bytes remaining in FIFO"]
    #[inline(always)]
    pub fn usb_tfwl(
        self,
    ) -> crate::common::RegisterField<5, 0x3, 1, 0, u8, u8, UsbTxc1Reg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<5,0x3,1,0,u8,u8,UsbTxc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Refill FIFO\nSetting the LAST bit to 1 automatically saves the Transmit Read Pointer (TXRP) to a buffer. When the RFF bit is set to 1, the buffered TXRP is reloaded into the TXRP. This allows the user to repeat the last transaction if no ACK was received from the host. If the MAC is currently using the FIFO to transmit, TXRP is reloaded only after the transmission is complete. After reload, this bit is cleared to 0 by hardware."]
    #[inline(always)]
    pub fn usb_rff(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbTxc1Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbTxc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Flush FIFO\nWriting a 1 to this bit flushes all data from the corresponding transmit FIFO, resets the endpoint to Idle state, and clears both the FIFO read and write pointers. If the MAC is currently using the FIFO to transmit, data is flushed after the transmission is complete. After data flushing, this bit is cleared to 0 by hardware."]
    #[inline(always)]
    pub fn usb_flush(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbTxc1Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbTxc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Toggle\nThe function of this bit differs depending on whether ISO (ISO bit in the EPCn register is set to 1) or non-ISO operation (ISO bit is cleared to 0) is used.\nFor non-ISO operation, it specifies the PID used when transmitting the packet. A value of 0 causes a DATA0 PID to be generated, while a value of 1 causes a DATA1 PID to be generated.\nFor ISO operation, this bit and the LSB of the frame counter (FNL0) act as a mask for the TX_EN bit to allow pre-queuing of packets to specific frame numbers; I.e. transmission is enabled only if bit 0 in the FNL register is set to TOGGLE. If an IN token is not received while this condition is true, the contents of the FIFO are flushed with the next SOF. If the endpoint is set to ISO, data is always transferred with a DATA0 PID."]
    #[inline(always)]
    pub fn usb_toggle_tx(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbTxc1Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbTxc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Last Byte\nSetting this bit to 1 indicates that the entire packet has been written into the FIFO. This is used especially for streaming data to the FIFO while the actual transmission occurs. If the LAST bit is not set to 1 and the transmit FIFO becomes empty during a transmission, a stuff error followed by an EOP is forced on the bus. Zero length packets are indicated by setting this bit without writing any data to the FIFO.\nThe transmit state machine transmits the payload data, CRC16 and the EOP signal before clearing this bit."]
    #[inline(always)]
    pub fn usb_last(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, UsbTxc1Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,UsbTxc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Transmission Enable\nThis bit enables data transmission from the FIFO. It is cleared to 0 by hardware after transmitting a single packet or after a STALL handshake in response to an IN token. It must be set to 1 by firmware to start packet transmission."]
    #[inline(always)]
    pub fn usb_tx_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbTxc1Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbTxc1Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxc1Reg {
    #[inline(always)]
    fn default() -> UsbTxc1Reg {
        <crate::RegValueT<UsbTxc1Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxc2Reg_SPEC;
impl crate::sealed::RegSpec for UsbTxc2Reg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Command Register 2"]
pub type UsbTxc2Reg = crate::RegValueT<UsbTxc2Reg_SPEC>;

impl UsbTxc2Reg {
    #[doc = "Ignore ISO Mask\nThis bit has an effect only if the endpoint is set to be isochronous. If set to 1, this bit disables locking of specific frame numbers with the alternate function of the TOGGLE bit. Thus data is transmitted upon reception of the next IN token. If cleared to 0, data is only transmitted when FNL0 matches TOGGLE. This bit is cleared to 0 after reset."]
    #[inline(always)]
    pub fn usb_ign_isomsk(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbTxc2Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbTxc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Transmit FIFO Warning Limit\nThese bits specify how many more bytes can be transmitted from the respective FIFO before an underrun condition occurs. If the number of bytes remaining in the FIFO is equal to or less than the selected warning limit, the TXWARN bit in the FWEV register is set. To avoid interrupts caused by setting this bit while the FIFO is being filled before a transmission begins, TXWARN is only set when transmission from the endpoint is enabled (TX_ENn in the TXCn register is set).\nTFWL\\[1:0\\] :\n00: TFWL disabled\n01: Less than 5 bytes remaining in FIFO\n10: Less than 9 bytes remaining in FIFO\n11: Less than 17 bytes remaining in FIFO"]
    #[inline(always)]
    pub fn usb_tfwl(
        self,
    ) -> crate::common::RegisterField<5, 0x3, 1, 0, u8, u8, UsbTxc2Reg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<5,0x3,1,0,u8,u8,UsbTxc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Refill FIFO\nSetting the LAST bit to 1 automatically saves the Transmit Read Pointer (TXRP) to a buffer. When the RFF bit is set to 1, the buffered TXRP is reloaded into the TXRP. This allows the user to repeat the last transaction if no ACK was received from the host. If the MAC is currently using the FIFO to transmit, TXRP is reloaded only after the transmission is complete. After reload, this bit is cleared to 0 by hardware."]
    #[inline(always)]
    pub fn usb_rff(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbTxc2Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbTxc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Flush FIFO\nWriting a 1 to this bit flushes all data from the corresponding transmit FIFO, resets the endpoint to Idle state, and clears both the FIFO read and write pointers. If the MAC is currently using the FIFO to transmit, data is flushed after the transmission is complete. After data flushing, this bit is cleared to 0 by hardware."]
    #[inline(always)]
    pub fn usb_flush(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbTxc2Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbTxc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Toggle\nThe function of this bit differs depending on whether ISO (ISO bit in the EPCn register is set to 1) or non-ISO operation (ISO bit is cleared to 0) is used.\nFor non-ISO operation, it specifies the PID used when transmitting the packet. A value of 0 causes a DATA0 PID to be generated, while a value of 1 causes a DATA1 PID to be generated.\nFor ISO operation, this bit and the LSB of the frame counter (FNL0) act as a mask for the TX_EN bit to allow pre-queuing of packets to specific frame numbers; I.e. transmission is enabled only if bit 0 in the FNL register is set to TOGGLE. If an IN token is not received while this condition is true, the contents of the FIFO are flushed with the next SOF. If the endpoint is set to ISO, data is always transferred with a DATA0 PID."]
    #[inline(always)]
    pub fn usb_toggle_tx(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbTxc2Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbTxc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Last Byte\nSetting this bit to 1 indicates that the entire packet has been written into the FIFO. This is used especially for streaming data to the FIFO while the actual transmission occurs. If the LAST bit is not set to 1 and the transmit FIFO becomes empty during a transmission, a stuff error followed by an EOP is forced on the bus. Zero length packets are indicated by setting this bit without writing any data to the FIFO.\nThe transmit state machine transmits the payload data, CRC16 and the EOP signal before clearing this bit."]
    #[inline(always)]
    pub fn usb_last(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, UsbTxc2Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,UsbTxc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Transmission Enable\nThis bit enables data transmission from the FIFO. It is cleared to 0 by hardware after transmitting a single packet or after a STALL handshake in response to an IN token. It must be set to 1 by firmware to start packet transmission."]
    #[inline(always)]
    pub fn usb_tx_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbTxc2Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbTxc2Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxc2Reg {
    #[inline(always)]
    fn default() -> UsbTxc2Reg {
        <crate::RegValueT<UsbTxc2Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxc3Reg_SPEC;
impl crate::sealed::RegSpec for UsbTxc3Reg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Command Register 3"]
pub type UsbTxc3Reg = crate::RegValueT<UsbTxc3Reg_SPEC>;

impl UsbTxc3Reg {
    #[doc = "Ignore ISO Mask\nThis bit has an effect only if the endpoint is set to be isochronous. If set to 1, this bit disables locking of specific frame numbers with the alternate function of the TOGGLE bit. Thus data is transmitted upon reception of the next IN token. If cleared to 0, data is only transmitted when FNL0 matches TOGGLE. This bit is cleared to 0 after reset."]
    #[inline(always)]
    pub fn usb_ign_isomsk(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbTxc3Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbTxc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Transmit FIFO Warning Limit\nThese bits specify how many more bytes can be transmitted from the respective FIFO before an underrun condition occurs. If the number of bytes remaining in the FIFO is equal to or less than the selected warning limit, the TXWARN bit in the FWEV register is set. To avoid interrupts caused by setting this bit while the FIFO is being filled before a transmission begins, TXWARN is only set when transmission from the endpoint is enabled (TX_ENn in the TXCn register is set).\nTFWL\\[1:0\\] :\n00: TFWL disabled\n01: Less than 5 bytes remaining in FIFO\n10: Less than 9 bytes remaining in FIFO\n11: Less than 17 bytes remaining in FIFO"]
    #[inline(always)]
    pub fn usb_tfwl(
        self,
    ) -> crate::common::RegisterField<5, 0x3, 1, 0, u8, u8, UsbTxc3Reg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<5,0x3,1,0,u8,u8,UsbTxc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Refill FIFO\nSetting the LAST bit to 1 automatically saves the Transmit Read Pointer (TXRP) to a buffer. When the RFF bit is set to 1, the buffered TXRP is reloaded into the TXRP. This allows the user to repeat the last transaction if no ACK was received from the host. If the MAC is currently using the FIFO to transmit, TXRP is reloaded only after the transmission is complete. After reload, this bit is cleared to 0 by hardware."]
    #[inline(always)]
    pub fn usb_rff(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbTxc3Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbTxc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Flush FIFO\nWriting a 1 to this bit flushes all data from the corresponding transmit FIFO, resets the endpoint to Idle state, and clears both the FIFO read and write pointers. If the MAC is currently using the FIFO to transmit, data is flushed after the transmission is complete. After data flushing, this bit is cleared to 0 by hardware."]
    #[inline(always)]
    pub fn usb_flush(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbTxc3Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbTxc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Toggle\nThe function of this bit differs depending on whether ISO (ISO bit in the EPCn register is set to 1) or non-ISO operation (ISO bit is cleared to 0) is used.\nFor non-ISO operation, it specifies the PID used when transmitting the packet. A value of 0 causes a DATA0 PID to be generated, while a value of 1 causes a DATA1 PID to be generated.\nFor ISO operation, this bit and the LSB of the frame counter (FNL0) act as a mask for the TX_EN bit to allow pre-queuing of packets to specific frame numbers; I.e. transmission is enabled only if bit 0 in the FNL register is set to TOGGLE. If an IN token is not received while this condition is true, the contents of the FIFO are flushed with the next SOF. If the endpoint is set to ISO, data is always transferred with a DATA0 PID."]
    #[inline(always)]
    pub fn usb_toggle_tx(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbTxc3Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbTxc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Last Byte\nSetting this bit to 1 indicates that the entire packet has been written into the FIFO. This is used especially for streaming data to the FIFO while the actual transmission occurs. If the LAST bit is not set to 1 and the transmit FIFO becomes empty during a transmission, a stuff error followed by an EOP is forced on the bus. Zero length packets are indicated by setting this bit without writing any data to the FIFO.\nThe transmit state machine transmits the payload data, CRC16 and the EOP signal before clearing this bit."]
    #[inline(always)]
    pub fn usb_last(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, UsbTxc3Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,UsbTxc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Transmission Enable\nThis bit enables data transmission from the FIFO. It is cleared to 0 by hardware after transmitting a single packet or after a STALL handshake in response to an IN token. It must be set to 1 by firmware to start packet transmission."]
    #[inline(always)]
    pub fn usb_tx_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbTxc3Reg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbTxc3Reg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxc3Reg {
    #[inline(always)]
    fn default() -> UsbTxc3Reg {
        <crate::RegValueT<UsbTxc3Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxd0Reg_SPEC;
impl crate::sealed::RegSpec for UsbTxd0Reg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Data 0 Register"]
pub type UsbTxd0Reg = crate::RegValueT<UsbTxd0Reg_SPEC>;

impl UsbTxd0Reg {
    #[doc = "Transmit FIFO Data Byte\nThe firmware is expected to write only the packet payload data. The PID and CRC16 are created automatically."]
    #[inline(always)]
    pub fn usb_txfd(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, UsbTxd0Reg_SPEC, crate::common::W>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,UsbTxd0Reg_SPEC,crate::common::W>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxd0Reg {
    #[inline(always)]
    fn default() -> UsbTxd0Reg {
        <crate::RegValueT<UsbTxd0Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxd1Reg_SPEC;
impl crate::sealed::RegSpec for UsbTxd1Reg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Data Register 1"]
pub type UsbTxd1Reg = crate::RegValueT<UsbTxd1Reg_SPEC>;

impl UsbTxd1Reg {
    #[doc = "Transmit FIFO Data Byte\nThe firmware is expected to write only the packet payload data. PID and CRC16 are inserted automatically in the transmit data stream.\nIn TEST mode this register allow read/write access via the core bus."]
    #[inline(always)]
    pub fn usb_txfd(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, UsbTxd1Reg_SPEC, crate::common::W>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,UsbTxd1Reg_SPEC,crate::common::W>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxd1Reg {
    #[inline(always)]
    fn default() -> UsbTxd1Reg {
        <crate::RegValueT<UsbTxd1Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxd2Reg_SPEC;
impl crate::sealed::RegSpec for UsbTxd2Reg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Data Register 2"]
pub type UsbTxd2Reg = crate::RegValueT<UsbTxd2Reg_SPEC>;

impl UsbTxd2Reg {
    #[doc = "Transmit FIFO Data Byte\nThe firmware is expected to write only the packet payload data. PID and CRC16 are inserted automatically in the transmit data stream.\nIn TEST mode this register allow read/write access via the core bus."]
    #[inline(always)]
    pub fn usb_txfd(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, UsbTxd2Reg_SPEC, crate::common::W>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,UsbTxd2Reg_SPEC,crate::common::W>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxd2Reg {
    #[inline(always)]
    fn default() -> UsbTxd2Reg {
        <crate::RegValueT<UsbTxd2Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxd3Reg_SPEC;
impl crate::sealed::RegSpec for UsbTxd3Reg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Data Register 3"]
pub type UsbTxd3Reg = crate::RegValueT<UsbTxd3Reg_SPEC>;

impl UsbTxd3Reg {
    #[doc = "Transmit FIFO Data Byte\nThe firmware is expected to write only the packet payload data. PID and CRC16 are inserted automatically in the transmit data stream.\nIn TEST mode this register allow read/write access via the core bus."]
    #[inline(always)]
    pub fn usb_txfd(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, UsbTxd3Reg_SPEC, crate::common::W>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,UsbTxd3Reg_SPEC,crate::common::W>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxd3Reg {
    #[inline(always)]
    fn default() -> UsbTxd3Reg {
        <crate::RegValueT<UsbTxd3Reg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxevReg_SPEC;
impl crate::sealed::RegSpec for UsbTxevReg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Event Register"]
pub type UsbTxevReg = crate::RegValueT<UsbTxevReg_SPEC>;

impl UsbTxevReg {
    #[doc = "Transmit Underrun n: 3:1\nThe bit n is a copy of the respective TX_URUN bit from the corresponding Transmit Status register (TXSn). Whenever any of the Transmit FIFOs underflows, the respective TXUDRRN bit is set to 1. These bits are cleared to 0 when the corresponding Transmit Status register is read"]
    #[inline(always)]
    pub fn usb_txudrrn31(
        self,
    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, UsbTxevReg_SPEC, crate::common::R> {
        crate::common::RegisterField::<4,0x7,1,0,u8,u8,UsbTxevReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Transmit FIFO n: 3:1\nThe bit n is a copy of the TX_DONE bit from the corresponding Transmit Status register (TXSn). A bit is set to 1 when the IN transaction for the corresponding transmit endpoint n has been completed. These bits are cleared to 0 when the corresponding TXSn register is read."]
    #[inline(always)]
    pub fn usb_txfifo31(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, UsbTxevReg_SPEC, crate::common::R> {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,UsbTxevReg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxevReg {
    #[inline(always)]
    fn default() -> UsbTxevReg {
        <crate::RegValueT<UsbTxevReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxmskReg_SPEC;
impl crate::sealed::RegSpec for UsbTxmskReg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Mask Register"]
pub type UsbTxmskReg = crate::RegValueT<UsbTxmskReg_SPEC>;

impl UsbTxmskReg {
    #[doc = "The Transmit Mask Register is used to select the bits of the TXEV registers, which causes the TX_EV bit in the MAEV register to be set to 1. When a bit is set to 1 and the corresponding bit in the TXEV register is set to 1, the TX_EV bit in the MAEV register is set to1. When cleared to 0, the corresponding bit in the TXEV register does not cause TX_EV to be set to 1. Same Bit Definition as TXEV Register"]
    #[inline(always)]
    pub fn usb_m_txudrrn31(
        self,
    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, UsbTxmskReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<4,0x7,1,0,u8,u8,UsbTxmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Same Bit Definition as TXEV Register"]
    #[inline(always)]
    pub fn usb_m_txfifo31(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, UsbTxmskReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x7,1,0,u8,u8,UsbTxmskReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxmskReg {
    #[inline(always)]
    fn default() -> UsbTxmskReg {
        <crate::RegValueT<UsbTxmskReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxs0Reg_SPEC;
impl crate::sealed::RegSpec for UsbTxs0Reg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Status 0 Register"]
pub type UsbTxs0Reg = crate::RegValueT<UsbTxs0Reg_SPEC>;

impl UsbTxs0Reg {
    #[doc = "Acknowledge Status\nThis bit indicates the status, as received from the host, of the ACK for the packet previously sent. This bit is to be interpreted when TX_DONE is set to 1. It is set to 1, when an ACK is received; otherwise, it remains cleared. This bit is also cleared to 0, when this register is read."]
    #[inline(always)]
    pub fn usb_ack_stat(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbTxs0Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<6,1,0,UsbTxs0Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Transmission Done\nWhen set to 1, this bit indicates that a packet has completed transmission. It is cleared to 0, when this register is read."]
    #[inline(always)]
    pub fn usb_tx_done(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbTxs0Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5,1,0,UsbTxs0Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Transmission Count\nThis 5-bit field indicates the number of empty bytes available in the FIFO. This field is never larger than 8 for Endpoint 0."]
    #[inline(always)]
    pub fn usb_tcount(
        self,
    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, UsbTxs0Reg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,UsbTxs0Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxs0Reg {
    #[inline(always)]
    fn default() -> UsbTxs0Reg {
        <crate::RegValueT<UsbTxs0Reg_SPEC> as RegisterValue<_>>::new(8)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxs1Reg_SPEC;
impl crate::sealed::RegSpec for UsbTxs1Reg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Status Register 1"]
pub type UsbTxs1Reg = crate::RegValueT<UsbTxs1Reg_SPEC>;

impl UsbTxs1Reg {
    #[doc = "Transmit FIFO Underrun\nThis bit is set to 1, if the transmit FIFO becomes empty during a transmission, and no new data is written to the FIFO. If so, the Media Access Controller (MAC) forces a bit stuff error followed by an EOP. This bit is cleared to 0, when this register is read."]
    #[inline(always)]
    pub fn usb_tx_urun(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbTxs1Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<7,1,0,UsbTxs1Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Acknowledge Status\nThis bit is interpreted when TX_DONE is set. It\'s function differs depending on whether ISO (ISO in the EPCx register is set) or non-ISO operation (ISO is reset) is used.\nFor non-ISO operation, this bit indicates the acknowledge status (from the host) about the ACK for the previously sent packet. This bit itself is set to 1, when an ACK is received; otherwise, it is cleared to 0.\nFor ISO operation, this bit is set if a frame number LSB match (see IGN_ISOMSK bit in the USB_TXCx_REG) occurs, and data was sent in response to an IN token. Otherwise, this bit is cleared to 0, the FIFO is flushed and TX_DONE is set.\nThis bit is also cleared to 0, when this register is read."]
    #[inline(always)]
    pub fn usb_ack_stat(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbTxs1Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<6,1,0,UsbTxs1Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Transmission Done\nWhen set to 1, this bit indicates that the endpoint responded to a USB packet. Three conditions can cause this bit to be set:\nA data packet completed transmission in response to an IN token with non-ISO operation.\nThe endpoint sent a STALL handshake in response to an IN token\nA scheduled ISO frame was transmitted or discarded.\nThis bit is cleared to 0 when this register is read."]
    #[inline(always)]
    pub fn usb_tx_done(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbTxs1Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5,1,0,UsbTxs1Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Transmission Count\nThis 5-bit field holds the number of empty bytes available in the FIFO. If this number is greater than 31, a value of 31 is actually reported."]
    #[inline(always)]
    pub fn usb_tcount(
        self,
    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, UsbTxs1Reg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,UsbTxs1Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxs1Reg {
    #[inline(always)]
    fn default() -> UsbTxs1Reg {
        <crate::RegValueT<UsbTxs1Reg_SPEC> as RegisterValue<_>>::new(31)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxs2Reg_SPEC;
impl crate::sealed::RegSpec for UsbTxs2Reg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Status Register 2"]
pub type UsbTxs2Reg = crate::RegValueT<UsbTxs2Reg_SPEC>;

impl UsbTxs2Reg {
    #[doc = "Transmit FIFO Underrun\nThis bit is set to 1, if the transmit FIFO becomes empty during a transmission, and no new data is written to the FIFO. If so, the Media Access Controller (MAC) forces a bit stuff error followed by an EOP. This bit is cleared to 0, when this register is read."]
    #[inline(always)]
    pub fn usb_tx_urun(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbTxs2Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<7,1,0,UsbTxs2Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Acknowledge Status\nThis bit is interpreted when TX_DONE is set. It\'s function differs depending on whether ISO (ISO in the EPCx register is set) or non-ISO operation (ISO is reset) is used.\nFor non-ISO operation, this bit indicates the acknowledge status (from the host) about the ACK for the previously sent packet. This bit itself is set to 1, when an ACK is received; otherwise, it is cleared to 0.\nFor ISO operation, this bit is set if a frame number LSB match (see IGN_ISOMSK bit in the USB_TXCx_REG) occurs, and data was sent in response to an IN token. Otherwise, this bit is cleared to 0, the FIFO is flushed and TX_DONE is set.\nThis bit is also cleared to 0, when this register is read."]
    #[inline(always)]
    pub fn usb_ack_stat(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbTxs2Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<6,1,0,UsbTxs2Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Transmission Done\nWhen set to 1, this bit indicates that the endpoint responded to a USB packet. Three conditions can cause this bit to be set:\nA data packet completed transmission in response to an IN token with non-ISO operation.\nThe endpoint sent a STALL handshake in response to an IN token\nA scheduled ISO frame was transmitted or discarded.\nThis bit is cleared to 0 when this register is read."]
    #[inline(always)]
    pub fn usb_tx_done(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbTxs2Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5,1,0,UsbTxs2Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Transmission Count\nThis 5-bit field holds the number of empty bytes available in the FIFO. If this number is greater than 31, a value of 31 is actually reported."]
    #[inline(always)]
    pub fn usb_tcount(
        self,
    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, UsbTxs2Reg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,UsbTxs2Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxs2Reg {
    #[inline(always)]
    fn default() -> UsbTxs2Reg {
        <crate::RegValueT<UsbTxs2Reg_SPEC> as RegisterValue<_>>::new(31)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbTxs3Reg_SPEC;
impl crate::sealed::RegSpec for UsbTxs3Reg_SPEC {
    type DataType = u16;
}

#[doc = "Transmit Status Register 3"]
pub type UsbTxs3Reg = crate::RegValueT<UsbTxs3Reg_SPEC>;

impl UsbTxs3Reg {
    #[doc = "Transmit FIFO Underrun\nThis bit is set to 1, if the transmit FIFO becomes empty during a transmission, and no new data is written to the FIFO. If so, the Media Access Controller (MAC) forces a bit stuff error followed by an EOP. This bit is cleared to 0, when this register is read."]
    #[inline(always)]
    pub fn usb_tx_urun(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbTxs3Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<7,1,0,UsbTxs3Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Acknowledge Status\nThis bit is interpreted when TX_DONE is set. It\'s function differs depending on whether ISO (ISO in the EPCx register is set) or non-ISO operation (ISO is reset) is used.\nFor non-ISO operation, this bit indicates the acknowledge status (from the host) about the ACK for the previously sent packet. This bit itself is set to 1, when an ACK is received; otherwise, it is cleared to 0.\nFor ISO operation, this bit is set if a frame number LSB match (see IGN_ISOMSK bit in the USB_TXCx_REG) occurs, and data was sent in response to an IN token. Otherwise, this bit is cleared to 0, the FIFO is flushed and TX_DONE is set.\nThis bit is also cleared to 0, when this register is read."]
    #[inline(always)]
    pub fn usb_ack_stat(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbTxs3Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<6,1,0,UsbTxs3Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Transmission Done\nWhen set to 1, this bit indicates that the endpoint responded to a USB packet. Three conditions can cause this bit to be set:\nA data packet completed transmission in response to an IN token with non-ISO operation.\nThe endpoint sent a STALL handshake in response to an IN token\nA scheduled ISO frame was transmitted or discarded.\nThis bit is cleared to 0 when this register is read."]
    #[inline(always)]
    pub fn usb_tx_done(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbTxs3Reg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5,1,0,UsbTxs3Reg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Transmission Count\nThis 5-bit field holds the number of empty bytes available in the FIFO. If this number is greater than 31, a value of 31 is actually reported."]
    #[inline(always)]
    pub fn usb_tcount(
        self,
    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, UsbTxs3Reg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,UsbTxs3Reg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbTxs3Reg {
    #[inline(always)]
    fn default() -> UsbTxs3Reg {
        <crate::RegValueT<UsbTxs3Reg_SPEC> as RegisterValue<_>>::new(31)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbUtrReg_SPEC;
impl crate::sealed::RegSpec for UsbUtrReg_SPEC {
    type DataType = u16;
}

#[doc = "USB test Register (for test purpose only)"]
pub type UsbUtrReg = crate::RegValueT<UsbUtrReg_SPEC>;

impl UsbUtrReg {
    #[doc = "Diagnostic enable\n\'0\': Normal operational.\n\'1\': Access to the USB_XCVDIAG_REG and USB_TCR_REG enabled. For diagnostic purposes only"]
    #[inline(always)]
    pub fn usb_diag(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbUtrReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,UsbUtrReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "No CRC16\nWhen this bit is set to 1, all packets transmitted by the Full/Low Speed USB node are sent without a trailing CRC16. Receive operations are unaffected. This mode is used to check that CRC errors can be detected by other nodes. For diagnostic purposes only"]
    #[inline(always)]
    pub fn usb_ncrc(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbUtrReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<6,1,0,UsbUtrReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Short Frame\nEnables the Frame timer to lock and track, short, non-compliant USB frame sizes. The Short Frame bit should not be set during normal operation. For test purposes only"]
    #[inline(always)]
    pub fn usb_sf(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbUtrReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbUtrReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Reserved. Must be kept to \'0\'"]
    #[inline(always)]
    pub fn usb_utr_res(
        self,
    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, UsbUtrReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,UsbUtrReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbUtrReg {
    #[inline(always)]
    fn default() -> UsbUtrReg {
        <crate::RegValueT<UsbUtrReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbUx20CdrReg_SPEC;
impl crate::sealed::RegSpec for UsbUx20CdrReg_SPEC {
    type DataType = u16;
}

#[doc = "Transceiver 2.0 Configuration and Diagnostics Register(for test purpose only)"]
pub type UsbUx20CdrReg = crate::RegValueT<UsbUx20CdrReg_SPEC>;

impl UsbUx20CdrReg {
    #[doc = "Test bit"]
    #[inline(always)]
    pub fn rpu_test7(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbUx20CdrReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<7,1,0,UsbUx20CdrReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "0: Closes SW2 switch to reduced pull-up resistor connected to the USB_Dp and USB_Dm.\n1: Opens SW2 switch resistor connected to the USB_Dp and USB_Dm (independent of the VBus state)."]
    #[inline(always)]
    pub fn rpu_test_sw2(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbUx20CdrReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<6,1,0,UsbUx20CdrReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "0: Enable the pull-up resistor on USB_Dp (SW1 closed)\n1: Disable the pull-up resistor on USB_Dp (SW1 open) (Independent of the VBus state)."]
    #[inline(always)]
    pub fn rpu_test_sw1(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbUx20CdrReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,UsbUx20CdrReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Pull-Up Resistor Test Enable\n0: Normal operation\n1: Enables the test features controlled by RPU_TEST_SW1, RPU_TEST_SW1DM and RPU_TEST_SW2"]
    #[inline(always)]
    pub fn rpu_test_en(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, UsbUx20CdrReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,UsbUx20CdrReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "0: Enable the pull-up resistor on USB_Dm (SW1DM closed)\n1: Disable the pull-up resistor on USB_Dm (SW1DM open) (Independent of the VBus state)."]
    #[inline(always)]
    pub fn rpu_test_sw1dm(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbUx20CdrReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbUx20CdrReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Test bit, must be kept 0"]
    #[inline(always)]
    pub fn rpu_rcdelay(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, UsbUx20CdrReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,UsbUx20CdrReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Test bit, must be kept 0"]
    #[inline(always)]
    pub fn rpu_ssproten(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbUx20CdrReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbUx20CdrReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbUx20CdrReg {
    #[inline(always)]
    fn default() -> UsbUx20CdrReg {
        <crate::RegValueT<UsbUx20CdrReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct UsbXcvdiagReg_SPEC;
impl crate::sealed::RegSpec for UsbXcvdiagReg_SPEC {
    type DataType = u16;
}

#[doc = "Transceiver diagnostic Register (for test purpose only)"]
pub type UsbXcvdiagReg = crate::RegValueT<UsbXcvdiagReg_SPEC>;

impl UsbXcvdiagReg {
    #[doc = "With Bit0 = 1 this bit shows the level of the USB_Dp receive data from transceiver; i.e. D+ <= VSE."]
    #[inline(always)]
    pub fn usb_vpin(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, UsbXcvdiagReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<7,1,0,UsbXcvdiagReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "With Bit0 = 1 this bit shows the level USB_Dm receive data from transceiver; i.e. D- <= VSE."]
    #[inline(always)]
    pub fn usb_vmin(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, UsbXcvdiagReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<6,1,0,UsbXcvdiagReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "With Bit0 = 1 this bit shows the differential level of the receive comparator."]
    #[inline(always)]
    pub fn usb_rcv(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, UsbXcvdiagReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5,1,0,UsbXcvdiagReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "With Bit0 = 1, this bit enables test Bits 2,1. Must be kept to \'0\' for normal operation"]
    #[inline(always)]
    pub fn usb_xcv_txen(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, UsbXcvdiagReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,UsbXcvdiagReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "With Bit3,0 = 1, this bit sets USB_Dm to a high level, independent of LSMODE selection"]
    #[inline(always)]
    pub fn usb_xcv_txn(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, UsbXcvdiagReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,UsbXcvdiagReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "With Bit3,0 = 1, this bit sets USB_Dp to a high level, independent of LSMODE selection"]
    #[inline(always)]
    pub fn usb_xcv_txp(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, UsbXcvdiagReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,UsbXcvdiagReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Enable USB_XCVDIAG_REG\n0: Normal operation, test bits disabled\n1: Enable test bits 7,6,5,3,2,1"]
    #[inline(always)]
    pub fn usb_xcv_test(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, UsbXcvdiagReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,UsbXcvdiagReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for UsbXcvdiagReg {
    #[inline(always)]
    fn default() -> UsbXcvdiagReg {
        <crate::RegValueT<UsbXcvdiagReg_SPEC> as RegisterValue<_>>::new(0)
    }
}