da1470x-pac 0.2.0

Peripheral Access Crate (PAC) for DA1470X.
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
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
/*
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:52 +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"EMMC registers"]
unsafe impl ::core::marker::Send for super::Emmc {}
unsafe impl ::core::marker::Sync for super::Emmc {}
impl super::Emmc {
    #[allow(unused)]
    #[inline(always)]
    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
        self.ptr
    }

    #[doc = "This register stores the ADMA state during an ADMA error. This register is applicable for an SD/eMMC/UHS-II mode."]
    #[inline(always)]
    pub const fn emmc_adma_err_stat_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcAdmaErrStatRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcAdmaErrStatRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(84usize),
            )
        }
    }

    #[doc = "This register holds the lower 32-bit system address for DMA transfer. This register is applicable for an SD/eMMC/UHS-II mode."]
    #[inline(always)]
    pub const fn emmc_adma_sa_low_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcAdmaSaLowRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcAdmaSaLowRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(88usize),
            )
        }
    }

    #[doc = "This register is used to configure the SD/eMMC command argument."]
    #[inline(always)]
    pub const fn emmc_argument_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcArgumentRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcArgumentRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(8usize),
            )
        }
    }

    #[doc = "This register controls some aspects of tuning and auto-tuning features. Do not program this register when HOST_CTRL2_R.SAMPLE_C"]
    #[inline(always)]
    pub const fn emmc_at_ctrl_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcAtCtrlRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcAtCtrlRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1344usize),
            )
        }
    }

    #[doc = "Register to read the Center, Left and Right codes used by tuning and auto-tuning engines. Center code field is also used for so"]
    #[inline(always)]
    pub const fn emmc_at_stat_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcAtStatRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcAtStatRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1348usize),
            )
        }
    }

    #[doc = "This register is used to indicate the CMD12 response error of Auto CMD12, and the CMD23 response error of Auto CMD23. The Host"]
    #[inline(always)]
    pub const fn emmc_auto_cmd_stat_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcAutoCmdStatRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcAutoCmdStatRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(60usize),
            )
        }
    }

    #[doc = "This register is used by the host driver to control any operation related to Block Gap. This register is applicable for an SD/e"]
    #[inline(always)]
    pub const fn emmc_bgap_ctrl_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcBgapCtrlRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcBgapCtrlRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(42usize),
            )
        }
    }

    #[doc = "This register is used to configure the number of data blocks. This register is applicable for both SD and eMMC modes."]
    #[inline(always)]
    pub const fn emmc_blockcount_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcBlockcountRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcBlockcountRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(6usize),
            )
        }
    }

    #[doc = "This register is used to configure an SDMA buffer boundary and the number of bytes in a data block. This register is applicable"]
    #[inline(always)]
    pub const fn emmc_blocksize_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcBlocksizeRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcBlocksizeRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(4usize),
            )
        }
    }

    #[doc = "This register is used to control the eMMC Boot operation."]
    #[inline(always)]
    pub const fn emmc_boot_ctrl_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcBootCtrlRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcBootCtrlRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1326usize),
            )
        }
    }

    #[doc = "This register is used to access the packet buffer. This register is applicable for an SD/eMMC/UHS-II mode."]
    #[inline(always)]
    pub const fn emmc_buf_data_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcBufDataRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcBufDataRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(32usize),
            )
        }
    }

    #[doc = "This register provides the Host Driver with information specific to the Host Controller implementation. The host controller may"]
    #[inline(always)]
    pub const fn emmc_capabilities1_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcCapabilities1RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcCapabilities1RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(64usize),
            )
        }
    }

    #[doc = "This register provides the Host Driver with information specific to the Host Controller implementation. The host controller may"]
    #[inline(always)]
    pub const fn emmc_capabilities2_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcCapabilities2RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcCapabilities2RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(68usize),
            )
        }
    }

    #[doc = "This register controls SDCLK (card clock) in an SD/eMMC mode and RCLK in the UHS-II mode. This register is applicable for an SD"]
    #[inline(always)]
    pub const fn emmc_clk_ctrl_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcClkCtrlRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcClkCtrlRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(44usize),
            )
        }
    }

    #[doc = "This register is used to provide the information related to a command and a response packet. This register is applicable for an"]
    #[inline(always)]
    pub const fn emmc_cmd_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcCmdRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcCmdRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(14usize),
            )
        }
    }

    #[doc = "This register indicates the capabilities of the command queuing engine."]
    #[inline(always)]
    pub const fn emmc_cqcap_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcCqcapReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcCqcapReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(388usize),
            )
        }
    }

    #[doc = "This register indicate the maximum current capability for each voltage, for VDD1. The value is meaningful if the Voltage Suppor"]
    #[inline(always)]
    pub const fn emmc_curr_capabilities1_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcCurrCapabilities1RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcCurrCapabilities1RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(72usize),
            )
        }
    }

    #[doc = "This register indicates the maximum current capability for each voltage (for VDD2). The value is meaningful if Voltage Support"]
    #[inline(always)]
    pub const fn emmc_curr_capabilities2_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcCurrCapabilities2RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcCurrCapabilities2RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(76usize),
            )
        }
    }

    #[doc = "This register controls the embedded device. When the Host Controller is connected to a removable device, this register is not u"]
    #[inline(always)]
    pub const fn emmc_embedded_ctrl_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcEmbeddedCtrlRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcEmbeddedCtrlRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(3948usize),
            )
        }
    }

    #[doc = "This register is used to control the eMMC operation."]
    #[inline(always)]
    pub const fn emmc_emmc_ctrl_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcEmmcCtrlRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcEmmcCtrlRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1324usize),
            )
        }
    }

    #[doc = "This register is used to select the interrupt status that is notified to the Host System as an interrupt. All these status bits"]
    #[inline(always)]
    pub const fn emmc_error_int_signal_en_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(58usize),
            )
        }
    }

    #[doc = "This register sets the Interrupt Status for Error Interrupt Status register (ERROR_INT_STAT_R), when ERROR_INT_STAT_EN_R is set"]
    #[inline(always)]
    pub const fn emmc_error_int_stat_en_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcErrorIntStatEnRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(54usize),
            )
        }
    }

    #[doc = "This register enables an interrupt when the Error Interrupt Status Enable is enabled and at least one of the statuses is set to"]
    #[inline(always)]
    pub const fn emmc_error_int_stat_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcErrorIntStatRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcErrorIntStatRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(50usize),
            )
        }
    }

    #[doc = "The register is not a physically implemented but is an address at which the Auto CMD Error Status register can be written.This"]
    #[inline(always)]
    pub const fn emmc_force_auto_cmd_stat_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcForceAutoCmdStatRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcForceAutoCmdStatRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(80usize),
            )
        }
    }

    #[doc = "This register is not physically implemented but is an address at which the Error Interrupt Status register can be written. The"]
    #[inline(always)]
    pub const fn emmc_force_error_int_stat_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcForceErrorIntStatRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcForceErrorIntStatRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(82usize),
            )
        }
    }

    #[doc = "This register is used to indicate the Host Controller Version number."]
    #[inline(always)]
    pub const fn emmc_host_cntrl_vers_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcHostCntrlVersRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcHostCntrlVersRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(254usize),
            )
        }
    }

    #[doc = "This register is used to control the operation of the Host Controller. This register is applicable for an SD/eMMC/UHS-II mode."]
    #[inline(always)]
    pub const fn emmc_host_ctrl1_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcHostCtrl1RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcHostCtrl1RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(40usize),
            )
        }
    }

    #[doc = "This register is used to control how the Host Controller operates. This register is applicable for an SD/eMMC/UHS-II mode."]
    #[inline(always)]
    pub const fn emmc_host_ctrl2_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcHostCtrl2RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcHostCtrl2RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(62usize),
            )
        }
    }

    #[doc = "This register is used to select the valid burst types that the AHB Master bus interface can generate. \n\nWhen more than one bit"]
    #[inline(always)]
    pub const fn emmc_mbiu_ctrl_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcMbiuCtrlRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcMbiuCtrlRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1296usize),
            )
        }
    }

    #[doc = "This register is used to control the operation of MSHC Host Controller."]
    #[inline(always)]
    pub const fn emmc_mshc_ctrl_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcMshcCtrlRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcMshcCtrlRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1288usize),
            )
        }
    }

    #[doc = "This register reflects the current release number of DWC_mshc/DWC_mshc_lite."]
    #[inline(always)]
    pub const fn emmc_mshc_ver_id_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcMshcVerIdRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcMshcVerIdRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1280usize),
            )
        }
    }

    #[doc = "This register reflects the current release type of DWC_mshc/DWC_mshc_lite."]
    #[inline(always)]
    pub const fn emmc_mshc_ver_type_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcMshcVerTypeRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcMshcVerTypeRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(1284usize),
            )
        }
    }

    #[doc = "This register is used to select the interrupt status that is indicated to the Host System as the interrupt. All these status bi"]
    #[inline(always)]
    pub const fn emmc_normal_int_signal_en_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(56usize),
            )
        }
    }

    #[doc = "This register enables the Interrupt Status for Normal Interrupt Status register (NORMAL_INT_STAT_R) when NORMAL_INT_STAT_R is s"]
    #[inline(always)]
    pub const fn emmc_normal_int_stat_en_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcNormalIntStatEnRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(52usize),
            )
        }
    }

    #[doc = "This register reflects the status of the Normal Interrupt. This register is applicable for an SD/eMMC/UHS-II mode."]
    #[inline(always)]
    pub const fn emmc_normal_int_stat_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcNormalIntStatRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcNormalIntStatRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(48usize),
            )
        }
    }

    #[doc = "This register defines the Preset Value for DDR50 and High Speed DDR speed modes in the SD and eMMC modes, respectively."]
    #[inline(always)]
    pub const fn emmc_preset_ddr50_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPresetDdr50RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPresetDdr50RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(110usize),
            )
        }
    }

    #[doc = "This register defines Preset Value for Default Speed mode in SD mode."]
    #[inline(always)]
    pub const fn emmc_preset_ds_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPresetDsRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPresetDsRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(98usize),
            )
        }
    }

    #[doc = "This register defines Preset Value for High Speed mode in SD mode."]
    #[inline(always)]
    pub const fn emmc_preset_hs_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPresetHsRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPresetHsRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(100usize),
            )
        }
    }

    #[doc = "This register defines Preset Value for Initialization in SD/eMMC mode."]
    #[inline(always)]
    pub const fn emmc_preset_init_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPresetInitRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPresetInitRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(96usize),
            )
        }
    }

    #[doc = "This register defines Preset Value for SDR104 and HS200 speed modes in the SD and eMMC modes, respectively."]
    #[inline(always)]
    pub const fn emmc_preset_sdr104_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPresetSdr104RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPresetSdr104RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(108usize),
            )
        }
    }

    #[doc = "This register defines Preset Value for SDR12 and Legacy speed mode in SD and eMMC mode respectively."]
    #[inline(always)]
    pub const fn emmc_preset_sdr12_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPresetSdr12RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPresetSdr12RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(102usize),
            )
        }
    }

    #[doc = "This register defines Preset Value for SDR25 and High Speed SDR speed mode in SD and eMMC mode respectively."]
    #[inline(always)]
    pub const fn emmc_preset_sdr25_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPresetSdr25RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPresetSdr25RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(104usize),
            )
        }
    }

    #[doc = "This register defines Preset Value for SDR50 speed mode in SD mode."]
    #[inline(always)]
    pub const fn emmc_preset_sdr50_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPresetSdr50RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPresetSdr50RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(106usize),
            )
        }
    }

    #[doc = "This register is used to hold the preset value for UHS-II and HS400 speed modes in the SD and eMMC modes, respectively."]
    #[inline(always)]
    pub const fn emmc_preset_uhs2_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPresetUhs2RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPresetUhs2RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(116usize),
            )
        }
    }

    #[doc = "This register indicates the present status of the Host Controller. This register is applicable for an SD/eMMC/UHS-II mode."]
    #[inline(always)]
    pub const fn emmc_pstate_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPstateReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPstateReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(36usize),
            )
        }
    }

    #[doc = "This register is used to control the bus power for the Card. This register is applicable for an SD, eMMC, and UHS-II modes."]
    #[inline(always)]
    pub const fn emmc_pwr_ctrl_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPwrCtrlRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPwrCtrlRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(41usize),
            )
        }
    }

    #[doc = "This register points to the location of UHS-II embedded control registers."]
    #[inline(always)]
    pub const fn emmc_p_embedded_cntrl_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPEmbeddedCntrlReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPEmbeddedCntrlReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(230usize),
            )
        }
    }

    #[doc = "This register used as a pointer for the Vendor Specific Area 1."]
    #[inline(always)]
    pub const fn emmc_p_vendor_specific_area_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPVendorSpecificAreaReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPVendorSpecificAreaReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(232usize),
            )
        }
    }

    #[doc = "This register is used as a pointer for the Vendor Specific Area 2."]
    #[inline(always)]
    pub const fn emmc_p_vndr2_specific_area_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcPVndr2SpecificAreaReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcPVndr2SpecificAreaReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(234usize),
            )
        }
    }

    #[doc = "This register stores 39-08 bits of the Response Field for an SD/eMMC mode.  The response for an SD/eMMC command can be a maximu"]
    #[inline(always)]
    pub const fn emmc_resp01_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcResp01RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcResp01RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(16usize),
            )
        }
    }

    #[doc = "This register stores 71-40 bits of the Response Field for an SD/eMMC mode. This register is used to store the response from the"]
    #[inline(always)]
    pub const fn emmc_resp23_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcResp23RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcResp23RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(20usize),
            )
        }
    }

    #[doc = "This register stores 103-72 bits of the Response Field for an SD/eMMC mode.  The response for SD/eMMC command can be a maximum"]
    #[inline(always)]
    pub const fn emmc_resp45_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcResp45RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcResp45RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(24usize),
            )
        }
    }

    #[doc = "This register stores 135-104 bits of the Response Field for an SD/eMMC mode.    The SD/eMMC response can be a maximum of 128 bi"]
    #[inline(always)]
    pub const fn emmc_resp67_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcResp67RReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcResp67RReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(28usize),
            )
        }
    }

    #[doc = "This register is used to configure a 32-bit Block Count or an SDMA System Address based on the Host Version 4 Enable bit in the"]
    #[inline(always)]
    pub const fn emmc_sdmasa_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcSdmasaRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcSdmasaRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(0usize),
            )
        }
    }

    #[doc = "This register indicates the Interrupt status of each slot."]
    #[inline(always)]
    pub const fn emmc_slot_intr_status_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcSlotIntrStatusRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcSlotIntrStatusRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(252usize),
            )
        }
    }

    #[doc = "This register is used to generate a reset pulse by writing 1 to each bit of this register. After completing the reset, the Host"]
    #[inline(always)]
    pub const fn emmc_sw_rst_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcSwRstRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcSwRstRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(47usize),
            )
        }
    }

    #[doc = "This register is used to set the Data Timeout Counter value for an SD/eMMC mode according to the timer clock defined by the Cap"]
    #[inline(always)]
    pub const fn emmc_tout_ctrl_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcToutCtrlRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcToutCtrlRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(46usize),
            )
        }
    }

    #[doc = "This register is mandatory for the Host Controller, but the wakeup functionality depends on the Host Controller system hardware"]
    #[inline(always)]
    pub const fn emmc_wup_ctrl_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcWupCtrlRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcWupCtrlRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(43usize),
            )
        }
    }

    #[doc = "This register is used to control the operation of data transfers for an SD/eMMC mode. The Host driver sets this register before"]
    #[inline(always)]
    pub const fn emmc_xfer_mode_r_reg(
        &self,
    ) -> &'static crate::common::Reg<self::EmmcXferModeRReg_SPEC, crate::common::RW> {
        unsafe {
            crate::common::Reg::<self::EmmcXferModeRReg_SPEC, crate::common::RW>::from_ptr(
                self._svd2pac_as_ptr().add(12usize),
            )
        }
    }
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct EmmcAdmaErrStatRReg_SPEC;
impl crate::sealed::RegSpec for EmmcAdmaErrStatRReg_SPEC {
    type DataType = u8;
}

#[doc = "This register stores the ADMA state during an ADMA error. This register is applicable for an SD/eMMC/UHS-II mode."]
pub type EmmcAdmaErrStatRReg = crate::RegValueT<EmmcAdmaErrStatRReg_SPEC>;

impl EmmcAdmaErrStatRReg {
    #[doc = "ADMA Length Mismatch Error States\nThis error occurs in the following instances:\n- While the Block Count Enable is being set, the total data length specified by the Descriptor table is different from that specified by the Block Count and Block Length\n- When the total data length cannot be divided by the block length\nValues:\n0x0 (NO_ERR): No Error\n0x1 (ERROR): Error"]
    #[inline(always)]
    pub fn adma_len_err(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcAdmaErrStatRReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<2,1,0,EmmcAdmaErrStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "ADMA Error States\nThese bits indicate the state of ADMA when an error occurs during ADMA data transfer.\nValues:\n0x0 (ST_STOP): Stop DMA - SYS_ADR register points to a location next to the error descriptor\n0x1 (ST_FDS): Fetch Descriptor - SYS_ADR register points to the error descriptor\n0x2 (UNUSED): Never set this state\n0x3 (ST_TFR): Transfer Data - SYS_ADR register points to a location next to the error descriptor"]
    #[inline(always)]
    pub fn adma_err_states(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3,
        1,
        0,
        u8,
        u8,
        EmmcAdmaErrStatRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcAdmaErrStatRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcAdmaErrStatRReg {
    #[inline(always)]
    fn default() -> EmmcAdmaErrStatRReg {
        <crate::RegValueT<EmmcAdmaErrStatRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register holds the lower 32-bit system address for DMA transfer. This register is applicable for an SD/eMMC/UHS-II mode."]
pub type EmmcAdmaSaLowRReg = crate::RegValueT<EmmcAdmaSaLowRReg_SPEC>;

impl EmmcAdmaSaLowRReg {
    #[doc = "ADMA System Address\n\nThese bits indicate the lower 32 bits of the ADMA system address.\n- SDMA: If Host Version 4 Enable is set to 1, this register stores the system address of the data location\n- ADMA2: This register stores the byte address of the executing command of the descriptor table\n- ADMA3: This register is set by ADMA3. ADMA2 increments the address of this register that points to the next line, every time a Descriptor line is fetched."]
    #[inline(always)]
    pub fn adma_sa_low(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffffffff,
        1,
        0,
        u32,
        u32,
        EmmcAdmaSaLowRReg_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0xffffffff,
            1,
            0,
            u32,
            u32,
            EmmcAdmaSaLowRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcAdmaSaLowRReg {
    #[inline(always)]
    fn default() -> EmmcAdmaSaLowRReg {
        <crate::RegValueT<EmmcAdmaSaLowRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to configure the SD/eMMC command argument."]
pub type EmmcArgumentRReg = crate::RegValueT<EmmcArgumentRReg_SPEC>;

impl EmmcArgumentRReg {
    #[doc = "Command Argument.\nThese bits specify the SD/eMMC command argument that is specified in bits 39-8 of the Command format."]
    #[inline(always)]
    pub fn argument(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffffffff,
        1,
        0,
        u32,
        u32,
        EmmcArgumentRReg_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0xffffffff,
            1,
            0,
            u32,
            u32,
            EmmcArgumentRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcArgumentRReg {
    #[inline(always)]
    fn default() -> EmmcArgumentRReg {
        <crate::RegValueT<EmmcArgumentRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register controls some aspects of tuning and auto-tuning features. Do not program this register when HOST_CTRL2_R.SAMPLE_C"]
pub type EmmcAtCtrlRReg = crate::RegValueT<EmmcAtCtrlRReg_SPEC>;

impl EmmcAtCtrlRReg {
    #[doc = "Sampling window threshold value setting\nThe maximum value that can be set here depends on the length of delayline used for tuning. A delayLine with 128 taps can use values from 0x0 to 0x7F.\nThis field is valid only when SWIN_TH_EN is \'1\'. Should be programmed only when SAMPLE_CLK_SEL is \'0\'\n     - 0x0 : Threshold values is 0x1, windows of length 1 tap and above can be selected as sampling window.\n     - 0x1 : Threshold values is 0x2, windows of length 2 taps and above can be selected as sampling window.\n     - 0x2 : Threshold values is 0x1, windows of length 3 taps and above can be selected as sampling window.\n     - ........\n     - 0x7F : Threshold values is 0x1, windows of length 127 taps and above can be selected as sampling window."]
    #[inline(always)]
    pub fn swin_th_val(
        self,
    ) -> crate::common::RegisterField<24, 0x7, 1, 0, u8, u8, EmmcAtCtrlRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<24,0x7,1,0,u8,u8,EmmcAtCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Time taken for phase switching and stable clock output.\nSpecifies the maximum time (in terms of cclk cycles) that the delay line can take to switch its output phase after a change in tuning_cclk_sel or autotuning_cclk_sel.\nValues:\n0x0 (LATENCY_LT_1): Less than 1-cycle latency\n0x1 (LATENCY_LT_2): Less than 2-cycle latency\n0x2 (LATENCY_LT_3): Less than 3-cycle latency\n0x3 (LATENCY_LT_4): Less than 4-cycle latency"]
    #[inline(always)]
    pub fn post_change_dly(
        self,
    ) -> crate::common::RegisterField<19, 0x3, 1, 0, u8, u8, EmmcAtCtrlRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<19,0x3,1,0,u8,u8,EmmcAtCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Maximum Latency specification between cclk_tx and cclk_rx.\nValues:\n0x0 (LATENCY_LT_1): Less than 1-cycle latency\n0x1 (LATENCY_LT_2): Less than 2-cycle latency\n0x2 (LATENCY_LT_3): Less than 3-cycle latency\n0x3 (LATENCY_LT_4): Less than 4-cycle latency"]
    #[inline(always)]
    pub fn pre_change_dly(
        self,
    ) -> crate::common::RegisterField<17, 0x3, 1, 0, u8, u8, EmmcAtCtrlRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<17,0x3,1,0,u8,u8,EmmcAtCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Clock stopping control for Tuning and auto-tuning circuit.\nWhen enabled, clock gate control output of DWC_mshc (clk2card_on) is pulled low before changing phase select codes on tuning_cclk_sel and autotuning_cclk_sel. This effectively stops the Device/Card\nclock, cclk_rx and also drift_cclk_rx. Changing phase code when clocks are stopped ensures glitch free phase switching. Set this bit to 0 if the PHY or delayline can guarantee glitch free switching.\nValues:\n0x1 (ENABLE_CLK_STOPPING): Clocks stopped during phase code change\n0x0 (DISABLE_CLK_STOPPING): Clocks not stopped. PHY ensures glitch free phase switching."]
    #[inline(always)]
    pub fn tune_clk_stop_en(
        self,
    ) -> crate::common::RegisterFieldBool<16, 1, 0, EmmcAtCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<16,1,0,EmmcAtCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "This fields enables software-managed tuning flow.\nValues:\n0x1 (SW_TUNING_ENABLE): Software-managed tuning enabled. AT_STAT_R.CENTER_PH_CODE Field is now writable.\n0x0 (SW_TUNING_DISABLE): Software-managed tuning disabled."]
    #[inline(always)]
    pub fn sw_tune_en(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcAtCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,EmmcAtCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Framing errors are not generated when executing tuning. This debug bit allows users to report these errors.\nValues:\n0x1 (DEBUG_ERRORS): Debug mode for reporting framing errors\n0x0 (ERRORS_DISABLED): Default mode where as per SD-HCI no errors are reported."]
    #[inline(always)]
    pub fn rpt_tune_err(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcAtCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,EmmcAtCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Sampling window Threshold enable\nSelects the tuning mode\nField should be programmed only when SAMPLE_CLK_SEL is \'0\'\nValues:\n0x1 (THRESHOLD_MODE): Tuning engine selects the first complete sampling window that meets the threshold set by SWIN_TH_VAL field\n0x0 (LARGEST_WIN_MODE): Tuning engine sweeps all taps and settles at the largest window"]
    #[inline(always)]
    pub fn swin_th_en(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcAtCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,EmmcAtCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcAtCtrlRReg {
    #[inline(always)]
    fn default() -> EmmcAtCtrlRReg {
        <crate::RegValueT<EmmcAtCtrlRReg_SPEC> as RegisterValue<_>>::new(16777220)
    }
}

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

#[doc = "Register to read the Center, Left and Right codes used by tuning and auto-tuning engines. Center code field is also used for so"]
pub type EmmcAtStatRReg = crate::RegValueT<EmmcAtStatRReg_SPEC>;

impl EmmcAtStatRReg {
    #[doc = "Left Edge Phase code. Reading this field returns the phase code value used by Auto-tuning engine to sample data on Left edge of sampling window."]
    #[inline(always)]
    pub fn l_edge_ph_code(
        self,
    ) -> crate::common::RegisterField<16, 0xff, 1, 0, u8, u8, EmmcAtStatRReg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<16,0xff,1,0,u8,u8,EmmcAtStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Right Edge Phase code. Reading this field returns the phase code value used by Auto-tuning engine to sample data on Right edge of sampling window."]
    #[inline(always)]
    pub fn r_edge_ph_code(
        self,
    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, EmmcAtStatRReg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<8,0xff,1,0,u8,u8,EmmcAtStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Centered Phase code. Reading this field returns the current value on tuning_cclk_sel output. Setting AT_CTRL_R.SW_TUNE_EN enables software to write to this field and its contents are reflected on tuning_cclk_sel."]
    #[inline(always)]
    pub fn center_ph_code(
        self,
    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, EmmcAtStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xff,1,0,u8,u8,EmmcAtStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcAtStatRReg {
    #[inline(always)]
    fn default() -> EmmcAtStatRReg {
        <crate::RegValueT<EmmcAtStatRReg_SPEC> as RegisterValue<_>>::new(6)
    }
}

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

#[doc = "This register is used to indicate the CMD12 response error of Auto CMD12, and the CMD23 response error of Auto CMD23. The Host"]
pub type EmmcAutoCmdStatRReg = crate::RegValueT<EmmcAutoCmdStatRReg_SPEC>;

impl EmmcAutoCmdStatRReg {
    #[doc = "Command Not Issued By Auto CMD12 Error\nIf this bit is set to 1, CMD_wo_DAT is not executed due to an Auto CMD12 Error (D04-D01) in this register.\nThis bit is set to 0 when Auto CMD Error is generated by Auto CMD23.\nValues:\n0x1 (TRUE): Not Issued\n0x0 (FALSE): No Error"]
    #[inline(always)]
    pub fn cmd_not_issued_auto_cmd12(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcAutoCmdStatRReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<7,1,0,EmmcAutoCmdStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Auto CMD Response Error\nThis bit is set when Response Error Check Enable in the Transfer Mode register is set to 1 and an error is detected in R1 response of either Auto CMD12 or CMD13. This status is ignored if any bit between D00 to D04 is set to 1.\nValues:\n0x1 (TRUE): Error\n0x0 (FALSE): No Error"]
    #[inline(always)]
    pub fn auto_cmd_resp_err(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcAutoCmdStatRReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<5,1,0,EmmcAutoCmdStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Auto CMD Index Error\nThis bit is set if the command index error occurs in response to a command.\nValues:\n0x1 (TRUE): Error\n0x0 (FALSE): No Error"]
    #[inline(always)]
    pub fn auto_cmd_idx_err(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcAutoCmdStatRReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<4,1,0,EmmcAutoCmdStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Auto CMD End Bit Error\nThis bit is set when detecting that the end bit of command response is 0.\nValues:\n0x1 (TRUE): End Bit Error Generated\n0x0 (FALSE): No Error"]
    #[inline(always)]
    pub fn auto_cmd_ebit_err(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcAutoCmdStatRReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<3,1,0,EmmcAutoCmdStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Auto CMD CRC Error\nThis bit is set when detecting a CRC error in the command response.\nValues:\n0x1 (TRUE): CRC Error Generated\n0x0 (FALSE): No Error"]
    #[inline(always)]
    pub fn auto_cmd_crc_err(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcAutoCmdStatRReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<2,1,0,EmmcAutoCmdStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Auto CMD Timeout Error\nThis bit is set if no response is returned with 64 SDCLK cycles from the end bit of the command.\nIf this bit is set to 1, error status bits (D04-D01) are meaningless.\nValues:\n0x1 (TRUE): Time out\n0x0 (FALSE): No Error"]
    #[inline(always)]
    pub fn auto_cmd_tout_err(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcAutoCmdStatRReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<1,1,0,EmmcAutoCmdStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Auto CMD12 Not Executed\nIf multiple memory block data transfer is not started due to a command error, this bit is not set because it is not necessary to issue an Auto CMD12. Setting this bit to 1 means that the Host Controller cannot issue Auto CMD12 to stop multiple memory block data transfer, due to some error. If this bit is set to 1, error status bits (D04-D01) is meaningless.\nThis bit is set to 0 when Auto CMD Error is generated by Auto CMD23.\nValues:\n0x1 (TRUE): Not Executed\n0x0 (FALSE): Executed"]
    #[inline(always)]
    pub fn auto_cmd12_not_exec(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcAutoCmdStatRReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcAutoCmdStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcAutoCmdStatRReg {
    #[inline(always)]
    fn default() -> EmmcAutoCmdStatRReg {
        <crate::RegValueT<EmmcAutoCmdStatRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used by the host driver to control any operation related to Block Gap. This register is applicable for an SD/e"]
pub type EmmcBgapCtrlRReg = crate::RegValueT<EmmcBgapCtrlRReg_SPEC>;

impl EmmcBgapCtrlRReg {
    #[doc = "Interrupt At Block Gap.\nThis bit is valid only in the 4-bit mode of an SDIO card and is used to select a sample point in the interrupt cycle. Setting to 1 enables interrupt detection at the block gap for a multiple block transfer.\n\nValues:\n\n0x0 (DISABLE): Disabled\n0x1 (ENABLE): Enabled"]
    #[inline(always)]
    pub fn int_at_bgap(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcBgapCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,EmmcBgapCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Read Wait Control.\nThis bit is used to enable the read wait protocol to stop read data using DAT\\[2\\] line if the card supports read wait. Otherwise, the Host Controller has to stop the card clock to hold the read data. \n\nValues:\n0x0 (DISABLE): Disable Read Wait Control\n0x1 (ENABLE): Enable Read Wait Control"]
    #[inline(always)]
    pub fn rd_wait_ctrl(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcBgapCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,EmmcBgapCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Continue Request.\nThis bit is used to restart the transaction, which was stopped using the Stop At Block Gap Request. The Host Controller automatically clears this bit when the transaction restarts. If stop at block gap request is set to 1, any write to this bit is ignored.\n\nValues:\n0x0 (NO_AFFECT): No Affect\n0x1 (RESTART): Restart"]
    #[inline(always)]
    pub fn continue_req(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcBgapCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,EmmcBgapCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Stop At Block Gap Request.\nThis bit is used to stop executing read and write transactions at the next block gap for non-DMA, SDMA, and ADMA transfers.\n\nValues:\n0x0 (XFER): Transfer\n0x1 (STOP): Stop"]
    #[inline(always)]
    pub fn stop_bg_req(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcBgapCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcBgapCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcBgapCtrlRReg {
    #[inline(always)]
    fn default() -> EmmcBgapCtrlRReg {
        <crate::RegValueT<EmmcBgapCtrlRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to configure the number of data blocks. This register is applicable for both SD and eMMC modes."]
pub type EmmcBlockcountRReg = crate::RegValueT<EmmcBlockcountRReg_SPEC>;

impl EmmcBlockcountRReg {
    #[doc = "16-bit Block Count.\n- If the Host Version 4 Enable bit is set 0 or the 16-bit Block Count register is set to non-zero, the 16-bit Block Count register is selected.\n- If the Host Version 4 Enable bit is set 1 and the 16-bit Block Count register is set to zero, the 32-bit Block Count register is selected.\nFollowing are the values for BLOCK_CNT:\n- 0x0: Stop Count\n- 0x1: 1 Block\n- 0x2: 2 Blocks\n- ... - ...\n- 0xFFFF: 65535 Blocks\nNote: For Host Version 4 Enable = 0, this register must be set to 0000h before programming the 32-bit block count register when Auto CMD23 is enabled for non-DMA and ADMA modes."]
    #[inline(always)]
    pub fn block_cnt(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffff,
        1,
        0,
        u16,
        u16,
        EmmcBlockcountRReg_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0xffff,
            1,
            0,
            u16,
            u16,
            EmmcBlockcountRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcBlockcountRReg {
    #[inline(always)]
    fn default() -> EmmcBlockcountRReg {
        <crate::RegValueT<EmmcBlockcountRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to configure an SDMA buffer boundary and the number of bytes in a data block. This register is applicable"]
pub type EmmcBlocksizeRReg = crate::RegValueT<EmmcBlocksizeRReg_SPEC>;

impl EmmcBlocksizeRReg {
    #[doc = "SDMA Buffer Boundary.\nThese bits specify the size of contiguous buffer in system memory. The SDMA transfer waits at every boundary specified by these fields and the Host Controller generates the DMA interrupt to request the Host Driver to update the SDMA System Address register.\n\nValues:\n0x0 (BYTES_4K): 4K bytes SDMA Buffer Boundary\n0x1 (BYTES_8K): 8K bytes SDMA Buffer Boundary\n0x2 (BYTES_16K): 16K bytes SDMA Buffer Boundary\n0x3 (BYTES_32K): 32K bytes SDMA Buffer Boundary\n0x4 (BYTES_64K): 64K bytes SDMA Buffer Boundary\n0x5 (BYTES_128K): 128K bytes SDMA Buffer Boundary\n0x6 (BYTES_256K): 256K bytes SDMA Buffer Boundary\n0x7 (BYTES_512K): 512K bytes SDMA Buffer Boundary"]
    #[inline(always)]
    pub fn sdma_buf_bdary(
        self,
    ) -> crate::common::RegisterField<
        12,
        0x7,
        1,
        0,
        u8,
        u8,
        EmmcBlocksizeRReg_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            12,
            0x7,
            1,
            0,
            u8,
            u8,
            EmmcBlocksizeRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Transfer Block Size.\nThese bits specify the block size of data transfers. In case of memory, it is set to 512 bytes. It can be accessed only if no transaction is executing. Read operations during transfers may return\nan invalid value, and write operations are ignored.\nFollowing are the values for XFER_BLOCK_SIZE:\n- 0x1: 1 byte\n- 0x2: 2 bytes\n- 0x3: 3 bytes\n- ...... \n- 0x1FF: 511 byte\n- 0x200: 512 bytes\n- ......   \n- 0x800: 2048 bytes\nNote: This register must be programmed with a non-zero value for data transfer."]
    #[inline(always)]
    pub fn xfer_block_size(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xfff,
        1,
        0,
        u16,
        u16,
        EmmcBlocksizeRReg_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0xfff,
            1,
            0,
            u16,
            u16,
            EmmcBlocksizeRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcBlocksizeRReg {
    #[inline(always)]
    fn default() -> EmmcBlocksizeRReg {
        <crate::RegValueT<EmmcBlocksizeRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to control the eMMC Boot operation."]
pub type EmmcBootCtrlRReg = crate::RegValueT<EmmcBootCtrlRReg_SPEC>;

impl EmmcBootCtrlRReg {
    #[doc = "Boot Ack Timeout Counter Value.\nThis value determines the interval by which boot ack timeout (50 ms) is detected when boot ack is expected during boot operation.\n- 0xF : Reserved\n- 0xE : TMCLK x 2^27\n- ..   - ............\n- 0x1 : TMCLK x 2^14\n- 0x0 : TMCLK x 2^13"]
    #[inline(always)]
    pub fn boot_tout_cnt(
        self,
    ) -> crate::common::RegisterField<12, 0xf, 1, 0, u8, u8, EmmcBootCtrlRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<
            12,
            0xf,
            1,
            0,
            u8,
            u8,
            EmmcBootCtrlRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Boot Acknowledge Enable\nWhen this bit set, DWC_mshc checks for boot acknowledge start pattern of 0-1-0 during boot operation. This bit is applicable for both mandatory and alternate boot mode.\nValues:\n0x1 (TRUE): Boot Ack enable\n0x0 (FALSE): Boot Ack disable"]
    #[inline(always)]
    pub fn boot_ack_enable(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, EmmcBootCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<8,1,0,EmmcBootCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Validate Mandatory Boot Enable bit\nThis bit is used to validate the MAN_BOOT_EN bit.\nValues:\n0x1 (TRUE): Validate Mandatory boot enable bit\n0x0 (FALSE): Ignore Mandatory boot Enable bit"]
    #[inline(always)]
    pub fn validate_boot(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcBootCtrlRReg_SPEC, crate::common::W> {
        crate::common::RegisterFieldBool::<7,1,0,EmmcBootCtrlRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Mandatory Boot Enable\nThis bit is used to initiate the mandatory boot operation. The application sets this bit along with VALIDATE_BOOT bit. Writing 0 is ignored. The DWC_mshc clears this bit after the boot transfer is completed or terminated.\nValues:\n0x1 (MAN_BOOT_EN): Mandatory boot enable\n0x0 (MAN_BOOT_DIS): Mandatory boot disable"]
    #[inline(always)]
    pub fn man_boot_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcBootCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcBootCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcBootCtrlRReg {
    #[inline(always)]
    fn default() -> EmmcBootCtrlRReg {
        <crate::RegValueT<EmmcBootCtrlRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to access the packet buffer. This register is applicable for an SD/eMMC/UHS-II mode."]
pub type EmmcBufDataRReg = crate::RegValueT<EmmcBufDataRReg_SPEC>;

impl EmmcBufDataRReg {
    #[doc = "Buffer Data.\nThese bits enable access to the Host Controller packet buffer."]
    #[inline(always)]
    pub fn buf_data(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffffffff,
        1,
        0,
        u32,
        u32,
        EmmcBufDataRReg_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0xffffffff,
            1,
            0,
            u32,
            u32,
            EmmcBufDataRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcBufDataRReg {
    #[inline(always)]
    fn default() -> EmmcBufDataRReg {
        <crate::RegValueT<EmmcBufDataRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register provides the Host Driver with information specific to the Host Controller implementation. The host controller may"]
pub type EmmcCapabilities1RReg = crate::RegValueT<EmmcCapabilities1RReg_SPEC>;

impl EmmcCapabilities1RReg {
    #[doc = "Slot Type\nThese bits indicate usage of a slot by a specific Host System.\nValues:\n0x0 (REMOVABLE_SLOT): Removable Card Slot\n0x1 (EMBEDDED_SLOT): Embedded Slot for one Device\n0x2 (SHARED_SLOT): Shared Bus Slot (SD mode)\n0x3 (UHS2_EMBEDDED_SLOT): UHS-II MultipleEmbedded Devices"]
    #[inline(always)]
    pub fn slot_type_r(
        self,
    ) -> crate::common::RegisterField<
        30,
        0x3,
        1,
        0,
        u8,
        u8,
        EmmcCapabilities1RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            30,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcCapabilities1RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Asynchronous Interrupt Support (SD Mode only)\nValues:\n0x0 (FALSE): Asynchronous Interrupt Not Supported\n0x1 (TRUE): Asynchronous Interrupt Supported"]
    #[inline(always)]
    pub fn async_int_support(
        self,
    ) -> crate::common::RegisterFieldBool<29, 1, 0, EmmcCapabilities1RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<29,1,0,EmmcCapabilities1RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "64-bit System Address Support for V3\nThis bit sets the Host controller to support 64-bit System Addressing of V3 mode.\nSDMA cannot be used in 64-bit Addressing in Version 3 Mode.\nIf this bit is set to 1, 64-bit ADMA2 with using 96-bit Descriptor can be enabled by setting Host Version 4 Enable (HOST_VER4_ENABLE = 0) and DMA select (DMA_SEL = 11b).\nValues:\n0x0 (FALSE): 64-bit System Address for V3 is Not Supported\n0x1 (TRUE): 64-bit System Address for V3 is Supported"]
    #[inline(always)]
    pub fn sys_addr_64_v3(
        self,
    ) -> crate::common::RegisterFieldBool<28, 1, 0, EmmcCapabilities1RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<28,1,0,EmmcCapabilities1RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "64-bit System Address Support for V4\nThis bit sets the Host Controller to support 64-bit System Addressing of V4 mode. When this bit is set to 1, full or part of 64-bit address must be used to decode the Host Controller Registers so that Host Controller Registers can be placed above system memory area. 64-bit address decode of Host Controller registers is effective regardless of setting to 64-bit Addressing in Host Control 2.\nIf this bit is set to 1, 64-bit DMA Addressing for version 4 is enabled by setting Host Version 4 Enable\n(HOST_VER4_ENABLE = 1) and by setting 64-bit Addressing (ADDRESSING =1) in the Host Control 2 register. SDMA can be used and ADMA2 uses 128-bit Descriptor.\nValues:\n0x0 (FALSE): 64-bit System Address for V4 is Not Supported\n0x1 (TRUE): 64-bit System Address for V4 is Supported"]
    #[inline(always)]
    pub fn sys_addr_64_v4(
        self,
    ) -> crate::common::RegisterFieldBool<27, 1, 0, EmmcCapabilities1RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<27,1,0,EmmcCapabilities1RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Voltage Support for 1.8V\nValues:\n0x0 (FALSE): 1.8V Not Supported\n0x1 (TRUE): 1.8V Supported"]
    #[inline(always)]
    pub fn volt_18(
        self,
    ) -> crate::common::RegisterFieldBool<26, 1, 0, EmmcCapabilities1RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<26,1,0,EmmcCapabilities1RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Voltage Support for SD 3.0V or Embedded 1.2V\nValues:\n0x0 (FALSE): SD 3.0V or Embedded 1.2V Not Supported\n0x1 (TRUE): SD 3.0V or Embedded Supported"]
    #[inline(always)]
    pub fn volt_30(
        self,
    ) -> crate::common::RegisterFieldBool<25, 1, 0, EmmcCapabilities1RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<25,1,0,EmmcCapabilities1RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Voltage Support for 3.3V\nValues:\n0x0 (FALSE): 3.3V Not Supported\n0x1 (TRUE): 3.3V Supported"]
    #[inline(always)]
    pub fn volt_33(
        self,
    ) -> crate::common::RegisterFieldBool<24, 1, 0, EmmcCapabilities1RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<24,1,0,EmmcCapabilities1RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Suspense/Resume Support\nThis bit indicates whether the Host Controller supports Suspend/Resume functionality. If this bit is 0, the Host Driver does not issue either Suspend or Resume commands because the Suspend and Resume mechanism is not supported.\nValues:\n0x0 (FALSE): Not Supported\n0x1 (TRUE): Supported"]
    #[inline(always)]
    pub fn sus_res_support(
        self,
    ) -> crate::common::RegisterFieldBool<23, 1, 0, EmmcCapabilities1RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<23,1,0,EmmcCapabilities1RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "SDMA Support\nThis bit indicates whether the Host Controller is capable of using SDMA to transfer data between the system memory and the Host Controller directly.\nValues:\n0x0 (FALSE): SDMA not Supported\n0x1 (TRUE): SDMA Supported"]
    #[inline(always)]
    pub fn sdma_support(
        self,
    ) -> crate::common::RegisterFieldBool<22, 1, 0, EmmcCapabilities1RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<22,1,0,EmmcCapabilities1RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "High Speed Support\nThis bit indicates whether the Host Controller and the Host System supports High Speed mode and they can supply the SD Clock frequency from 25 MHz to 50 MHz.\nValues:\n0x0 (FALSE): High Speed not Supported\n0x1 (TRUE): High Speed Supported"]
    #[inline(always)]
    pub fn high_speed_support(
        self,
    ) -> crate::common::RegisterFieldBool<21, 1, 0, EmmcCapabilities1RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<21,1,0,EmmcCapabilities1RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "ADMA2 Support\nThis bit indicates whether the Host Controller is capable of using ADMA2.\nValues:\n0x0 (FALSE): ADMA2 not Supported\n0x1 (TRUE): ADMA2 Supported"]
    #[inline(always)]
    pub fn adma2_support(
        self,
    ) -> crate::common::RegisterFieldBool<19, 1, 0, EmmcCapabilities1RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<19,1,0,EmmcCapabilities1RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "8-bit Support for Embedded Device\nThis bit indicates whether the Host Controller is capable of using an 8-bit bus width mode. This bit is not effective when the Slot Type is set to 10b.\nValues:\n0x0 (FALSE): 8-bit Bus Width not Supported\n0x1 (TRUE): 8-bit Bus Width Supported"]
    #[inline(always)]
    pub fn embedded_8_bit(
        self,
    ) -> crate::common::RegisterFieldBool<18, 1, 0, EmmcCapabilities1RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<18,1,0,EmmcCapabilities1RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Maximum Block Length\nThis bit indicates the maximum block size that the Host driver can read and write to the buffer in the Host Controller. The buffer transfers this block size without wait cycles. The transfer block length is always 512 bytes for the SD Memory irrespective of this bit\nValues:\n0x0 (ZERO): 512 Byte\n0x1 (ONE): 1024 Byte\n0x2 (TWO): 2048 Byte\n0x3 (THREE): Reserved"]
    #[inline(always)]
    pub fn max_blk_len(
        self,
    ) -> crate::common::RegisterField<
        16,
        0x3,
        1,
        0,
        u8,
        u8,
        EmmcCapabilities1RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            16,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcCapabilities1RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Base Clock Frequency for SD clock\nThese bits indicate the base (maximum) clock frequency for the SD Clock. The definition of these bits depend on the Host Controller Version.\n- 6-Bit Base Clock Frequency: This mode is supported by the Host Controller version 1.00 and 2.00. The upper 2 bits are not effective and are always 0. The unit values are 1 MHz. The supported clock range is 10 MHz to 63 MHz.\n-- 0x00 : Get information through another method\n-- 0x01 : 1 MHz\n-- 0x02 : 2 MHz\n-- .............\n-- 0x3F : 63 MHz\n-- 0x40-0xFF : Not Supported\n- 8-Bit Base Clock Frequency: This mode is supported by the Host Controller version 3.00. The unit values are 1 MHz. The supported clock range is 10 MHz to 255 MHz.\n-- 0x00 : Get information through another method\n-- 0x01 : 1 MHz\n-- 0x02 : 2 MHz\n-- ............\n-- 0xFF : 255 MHz\nIf the frequency is 16.5 MHz, the larger value is set to 0001001b (17 MHz) because the Host Driver uses this value to calculate the clock divider value and it does not exceed the upper limit of the SD Clock frequency. If these bits are all 0, the Host system has to get information using a different method."]
    #[inline(always)]
    pub fn base_clk_freq(
        self,
    ) -> crate::common::RegisterField<
        8,
        0xff,
        1,
        0,
        u8,
        u8,
        EmmcCapabilities1RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            8,
            0xff,
            1,
            0,
            u8,
            u8,
            EmmcCapabilities1RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Timeout Clock Unit\nThis bit shows the unit of base clock frequency used to detect Data TImeout Error.\nValues:\n0x0 (KHZ): KHz\n0x1 (MHZ): MHz"]
    #[inline(always)]
    pub fn tout_clk_unit(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcCapabilities1RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<7,1,0,EmmcCapabilities1RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Timeout Clock Frequency\n\nThis bit shows the base clock frequency used to detect Data Timeout Error. The Timeout Clock unit defines the unit of timeout clock frequency. It can be KHz or MHz.\n- 0x00 : Get information through another method\n- 0x01 :  1KHz /  1MHz\n- 0x02 :  2KHz /  2MHz\n- 0x03 :  3KHz /  3MHz\n-  ...........\n- 0x3F : 63KHz / 63MHz"]
    #[inline(always)]
    pub fn tout_clk_freq(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3f,
        1,
        0,
        u8,
        u8,
        EmmcCapabilities1RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x3f,
            1,
            0,
            u8,
            u8,
            EmmcCapabilities1RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcCapabilities1RReg {
    #[inline(always)]
    fn default() -> EmmcCapabilities1RReg {
        <crate::RegValueT<EmmcCapabilities1RReg_SPEC> as RegisterValue<_>>::new(544092320)
    }
}

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

#[doc = "This register provides the Host Driver with information specific to the Host Controller implementation. The host controller may"]
pub type EmmcCapabilities2RReg = crate::RegValueT<EmmcCapabilities2RReg_SPEC>;

impl EmmcCapabilities2RReg {
    #[doc = "1.8V VDD2 Support\nThis bit indicates support of VDD2 for the Host System.\nValues:\n0x0 (FALSE): 1.8V VDD2 is not Supported\n0x1 (TRUE): 1.8V VDD2 is Supported"]
    #[inline(always)]
    pub fn vdd2_18v_support(
        self,
    ) -> crate::common::RegisterFieldBool<28, 1, 0, EmmcCapabilities2RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<28,1,0,EmmcCapabilities2RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "ADMA3 Support\nThis bit indicates whether the Host Controller is capable of using ADMA3.\nValues:\n0x0 (FALSE): ADMA3 not Supported\n0x1 (TRUE): ADMA3 Supported"]
    #[inline(always)]
    pub fn adma3_support(
        self,
    ) -> crate::common::RegisterFieldBool<27, 1, 0, EmmcCapabilities2RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<27,1,0,EmmcCapabilities2RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Clock Multiplier\nThese bits indicate the clock multiplier of the programmable clock generator. Setting these bits to 0 means that the Host Controller does not support a programmable clock generator.\n- 0x0: Clock Multiplier is not Supported\n- 0x1: Clock Multiplier M = 2\n- 0x2: Clock Multiplier M = 3\n-   .........\n- 0xFF: Clock Multiplier M = 256"]
    #[inline(always)]
    pub fn clk_mul(
        self,
    ) -> crate::common::RegisterField<
        16,
        0xff,
        1,
        0,
        u8,
        u8,
        EmmcCapabilities2RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            16,
            0xff,
            1,
            0,
            u8,
            u8,
            EmmcCapabilities2RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Re-Tuning Modes (UHS-I only)\nThese bits select the re-tuning method and limit the maximum data length.\nValues:\n0x0 (MODE1): Timer\n0x1 (MODE2): Timer and Re-Tuning Request (Not supported)\n0x2 (MODE3): Auto Re-Tuning (for transfer)\n0x3 (RSVD_MODE): Reserved"]
    #[inline(always)]
    pub fn re_tuning_modes(
        self,
    ) -> crate::common::RegisterField<
        14,
        0x3,
        1,
        0,
        u8,
        u8,
        EmmcCapabilities2RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            14,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcCapabilities2RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Use Tuning for SDR50 (UHS-I only)"]
    #[inline(always)]
    pub fn use_tuning_sdr50(
        self,
    ) -> crate::common::RegisterFieldBool<13, 1, 0, EmmcCapabilities2RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<13,1,0,EmmcCapabilities2RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Timer Count for Re-Tuning (UHS-I only)\n- 0x0: Re-Tuning Timer disabled\n- 0x1: 1 seconds\n- 0x2: 2 seconds\n- 0x3: 4 seconds\n-  ........\n- 0xB: 1024 seconds\n- 0xC: Reserved\n- 0xD: Reserved\n- 0xE: Reserved\n- 0xF: Get information from other source"]
    #[inline(always)]
    pub fn retune_cnt(
        self,
    ) -> crate::common::RegisterField<
        8,
        0xf,
        1,
        0,
        u8,
        u8,
        EmmcCapabilities2RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            8,
            0xf,
            1,
            0,
            u8,
            u8,
            EmmcCapabilities2RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Driver Type D Support (UHS-I only)\nThis bit indicates support of Driver Type D for 1.8 Signaling.\nValues:\nDescription\n0x0 (FALSE): Driver Type D is not supported\n0x1 (TRUE): Driver Type D is supported"]
    #[inline(always)]
    pub fn drv_typed(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, EmmcCapabilities2RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<6,1,0,EmmcCapabilities2RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Driver Type C Support (UHS-I only)\nThis bit indicates support of Driver Type C for 1.8 Signaling.\nValues:\n0x0 (FALSE): Driver Type C is not supported\n0x1 (TRUE): Driver Type C is supported"]
    #[inline(always)]
    pub fn drv_typec(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcCapabilities2RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<5,1,0,EmmcCapabilities2RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Driver Type A Support (UHS-I only)\nThis bit indicates support of Driver Type A for 1.8 Signaling.\nValues:\n0x0 (FALSE): Driver Type A is not supported\n0x1 (TRUE): Driver Type A is supported"]
    #[inline(always)]
    pub fn drv_typea(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcCapabilities2RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<4,1,0,EmmcCapabilities2RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "UHS-II Support (UHS-II only)\nThis bit indicates whether Host Controller supports UHS-II.\nValues:\n0x0 (FALSE): UHS-II is not supported\n0x1 (TRUE): UHS-II is supported"]
    #[inline(always)]
    pub fn uhs2_support(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcCapabilities2RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<3,1,0,EmmcCapabilities2RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "DDR50 Support (UHS-I only)\nValues:\n0x0 (FALSE): DDR50 is not supported\n0x1 (TRUE): DDR50 is supported"]
    #[inline(always)]
    pub fn ddr50_support(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcCapabilities2RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<2,1,0,EmmcCapabilities2RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "SDR104 Support (UHS-I only)\nThis bit mentions that SDR104 requires tuning.\nValues:\n0x0 (FALSE): SDR104 is not supported\n0x1 (TRUE): SDR104 is supported"]
    #[inline(always)]
    pub fn sdr104_support(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcCapabilities2RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<1,1,0,EmmcCapabilities2RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "SDR50 Support (UHS-I only)\nThsi bit indicates that SDR50 is supported. The bit 13 (USE_TUNING_SDR50) indicates whether SDR50 requires tuning or not.\nValues:\n0x0 (FALSE): SDR50 is not supported\n0x1 (TRUE): SDR50 is supported"]
    #[inline(always)]
    pub fn sdr50_support(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcCapabilities2RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<0,1,0,EmmcCapabilities2RReg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcCapabilities2RReg {
    #[inline(always)]
    fn default() -> EmmcCapabilities2RReg {
        <crate::RegValueT<EmmcCapabilities2RReg_SPEC> as RegisterValue<_>>::new(119)
    }
}

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

#[doc = "This register controls SDCLK (card clock) in an SD/eMMC mode and RCLK in the UHS-II mode. This register is applicable for an SD"]
pub type EmmcClkCtrlRReg = crate::RegValueT<EmmcClkCtrlRReg_SPEC>;

impl EmmcClkCtrlRReg {
    #[doc = "SDCLK/RCLK Frequency Select.\nThese bits are used to select the frequency of the SDCLK signal. These bits depend on setting of Preset Value Enable in the Host Control 2 register. If Preset Value Enable = 0, these bits are set by the Host Driver. If Preset Value Enable = 1, these bits are automatically set to a value specified in one of the Preset Value register. The value is reflected on the lower 8-bit of the card_clk_freq_sel signal. \n10-bit Divided Clock Mode:\n- 0x3FF : 1/2046 Divided clock\n- N    : 1/2N Divided Clock\n- 0x002  : 1/4 Divided Clock\n- 0x001 : 1/2 Divided Clock\n- 0x000 : Base clock (10MHz - 255 MHz)\nProgrammable Clock Mode : Enables the Host System to select a fine grain SD clock frequency:\n- 0x3FF : Base clock  * M /1024\n- N-1  : Base clock  * M /N\n- 0x002  : Base clock  * M /3\n- 0x001 : Base clock  * M /2\n- 0x000 : Base clock  * M"]
    #[inline(always)]
    pub fn freq_sel(
        self,
    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, EmmcClkCtrlRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<8,0xff,1,0,u8,u8,EmmcClkCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "These bits specify the upper 2 bits of 10-bit SDCLK/RCLK Frequency Select control. The value is reflected on the upper 2 bits of the card_clk_freq_sel signal."]
    #[inline(always)]
    pub fn upper_freq_sel(
        self,
    ) -> crate::common::RegisterField<6, 0x3, 1, 0, u8, u8, EmmcClkCtrlRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<6,0x3,1,0,u8,u8,EmmcClkCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Clock Generator Select.\nThis bit is used to select the clock generator mode in SDCLK/RCLK Frequency Select. If Preset Value Enable = 0, this bit is set by the Host Driver. If Preset Value Enable = 1, this bit is automatically set to a value specified in one of the Preset Value registers. The value is reflected on the card_clk_gen_sel signal.\n\nValues:\n0x0 (FALSE): Divided Clock Mode\n0x1 (TRUE): Programmable Clock Mode"]
    #[inline(always)]
    pub fn clk_gen_select(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcClkCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,EmmcClkCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "PLL Enable.\nThis bit is used to activate the PLL (applicable when Host Version 4 Enable = 1). When Host Version 4 Enable = 0, INTERNAL_CLK_EN bit may be used to activate PLL. The value is reflected on the card_clk_en signal.\nNote: If this bit is not used to to active the PLL when Host Version 4 Enable = 1, it is recommended to set this bit to \'1\' .\n\nValues:\n0x0 (FALSE): PLL is in low power mode\n0x1 (TRUE): PLL is enabled"]
    #[inline(always)]
    pub fn pll_enable(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcClkCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,EmmcClkCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "SD/eMMC Clock Enable.\nThis bit stops the SDCLK or RCLK when set to 0. The SDCLK/RCLK Frequency Select bit can be changed when this bit is set to 0.\nThe value is reflected on the clk2card_on pin.\n\nValues:\n0x0 (FALSE): Disable providing SDCLK/RCLK\n0x1 (TRUE): Enable providing SDCLK/RCLK"]
    #[inline(always)]
    pub fn sd_clk_en(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcClkCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,EmmcClkCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Internal Clock Stable\nThis bit enables the Host Driver to check the clock stability twice after the Internal Clock Enable bit is set and after the PLL Enable bit is set. This bit reflects the synchronized value of the intclk_stable signal after the Internal Clock Enable bit is set to 1 and also reflects the synchronized value of the card_clk_stable signal after the PLL Enable bit is set to 1.\n\nValues:\n0x0 (FALSE): Not Ready\n0x1 (TRUE): Ready"]
    #[inline(always)]
    pub fn internal_clk_stable(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcClkCtrlRReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<1,1,0,EmmcClkCtrlRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Internal Clock Enable.\nThis bit is set to 0 when the Host Driver is not using the Host Controller or the Host Controller awaits a wakeup interrupt. The Host Controller must stop its internal clock to enter a very low power state. However, registers can still be read and written to. The value is reflected on the intclk_en signal.\nNote: If this bit is not used to control the internal clock (base clock and master clock), it is recommended to set this bit to \'1\'.\n\nValues:\n0x0 (FALSE): Stop\n0x1 (TRUE): Oscillate"]
    #[inline(always)]
    pub fn internal_clk_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcClkCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcClkCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcClkCtrlRReg {
    #[inline(always)]
    fn default() -> EmmcClkCtrlRReg {
        <crate::RegValueT<EmmcClkCtrlRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to provide the information related to a command and a response packet. This register is applicable for an"]
pub type EmmcCmdRReg = crate::RegValueT<EmmcCmdRReg_SPEC>;

impl EmmcCmdRReg {
    #[doc = "Command Index.\nThese bits are set to the command number that is specified in bits 45-40 of the Command Format."]
    #[inline(always)]
    pub fn cmd_index(
        self,
    ) -> crate::common::RegisterField<8, 0x3f, 1, 0, u8, u8, EmmcCmdRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<8,0x3f,1,0,u8,u8,EmmcCmdRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command Type.\nThese bits indicate the command type.\nNote: While issuing Abort CMD using CMD12/CMD52 or reset CMD using CMD0/CMD52, CMD_TYPE field shall be set to 0x3.\n\nValues:\n0x3 (ABORT_CMD): Abort\n0x2 (RESUME_CMD): Resume\n0x1 (SUSPEND_CMD): Suspend\n0x0 (NORMAL_CMD): Normal"]
    #[inline(always)]
    pub fn cmd_type(
        self,
    ) -> crate::common::RegisterField<6, 0x3, 1, 0, u8, u8, EmmcCmdRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<6,0x3,1,0,u8,u8,EmmcCmdRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Data Present Select.\nThis bit is set to 1 to indicate that data is present and that the data is transferred using the DAT line.\nThis bit is set to 0 in the following instances:\n- Command using the CMD line\n- Command with no data transfer but using busy signal on the DAT\\[0\\] line\n- Resume Command\n\nValues:\n0x0 (NO_DATA): No Data Present\n0x1 (DATA): Data Present"]
    #[inline(always)]
    pub fn data_present_sel(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcCmdRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,EmmcCmdRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command Index Check Enable.\nThis bit enables the Host Controller to check the index field in the response to verify if it has the same value as the command index. If the value is not the same, it is reported as a Command Index error.\nNote:\n- Index Check enable must be set to 0 for the command with no response, R2 response, R3 response and R4 response.\n- For the tuning command, this bit must always be set to enable the index check.\n\nValues:\n0x0 (DISABLED): Disable\n0x1 (ENABLED): Enable"]
    #[inline(always)]
    pub fn cmd_idx_chk_enable(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcCmdRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,EmmcCmdRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command CRC Check Enable.\nThis bit enables the Host Controller to check the CRC field in the response. If an error is detected, it is reported as a Command CRC error.\nNote:\n- CRC Check enable must be set to 0 for the command with no response, R3 response, and R4 response.\n- For the tuning command, this bit must always be set to 1 to enable the CRC check.\n\nValues:\n0x0 (DISABLED): Disable\n0x1 (ENABLED): Enable"]
    #[inline(always)]
    pub fn cmd_crc_chk_enable(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcCmdRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,EmmcCmdRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Sub Command Flag.\nThis bit distinguishes between a main command and a sub command.\n\nValues:\n0x0 (MAIN): Main Command\n0x1 (SUB): Sub Command"]
    #[inline(always)]
    pub fn sub_cmd_flag(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcCmdRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,EmmcCmdRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Response Type Select.\nThis bit indicates the type of response expected from the card.\n\nValues:\n0x0 (NO_RESP): No Response\n0x1 (RESP_LEN_136): Response Length 136\n0x2 (RESP_LEN_48): Response Length 48\n0x3 (RESP_LEN_48B): Response Length 48; Check\nBusy after response"]
    #[inline(always)]
    pub fn resp_type_select(
        self,
    ) -> crate::common::RegisterField<0, 0x3, 1, 0, u8, u8, EmmcCmdRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0x3,1,0,u8,u8,EmmcCmdRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcCmdRReg {
    #[inline(always)]
    fn default() -> EmmcCmdRReg {
        <crate::RegValueT<EmmcCmdRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register indicates the capabilities of the command queuing engine."]
pub type EmmcCqcapReg = crate::RegValueT<EmmcCqcapReg_SPEC>;

impl EmmcCqcapReg {
    #[doc = "Crypto Support   \nThis bit indicates whether the Host Controller supports cryptographic operations.\nValues:\n0x0 (FALSE): Crypto not Supported\n0x1 (TRUE): Crypto Supported"]
    #[inline(always)]
    pub fn crypto_support(
        self,
    ) -> crate::common::RegisterFieldBool<28, 1, 0, EmmcCqcapReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<28,1,0,EmmcCqcapReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "These bits \\[27:16\\] of the CQCAP register are reserved. They always return 0."]
    #[inline(always)]
    pub fn cqccap_rsvd2(
        self,
    ) -> crate::common::RegisterField<16, 0xfff, 1, 0, u16, u16, EmmcCqcapReg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<16,0xfff,1,0,u16,u16,EmmcCqcapReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Internal Timer Clock Frequency Multiplier (ITCFMUL)\nThis field indicates the frequency of the clock used for interrupt coalescing timer and for\ndetermining the SQS polling period. See ITCFVAL definition for details. Values 0x5 to 0xF are reserved.\nValues:\n0x0 (CLK_1KHz): 1KHz clock\n0x1 (CLK_10KHz): 10KHz clock\n0x2 (CLK_100KHz): 100KHz clock\n0x3 (CLK_1MHz): 1MHz clock\n0x4 (CLK_10MHz): 10MHz clock"]
    #[inline(always)]
    pub fn itcfmul(
        self,
    ) -> crate::common::RegisterField<12, 0xf, 1, 0, u8, u8, EmmcCqcapReg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<12,0xf,1,0,u8,u8,EmmcCqcapReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Internal Timer Clock Frequency Value (ITCFVAL)\nThis field scales the frequency of the timer clock provided by ITCFMUL. The Final clock frequency of actual timer clock is calculated as ITCFVAL* ITCFMUL."]
    #[inline(always)]
    pub fn itcfval(
        self,
    ) -> crate::common::RegisterField<0, 0x3ff, 1, 0, u16, u16, EmmcCqcapReg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<0,0x3ff,1,0,u16,u16,EmmcCqcapReg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcCqcapReg {
    #[inline(always)]
    fn default() -> EmmcCqcapReg {
        <crate::RegValueT<EmmcCqcapReg_SPEC> as RegisterValue<_>>::new(12488)
    }
}

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

#[doc = "This register indicate the maximum current capability for each voltage, for VDD1. The value is meaningful if the Voltage Suppor"]
pub type EmmcCurrCapabilities1RReg = crate::RegValueT<EmmcCurrCapabilities1RReg_SPEC>;

impl EmmcCurrCapabilities1RReg {
    #[doc = "Maximum Current for 1.8V\nThis bit specifies the Maximum Current for 1.8V VDD1 power supply for the card.\n- 0: Get information through another method\n- 1: 4mA\n- 2: 8mA\n- 3: 13mA\n- .......\n- 255: 1020mA"]
    #[inline(always)]
    pub fn max_cur_18v(
        self,
    ) -> crate::common::RegisterField<
        16,
        0xff,
        1,
        0,
        u8,
        u8,
        EmmcCurrCapabilities1RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            16,
            0xff,
            1,
            0,
            u8,
            u8,
            EmmcCurrCapabilities1RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Maximum Current for 3.0V\nThis bit specifies the Maximum Current for 3.0V VDD1 power supply for the card.\n- 0: Get information through another method\n- 1: 4mA\n- 2: 8mA\n- 3: 13mA\n- .......\n- 255: 1020mA"]
    #[inline(always)]
    pub fn max_cur_30v(
        self,
    ) -> crate::common::RegisterField<
        8,
        0xff,
        1,
        0,
        u8,
        u8,
        EmmcCurrCapabilities1RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            8,
            0xff,
            1,
            0,
            u8,
            u8,
            EmmcCurrCapabilities1RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Maximum Current for 3.3V\nThis bit specifies the Maximum Current for 3.3V VDD1 power supply for the card.\n- 0: Get information through another method\n- 1: 4mA\n- 2: 8mA\n- 3: 13mA\n- .......\n- 255: 1020mA"]
    #[inline(always)]
    pub fn max_cur_33v(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xff,
        1,
        0,
        u8,
        u8,
        EmmcCurrCapabilities1RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xff,
            1,
            0,
            u8,
            u8,
            EmmcCurrCapabilities1RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcCurrCapabilities1RReg {
    #[inline(always)]
    fn default() -> EmmcCurrCapabilities1RReg {
        <crate::RegValueT<EmmcCurrCapabilities1RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register indicates the maximum current capability for each voltage (for VDD2). The value is meaningful if Voltage Support"]
pub type EmmcCurrCapabilities2RReg = crate::RegValueT<EmmcCurrCapabilities2RReg_SPEC>;

impl EmmcCurrCapabilities2RReg {
    #[doc = "Maximum Current for 1.8V VDD2\nThis bit specifies the Maximum Current for 1.8V VDD2 power supply for the UHS-II card.\n- 0: Get information through another method\n- 1: 4mA\n- 2: 8mA\n- 3: 13mA\n- .......\n- 255: 1020mA"]
    #[inline(always)]
    pub fn max_cur_vdd2_18v(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xff,
        1,
        0,
        u8,
        u8,
        EmmcCurrCapabilities2RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xff,
            1,
            0,
            u8,
            u8,
            EmmcCurrCapabilities2RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcCurrCapabilities2RReg {
    #[inline(always)]
    fn default() -> EmmcCurrCapabilities2RReg {
        <crate::RegValueT<EmmcCurrCapabilities2RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register controls the embedded device. When the Host Controller is connected to a removable device, this register is not u"]
pub type EmmcEmbeddedCtrlRReg = crate::RegValueT<EmmcEmbeddedCtrlRReg_SPEC>;

impl EmmcEmbeddedCtrlRReg {
    #[doc = "Back-End Power Control (SD Mode)\n\nEach bit of this field controls back-end power supply for an embedded device.\n- 0 : Back-End Power is off\n- 1 : Back-End Power is supplied\n\nD24 : Back-End Power for Device 1\n\nD25 : Back-End Power for Device 2\n\nD26 : Back-End Power for Device 3\n\nD27 : Back-End Power for Device 4\n\nD28 : Back-End Power for Device 5\n\nD29 : Back-End Power for Device 6\n\nD30 : Back-End Power for Device 7"]
    #[inline(always)]
    pub fn back_end_pwr_ctrl(
        self,
    ) -> crate::common::RegisterField<
        24,
        0x7f,
        1,
        0,
        u8,
        u8,
        EmmcEmbeddedCtrlRReg_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            24,
            0x7f,
            1,
            0,
            u8,
            u8,
            EmmcEmbeddedCtrlRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Interrupt Pin Select\n\nThese bits enable the interrupt pin inputs.\n- 000 : Interrupts (INT_A,INT_B,INT_C) are disabled\n- xx1 : INT_A is enabled\n- x1x : INT_B is enabled\n- 1xx : INT_C is enabled"]
    #[inline(always)]
    pub fn int_pin_sel(
        self,
    ) -> crate::common::RegisterField<
        20,
        0x7,
        1,
        0,
        u8,
        u8,
        EmmcEmbeddedCtrlRReg_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            20,
            0x7,
            1,
            0,
            u8,
            u8,
            EmmcEmbeddedCtrlRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Clock Pin Select (SD Mode)\n\nThis bit is selected by one of clock pin outputs.\n- 0x0 : Clock pins are disabled\n- 0x1 : CLK\\[1\\] is selected\n- 0x2 : CLK\\[2\\] is selected\n-  .      . \n-  .      . \n-  .      . \n- 0x7 : CLK\\[7\\] is selected"]
    #[inline(always)]
    pub fn clk_pin_sel(
        self,
    ) -> crate::common::RegisterField<
        16,
        0x7,
        1,
        0,
        u8,
        u8,
        EmmcEmbeddedCtrlRReg_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            16,
            0x7,
            1,
            0,
            u8,
            u8,
            EmmcEmbeddedCtrlRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Bus Width Preset (SD Mode)\n\nEach bit of this field specifies the bus width for each embedded device. The shared bus supports mixing of 4-bit and 8-bit bus width devices.\n- D08 : Bus Width Preset for Device 1\n- D09 : Bus Width Preset for Device 2\n- D10 : Bus Width Preset for Device 3\n- D11 : Bus Width Preset for Device 4\n- D12 : Bus Width Preset for Device 5\n- D13 : Bus Width Preset for Device 6\n- D14 : Bus Width Preset for Device 7\n\nFunction of each bit is defined as follows:\n- 0 : 4-bit bus width mode\n- 1 : 8-bit bus width mode"]
    #[inline(always)]
    pub fn bus_width_preset(
        self,
    ) -> crate::common::RegisterField<
        8,
        0x7f,
        1,
        0,
        u8,
        u8,
        EmmcEmbeddedCtrlRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            8,
            0x7f,
            1,
            0,
            u8,
            u8,
            EmmcEmbeddedCtrlRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Number of Interrupt Input Pins\n\nThis field indicates support of interrupt input pins for an embedded system."]
    #[inline(always)]
    pub fn num_int_pin(
        self,
    ) -> crate::common::RegisterField<
        4,
        0x3,
        1,
        0,
        u8,
        u8,
        EmmcEmbeddedCtrlRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            4,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcEmbeddedCtrlRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Number of Clock Pins (SD Mode)\n\nThis field indicates support of clock pins to select one of devices for shared bus system. Up to 7 clock pins can be supported.\n- 0x0 : Shared bus is not supported\n- 0x1 : 1 SDCLK is supported\n- 0x2 - 2 SDCLK is supported\n-  .    .\n-  .    .\n-  .    .\n- 0x7 : 7 SDCLK is supported"]
    #[inline(always)]
    pub fn num_clk_pin(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x7,
        1,
        0,
        u8,
        u8,
        EmmcEmbeddedCtrlRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x7,
            1,
            0,
            u8,
            u8,
            EmmcEmbeddedCtrlRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcEmbeddedCtrlRReg {
    #[inline(always)]
    fn default() -> EmmcEmbeddedCtrlRReg {
        <crate::RegValueT<EmmcEmbeddedCtrlRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to control the eMMC operation."]
pub type EmmcEmmcCtrlRReg = crate::RegValueT<EmmcEmmcCtrlRReg_SPEC>;

impl EmmcEmmcCtrlRReg {
    #[doc = "Output Enable control for EMMC Device Reset signal PAD control.\nThis field drived sd_rst_n_oe output of DWC_mshc\nValues:\n0x1 (ENABLE): sd_rst_n_oe is 1\n0x0 (DISABLE): sd_rst_n_oe is 0"]
    #[inline(always)]
    pub fn emmc_rst_n_oe(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcEmmcCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,EmmcEmmcCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "EMMC Device Reset signal control.\nThis register field controls the sd_rst_n output of DWC_mshc\nValues:\n0x1 (RST_DEASSERT): Reset to eMMC device is deasserted\n0x0 (RST_ASSERT): Reset to eMMC device asserted (active low)"]
    #[inline(always)]
    pub fn emmc_rst_n(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcEmmcCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,EmmcEmmcCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Disable Data CRC Check\nThis bit controls masking of CRC16 error for Card Write in eMMC mode. This is useful in bus testing (CMD19) for an eMMC device. In bus testing, an eMMC card does not send CRC status for a block, which may generate CRC error. This CRC error can be masked using this bit during bus testing.\nValues:\n0x1 (DISABLE): DATA CRC check is disabled\n0x0 (ENABLE): DATA CRC check is enabled"]
    #[inline(always)]
    pub fn disable_data_crc_chk(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcEmmcCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,EmmcEmmcCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "eMMC Card present\nThis bit indicates the type of card connected. An application program this bit based on the card connected to MSHC.\nValues:\n0x1 (EMMC_CARD): Card connected to MSHC is an eMMC card\n0x0 (NON_EMMC_CARD): Card connected to MSHC is a non-eMMC card"]
    #[inline(always)]
    pub fn card_is_emmc(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcEmmcCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcEmmcCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcEmmcCtrlRReg {
    #[inline(always)]
    fn default() -> EmmcEmmcCtrlRReg {
        <crate::RegValueT<EmmcEmmcCtrlRReg_SPEC> as RegisterValue<_>>::new(12)
    }
}

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

#[doc = "This register is used to select the interrupt status that is notified to the Host System as an interrupt. All these status bits"]
pub type EmmcErrorIntSignalEnRReg = crate::RegValueT<EmmcErrorIntSignalEnRReg_SPEC>;

impl EmmcErrorIntSignalEnRReg {
    #[doc = "The 16th bit of Error Interrupt Signal Enable is reserved.\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn vendor_err_signal_en3(
        self,
    ) -> crate::common::RegisterFieldBool<15, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<15,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "The 15th bit of Error Interrupt Signal Enable is reserved.\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn vendor_err_signal_en2(
        self,
    ) -> crate::common::RegisterFieldBool<14, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<14,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "The 14th bit of Error Interrupt Signal Enable is reserved.\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn vendor_err_signal_en1(
        self,
    ) -> crate::common::RegisterFieldBool<13, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<13,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Boot Acknowledgment Error (eMMC Mode only).\nSetting this bit to 1 enables generating interrupt signal when Boot Acknowledgement Error in Error Interrupt Status register is set.\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn boot_ack_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<12, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<12,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Response Error Signal Enable (SD Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn resp_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<11, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<11,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Tuning Error Signal Enable (UHS-I Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn tuning_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<10,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "ADMA Error Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn adma_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<9, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<9,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Auto CMD Error Signal Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn auto_cmd_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<8,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Current Limit Error Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cur_lmt_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<7,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Data End Bit Error Signal Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn data_end_bit_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<6,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Data CRC Error Signal Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn data_crc_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<5,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Data Timeout Error Signal Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn data_tout_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<4,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command Index Error Signal Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cmd_idx_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<3,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command End Bit Error Signal Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cmd_end_bit_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<2,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command CRC Error Signal Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cmd_crc_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<1,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command Timeout Error Signal Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cmd_tout_err_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcErrorIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<0,1,0,EmmcErrorIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcErrorIntSignalEnRReg {
    #[inline(always)]
    fn default() -> EmmcErrorIntSignalEnRReg {
        <crate::RegValueT<EmmcErrorIntSignalEnRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register sets the Interrupt Status for Error Interrupt Status register (ERROR_INT_STAT_R), when ERROR_INT_STAT_EN_R is set"]
pub type EmmcErrorIntStatEnRReg = crate::RegValueT<EmmcErrorIntStatEnRReg_SPEC>;

impl EmmcErrorIntStatEnRReg {
    #[doc = "The 15th bit of Error Interrupt Status Enable register is reserved.\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn vendor_err_stat_en3(
        self,
    ) -> crate::common::RegisterFieldBool<15, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<15,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "The 14th bit of Error Interrupt Status Enable register is reserved.\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn vendor_err_stat_en2(
        self,
    ) -> crate::common::RegisterFieldBool<14, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<14,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "The 13th bit of Error Interrupt Status Enable register is reserved.\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn vendor_err_stat_en1(
        self,
    ) -> crate::common::RegisterFieldBool<13, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<13,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Boot Acknowledgment Error (eMMC Mode only)\nSetting this bit to 1 enables setting of Boot Acknowledgment Error in Error Interrupt Status register (ERROR_INT_STAT_R).\n\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn boot_ack_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<12, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<12,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Response Error Status Enable (SD Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn resp_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<11, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<11,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Tuning Error Status Enable (UHS-I Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn tuning_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<10,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "ADMA Error Status Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn adma_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<9, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<9,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Auto CMD Error Status Enable (SD/eMMC Mode only).\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn auto_cmd_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<8,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Current Limit Error Status Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cur_lmt_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<7,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Data End Bit Error Status Enable (SD/eMMC Mode only).\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn data_end_bit_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<6,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Data CRC Error Status Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn data_crc_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<5,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Data Timeout Error Status Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn data_tout_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<4,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command Index Error Status Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cmd_idx_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<3,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command End Bit Error Status Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cmd_end_bit_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<2,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command CRC Error Status Enable (SD/eMMC Mode only)\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cmd_crc_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<1,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command Timeout Error Status Enable (SD/eMMC Mode only).\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cmd_tout_err_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcErrorIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<0,1,0,EmmcErrorIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcErrorIntStatEnRReg {
    #[inline(always)]
    fn default() -> EmmcErrorIntStatEnRReg {
        <crate::RegValueT<EmmcErrorIntStatEnRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register enables an interrupt when the Error Interrupt Status Enable is enabled and at least one of the statuses is set to"]
pub type EmmcErrorIntStatRReg = crate::RegValueT<EmmcErrorIntStatRReg_SPEC>;

impl EmmcErrorIntStatRReg {
    #[doc = "Boot Acknowledgement Error.\nThis bit is set when there is a timeout for boot acknowledgement or when detecting boot ack status having a value other than 010. This is applicable only when boot acknowledgement is expected in eMMC mode.\n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): Error"]
    #[inline(always)]
    pub fn boot_ack_err(
        self,
    ) -> crate::common::RegisterFieldBool<12, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<12,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Response Error.\nHost Controller Version 4.00 supports response error check function to avoid overhead of response error check by Host Driver during DMA execution. If Response Error Check Enable is set to 1 in the Transfer Mode register, Host Controller Checks R1 or R5 response. If an error is detected in a response, this bit is set to 1.This is applicable in SD/eMMC mode.\n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): Error"]
    #[inline(always)]
    pub fn resp_err(
        self,
    ) -> crate::common::RegisterFieldBool<11, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<11,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Tuning Error.\nThis bit is set when an unrecoverable error is detected in a tuning circuit except during the tuning procedure (occurrence of an error during tuning procedure is indicated by Sampling Clock Select in the Host Control 2 register). By detecting Tuning Error, Host Driver needs to abort a command executing and perform tuning. To reset tuning circuit, Sampling Clock Select is set to 0 before executing tuning procedure. The Tuning Error is higher priority than the other error interrupts generated during data transfer. By detecting Tuning Error, the Host Driver must discard data transferred by a current read/write command and retry data transfer after the Host Controller retrieved from the tuning circuit error. This is applicable in SD/eMMC mode.\n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): Error"]
    #[inline(always)]
    pub fn tuning_err(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<10,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "ADMA Error.\nThis bit is set when the Host Controller detects error during ADMA-based data transfer. The error could be due to following reasons:\n- Error response received from System bus (Master I/F)\n- ADMA3,ADMA2 Descriptors invalid\n- CQE Task or Transfer descriptors invalid\nWhen the error occurs, the state of the ADMA is saved in the ADMA Error Status register.\nIn eMMC CQE mode:\nThe Host Controller generates this Interrupt when it detects an invalid descriptor data (Valid=0) at the ST_FDS state. ADMA Error State in the ADMA Error Status indicates that an error has occurred in ST_FDS state. The Host Driver may find that Valid bit is not set at the error descriptor.\n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): Error"]
    #[inline(always)]
    pub fn adma_err(
        self,
    ) -> crate::common::RegisterFieldBool<9, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<9,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Auto CMD Error.\nThis error status is used by Auto CMD12 and Auto CMD23 in SD/eMMC mode. This bit is set when detecting that any of the bits D00 to D05 in Auto CMD Error Status register has changed from 0 to 1. D07 is effective in case of Auto CMD12. Auto CMD Error Status register is valid while this bit is set to 1 and may be cleared by clearing of this bit.\n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): Error"]
    #[inline(always)]
    pub fn auto_cmd_err(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<8,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Current Limit Error.\nBy setting the SD Bus Power bit in the Power Control register, the Host Controller is requested to supply power for the SD Bus. If the Host Controller supports the Current Limit function, it can\nbe protected from an illegal card by stopping power supply to the card in which case this bit indicates a failure status. A reading of 1 for this bit means that the Host Controller is not supplying\npower to the SD card due to some failure. A reading of 0 for this bit means that the Host Controller is supplying power and no error has occurred. The Host Controller may require some sampling time to\ndetect the current limit. DWC_mshc Host Controller does not support this function, this bit is always set to 0.\n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): Power Fail"]
    #[inline(always)]
    pub fn cur_lmt_err(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<7,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Data End Bit Error.\nThis error occurs in SD/eMMC mode either when detecting 0 at the end bit position of read data that uses the DAT line or at the end bit position of the CRC status.\n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): Error"]
    #[inline(always)]
    pub fn data_end_bit_err(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<6,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Data CRC Error.\nThis error occurs in SD/eMMC mode when detecting CRC error when transferring read data which uses the DAT line, when detecting the Write CRC status having a value of other than 010 or when write CRC status timeout.\n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): Error"]
    #[inline(always)]
    pub fn data_crc_err(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<5,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Data Timeout Error.\nThis bit is set in SD/eMMC mode when detecting one of the following timeout conditions:\n- Busy timeout for R1b, R5b type\n- Busy timeout after Write CRC status\n- Write CRC Status timeout\n- Read Data timeout\n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): Time out"]
    #[inline(always)]
    pub fn data_tout_err(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<4,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command Index Error.\nThis bit is set if a Command Index error occurs in the command respons in SD/eMMC mode.\n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): Error"]
    #[inline(always)]
    pub fn cmd_idx_err(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<3,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command End Bit Error.\nThis bit is set when detecting that the end bit of a command response is 0 in SD/eMMC mode. \n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): End Bit error generated"]
    #[inline(always)]
    pub fn cmd_end_bit_err(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<2,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command CRC Error.\nCommand CRC Error is generated in SD/eMMC mode for following two cases.\n- If a response is returned and the Command Timeout Error is set to 0 (indicating no timeout), this bit is set to 1 when detecting a CRC error in the command response.\n- The Host Controller detects a CMD line conflict by monitoring the CMD line when a command is issued. If the Host Controller drives the CMD line to 1 level, but detects 0 level on the CMD line at the next SD clock edge, then the Host Controller aborts the command (stop driving CMD line) and set this bit to 1. The Command Timeout Error is also set to 1 to distinguish a CMD line conflict.\n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): CRC error generated"]
    #[inline(always)]
    pub fn cmd_crc_err(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<1,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command Timeout Error.\nIn SD/eMMC Mode,this bit is set only if no response is returned within 64 SD clock cycles from the end bit of the command. If the Host Controller detects a CMD line conflict, along with Command CRC Error bit, this bit is set to 1, without waiting for 64 SD/eMMC card clock cycles.\n\nValues:\n0x0 (FALSE): No error\n0x1 (TRUE): Time out"]
    #[inline(always)]
    pub fn cmd_tout_err(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcErrorIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<0,1,0,EmmcErrorIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcErrorIntStatRReg {
    #[inline(always)]
    fn default() -> EmmcErrorIntStatRReg {
        <crate::RegValueT<EmmcErrorIntStatRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "The register is not a physically implemented but is an address at which the Auto CMD Error Status register can be written.This"]
pub type EmmcForceAutoCmdStatRReg = crate::RegValueT<EmmcForceAutoCmdStatRReg_SPEC>;

impl EmmcForceAutoCmdStatRReg {
    #[doc = "Force Event for Command Not Issued By Auto CMD12 Error\nValues:\n0x1 (TRUE): Command Not Issued By Auto CMD12 Error Status is set\n0x0 (FALSE): Not Affected"]
    #[inline(always)]
    pub fn force_cmd_not_issued_auto_cmd12(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcForceAutoCmdStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<7,1,0,EmmcForceAutoCmdStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Auto CMD Response Error\nValues:\n0x1 (TRUE): Auto CMD Response Error Status is set\n0x0 (FALSE): Not Affected"]
    #[inline(always)]
    pub fn force_auto_cmd_resp_err(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcForceAutoCmdStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<5,1,0,EmmcForceAutoCmdStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Auto CMD Index Error\nValues:\n0x1 (TRUE): Auto CMD Index Error Status is set\n0x0 (FALSE): Not Affected"]
    #[inline(always)]
    pub fn force_auto_cmd_idx_err(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcForceAutoCmdStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<4,1,0,EmmcForceAutoCmdStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Auto CMD End Bit Error\nValues:\n0x1 (TRUE): Auto CMD End Bit Error Status is set\n0x0 (FALSE): Not Affected"]
    #[inline(always)]
    pub fn force_auto_cmd_ebit_err(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcForceAutoCmdStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<3,1,0,EmmcForceAutoCmdStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Auto CMD CRC Error\nValues:\n0x1 (TRUE): Auto CMD CRC Error Status is set\n0x0 (FALSE): Not Affected"]
    #[inline(always)]
    pub fn force_auto_cmd_crc_err(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcForceAutoCmdStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<2,1,0,EmmcForceAutoCmdStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Auto CMD Timeout Error\nValues:\n0x1 (TRUE): Auto CMD Timeout Error Status is set\n0x0 (FALSE): Not Affected"]
    #[inline(always)]
    pub fn force_auto_cmd_tout_err(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcForceAutoCmdStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<1,1,0,EmmcForceAutoCmdStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Auto CMD12 Not Executed\nValues:\n0x1 (TRUE): Auto CMD12 Not Executed Status is set\n0x0 (FALSE): Not Affected"]
    #[inline(always)]
    pub fn force_auto_cmd12_not_exec(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcForceAutoCmdStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<0,1,0,EmmcForceAutoCmdStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcForceAutoCmdStatRReg {
    #[inline(always)]
    fn default() -> EmmcForceAutoCmdStatRReg {
        <crate::RegValueT<EmmcForceAutoCmdStatRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is not physically implemented but is an address at which the Error Interrupt Status register can be written. The"]
pub type EmmcForceErrorIntStatRReg = crate::RegValueT<EmmcForceErrorIntStatRReg_SPEC>;

impl EmmcForceErrorIntStatRReg {
    #[doc = "This bit (FORCE_VENDOR_ERR3) of the FORCE_ERROR_INT_STAT_R register is reserved. It always returns 0."]
    #[inline(always)]
    pub fn force_vendor_err3(
        self,
    ) -> crate::common::RegisterFieldBool<15, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<15,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "This bit (FORCE_VENDOR_ERR2) of the FORCE_ERROR_INT_STAT_R register is reserved. It always returns 0."]
    #[inline(always)]
    pub fn force_vendor_err2(
        self,
    ) -> crate::common::RegisterFieldBool<14, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<14,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "This bit (FORCE_VENDOR_ERR1) of the FORCE_ERROR_INT_STAT_R register is reserved. It always returns 0."]
    #[inline(always)]
    pub fn force_vendor_err1(
        self,
    ) -> crate::common::RegisterFieldBool<13, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<13,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Boot Ack error\nValues:\n\n0x0 (FALSE): Not Affected\n0x1 (TRUE): Boot ack Error Status is set"]
    #[inline(always)]
    pub fn force_boot_ack_err(
        self,
    ) -> crate::common::RegisterFieldBool<12, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<12,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Response Error (SD Mode only)\nValues:\n0x0 (FALSE): Not Affected\n0x1 (TRUE): Response Error Status is set"]
    #[inline(always)]
    pub fn force_resp_err(
        self,
    ) -> crate::common::RegisterFieldBool<11, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<11,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Tuning Error (UHS-I Mode only)"]
    #[inline(always)]
    pub fn force_tuning_err(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<10,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for ADMA Error\nValues:\n0x0 (FALSE): Not Affected\n0x1 (TRUE): ADMA Error Status is set"]
    #[inline(always)]
    pub fn force_adma_err(
        self,
    ) -> crate::common::RegisterFieldBool<9, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<9,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Auto CMD Error (SD/eMMC Mode only)\nValues:\n0x0 (FALSE): Not Affected\n0x1 (TRUE): ADMA Error Status is set"]
    #[inline(always)]
    pub fn force_auto_cmd_err(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<8,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Current Limit Error\nValues:\n0x0 (FALSE): Not Affected\n0x1 (TRUE): Current Limit Error Status is set"]
    #[inline(always)]
    pub fn force_cur_lmt_err(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<7,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Data End Bit Error (SD/eMMC Mode only)\nValues:\n0x0 (FALSE): Not Affected\n0x1 (TRUE): Data End Bit Error Status is set"]
    #[inline(always)]
    pub fn force_data_end_bit_err(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<6,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Data CRC Error (SD/eMMC Mode only)\nValues:\n0x0 (FALSE): Not Affected\n0x1 (TRUE): Data CRC Error Status is set"]
    #[inline(always)]
    pub fn force_data_crc_err(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<5,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Data Timeout Error (SD/eMMC Mode only)\nValues:\n0x0 (FALSE): Not Affected\n0x1 (TRUE): Data Timeout Error Status is set"]
    #[inline(always)]
    pub fn force_data_tout_err(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<4,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Command Index Error (SD/eMMC Mode only)\nValues:\n0x0 (FALSE): Not Affected\n0x1 (TRUE): Command Index Error Status is set"]
    #[inline(always)]
    pub fn force_cmd_idx_err(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<3,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Command End Bit Error (SD/eMMC Mode only)\nValues:\n0x0 (FALSE): Not Affected\n0x1 (TRUE): Command End Bit Error Status is set"]
    #[inline(always)]
    pub fn force_cmd_end_bit_err(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<2,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Command CRC Error (SD/eMMC Mode only)\nValues:\n0x0 (FALSE): Not Affected\n0x1 (TRUE): Command CRC Error Status is set"]
    #[inline(always)]
    pub fn force_cmd_crc_err(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<1,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }

    #[doc = "Force Event for Command Timeout Error (SD/eMMC Mode only)\nValues:\n0x0 (FALSE): Not Affected\n0x1 (TRUE): Command Timeout Error Status is set"]
    #[inline(always)]
    pub fn force_cmd_tout_err(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcForceErrorIntStatRReg_SPEC, crate::common::W>
    {
        crate::common::RegisterFieldBool::<0,1,0,EmmcForceErrorIntStatRReg_SPEC,crate::common::W>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcForceErrorIntStatRReg {
    #[inline(always)]
    fn default() -> EmmcForceErrorIntStatRReg {
        <crate::RegValueT<EmmcForceErrorIntStatRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to indicate the Host Controller Version number."]
pub type EmmcHostCntrlVersRReg = crate::RegValueT<EmmcHostCntrlVersRReg_SPEC>;

impl EmmcHostCntrlVersRReg {
    #[doc = "Vendor Version Number             \n\nThis field is reserved for the vendor version number. Host Driver must not use this status."]
    #[inline(always)]
    pub fn vendor_version_num(
        self,
    ) -> crate::common::RegisterField<
        8,
        0xff,
        1,
        0,
        u8,
        u8,
        EmmcHostCntrlVersRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            8,
            0xff,
            1,
            0,
            u8,
            u8,
            EmmcHostCntrlVersRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Specification Version Number\nThese bits indicate the Host controller specification version. The upper and lower 4-bits indicate the version. Values 0x06-0xFF are reserved.\nValues:\n0x0 (VER_1_00): SD Host Controller Specification Version 1.00\n0x1 (VER_2_00): SD Host Controller Specification Version 2.00\n0x2 (VER_3_00): SD Host Controller Specification Version 3.00\n0x3 (VER_4_00): SD Host Controller Specification Version 4.00\n0x4 (VER_4_10): SD Host Controller Specification Version 4.10\n0x5 (VER_4_20): SD Host Controller Specification Version 4.20"]
    #[inline(always)]
    pub fn spec_version_num(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xff,
        1,
        0,
        u8,
        u8,
        EmmcHostCntrlVersRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xff,
            1,
            0,
            u8,
            u8,
            EmmcHostCntrlVersRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcHostCntrlVersRReg {
    #[inline(always)]
    fn default() -> EmmcHostCntrlVersRReg {
        <crate::RegValueT<EmmcHostCntrlVersRReg_SPEC> as RegisterValue<_>>::new(5)
    }
}

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

#[doc = "This register is used to control the operation of the Host Controller. This register is applicable for an SD/eMMC/UHS-II mode."]
pub type EmmcHostCtrl1RReg = crate::RegValueT<EmmcHostCtrl1RReg_SPEC>;

impl EmmcHostCtrl1RReg {
    #[doc = "Card Detect Signal Selection.\nThis bit selects a source for card detection. When the source for the card detection is switched, the interrupt must be disabled during the switching period.\n\nValues:\n0x1 (CARD_DT_TEST_LEVEL): Card Detect Test Level is selected (for test purpose)\n0x0 (SDCD_PIN): SDCD# (card_detect_n signal) is selected (for normal use)"]
    #[inline(always)]
    pub fn card_detect_sig_sel(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcHostCtrl1RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,EmmcHostCtrl1RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Card Detect Test Level.\nThis bit is enabled while the Card Detect Signal Selection is set to 1 and it indicates whether a card inserted or not.\n\nValues:\n0x1 (CARD_INSERTED): Card Inserted\n0x0 (No_CARD): No Card"]
    #[inline(always)]
    pub fn card_detect_test_lvl(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, EmmcHostCtrl1RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<6,1,0,EmmcHostCtrl1RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Extended Data Transfer Width.\nThis bit controls 8-bit bus width mode of embedded device.\n\nValues:\n0x1 (EIGHT_BIT): 8-bit Bus Width\n0x0 (DEFAULT): Bus Width is selected by the Data Transfer Width"]
    #[inline(always)]
    pub fn ext_dat_xfer(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcHostCtrl1RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,EmmcHostCtrl1RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "DMA Select.\nThis field is used to select the DMA type.\nWhen Host Version 4 Enable is 1 in Host Control 2 register:\n- 0x0 : SDMA is selected\n- 0x1 : Reserved\n- 0x2 : ADMA2 is selected\n- 0x3 : ADMA2 or ADMA3 is selected\nWhen Host Version 4 Enable is 0 in Host Control 2 register:\n- 0x0 : SDMA is selected\n- 0x1 : Reserved\n- 0x2 : 32-bit Address ADMA2 is selected\n- 0x3 : 64-bit Address ADMA2 is selected\n\nValues:\n0x0 (SDMA): SDMA is selected\n0x1 (RSVD_BIT): Reserved\n0x2 (ADMA2): ADMA2 is selected\n0x3 (ADMA2_3): ADMA2 or ADMA3 is selected"]
    #[inline(always)]
    pub fn dma_sel(
        self,
    ) -> crate::common::RegisterField<3, 0x3, 1, 0, u8, u8, EmmcHostCtrl1RReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<
            3,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcHostCtrl1RReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "High Speed Enable (SD/eMMC Mode only).\nIn SD/eMMC mode, this bit is used to determine the selection of preset value for High Speed mode.\nBefore setting this bit, the Host Driver checks the High Speed Support in the Capabilities register.\nNote: DWC_MSHC always outputs the sd_cmd_out and sd_dat_out lines at the rising edge of cclk_tx clock irrespective of this bit.Please refer the section Connecting the Clock IO interface  in the Mobile Storage Host Controller user guide on clocking requirement for an SD/eMMC card.\n\nValues:\n0x1 (HIGH_SPEED): High Speed mode\n0x0 (NORMAL_SPEED): Normal Speed mode"]
    #[inline(always)]
    pub fn high_speed_en(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcHostCtrl1RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,EmmcHostCtrl1RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Data Transfer Width.\nFor SD/eMMC mode,this bit selects the data transfer width of the Host Controller. The Host Driver sets it to match the data width of the SD/eMMC card.\n\nValues:\n0x1 (FOUR_BIT): 4-bit mode\n0x0 (ONE_BIT): 1-bit mode"]
    #[inline(always)]
    pub fn dat_xfer_width(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcHostCtrl1RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,EmmcHostCtrl1RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "LED Control.\nThis bit is used to caution the user not to remove the card while the SD card is being accessed. The value is reflected on the led_control signal.\n\nValues:\n0x0 (OFF): LED off\n0x1 (ON): LED on"]
    #[inline(always)]
    pub fn led_ctrl(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcHostCtrl1RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcHostCtrl1RReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcHostCtrl1RReg {
    #[inline(always)]
    fn default() -> EmmcHostCtrl1RReg {
        <crate::RegValueT<EmmcHostCtrl1RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to control how the Host Controller operates. This register is applicable for an SD/eMMC/UHS-II mode."]
pub type EmmcHostCtrl2RReg = crate::RegValueT<EmmcHostCtrl2RReg_SPEC>;

impl EmmcHostCtrl2RReg {
    #[doc = "Preset Value Enable\nThis bit enables automatic selection of SDCLK frequency and Driver strength Preset Value registers. When Preset Value Enable is set, SDCLK frequency generation (Frequency Select and Clock Generator\nSelect) and the driver strength selection are performed by the controller. These values are selected from set of Preset Value registers based on selected speed mode.\nNote: For more information, see the FAQ on Preset Register in the DWC_mshc Databook.\nValues:\n0x0 (FALSE): SDCLK and Driver Strength are controlled by Host Driver\n0x1 (TRUE): Automatic Selection by Preset Value are Enabled"]
    #[inline(always)]
    pub fn preset_val_enable(
        self,
    ) -> crate::common::RegisterFieldBool<15, 1, 0, EmmcHostCtrl2RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<15,1,0,EmmcHostCtrl2RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Asynchronous Interrupt Enable\nThis bit can be set if a card supports asynchronous interrupts and Asynchronous Interrupt Support is set to 1 in the Capabilities register.\nValues:\n0x0 (FALSE): Disabled\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn async_int_enable(
        self,
    ) -> crate::common::RegisterFieldBool<14, 1, 0, EmmcHostCtrl2RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<14,1,0,EmmcHostCtrl2RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "64-bit Addressing\nThis bit is effective when Host Version 4 Enable is set to 1.\nValues:\n0x0 (FALSE): 32 bits addressing\n0x1 (TRUE): 64 bits addressing"]
    #[inline(always)]
    pub fn addressing(
        self,
    ) -> crate::common::RegisterFieldBool<13, 1, 0, EmmcHostCtrl2RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<13,1,0,EmmcHostCtrl2RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Host Version 4 Enable\nThis bit selects either Version 3.00 compatible mode or Version 4 mode.\nFunctions of following fields are modified for Host Version 4 mode:\n- SDMA Address: SDMA uses ADMA System Address (05Fh-058h) instead of SDMA System Address register (003h-000h)\n- ADMA2/ADMA3 selection: ADMA3 is selected by DMA select in Host Control 1 register\n- 64-bit ADMA Descriptor Size: 128-bit descriptor is used instead of 96-bit descriptor when 64-bit Addressing is set to 1\n- Selection of 32-bit/64-bit System Addressing: Either 32-bit or 64-bit system addressing is selected by 64-bit Addressing bit in this register\n- 32-bit Block Count: SDMA System Address register (003h-000h) is modified to 32-bit Block Count register\nNote: It is recommended not to program ADMA3 Integrated Descriptor Address registers, UHS-II registers and Command Queuing registers (if applicable) while operating in Host version less than 4 mode (Host Version 4 Enable = 0).\nValues:\n0x0 (FALSE): Version 3.00 compatible mode\n0x1 (TRUE): Version 4 mode"]
    #[inline(always)]
    pub fn host_ver4_enable(
        self,
    ) -> crate::common::RegisterFieldBool<12, 1, 0, EmmcHostCtrl2RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<12,1,0,EmmcHostCtrl2RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "CMD23 Enable\nIf the card supports CMD23, this bit is set to 1. This bit is used to select Auto CMD23 or Auto CMD12 for ADMA3 data transfer.\nValues:\n0x0 (FALSE): Auto CMD23 is disabled\n0x1 (TRUE): Auto CMD23 is enabled"]
    #[inline(always)]
    pub fn cmd23_enable(
        self,
    ) -> crate::common::RegisterFieldBool<11, 1, 0, EmmcHostCtrl2RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<11,1,0,EmmcHostCtrl2RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "ADMA2 Length Mode\nThis bit selects ADMA2 Length mode to be either 16-bit or 26-bit.\nValues:\n0x0 (FALSE): 16-bit Data Length Mode\n0x1 (TRUE): 26-bit Data Length Mode"]
    #[inline(always)]
    pub fn adma2_len_mode(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcHostCtrl2RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<10,1,0,EmmcHostCtrl2RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "UHS-II Interface Enable\nThis bit is used to enable the UHS-II Interface. The value is reflected on the uhs2_if_en pin.\nValues:\n0x0 (FALSE): SD/eMMC Interface Enabled\n0x1 (TRUE): UHS-II Interface Enabled"]
    #[inline(always)]
    pub fn uhs2_if_enable(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, EmmcHostCtrl2RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<8,1,0,EmmcHostCtrl2RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Sampling Clock Select\nThis bit is used by the Host Controller to select the sampling clock in SD/eMMC mode to receive CMD and DAT. This bit is set by the tuning procedure and is valid after the completion of tuning (when Execute Tuning is cleared). Setting this bit to 1 means that tuning is completed successfully and setting this bit to 0 means that tuning has failed. The value is reflected on the sample_cclk_sel pin.\nValues:\n0x0 (FALSE): Fixed clock is used to sample data\n0x1 (TRUE): Tuned clock is used to sample data"]
    #[inline(always)]
    pub fn sample_clk_sel(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcHostCtrl2RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,EmmcHostCtrl2RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Execute Tuning\nThis bit is set to 1 to start the tuning procedure in UHS-I/eMMC speed modes and this bit is automatically cleared when tuning procedure is completed.\nValues:\n0x0 (FALSE): Not Tuned or Tuning completed\n0x1 (TRUE): Execute Tuning"]
    #[inline(always)]
    pub fn exec_tuning(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, EmmcHostCtrl2RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<6,1,0,EmmcHostCtrl2RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Driver Strength Select\nThis bit is used to select the Host Controller output driver in 1.8V signaling UHS-I/eMMC speed modes. The bit depends on setting of Preset Value Enable. The value is reflected on the uhs1_drv_sth pin.\nValues:\n0x0 (TYPEB): Driver TYPEB is selected\n0x1 (TYPEA): Driver TYPEA is selected\n0x2 (TYPEC): Driver TYPEC is selected\n0x3 (TYPED): Driver TYPED is selected"]
    #[inline(always)]
    pub fn drv_strength_sel(
        self,
    ) -> crate::common::RegisterField<4, 0x3, 1, 0, u8, u8, EmmcHostCtrl2RReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<
            4,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcHostCtrl2RReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "1.8V Signaling Enable\nThis bit controls voltage regulator for I/O cell in UHS-I/eMMC speed modes. Setting this bit from 0 to 1 starts changing the signal voltage from 3.3V to 1.8V. Host Controller clears this bit if switching to 1.8 signaling\nfails. The value is reflected on the uhs1_swvolt_en pin.\nNote: This bit must be set for all UHS-I speed modes (SDR12/SDR25/SDR50/SDR104/DDR50).\nValues:\n0x0 (V_3_3): 3.3V Signalling\n0x1 (V_1_8): 1.8V Signalling"]
    #[inline(always)]
    pub fn signaling_en(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcHostCtrl2RReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,EmmcHostCtrl2RReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "UHS Mode/eMMC Speed Mode Select\nThese bits are used to select UHS mode in the SD mode of operation. In eMMC mode, these bits are used to select eMMC Speed mode.\nUHS Mode (SD/UHS-II mode only):\n- 0x0: SDR12\n- 0x1: SDR25\n- 0x2: SDR50\n- 0x3: SDR104\n- 0x4: DDR50\n- 0x5: Reserved\n- 0x6: Reserved\n- 0x7: UHS-II\neMMC Speed Mode (eMMC mode only):\n- 0x0: Legacy\n- 0x1: High Speed SDR\n- 0x2: Reserved\n- 0x3: HS200\n- 0x4: High Speed DDR\n- 0x5: Reserved\n- 0x6: Reserved\n- 0x7: HS400\nValues:\n0x0 (SDR12): SDR12/Legacy\n0x1 (SDR25): SDR25/High Speed SDR\n0x2 (SDR50): SDR50\n0x3 (SDR104): SDR104/HS200\n0x4 (DDR50): DDR50/High Speed DDR\n0x5 (RSVD5): Reserved\n0x6 (RSVD6): Reserved\n0x7 (UHS2): UHS-II/HS400"]
    #[inline(always)]
    pub fn uhs_mode_sel(
        self,
    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, EmmcHostCtrl2RReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<
            0,
            0x7,
            1,
            0,
            u8,
            u8,
            EmmcHostCtrl2RReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcHostCtrl2RReg {
    #[inline(always)]
    fn default() -> EmmcHostCtrl2RReg {
        <crate::RegValueT<EmmcHostCtrl2RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to select the valid burst types that the AHB Master bus interface can generate. \n\nWhen more than one bit"]
pub type EmmcMbiuCtrlRReg = crate::RegValueT<EmmcMbiuCtrlRReg_SPEC>;

impl EmmcMbiuCtrlRReg {
    #[doc = "INCR16 Burst\nControls generation of INCR16 transfers on Master interface.\nValues:\n0x0 (FALSE): AHB INCR16 burst type is not generated on Master I/F\n0x1 (TRUE): AHB INCR16 burst type can be generated on Master I/F"]
    #[inline(always)]
    pub fn burst_incr16_en(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcMbiuCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<3,1,0,EmmcMbiuCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "INCR8 Burst\nControls generation of INCR8 transfers on Master interface.\nValues:\n0x0 (FALSE): AHB INCR8 burst type is not generated on Master I/F\n0x1 (TRUE): AHB INCR8 burst type can be generated on Master I/F"]
    #[inline(always)]
    pub fn burst_incr8_en(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcMbiuCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,EmmcMbiuCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "INCR4 Burst\nControls generation of INCR4 transfers on Master interface.\nValues:\n0x0 (FALSE): AHB INCR4 burst type is not generated on Master I/F\n0x1 (TRUE): AHB INCR4 burst type can be generated on Master I/F"]
    #[inline(always)]
    pub fn burst_incr4_en(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcMbiuCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,EmmcMbiuCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Undefined INCR Burst\nControls generation of undefined length INCR transfer on Master interface.\nValues:\n0x0 (FALSE): Undefined INCR type burst is the least preferred burst on AHB Master I/F\n0x1 (TRUE): Undefined INCR type burst is the most preferred burst on AHB Master I/F"]
    #[inline(always)]
    pub fn undefl_incr_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcMbiuCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcMbiuCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcMbiuCtrlRReg {
    #[inline(always)]
    fn default() -> EmmcMbiuCtrlRReg {
        <crate::RegValueT<EmmcMbiuCtrlRReg_SPEC> as RegisterValue<_>>::new(14)
    }
}

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

#[doc = "This register is used to control the operation of MSHC Host Controller."]
pub type EmmcMshcCtrlRReg = crate::RegValueT<EmmcMshcCtrlRReg_SPEC>;

impl EmmcMshcCtrlRReg {
    #[doc = "Internal clock gating disable control\nThis bit must be used to disable IP\'s internal clock gating when required. when disabled clocks are not gated. Clocks to the core (except hclk) must be stopped when programming this bit.\nValues:\n0x0 (ENABLE): Internal clock gates are active and clock gating is controlled internally\n0x1 (DISABLE): Internal clock gating is disabled, clocks are not gated internally"]
    #[inline(always)]
    pub fn sw_cg_dis(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcMshcCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,EmmcMshcCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command conflict check\nThis bit enables command conflict check.\nNote: DWC_mshc controller monitors the CMD line whenever a command is issued and checks whether the value driven on sd_cmd_out matches the value on sd_cmd_in at next subsequent edge\nof cclk_tx to determine command conflict error. This bit is cleared only if the feed back delay (including IO Pad delay) is more than (t_card_clk_period - t_setup), where t_setup is the setup time of\na flop in DWC_mshc. The I/O pad delay is consistent across CMD and DATA lines, and it is within the value:\n(2*t_card_clk_period - t_setup)  \nValues:\n0x0 (DISABLE_CMD_CONFLICT_CHK): Disable command conflict check\n0x1 (CMD_CONFLICT_CHK_LAT1): Check for command conflict after 1 card clock cycle"]
    #[inline(always)]
    pub fn cmd_conflict_check(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcMshcCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcMshcCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcMshcCtrlRReg {
    #[inline(always)]
    fn default() -> EmmcMshcCtrlRReg {
        <crate::RegValueT<EmmcMshcCtrlRReg_SPEC> as RegisterValue<_>>::new(1)
    }
}

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

#[doc = "This register reflects the current release number of DWC_mshc/DWC_mshc_lite."]
pub type EmmcMshcVerIdRReg = crate::RegValueT<EmmcMshcVerIdRReg_SPEC>;

impl EmmcMshcVerIdRReg {
    #[doc = "Current release number\nThis field indicates the Synopsys DesignWare Cores DWC_mshc/DWC_mshc_lite current release number that is read by an application.\nAn application reading this register in conjunction with the MSHC_VER_TYPE_R register, gathers details of the current release."]
    #[inline(always)]
    pub fn mshc_ver_id(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffffffff,
        1,
        0,
        u32,
        u32,
        EmmcMshcVerIdRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xffffffff,
            1,
            0,
            u32,
            u32,
            EmmcMshcVerIdRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcMshcVerIdRReg {
    #[inline(always)]
    fn default() -> EmmcMshcVerIdRReg {
        <crate::RegValueT<EmmcMshcVerIdRReg_SPEC> as RegisterValue<_>>::new(825765930)
    }
}

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

#[doc = "This register reflects the current release type of DWC_mshc/DWC_mshc_lite."]
pub type EmmcMshcVerTypeRReg = crate::RegValueT<EmmcMshcVerTypeRReg_SPEC>;

impl EmmcMshcVerTypeRReg {
    #[doc = "Current release type\nThis field indicates the Synopsys DesignWare Cores DWC_mshc/DWC_mshc_lite current release type that is read by an application.\nAn application reading this register in conjunction with the MSHC_VER_ID_R register, gathers details of the current release."]
    #[inline(always)]
    pub fn mshc_ver_type(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffffffff,
        1,
        0,
        u32,
        u32,
        EmmcMshcVerTypeRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xffffffff,
            1,
            0,
            u32,
            u32,
            EmmcMshcVerTypeRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcMshcVerTypeRReg {
    #[inline(always)]
    fn default() -> EmmcMshcVerTypeRReg {
        <crate::RegValueT<EmmcMshcVerTypeRReg_SPEC> as RegisterValue<_>>::new(1734421034)
    }
}

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

#[doc = "This register is used to select the interrupt status that is indicated to the Host System as the interrupt. All these status bi"]
pub type EmmcNormalIntSignalEnRReg = crate::RegValueT<EmmcNormalIntSignalEnRReg_SPEC>;

impl EmmcNormalIntSignalEnRReg {
    #[doc = "Command Queuing Engine Event Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cqe_event_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<14, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<
            14,
            1,
            0,
            EmmcNormalIntSignalEnRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "FX Event Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn fx_event_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<13, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<
            13,
            1,
            0,
            EmmcNormalIntSignalEnRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "Re-Tuning Event (UHS-I only) Signal Enable.\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn re_tune_event_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<12, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<
            12,
            1,
            0,
            EmmcNormalIntSignalEnRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "INT_C (Embedded) Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn int_c_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<11, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<
            11,
            1,
            0,
            EmmcNormalIntSignalEnRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "INT_B (Embedded) Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn int_b_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<
            10,
            1,
            0,
            EmmcNormalIntSignalEnRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }

    #[doc = "INT_A (Embedded) Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn int_a_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<9, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<9,1,0,EmmcNormalIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Card Interrupt Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn card_interrupt_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<8,1,0,EmmcNormalIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Card Removal Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn card_removal_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<7,1,0,EmmcNormalIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Card Insertion Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn card_insertion_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<6,1,0,EmmcNormalIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Buffer Read Ready Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn buf_rd_ready_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<5,1,0,EmmcNormalIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Buffer Write Ready Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn buf_wr_ready_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<4,1,0,EmmcNormalIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "DMA Interrupt Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn dma_interrupt_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<3,1,0,EmmcNormalIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Block Gap Event Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn bgap_event_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<2,1,0,EmmcNormalIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Transfer Complete Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn xfer_complete_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<1,1,0,EmmcNormalIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command Complete Signal Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cmd_complete_signal_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcNormalIntSignalEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<0,1,0,EmmcNormalIntSignalEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcNormalIntSignalEnRReg {
    #[inline(always)]
    fn default() -> EmmcNormalIntSignalEnRReg {
        <crate::RegValueT<EmmcNormalIntSignalEnRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register enables the Interrupt Status for Normal Interrupt Status register (NORMAL_INT_STAT_R) when NORMAL_INT_STAT_R is s"]
pub type EmmcNormalIntStatEnRReg = crate::RegValueT<EmmcNormalIntStatEnRReg_SPEC>;

impl EmmcNormalIntStatEnRReg {
    #[doc = "CQE Event Status Enable\n\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cqe_event_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<14, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<14,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "FX Event Status Enable\nThis bit is added from Version 4.10.\n\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn fx_event_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<13, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<13,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Re-Tuning Event (UHS-I only) Status Enable\n\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn re_tune_event_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<12, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<12,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "INT_C (Embedded) Status Enable\n\nIf this bit is set to 0, the Host Controller clears the interrupt request to the System. The Host Driver may clear this bit before servicing the INT_C and may set this bit again after all interrupt requests to INT_C pin are cleared to prevent inadvertent interrupts.\n\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn int_c_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<11, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<11,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "INT_B (Embedded) Status Enable\n\nIf this bit is set to 0, the Host Controller clears the interrupt request to the System. The Host Driver may clear this bit before servicing the INT_B and may set this bit again after all interrupt requests to INT_B pin are cleared to prevent inadvertent interrupts.\n\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn int_b_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<10,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "INT_A (Embedded) Status Enable\n\nIf this bit is set to 0, the Host Controller clears the interrupt request to the System. The Host Driver may clear this bit before servicing the INT_A and may set this bit again after all interrupt requests to INT_A pin are cleared to prevent inadvertent interrupts.\n\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn int_a_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<9, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<9,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Card Interrupt Status Enable\n\nIf this bit is set to 0, the Host Controller clears the interrupt request to the System. The Card Interrupt detection is stopped when this bit is cleared and restarted when this bit is set to 1. The Host Driver may clear the Card Interrupt Status Enable before servicing the Card Interrupt and may set this bit again after all interrupt requests from the card are cleared to prevent inadvertent interrupts.\n\nBy setting this bit to 0, interrupt input must be masked by implementation so that the interrupt input is not affected by external signal in any state (for example, floating).\n\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn card_interrupt_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<8,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Card Removal Status Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn card_removal_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<7,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Card Insertion Status Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn card_insertion_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<6,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Buffer Read Ready Status Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn buf_rd_ready_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<5,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Buffer Write Ready Status Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn buf_wr_ready_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<4,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "DMA Interrupt Status Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn dma_interrupt_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<3,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Block Gap Event Status Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn bgap_event_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<2,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Transfer Complete Status Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn xfer_complete_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<1,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command Complete Status Enable\nValues:\n\n0x0 (FALSE): Masked\n0x1 (TRUE): Enabled"]
    #[inline(always)]
    pub fn cmd_complete_stat_en(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcNormalIntStatEnRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<0,1,0,EmmcNormalIntStatEnRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcNormalIntStatEnRReg {
    #[inline(always)]
    fn default() -> EmmcNormalIntStatEnRReg {
        <crate::RegValueT<EmmcNormalIntStatEnRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register reflects the status of the Normal Interrupt. This register is applicable for an SD/eMMC/UHS-II mode."]
pub type EmmcNormalIntStatRReg = crate::RegValueT<EmmcNormalIntStatRReg_SPEC>;

impl EmmcNormalIntStatRReg {
    #[doc = "Error Interrupt.\nIf any of the bits in the Error Interrupt Status register are set, then this bit is set.\n\nValues:\n0x0 (FALSE): No Error\n0x1 (TRUE): Error"]
    #[inline(always)]
    pub fn err_interrupt(
        self,
    ) -> crate::common::RegisterFieldBool<15, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<15,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Command Queuing Event\nThis status is set if Command Queuing/Crypto related event has occurred in eMMC/SD mode. Read CQHCI\'s CQIS/CRNQIS register for more details.\n\nValues:\n0x0 (FALSE): No Event\n0x1 (TRUE): Command Queuing Event is detected"]
    #[inline(always)]
    pub fn cqe_event(
        self,
    ) -> crate::common::RegisterFieldBool<14, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<14,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "FX Event.\nThis status is set when R\\[14\\] of response register is set to 1 and Response Type R1/R5 is set to 0 in Transfer Mode register. This interrupt is used with response check function.\n\nValues:\n0x0 (FALSE): No Event\n0x1 (TRUE): FX Event is detected"]
    #[inline(always)]
    pub fn fx_event(
        self,
    ) -> crate::common::RegisterFieldBool<13, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<13,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Re-tuning Event.\nThis bit is set if the Re-Tuning Request changes from 0 to 1. Re-Tuning request is not supported."]
    #[inline(always)]
    pub fn re_tune_event(
        self,
    ) -> crate::common::RegisterFieldBool<12, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<12,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "INT_C (Embedded).\nThis bit is set if INT_C is enabled and if INT_C# pin is in low level. The INT_C# pin is not supported."]
    #[inline(always)]
    pub fn int_c(
        self,
    ) -> crate::common::RegisterFieldBool<11, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<11,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "INT_B (Embedded).\nThis bit is set if INT_B is enabled and if INT_B# pin is in low level. The INT_B# pin is not supported."]
    #[inline(always)]
    pub fn int_b(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<10,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "INT_A (Embedded).\nThis bit is set if INT_A is enabled and if INT_A# pin is in low level. The INT_A# pin is not supported."]
    #[inline(always)]
    pub fn int_a(
        self,
    ) -> crate::common::RegisterFieldBool<9, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<9,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Card Interrupt.\nThis bit reflects the synchronized value of:\n- DAT\\[1\\] Interrupt Input for SD Mode\n- DAT\\[2\\] Interrupt Input for UHS-II Mode\n\nValues:\n0x0 (FALSE): No Card Interrupt\n0x1 (TRUE): Generate Card Interrupt"]
    #[inline(always)]
    pub fn card_interrupt(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<8,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Card Removal.\nThis bit is set if the Card Inserted in the Present State register changes from 1 to 0.\n\nValues:\n0x0 (FALSE): Card state stable or Debouncing\n0x1 (TRUE): Card Removed"]
    #[inline(always)]
    pub fn card_removal_stat_r(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<7,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Card Insertion\nThis bit is set if the Card Inserted in the Present State register changes from 0 to 1.\n\nValues:\n0x0 (FALSE): Card state stable or Debouncing\n0x1 (TRUE): Card Inserted"]
    #[inline(always)]
    pub fn card_insertion(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<6,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Buffer Read Ready.\nThis bit is set if the Buffer Read Enable changes from 0 to 1.\n\nValues:\n0x0 (FALSE): Not ready to read buffer\n0x1 (TRUE): Ready to read buffer"]
    #[inline(always)]
    pub fn buf_rd_ready(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<5,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Buffer Write Ready.\nThis bit is set if the Buffer Write Enable changes from 0 to 1.\n\nValues:\n0x0 (FALSE): Not ready to write buffer\n0x1 (TRUE): Ready to write buffer"]
    #[inline(always)]
    pub fn buf_wr_ready(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<4,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "DMA Interrupt.\nThis bit is set if the Host Controller detects the SDMA Buffer Boundary during transfer. In case of ADMA, by setting the Int field in the descriptor table, the Host controller generates this interrupt. This interrupt is not generated after a Transfer Complete.\n\nValues:\n0x0 (FALSE): No DMA Interrupt\n0x1 (TRUE): DMA Interrupt is generated"]
    #[inline(always)]
    pub fn dma_interrupt(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<3,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Block Gap Event.\nThis bit is set when both read/write transaction is stopped at block gap due to a Stop at Block Gap Request.\n\nValues:\n0x0 (FALSE): No Block Gap Event\n0x1 (TRUE): Transaction stopped at block gap"]
    #[inline(always)]
    pub fn bgap_event(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<2,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Transfer Complete.\nThis bit is set when a read/write transfer and a command with status busy is completed.\n\nValues:\n0x0 (FALSE): Not complete\n0x1 (TRUE): Command execution is completed"]
    #[inline(always)]
    pub fn xfer_complete(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<1,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Command Complete.\nIn an SD/eMMC Mode, this bit is set when the end bit of a response except for Auto CMD12 and Auto CMD23.\nThis interrupt is not generated when the Response Interrupt Disable in Transfer Mode Register is set to 1.\n\nValues:\n0x0 (FALSE): No command complete\n0x1 (TRUE): Command Complete"]
    #[inline(always)]
    pub fn cmd_complete(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcNormalIntStatRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterFieldBool::<0,1,0,EmmcNormalIntStatRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcNormalIntStatRReg {
    #[inline(always)]
    fn default() -> EmmcNormalIntStatRReg {
        <crate::RegValueT<EmmcNormalIntStatRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register defines the Preset Value for DDR50 and High Speed DDR speed modes in the SD and eMMC modes, respectively."]
pub type EmmcPresetDdr50RReg = crate::RegValueT<EmmcPresetDdr50RReg_SPEC>;

impl EmmcPresetDdr50RReg {
    #[doc = "Driver Strength Select Value\nThese bits indicate Driver strength value supported for DDR50 bus speed mode. These bits are meaningless for 3.3V signaling.\nValues:\n0x0 (TYPEB): Driver Type B is selected\n0x1 (TYPEA): Driver Type A is selected\n0x2 (TYPEC): Driver Type C is selected\n0x3 (TYPED): Driver Type D is selected"]
    #[inline(always)]
    pub fn drv_sel_val(
        self,
    ) -> crate::common::RegisterField<
        14,
        0x3,
        1,
        0,
        u8,
        u8,
        EmmcPresetDdr50RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            14,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcPresetDdr50RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Clock Generator Select Value\nThis bit is effective when Host Controller supports programmable clock generator.\nValues:\n0x0 (FALSE): Host Controller Ver2.0 Compatible Clock Generator\n0x1 (PROG): Programmable Clock Generator"]
    #[inline(always)]
    pub fn clk_gen_sel_val(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcPresetDdr50RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<10,1,0,EmmcPresetDdr50RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "SDCLK/RCLK Frequency Select Value\nThese bits specify a 10-bit preset value that must be set in the SDCLK/RCLK Frequency Select field of the Clock Control register, as described by a Host System."]
    #[inline(always)]
    pub fn freq_sel_val(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3ff,
        1,
        0,
        u16,
        u16,
        EmmcPresetDdr50RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x3ff,
            1,
            0,
            u16,
            u16,
            EmmcPresetDdr50RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcPresetDdr50RReg {
    #[inline(always)]
    fn default() -> EmmcPresetDdr50RReg {
        <crate::RegValueT<EmmcPresetDdr50RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register defines Preset Value for Default Speed mode in SD mode."]
pub type EmmcPresetDsRReg = crate::RegValueT<EmmcPresetDsRReg_SPEC>;

impl EmmcPresetDsRReg {
    #[doc = "Driver Strength Select Value\nThese bits indicate the Driver strength value supported by 1.8V signaling bus speed modes. This field is meaningless for the Default speed mode as it uses 3.3V signaling.\nValues:\n0x0 (TYPEB): Driver Type B is selected\n0x1 (TYPEA): Driver Type A is selected\n0x2 (TYPEC): Driver Type C is selected\n0x3 (TYPED): Driver Type D is selected"]
    #[inline(always)]
    pub fn drv_sel_val(
        self,
    ) -> crate::common::RegisterField<14, 0x3, 1, 0, u8, u8, EmmcPresetDsRReg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<14,0x3,1,0,u8,u8,EmmcPresetDsRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Clock Generator Select Value\nThis bit is effective when Host Controller supports programmable clock generator.\nValues:\n0x0 (FALSE): Host Controller Ver2.0 Compatible Clock Generator\n0x1 (PROG): Programmable Clock Generator"]
    #[inline(always)]
    pub fn clk_gen_sel_val(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcPresetDsRReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<10,1,0,EmmcPresetDsRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "SDCLK/RCLK Frequency Select Value\n10-bit preset value to be set in SDCLK/RCLK Frequency Select field of the Clock Control register described by a Host System."]
    #[inline(always)]
    pub fn freq_sel_val(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3ff,
        1,
        0,
        u16,
        u16,
        EmmcPresetDsRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x3ff,
            1,
            0,
            u16,
            u16,
            EmmcPresetDsRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcPresetDsRReg {
    #[inline(always)]
    fn default() -> EmmcPresetDsRReg {
        <crate::RegValueT<EmmcPresetDsRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register defines Preset Value for High Speed mode in SD mode."]
pub type EmmcPresetHsRReg = crate::RegValueT<EmmcPresetHsRReg_SPEC>;

impl EmmcPresetHsRReg {
    #[doc = "Driver Strength Select Value\nThese bits indicate the Driver strength value supported by 1.8V signaling bus speed modes. This field is meaningless for High speed mode as it uses 3.3V signaling.\nValues:\n0x0 (TYPEB): Driver Type B is selected\n0x1 (TYPEA): Driver Type A is selected\n0x2 (TYPEC): Driver Type C is selected\n0x3 (TYPED): Driver Type D is selected"]
    #[inline(always)]
    pub fn drv_sel_val(
        self,
    ) -> crate::common::RegisterField<14, 0x3, 1, 0, u8, u8, EmmcPresetHsRReg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<14,0x3,1,0,u8,u8,EmmcPresetHsRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Clock Generator Select Value\nThis bit is effective when Host Controller supports programmable clock generator.\nValues:\n0x0 (FALSE): Host Controller Ver2.0 Compatible Clock Generator\n0x1 (PROG): Programmable Clock Generator"]
    #[inline(always)]
    pub fn clk_gen_sel_val(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcPresetHsRReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<10,1,0,EmmcPresetHsRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "SDCLK/RCLK Frequency Select Value\n10-bit preset value to be set in SDCLK/RCLK Frequency Select field of the Clock Control register described by a Host System."]
    #[inline(always)]
    pub fn freq_sel_val(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3ff,
        1,
        0,
        u16,
        u16,
        EmmcPresetHsRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x3ff,
            1,
            0,
            u16,
            u16,
            EmmcPresetHsRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcPresetHsRReg {
    #[inline(always)]
    fn default() -> EmmcPresetHsRReg {
        <crate::RegValueT<EmmcPresetHsRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register defines Preset Value for Initialization in SD/eMMC mode."]
pub type EmmcPresetInitRReg = crate::RegValueT<EmmcPresetInitRReg_SPEC>;

impl EmmcPresetInitRReg {
    #[doc = "Driver Strength Select Value\nThese bits indicate that the Driver strength is supported by 1.8V signaling bus speed modes. These bits are meaningless for 3.3V signaling.\nValues:\n0x0 (TYPEB): Driver Type B is selected\n0x1 (TYPEA): Driver Type A is selected\n0x2 (TYPEC): Driver Type C is selected\n0x3 (TYPED): Driver Type D is selected"]
    #[inline(always)]
    pub fn drv_sel_val(
        self,
    ) -> crate::common::RegisterField<
        14,
        0x3,
        1,
        0,
        u8,
        u8,
        EmmcPresetInitRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            14,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcPresetInitRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Clock Generator Select Value\nThis bit is effective when the Host Controller supports a programmable clock generator.\nValues:\n0x0 (FALSE): Host Controller Ver2.0 Compatible Clock Generator\n0x1 (PROG): Programmable Clock Generator"]
    #[inline(always)]
    pub fn clk_gen_sel_val(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcPresetInitRReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<10,1,0,EmmcPresetInitRReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "SDCLK/RCLK Frequency Select Value\n10-bit preset value to be set in SDCLK/RCLK Frequency Select field of the Clock Control register described by a Host System."]
    #[inline(always)]
    pub fn freq_sel_val(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3ff,
        1,
        0,
        u16,
        u16,
        EmmcPresetInitRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x3ff,
            1,
            0,
            u16,
            u16,
            EmmcPresetInitRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcPresetInitRReg {
    #[inline(always)]
    fn default() -> EmmcPresetInitRReg {
        <crate::RegValueT<EmmcPresetInitRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register defines Preset Value for SDR104 and HS200 speed modes in the SD and eMMC modes, respectively."]
pub type EmmcPresetSdr104RReg = crate::RegValueT<EmmcPresetSdr104RReg_SPEC>;

impl EmmcPresetSdr104RReg {
    #[doc = "Driver Strength Select Value\nThese bits indicate Driver strength value supported for SDR104 bus speed mode. These bits are meaningless for 3.3V signaling.\nValues:\n0x0 (TYPEB): Driver Type B is selected\n0x1 (TYPEA): Driver Type A is selected\n0x2 (TYPEC): Driver Type C is selected\n0x3 (TYPED): Driver Type D is selected"]
    #[inline(always)]
    pub fn drv_sel_val(
        self,
    ) -> crate::common::RegisterField<
        14,
        0x3,
        1,
        0,
        u8,
        u8,
        EmmcPresetSdr104RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            14,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcPresetSdr104RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Clock Generator Select Value\nThis bit is effective when Host Controller supports programmable clock generator.\nValues:\n0x0 (FALSE): Host Controller Ver2.0 Compatible Clock Generator\n0x1 (PROG): Programmable Clock Generator"]
    #[inline(always)]
    pub fn clk_gen_sel_val(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcPresetSdr104RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<10,1,0,EmmcPresetSdr104RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "SDCLK/RCLK Frequency Select Value\nThese bits specify a 10-bit preset value that must be set in the SDCLK/RCLK Frequency Select field of the Clock Control register described by a Host System."]
    #[inline(always)]
    pub fn freq_sel_val(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3ff,
        1,
        0,
        u16,
        u16,
        EmmcPresetSdr104RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x3ff,
            1,
            0,
            u16,
            u16,
            EmmcPresetSdr104RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcPresetSdr104RReg {
    #[inline(always)]
    fn default() -> EmmcPresetSdr104RReg {
        <crate::RegValueT<EmmcPresetSdr104RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register defines Preset Value for SDR12 and Legacy speed mode in SD and eMMC mode respectively."]
pub type EmmcPresetSdr12RReg = crate::RegValueT<EmmcPresetSdr12RReg_SPEC>;

impl EmmcPresetSdr12RReg {
    #[doc = "Driver Strength Select Value\nThese bits indicate the Driver strength value supported for the SDR12 bus speed mode. These bits are meaningless for 3.3V signaling.\nValues:\n0x0 (TYPEB): Driver Type B is selected\n0x1 (TYPEA): Driver Type A is selected\n0x2 (TYPEC): Driver Type C is selected\n0x3 (TYPED): Driver Type D is selected"]
    #[inline(always)]
    pub fn drv_sel_val(
        self,
    ) -> crate::common::RegisterField<
        14,
        0x3,
        1,
        0,
        u8,
        u8,
        EmmcPresetSdr12RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            14,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcPresetSdr12RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Clock Generator Select Value\nThis bit is effective when Host Controller supports programmable clock generator\nValues:\n0x0 (FALSE): Host Controller Ver2.0 Compatible Clock Generator\n0x1 (PROG): Programmable Clock Generator"]
    #[inline(always)]
    pub fn clk_gen_sel_val(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcPresetSdr12RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<10,1,0,EmmcPresetSdr12RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "SDCLK/RCLK Frequency Select Value\n10-bit preset value to be set in SDCLK/RCLK Frequency Select field of the Clock Control register described by a Host System."]
    #[inline(always)]
    pub fn freq_sel_val(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3ff,
        1,
        0,
        u16,
        u16,
        EmmcPresetSdr12RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x3ff,
            1,
            0,
            u16,
            u16,
            EmmcPresetSdr12RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcPresetSdr12RReg {
    #[inline(always)]
    fn default() -> EmmcPresetSdr12RReg {
        <crate::RegValueT<EmmcPresetSdr12RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register defines Preset Value for SDR25 and High Speed SDR speed mode in SD and eMMC mode respectively."]
pub type EmmcPresetSdr25RReg = crate::RegValueT<EmmcPresetSdr25RReg_SPEC>;

impl EmmcPresetSdr25RReg {
    #[doc = "Driver Strength Select Value\nThese bits indicate the Driver strength value supported for the SDR25 bus speed mode. These bits are meaningless for 3.3V signaling.\nValues:\n0x0 (TYPEB): Driver Type B is selected\n0x1 (TYPEA): Driver Type A is selected\n0x2 (TYPEC): Driver Type C is selected\n0x3 (TYPED): Driver Type D is selected"]
    #[inline(always)]
    pub fn drv_sel_val(
        self,
    ) -> crate::common::RegisterField<
        14,
        0x3,
        1,
        0,
        u8,
        u8,
        EmmcPresetSdr25RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            14,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcPresetSdr25RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Clock Generator Select Value\nThis bit is effective when Host Controller supports programmable clock generator.\nValues:\n0x0 (FALSE): Host Controller Ver2.0 Compatible Clock Generator\n0x1 (PROG): Programmable Clock Generator"]
    #[inline(always)]
    pub fn clk_gen_sel_val(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcPresetSdr25RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<10,1,0,EmmcPresetSdr25RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "SDCLK/RCLK Frequency Select Value\n10-bit preset value to be set in SDCLK/RCLK Frequency Select field of the Clock Control register described by a Host System."]
    #[inline(always)]
    pub fn freq_sel_val(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3ff,
        1,
        0,
        u16,
        u16,
        EmmcPresetSdr25RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x3ff,
            1,
            0,
            u16,
            u16,
            EmmcPresetSdr25RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcPresetSdr25RReg {
    #[inline(always)]
    fn default() -> EmmcPresetSdr25RReg {
        <crate::RegValueT<EmmcPresetSdr25RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register defines Preset Value for SDR50 speed mode in SD mode."]
pub type EmmcPresetSdr50RReg = crate::RegValueT<EmmcPresetSdr50RReg_SPEC>;

impl EmmcPresetSdr50RReg {
    #[doc = "Driver Strength Select Value\nThese bits indicate Driver strength value supported for SDR50 bus speed mode. These bits are meaningless for 3.3V signaling.\nValues:\n0x0 (TYPEB): Driver Type B is selected\n0x1 (TYPEA): Driver Type A is selected\n0x2 (TYPEC): Driver Type C is selected\n0x3 (TYPED): Driver Type D is selected"]
    #[inline(always)]
    pub fn drv_sel_val(
        self,
    ) -> crate::common::RegisterField<
        14,
        0x3,
        1,
        0,
        u8,
        u8,
        EmmcPresetSdr50RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            14,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcPresetSdr50RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Clock Generator Select Value\nThis bit is effective when Host Controller supports programmable clock generator.\nValues:\n0x0 (FALSE): Host Controller Ver2.0 Compatible Clock Generator\n0x1 (PROG): Programmable Clock Generator"]
    #[inline(always)]
    pub fn clk_gen_sel_val(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcPresetSdr50RReg_SPEC, crate::common::R>
    {
        crate::common::RegisterFieldBool::<10,1,0,EmmcPresetSdr50RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "SDCLK/RCLK Frequency Select Value\n10-bit preset value to be set in SDCLK/RCLK Frequency Select field of the Clock Control register described by a Host System."]
    #[inline(always)]
    pub fn freq_sel_val(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3ff,
        1,
        0,
        u16,
        u16,
        EmmcPresetSdr50RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x3ff,
            1,
            0,
            u16,
            u16,
            EmmcPresetSdr50RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcPresetSdr50RReg {
    #[inline(always)]
    fn default() -> EmmcPresetSdr50RReg {
        <crate::RegValueT<EmmcPresetSdr50RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to hold the preset value for UHS-II and HS400 speed modes in the SD and eMMC modes, respectively."]
pub type EmmcPresetUhs2RReg = crate::RegValueT<EmmcPresetUhs2RReg_SPEC>;

impl EmmcPresetUhs2RReg {
    #[doc = "Driver Strength Select Value\nThese bits indicate the Driver strength value supported by 1.8V signaling bus speed modes in the SD mode. This field is meaningless for UHS-II mode. In eMMC mode, these bits can be used for selecting\nthe Drive strength value for HS400 mode.\nValues:\n0x0 (TYPEB): Driver Type B is selected\n0x1 (TYPEA): Driver Type A is selected\n0x2 (TYPEC): Driver Type C is selected\n0x3 (TYPED): Driver Type D is selected"]
    #[inline(always)]
    pub fn drv_sel_val(
        self,
    ) -> crate::common::RegisterField<
        14,
        0x3,
        1,
        0,
        u8,
        u8,
        EmmcPresetUhs2RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            14,
            0x3,
            1,
            0,
            u8,
            u8,
            EmmcPresetUhs2RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }

    #[doc = "Clock Generator Select Value\nThis bit is effective when the Host Controller supports a programmable clock generator.\nValues:\n0x0 (FALSE): Host Controller Ver2.0 Compatible Clock Generator\n0x1 (PROG): Programmable Clock Generator"]
    #[inline(always)]
    pub fn clk_gen_sel_val(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcPresetUhs2RReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<10,1,0,EmmcPresetUhs2RReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "SDCLK/RCLK Frequency Select Value\nThese bits specify the 10-bit preset value that must be set in the SDCLK/RCLK Frequency Select field of the Clock Control register, as described by a Host System."]
    #[inline(always)]
    pub fn freq_sel_val(
        self,
    ) -> crate::common::RegisterField<
        0,
        0x3ff,
        1,
        0,
        u16,
        u16,
        EmmcPresetUhs2RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0x3ff,
            1,
            0,
            u16,
            u16,
            EmmcPresetUhs2RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcPresetUhs2RReg {
    #[inline(always)]
    fn default() -> EmmcPresetUhs2RReg {
        <crate::RegValueT<EmmcPresetUhs2RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register indicates the present status of the Host Controller. This register is applicable for an SD/eMMC/UHS-II mode."]
pub type EmmcPstateReg = crate::RegValueT<EmmcPstateReg_SPEC>;

impl EmmcPstateReg {
    #[doc = "UHS-II Interface Detection.\nFor SD/eMMC mode, this bit always returns 0.\n\nValues:\n0x0 (FALSE): UHS-II interface is not detected\n0x1 (TRUE): UHS-II interface is detected"]
    #[inline(always)]
    pub fn uhs2_if_detect(
        self,
    ) -> crate::common::RegisterFieldBool<31, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<31,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Lane Synchronization.\nFor SD/eMMC mode, this bit always returns 0.\n\nValues:\n0x0 (FALSE): UHS-II PHY is not initialized\n0x1 (TRUE): UHS-II PHY is initialized"]
    #[inline(always)]
    pub fn lane_sync(
        self,
    ) -> crate::common::RegisterFieldBool<30, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<30,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "In Dormant Status\nFor SD/eMMC mode, this bit always returns 0.\n\nValues:\n0x0 (FALSE): Not in DORMANT state\n0x1 (TRUE): In DORMANT state"]
    #[inline(always)]
    pub fn in_dormant_st(
        self,
    ) -> crate::common::RegisterFieldBool<29, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<29,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Sub Command Status.\nThis bit is used to distinguish between a main command and a sub command status.\n\nValues:\n0x0 (FALSE): Main Command Status\n0x1 (TRUE): Sub Command Status"]
    #[inline(always)]
    pub fn sub_cmd_stat(
        self,
    ) -> crate::common::RegisterFieldBool<28, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<28,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Command Not Issued by Error.\nThis bit is set if a command cannot be issued after setting the command register due to an error except the Auto CMD12 error.\n\nValues:\n0x0 (FALSE): No error for issuing a command\n0x1 (TRUE): Command cannot be issued"]
    #[inline(always)]
    pub fn cmd_issue_err(
        self,
    ) -> crate::common::RegisterFieldBool<27, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<27,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Host Regulator Voltage Stable.\nThis bit is used to check whether the host regulator voltage is stable for switching the voltage of UHS-I mode. This bit reflects the synchronized value of the host_reg_vol_stable signal.\n\nValues:\nDescription\n0x0 (FALSE): Host Regulator Voltage is not stable\n0x1 (TRUE): Host Regulator Voltage is stable"]
    #[inline(always)]
    pub fn host_reg_vol(
        self,
    ) -> crate::common::RegisterFieldBool<25, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<25,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Command-Line Signal Level.\nThis bit is used to check the CMD line level to recover from errors and for debugging. These bits reflect the value of the sd_cmd_in signal."]
    #[inline(always)]
    pub fn cmd_line_lvl(
        self,
    ) -> crate::common::RegisterFieldBool<24, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<24,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "DAT\\[3:0\\] Line Signal Level.\nThis bit is used to check the DAT line level to recover from errors and for debugging. These bits reflect the value of the sd_dat_in (lower nibble) signal."]
    #[inline(always)]
    pub fn dat_3_0(
        self,
    ) -> crate::common::RegisterField<20, 0xf, 1, 0, u8, u8, EmmcPstateReg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<20,0xf,1,0,u8,u8,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Write Protect Switch Pin Level.\nThis bit is supported only for memory and combo cards. This bit reflects the synchronized value of the card_write_prot signal.\n\nValues:\n0x0 (FALSE): Write protected\n0x1 (TRUE): Write enabled"]
    #[inline(always)]
    pub fn wr_protect_sw_lvl(
        self,
    ) -> crate::common::RegisterFieldBool<19, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<19,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Card Detect Pin Level.\nThis bit reflects the inverse synchronized value of the card_detect_n signal.\n\nValues:\n0x0 (FALSE): No card present\n0x1 (TRUE): Card Present"]
    #[inline(always)]
    pub fn card_detect_pin_level(
        self,
    ) -> crate::common::RegisterFieldBool<18, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<18,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Card Stable.\nThis bit indicates the stability of the Card Detect Pin Level. A card is not detected if this bit is set to 1 and the value of the CARD_INSERTED bit is 0.\n\nValues:\n0x0 (FALSE): Reset or Debouncing\n0x1 (TRUE): No Card or Inserted"]
    #[inline(always)]
    pub fn card_stable(
        self,
    ) -> crate::common::RegisterFieldBool<17, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<17,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Card Inserted.\nThis bit indicates whether a card has been inserted. The Host Controller debounces this signal so that Host Driver need not wait for it to stabilize.\n\nValues:\n0x0 (FALSE): Reset, Debouncing, or No card\n0x1 (TRUE): Card Inserted"]
    #[inline(always)]
    pub fn card_inserted(
        self,
    ) -> crate::common::RegisterFieldBool<16, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<16,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Buffer Read Enable.\nThis bit is used for non-DMA transfers. This bit is set if valid data exists in the Host buffer.\n\nValues:\n0x0 (DISABLED): Read disable\n0x1 (ENABLED): Read enable"]
    #[inline(always)]
    pub fn buf_rd_enable(
        self,
    ) -> crate::common::RegisterFieldBool<11, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<11,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Buffer Write Enable.\nThis bit is used for non-DMA transfers. This bit is set if space is available for writing data.\n\nValues:\n0x0 (DISABLED): Write disable\n0x1 (ENABLED): Write enable"]
    #[inline(always)]
    pub fn buf_wr_enable(
        self,
    ) -> crate::common::RegisterFieldBool<10, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<10,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Read Transfer Active.\nThis bit indicates whether a read transfer is active for SD/eMMC mode.\n\nValues:\n0x0 (INACTIVE): No valid data\n0x1 (ACTIVE): Transferring data"]
    #[inline(always)]
    pub fn rd_xfer_active(
        self,
    ) -> crate::common::RegisterFieldBool<9, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<9,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Write Transfer Active.\nThis status indicates whether a write transfer is active  for SD/eMMC mode.\n\nValues:\n0x0 (INACTIVE): No valid data\n0x1 (ACTIVE): Transferring data"]
    #[inline(always)]
    pub fn wr_xfer_active(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<8,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "DAT\\[7:4\\] Line Signal Level.\nThis bit is used to check the DAT line level to recover from errors and for debugging. These bits reflect the value of the sd_dat_in (upper nibble) signal."]
    #[inline(always)]
    pub fn dat_7_4(
        self,
    ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, EmmcPstateReg_SPEC, crate::common::R>
    {
        crate::common::RegisterField::<4,0xf,1,0,u8,u8,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Re-Tuning Request.\nDWC_mshc does not generate retuning request. The software must maintain the Retuning timer."]
    #[inline(always)]
    pub fn re_tune_req(
        self,
    ) -> crate::common::RegisterFieldBool<3, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<3,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "DAT Line Active (SD/eMMC Mode only).\nThis bit indicates whether one of the DAT lines on the SD/eMMC bus is in use.\nIn the case of read transactions, this bit indicates whether a read transfer is executing on the SD/eMMC bus.\nIn the case of write transactions, this bit indicates whether a write transfer is executing on the SD/eMMC bus.\nFor a command with busy, this status indicates whether the command executing busy is executing on an SD or eMMC bus.\n\nValues:\n0x0 (INACTIVE): DAT Line Inactive\n0x1 (ACTIVE): DAT Line Active"]
    #[inline(always)]
    pub fn dat_line_active(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<2,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Command Inhibit (DAT).\nThis bit is applicable for SD/eMMC mode and is generated if either DAT line active or Read transfer active is set to 1.\nIf this bit is set to 0, it indicates that the Host Controller can issue subsequent SD/eMMC commands.\n\nValues:\n0x0 (READY): Can issue command which used DAT line\n0x1 (NOT_READY): Cannot issue command which used\nDAT line"]
    #[inline(always)]
    pub fn cmd_inhibit_dat(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<1,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }

    #[doc = "Command Inhibit (CMD).\nThis bit indicates the following :\n- SD/eMMC mode: If this bit is set to 0, it indicates that the CMD line is not in use and the Host controller can issue an SD/eMMC command using the CMD line. This bit is set when the command register is written. This bit is cleared when the command response is received. This bit is not cleared by the response of auto CMD12/23 but cleared by the response of read/write command.\n\nValues:\n0x0 (READY): Host Controller is ready to issue a command\n0x1 (NOT_READY): Host Controller is not ready to issue a command"]
    #[inline(always)]
    pub fn cmd_inhibit(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcPstateReg_SPEC, crate::common::R> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcPstateReg_SPEC,crate::common::R>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcPstateReg {
    #[inline(always)]
    fn default() -> EmmcPstateReg {
        <crate::RegValueT<EmmcPstateReg_SPEC> as RegisterValue<_>>::new(34340864)
    }
}

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

#[doc = "This register is used to control the bus power for the Card. This register is applicable for an SD, eMMC, and UHS-II modes."]
pub type EmmcPwrCtrlRReg = crate::RegValueT<EmmcPwrCtrlRReg_SPEC>;

impl EmmcPwrCtrlRReg {
    #[doc = "SD Bus Voltage Select for VDD2.\nThis is irrelevant for SD/eMMC card.\n\nValues:\n0x7 (NOT_USED7): Not used\n0x6 (NOT_USED6): Not used\n0x5 (V_1_8): 1.8V\n0x4 (V_1_2): Reserved for 1.2V\n0x3 (RSVD3): Reserved\n0x2 (RSVD2): Reserved\n0x1 (RSVD1): Reserved\n0x0 (NO_VDD2): VDD2 Not Supported"]
    #[inline(always)]
    pub fn sd_bus_vol_vdd2(
        self,
    ) -> crate::common::RegisterField<5, 0x7, 1, 0, u8, u8, EmmcPwrCtrlRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<5,0x7,1,0,u8,u8,EmmcPwrCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "SD Bus Power for VDD2.\nThis is irrelevant for SD/eMMC card.\n\nValues:\n0x0 (OFF): Power off\n0x1 (ON): Power on"]
    #[inline(always)]
    pub fn sd_bus_pwr_vdd2(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcPwrCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,EmmcPwrCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "SD Bus Voltage Select for VDD1/eMMC Bus Voltage Select for VDD.\nThese bits enable the Host Driver to select the voltage level for an SD/eMMC card. Before setting this register, the Host Driver checks the Voltage Support bits in the Capabilities register.\nIf an unsupported voltage is selected, the Host System does not supply the SD Bus voltage. The value set in this field is available on the DWC_mshc output signal (sd_vdd1_sel), which is used by the voltage switching circuitry.\nSD Bus Voltage Select options:\n- 0x7 : 3.3V(Typical)\n- 0x6 : 3.0V(Typical)\n- 0x5 : 1.8V(Typical) for Embedded\n- 0x4 : 0x0   - Reserved\neMMC Bus Voltage Select options:\n- 0x7 : 3.3V(Typical)\n- 0x6 : 1.8V(Typical)\n- 0x5 : 1.2V(Typical)\n- 0x4 : 0x0   - Reserved\n\nValues:\n0x7 (V_3_3): 3.3V (Typ.)\n0x6 (V_3_0): 3.0V (Typ.)\n0x5 (V_1_8): 1.8V (Typ.) for Embedded\n0x4 (RSVD4): Reserved\n0x3 (RSVD3): Reserved\n0x2 (RSVD2): Reserved\n0x1 (RSVD1): Reserved\n0x0 (RSVD0): Reserved"]
    #[inline(always)]
    pub fn sd_bus_vol_vdd1(
        self,
    ) -> crate::common::RegisterField<1, 0x7, 1, 0, u8, u8, EmmcPwrCtrlRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<1,0x7,1,0,u8,u8,EmmcPwrCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "SD Bus Power for VDD1.\nThis bit enables VDD1 power of the card. This setting is available on the sd_vdd1_on output of DWC_mshc so that it can be used to control the VDD1 power supply of the card. Before setting this bit, the SD Host Driver sets the SD Bus Voltage Select bit. If the Host Controller detects a No Card state, this bit is cleared.\nIn SD mode, if this bit is cleared, the Host Controller stops the SD Clock by clearing the SD_CLK_IN bit in the CLK_CTRL_R register.\n\nValues:\n0x0 (OFF): Power off\n0x1 (ON): Power on"]
    #[inline(always)]
    pub fn sd_bus_pwr_vdd1(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcPwrCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcPwrCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcPwrCtrlRReg {
    #[inline(always)]
    fn default() -> EmmcPwrCtrlRReg {
        <crate::RegValueT<EmmcPwrCtrlRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register points to the location of UHS-II embedded control registers."]
pub type EmmcPEmbeddedCntrlReg = crate::RegValueT<EmmcPEmbeddedCntrlReg_SPEC>;

impl EmmcPEmbeddedCntrlReg {
    #[doc = "Offset Address of Embedded Control register."]
    #[inline(always)]
    pub fn reg_offset_embedded_cntrl_addr(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xfff,
        1,
        0,
        u16,
        u16,
        EmmcPEmbeddedCntrlReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xfff,
            1,
            0,
            u16,
            u16,
            EmmcPEmbeddedCntrlReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcPEmbeddedCntrlReg {
    #[inline(always)]
    fn default() -> EmmcPEmbeddedCntrlReg {
        <crate::RegValueT<EmmcPEmbeddedCntrlReg_SPEC> as RegisterValue<_>>::new(3948)
    }
}

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

#[doc = "This register used as a pointer for the Vendor Specific Area 1."]
pub type EmmcPVendorSpecificAreaReg = crate::RegValueT<EmmcPVendorSpecificAreaReg_SPEC>;

impl EmmcPVendorSpecificAreaReg {
    #[doc = "Base offset Address for Vendor-Specific registers."]
    #[inline(always)]
    pub fn reg_offset_addr_vendor(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xfff,
        1,
        0,
        u16,
        u16,
        EmmcPVendorSpecificAreaReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xfff,
            1,
            0,
            u16,
            u16,
            EmmcPVendorSpecificAreaReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcPVendorSpecificAreaReg {
    #[inline(always)]
    fn default() -> EmmcPVendorSpecificAreaReg {
        <crate::RegValueT<EmmcPVendorSpecificAreaReg_SPEC> as RegisterValue<_>>::new(1280)
    }
}

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

#[doc = "This register is used as a pointer for the Vendor Specific Area 2."]
pub type EmmcPVndr2SpecificAreaReg = crate::RegValueT<EmmcPVndr2SpecificAreaReg_SPEC>;

impl EmmcPVndr2SpecificAreaReg {
    #[doc = "Base offset Address for Command Queuing registers."]
    #[inline(always)]
    pub fn reg_offset_addr_vndr2(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffff,
        1,
        0,
        u16,
        u16,
        EmmcPVndr2SpecificAreaReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xffff,
            1,
            0,
            u16,
            u16,
            EmmcPVndr2SpecificAreaReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcPVndr2SpecificAreaReg {
    #[inline(always)]
    fn default() -> EmmcPVndr2SpecificAreaReg {
        <crate::RegValueT<EmmcPVndr2SpecificAreaReg_SPEC> as RegisterValue<_>>::new(384)
    }
}

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

#[doc = "This register stores 39-08 bits of the Response Field for an SD/eMMC mode.  The response for an SD/eMMC command can be a maximu"]
pub type EmmcResp01RReg = crate::RegValueT<EmmcResp01RReg_SPEC>;

impl EmmcResp01RReg {
    #[doc = "Command Response.\nThese bits reflect 39-8 bits of SD/eMMC Response Field.\nNote: For Auto CMD, the 32-bit response (bits 39-8 of the Response Field) is updated in the RESP67_R register."]
    #[inline(always)]
    pub fn resp01(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffffffff,
        1,
        0,
        u32,
        u32,
        EmmcResp01RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xffffffff,
            1,
            0,
            u32,
            u32,
            EmmcResp01RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcResp01RReg {
    #[inline(always)]
    fn default() -> EmmcResp01RReg {
        <crate::RegValueT<EmmcResp01RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register stores 71-40 bits of the Response Field for an SD/eMMC mode. This register is used to store the response from the"]
pub type EmmcResp23RReg = crate::RegValueT<EmmcResp23RReg_SPEC>;

impl EmmcResp23RReg {
    #[doc = "Command Response.\nThese bits reflect 71-40 bits of the SD/eMMC Response Field."]
    #[inline(always)]
    pub fn resp23(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffffffff,
        1,
        0,
        u32,
        u32,
        EmmcResp23RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xffffffff,
            1,
            0,
            u32,
            u32,
            EmmcResp23RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcResp23RReg {
    #[inline(always)]
    fn default() -> EmmcResp23RReg {
        <crate::RegValueT<EmmcResp23RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register stores 103-72 bits of the Response Field for an SD/eMMC mode.  The response for SD/eMMC command can be a maximum"]
pub type EmmcResp45RReg = crate::RegValueT<EmmcResp45RReg_SPEC>;

impl EmmcResp45RReg {
    #[doc = "Command Response.\nThese bits reflect 103-72 bits of the Response Field."]
    #[inline(always)]
    pub fn resp45(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffffffff,
        1,
        0,
        u32,
        u32,
        EmmcResp45RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xffffffff,
            1,
            0,
            u32,
            u32,
            EmmcResp45RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcResp45RReg {
    #[inline(always)]
    fn default() -> EmmcResp45RReg {
        <crate::RegValueT<EmmcResp45RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register stores 135-104 bits of the Response Field for an SD/eMMC mode.    The SD/eMMC response can be a maximum of 128 bi"]
pub type EmmcResp67RReg = crate::RegValueT<EmmcResp67RReg_SPEC>;

impl EmmcResp67RReg {
    #[doc = "Command Response.\nThese bits reflect bits 135-104 of SD/EMMC Response Field.\nNote: For Auto CMD, this register also reflects the 32-bit response (bits 39-8 of the Response Field)."]
    #[inline(always)]
    pub fn resp67(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffffffff,
        1,
        0,
        u32,
        u32,
        EmmcResp67RReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xffffffff,
            1,
            0,
            u32,
            u32,
            EmmcResp67RReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcResp67RReg {
    #[inline(always)]
    fn default() -> EmmcResp67RReg {
        <crate::RegValueT<EmmcResp67RReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to configure a 32-bit Block Count or an SDMA System Address based on the Host Version 4 Enable bit in the"]
pub type EmmcSdmasaRReg = crate::RegValueT<EmmcSdmasaRReg_SPEC>;

impl EmmcSdmasaRReg {
    #[doc = "32-bit Block Count (SDMA System Address).\n- SDMA System Address (Host Version 4 Enable = 0): This register contains the system memory address for an SDMA transfer in the 32-bit addressing mode. When the Host Controller stops an SDMA transfer, this register points to the system address of the next contiguous data position. It can be accessed only if no transaction is executing. Reading this register during data transfers may\nreturn an invalid value.\n- 32-bit Block Count (Host Version 4 Enable = 1): From the Host Controller Version 4.10 specification, this register is redefined as 32-bit Block Count. The Host Controller decrements the block count of this register for every block transfer and the data transfer stops when the count reaches zero. This register must be accessed when no transaction is executing. Reading this register during data transfers may return invalid value.\nFollowing are the values for BLOCKCNT_SDMASA:\n- 0xFFFF_FFFF: 4G - 1 Block\n- ...  \n- 0x0000_0002: 2 Blocks\n- 0x0000_0001: 1 Block\n- 0x0000_0000: Stop Count\nNote:\n- For Host Version 4 Enable = 0, the Host driver does not program the system address in this register while operating in ADMA mode. The system address must be programmed in the ADMA System Address register.\n- For Host Version 4 Enable = 0, the Host driver programs a non-zero 32-bit block count value in this register when Auto CMD23 is enabled for non-DMA and ADMA modes. Auto CMD23 cannot be used with SDMA.\n- This register must be programmed with a non-zero value for data transfer if the 32-bit Block count register is used instead of the 16-bit Block count register."]
    #[inline(always)]
    pub fn blockcnt_sdmasa(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xffffffff,
        1,
        0,
        u32,
        u32,
        EmmcSdmasaRReg_SPEC,
        crate::common::RW,
    > {
        crate::common::RegisterField::<
            0,
            0xffffffff,
            1,
            0,
            u32,
            u32,
            EmmcSdmasaRReg_SPEC,
            crate::common::RW,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcSdmasaRReg {
    #[inline(always)]
    fn default() -> EmmcSdmasaRReg {
        <crate::RegValueT<EmmcSdmasaRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register indicates the Interrupt status of each slot."]
pub type EmmcSlotIntrStatusRReg = crate::RegValueT<EmmcSlotIntrStatusRReg_SPEC>;

impl EmmcSlotIntrStatusRReg {
    #[doc = "Interrupt signal for each Slot     \n\nThese status bits indicate the logical OR of Interrupt signal and Wakeup signal for each slot. A maximum of 8 slots can be defined. If one interrupt signal is associated with multiple slots, the Host\nDriver can identify the interrupt that is generated by reading these bits. By a power on reset or by setting Software Reset For All bit, the interrupt signals are de-asserted and this status reads 00h.\n- Bit 00: Slot 1\n- Bit 01: Slot 2\n- Bit 02: Slot 3\n- ..........\n- ..........\n- Bit 07: Slot 8\n\nNote: MSHC Host Controller support single card slot. This register shall always return 0."]
    #[inline(always)]
    pub fn intr_slot(
        self,
    ) -> crate::common::RegisterField<
        0,
        0xff,
        1,
        0,
        u8,
        u8,
        EmmcSlotIntrStatusRReg_SPEC,
        crate::common::R,
    > {
        crate::common::RegisterField::<
            0,
            0xff,
            1,
            0,
            u8,
            u8,
            EmmcSlotIntrStatusRReg_SPEC,
            crate::common::R,
        >::from_register(self, 0)
    }
}
impl ::core::default::Default for EmmcSlotIntrStatusRReg {
    #[inline(always)]
    fn default() -> EmmcSlotIntrStatusRReg {
        <crate::RegValueT<EmmcSlotIntrStatusRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to generate a reset pulse by writing 1 to each bit of this register. After completing the reset, the Host"]
pub type EmmcSwRstRReg = crate::RegValueT<EmmcSwRstRReg_SPEC>;

impl EmmcSwRstRReg {
    #[doc = "Software Reset For DAT line.\nThis bit is used in SD/eMMC mode and it resets only a part of the data circuit and the DMA circuit is also reset.\nThe following registers and bits are cleared by this bit:\n- Buffer Data Port register\n-- Buffer is cleared and initialized.  \n- Present state register\n-- Buffer Read Enable\n-- Buffer Write Enable\n-- Read Transfer Active\n-- Write Transfer Active\n-- DAT Line Active\n-- Command Inhibit (DAT)\n- Block Gap Control register\n-- Continue Request \n-- Stop At Block Gap Request\n- Normal Interrupt status register\n-- Buffer Read Ready\n-- Buffer Write Ready\n-- DMA Interrupt\n-- Block Gap Event\n-- Transfer Complete\n\nValues:\n0x0 (FALSE): Work\n0x1 (TRUE): Reset"]
    #[inline(always)]
    pub fn sw_rst_dat(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcSwRstRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,EmmcSwRstRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Software Reset For CMD line.\nThis bit resets only a part of the command circuit to be able to issue a command.  This reset is effective only for a command issuing circuit (including response error statuses related to Command Inhibit (CMD) control) and does not affect the data transfer circuit. Host Controller can continue data transfer even after this reset is executed while handling subcommand-response errors.\nThe following registers and bits are cleared by this bit:\n- Present State register : Command Inhibit (CMD) bit\n- Normal Interrupt Status register : Command Complete bit\n- Error Interrupt Status : Response error statuses related to Command Inhibit (CMD) bit\n\nValues:\n0x0 (FALSE): Work\n0x1 (TRUE): Reset"]
    #[inline(always)]
    pub fn sw_rst_cmd(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcSwRstRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,EmmcSwRstRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Software Reset For All.\nThis reset affects the entire Host Controller except for the card detection circuit. During its initialization, the Host Driver sets this bit to 1 to reset the Host Controller. All registers are reset except the capabilities register. If this bit is set to 1, the Host Driver must issue reset command and reinitialize the card.\n\nValues:\n0x0 (FALSE): Work\n0x1 (TRUE): Reset"]
    #[inline(always)]
    pub fn sw_rst_all(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcSwRstRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcSwRstRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcSwRstRReg {
    #[inline(always)]
    fn default() -> EmmcSwRstRReg {
        <crate::RegValueT<EmmcSwRstRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to set the Data Timeout Counter value for an SD/eMMC mode according to the timer clock defined by the Cap"]
pub type EmmcToutCtrlRReg = crate::RegValueT<EmmcToutCtrlRReg_SPEC>;

impl EmmcToutCtrlRReg {
    #[doc = "Data Timeout Counter Value.\nThis value determines the interval by which DAT line timeouts are detected. The Timeout clock frequency is generated by dividing the base clock TMCLK value by this value. When setting this\nregister, prevent inadvertent timeout events by clearing the Data Timeout Error Status Enable (in the Error Interrupt Status Enable register).\nThe values for these bits are:\n- 0xF :  Reserved\n- 0xE : TMCLK x 2^27\n- 0x1 : TMCLK x 2^14\n- 0x0 : TMCLK x 2^13\nNote: During a boot operating in an eMMC mode, an application must configure the boot data timeout value (approximately 1 sec) in this bit."]
    #[inline(always)]
    pub fn tout_cnt(
        self,
    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, EmmcToutCtrlRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<0,0xf,1,0,u8,u8,EmmcToutCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcToutCtrlRReg {
    #[inline(always)]
    fn default() -> EmmcToutCtrlRReg {
        <crate::RegValueT<EmmcToutCtrlRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is mandatory for the Host Controller, but the wakeup functionality depends on the Host Controller system hardware"]
pub type EmmcWupCtrlRReg = crate::RegValueT<EmmcWupCtrlRReg_SPEC>;

impl EmmcWupCtrlRReg {
    #[doc = "Wakeup Event Enable on SD Card Removal.\nThis bit enables wakeup event through Card Removal assertion in the Normal Interrupt Status register. For the SDIO card, Wake Up Support (FN_WUS) in the Card Information Structure (CIS) register does not affect this bit.\n\nValues:\n\n0x0 (DISABLED): Disable\n0x1 (ENABLED): Enable"]
    #[inline(always)]
    pub fn card_removal(
        self,
    ) -> crate::common::RegisterFieldBool<2, 1, 0, EmmcWupCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<2,1,0,EmmcWupCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Wakeup Event Enable on SD Card Insertion.\nThis bit enables wakeup event through Card Insertion assertion in the Normal Interrupt Status register. FN_WUS (Wake Up Support) in CIS does not affect this bit.\n\nValues:\n0x0 (DISABLED): Disable\n0x1 (ENABLED): Enable"]
    #[inline(always)]
    pub fn card_insert(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcWupCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,EmmcWupCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Wakeup Event Enable on Card Interrupt.\nThis bit enables wakeup event through a Card Interrupt assertion in the Normal Interrupt Status register. This bit can be set to 1 if FN_WUS (Wake Up Support) in CIS is set to 1.\n\nValues:\n0x0 (DISABLED): Disable\n0x1 (ENABLED): Enable"]
    #[inline(always)]
    pub fn card_int(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcWupCtrlRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcWupCtrlRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcWupCtrlRReg {
    #[inline(always)]
    fn default() -> EmmcWupCtrlRReg {
        <crate::RegValueT<EmmcWupCtrlRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}

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

#[doc = "This register is used to control the operation of data transfers for an SD/eMMC mode. The Host driver sets this register before"]
pub type EmmcXferModeRReg = crate::RegValueT<EmmcXferModeRReg_SPEC>;

impl EmmcXferModeRReg {
    #[doc = "Response Interrupt Disable.\nThe Host Controller supports response check function to avoid overhead of response error check by the Host driver. Response types of only R1 and R5 can be checked by the Controller.\nIf Host Driver checks the response error, set this bit to 0 and wait for Command Complete Interrupt and then check\nthe response register.\nIf the Host Controller checks the response error, set this bit to 1 and set the Response Error Check Enable bit to 1. The Command Complete Interrupt is disabled by this bit\nregardless of the Command Complete Signal Enable.\nNote: During tuning (when the Execute Tuning bit in the Host Control2 register is set), the Command Complete Interrupt is not generated irrespective of the Response Interrupt Disable setting.\n\nValues:\n0x0 (ENABLED): Response Interrupt is enabled\n0x1 (DISABLED): Response Interrupt is disabled"]
    #[inline(always)]
    pub fn resp_int_disable(
        self,
    ) -> crate::common::RegisterFieldBool<8, 1, 0, EmmcXferModeRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<8,1,0,EmmcXferModeRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Response Error Check Enable.\nThe Host Controller supports response check function to avoid overhead of response error check by Host driver. Response types of only R1 and R5 can be checked by the Controller.\nIf the Host Controller checks the response error, set this bit to 1 and set Response Interrupt Disable to 1. If an error is detected, the Response Error interrupt is generated in the Error Interrupt Status register.\nNote:\n- Response error check must not be enabled for any response type other than R1 and R5.\n- Response check must not be enabled for the tuning command.\n\nValues:\n0x0 (DISABLED): Response Error Check is disabled\n0x1 (ENABLED): Response Error Check is enabled"]
    #[inline(always)]
    pub fn resp_err_chk_enable(
        self,
    ) -> crate::common::RegisterFieldBool<7, 1, 0, EmmcXferModeRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<7,1,0,EmmcXferModeRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Response Type R1/R5.\nThis bit selects either R1 or R5 as a response type when the Response Error Check is selected.\nError statuses checked in R1:\n- OUT_OF_RANGE\n- ADDRESS_ERROR\n- BLOCK_LEN_ERROR\n- WP_VIOLATION\n- CARD_IS_LOCKED\n- COM_CRC_ERROR\n- CARD_ECC_FAILED\n- CC_ERROR\n- ERROR\nResponse Flags checked in R5:\n- COM_CRC_ERROR\n- ERROR\n- FUNCTION_NUMBER\n- OUT_OF_RANGE\n\nValues:\n0x0 (RESP_R1): R1 (Memory)\n0x1 (RESP_R5): R5 (SDIO)"]
    #[inline(always)]
    pub fn resp_type(
        self,
    ) -> crate::common::RegisterFieldBool<6, 1, 0, EmmcXferModeRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<6,1,0,EmmcXferModeRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Multi/Single Block Select.\nThis bit is set when issuing multiple-block transfer commands using the DAT line. If this bit is set to 0, it is not necessary to set the Block Count register.\n\nValues:\n0x0 (SINGLE): Single Block\n0x1 (MULTI): Multiple Block"]
    #[inline(always)]
    pub fn multi_blk_sel(
        self,
    ) -> crate::common::RegisterFieldBool<5, 1, 0, EmmcXferModeRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<5,1,0,EmmcXferModeRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Data Transfer Direction Select.\nThis bit defines the direction of DAT line data transfers. This bit is set to 1 by the Host Driver to transfer data\nfrom the SD/eMMC card to the Host Controller and it is set to 0 for all other commands.\n\nValues:\n0x1 (READ): Read (Card to Host)\n0x0 (WRITE): Write (Host to Card)"]
    #[inline(always)]
    pub fn data_xfer_dir(
        self,
    ) -> crate::common::RegisterFieldBool<4, 1, 0, EmmcXferModeRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<4,1,0,EmmcXferModeRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Auto Command Enable.\nThis field determines use of Auto Command functions.\nNote: In SDIO, this field must be set as 00b (Auto Command Disabled).\n\nValues:\n0x0 (AUTO_CMD_DISABLED): Auto Command Disabled\n0x1 (AUTO_CMD12_ENABLED): Auto CMD12 Enable\n0x2 (AUTO_CMD23_ENABLED): Auto CMD23 Enable\n0x3 (AUTO_CMD_AUTO_SEL): Auto CMD Auto Select"]
    #[inline(always)]
    pub fn auto_cmd_enable(
        self,
    ) -> crate::common::RegisterField<2, 0x3, 1, 0, u8, u8, EmmcXferModeRReg_SPEC, crate::common::RW>
    {
        crate::common::RegisterField::<2,0x3,1,0,u8,u8,EmmcXferModeRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "Block Count Enable.\nThis bit is used to enable the Block Count register, which is relevant for multiple block transfers.\nIf this bit is set to 0, the Block Count register is disabled, which is useful in executing an infinite transfer. The Host Driver must set this bit to 0 when ADMA is used.\n\nValues:\n0x1 (ENABLED): Enable\n0x0 (DISABLED): Disable"]
    #[inline(always)]
    pub fn block_count_enable(
        self,
    ) -> crate::common::RegisterFieldBool<1, 1, 0, EmmcXferModeRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<1,1,0,EmmcXferModeRReg_SPEC,crate::common::RW>::from_register(self,0)
    }

    #[doc = "DMA Enable.\nThis bit enables the DMA functionality. If this bit is set to 1, a DMA operation begins when the Host Driver writes to the Command register. You can select one of the DMA modes by using DMA Select in the Host Control 1 register.\n\nValues:\n0x1 (ENABLED): DMA Data transfer\n0x0 (DISABLED): No data transfer or Non-DMA data\ntransfer"]
    #[inline(always)]
    pub fn dma_en_emmc(
        self,
    ) -> crate::common::RegisterFieldBool<0, 1, 0, EmmcXferModeRReg_SPEC, crate::common::RW> {
        crate::common::RegisterFieldBool::<0,1,0,EmmcXferModeRReg_SPEC,crate::common::RW>::from_register(self,0)
    }
}
impl ::core::default::Default for EmmcXferModeRReg {
    #[inline(always)]
    fn default() -> EmmcXferModeRReg {
        <crate::RegValueT<EmmcXferModeRReg_SPEC> as RegisterValue<_>>::new(0)
    }
}