summaryrefslogtreecommitdiff
path: root/tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_MCU_K64F/device/device/MK64F12/MK64F12_sdhc.h
blob: 2aa434bf961444f755cccdc87506f5b627d00b51 (plain)
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
/*
** ###################################################################
**     Compilers:           Keil ARM C/C++ Compiler
**                          Freescale C/C++ for Embedded ARM
**                          GNU C Compiler
**                          IAR ANSI C/C++ Compiler for ARM
**
**     Reference manual:    K64P144M120SF5RM, Rev.2, January 2014
**     Version:             rev. 2.5, 2014-02-10
**     Build:               b140604
**
**     Abstract:
**         Extension to the CMSIS register access layer header.
**
**     Copyright (c) 2014 Freescale Semiconductor, Inc.
**     All rights reserved.
**
**     Redistribution and use in source and binary forms, with or without modification,
**     are permitted provided that the following conditions are met:
**
**     o Redistributions of source code must retain the above copyright notice, this list
**       of conditions and the following disclaimer.
**
**     o Redistributions in binary form must reproduce the above copyright notice, this
**       list of conditions and the following disclaimer in the documentation and/or
**       other materials provided with the distribution.
**
**     o Neither the name of Freescale Semiconductor, Inc. nor the names of its
**       contributors may be used to endorse or promote products derived from this
**       software without specific prior written permission.
**
**     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
**     ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
**     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
**     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
**     ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
**     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
**     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
**     ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
**     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
**     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
**     http:                 www.freescale.com
**     mail:                 support@freescale.com
**
**     Revisions:
**     - rev. 1.0 (2013-08-12)
**         Initial version.
**     - rev. 2.0 (2013-10-29)
**         Register accessor macros added to the memory map.
**         Symbols for Processor Expert memory map compatibility added to the memory map.
**         Startup file for gcc has been updated according to CMSIS 3.2.
**         System initialization updated.
**         MCG - registers updated.
**         PORTA, PORTB, PORTC, PORTE - registers for digital filter removed.
**     - rev. 2.1 (2013-10-30)
**         Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled.
**     - rev. 2.2 (2013-12-09)
**         DMA - EARS register removed.
**         AIPS0, AIPS1 - MPRA register updated.
**     - rev. 2.3 (2014-01-24)
**         Update according to reference manual rev. 2
**         ENET, MCG, MCM, SIM, USB - registers updated
**     - rev. 2.4 (2014-02-10)
**         The declaration of clock configurations has been moved to separate header file system_MK64F12.h
**         Update of SystemInit() and SystemCoreClockUpdate() functions.
**     - rev. 2.5 (2014-02-10)
**         The declaration of clock configurations has been moved to separate header file system_MK64F12.h
**         Update of SystemInit() and SystemCoreClockUpdate() functions.
**         Module access macro module_BASES replaced by module_BASE_PTRS.
**
** ###################################################################
*/

/*
 * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
 *
 * This file was generated automatically and any changes may be lost.
 */
#ifndef __HW_SDHC_REGISTERS_H__
#define __HW_SDHC_REGISTERS_H__

#include "MK64F12.h"
#include "fsl_bitaccess.h"

/*
 * MK64F12 SDHC
 *
 * Secured Digital Host Controller
 *
 * Registers defined in this header file:
 * - HW_SDHC_DSADDR - DMA System Address register
 * - HW_SDHC_BLKATTR - Block Attributes register
 * - HW_SDHC_CMDARG - Command Argument register
 * - HW_SDHC_XFERTYP - Transfer Type register
 * - HW_SDHC_CMDRSP0 - Command Response 0
 * - HW_SDHC_CMDRSP1 - Command Response 1
 * - HW_SDHC_CMDRSP2 - Command Response 2
 * - HW_SDHC_CMDRSP3 - Command Response 3
 * - HW_SDHC_DATPORT - Buffer Data Port register
 * - HW_SDHC_PRSSTAT - Present State register
 * - HW_SDHC_PROCTL - Protocol Control register
 * - HW_SDHC_SYSCTL - System Control register
 * - HW_SDHC_IRQSTAT - Interrupt Status register
 * - HW_SDHC_IRQSTATEN - Interrupt Status Enable register
 * - HW_SDHC_IRQSIGEN - Interrupt Signal Enable register
 * - HW_SDHC_AC12ERR - Auto CMD12 Error Status Register
 * - HW_SDHC_HTCAPBLT - Host Controller Capabilities
 * - HW_SDHC_WML - Watermark Level Register
 * - HW_SDHC_FEVT - Force Event register
 * - HW_SDHC_ADMAES - ADMA Error Status register
 * - HW_SDHC_ADSADDR - ADMA System Addressregister
 * - HW_SDHC_VENDOR - Vendor Specific register
 * - HW_SDHC_MMCBOOT - MMC Boot register
 * - HW_SDHC_HOSTVER - Host Controller Version
 *
 * - hw_sdhc_t - Struct containing all module registers.
 */

#define HW_SDHC_INSTANCE_COUNT (1U) /*!< Number of instances of the SDHC module. */

/*******************************************************************************
 * HW_SDHC_DSADDR - DMA System Address register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_DSADDR - DMA System Address register (RW)
 *
 * Reset value: 0x00000000U
 *
 * This register contains the physical system memory address used for DMA
 * transfers.
 */
typedef union _hw_sdhc_dsaddr
{
    uint32_t U;
    struct _hw_sdhc_dsaddr_bitfields
    {
        uint32_t RESERVED0 : 2;        /*!< [1:0]  */
        uint32_t DSADDR : 30;          /*!< [31:2] DMA System Address */
    } B;
} hw_sdhc_dsaddr_t;

/*!
 * @name Constants and macros for entire SDHC_DSADDR register
 */
/*@{*/
#define HW_SDHC_DSADDR_ADDR(x)   ((x) + 0x0U)

#define HW_SDHC_DSADDR(x)        (*(__IO hw_sdhc_dsaddr_t *) HW_SDHC_DSADDR_ADDR(x))
#define HW_SDHC_DSADDR_RD(x)     (HW_SDHC_DSADDR(x).U)
#define HW_SDHC_DSADDR_WR(x, v)  (HW_SDHC_DSADDR(x).U = (v))
#define HW_SDHC_DSADDR_SET(x, v) (HW_SDHC_DSADDR_WR(x, HW_SDHC_DSADDR_RD(x) |  (v)))
#define HW_SDHC_DSADDR_CLR(x, v) (HW_SDHC_DSADDR_WR(x, HW_SDHC_DSADDR_RD(x) & ~(v)))
#define HW_SDHC_DSADDR_TOG(x, v) (HW_SDHC_DSADDR_WR(x, HW_SDHC_DSADDR_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_DSADDR bitfields
 */

/*!
 * @name Register SDHC_DSADDR, field DSADDR[31:2] (RW)
 *
 * Contains the 32-bit system memory address for a DMA transfer. Because the
 * address must be word (4 bytes) align, the least 2 bits are reserved, always 0.
 * When the SDHC stops a DMA transfer, this register points to the system address
 * of the next contiguous data position. It can be accessed only when no
 * transaction is executing, that is, after a transaction has stopped. Read operation
 * during transfers may return an invalid value. The host driver shall initialize
 * this register before starting a DMA transaction. After DMA has stopped, the
 * system address of the next contiguous data position can be read from this register.
 * This register is protected during a data transfer. When data lines are
 * active, write to this register is ignored. The host driver shall wait, until
 * PRSSTAT[DLA] is cleared, before writing to this register. The SDHC internal DMA does
 * not support a virtual memory system. It supports only continuous physical
 * memory access. And due to AHB burst limitations, if the burst must cross the 1 KB
 * boundary, SDHC will automatically change SEQ burst type to NSEQ. Because this
 * register supports dynamic address reflecting, when IRQSTAT[TC] bit is set, it
 * automatically alters the value of internal address counter, so SW cannot
 * change this register when IRQSTAT[TC] is set.
 */
/*@{*/
#define BP_SDHC_DSADDR_DSADDR (2U)         /*!< Bit position for SDHC_DSADDR_DSADDR. */
#define BM_SDHC_DSADDR_DSADDR (0xFFFFFFFCU) /*!< Bit mask for SDHC_DSADDR_DSADDR. */
#define BS_SDHC_DSADDR_DSADDR (30U)        /*!< Bit field size in bits for SDHC_DSADDR_DSADDR. */

/*! @brief Read current value of the SDHC_DSADDR_DSADDR field. */
#define BR_SDHC_DSADDR_DSADDR(x) (HW_SDHC_DSADDR(x).B.DSADDR)

/*! @brief Format value for bitfield SDHC_DSADDR_DSADDR. */
#define BF_SDHC_DSADDR_DSADDR(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_DSADDR_DSADDR) & BM_SDHC_DSADDR_DSADDR)

/*! @brief Set the DSADDR field to a new value. */
#define BW_SDHC_DSADDR_DSADDR(x, v) (HW_SDHC_DSADDR_WR(x, (HW_SDHC_DSADDR_RD(x) & ~BM_SDHC_DSADDR_DSADDR) | BF_SDHC_DSADDR_DSADDR(v)))
/*@}*/

/*******************************************************************************
 * HW_SDHC_BLKATTR - Block Attributes register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_BLKATTR - Block Attributes register (RW)
 *
 * Reset value: 0x00000000U
 *
 * This register is used to configure the number of data blocks and the number
 * of bytes in each block.
 */
typedef union _hw_sdhc_blkattr
{
    uint32_t U;
    struct _hw_sdhc_blkattr_bitfields
    {
        uint32_t BLKSIZE : 13;         /*!< [12:0] Transfer Block Size */
        uint32_t RESERVED0 : 3;        /*!< [15:13]  */
        uint32_t BLKCNT : 16;          /*!< [31:16] Blocks Count For Current Transfer
                                        * */
    } B;
} hw_sdhc_blkattr_t;

/*!
 * @name Constants and macros for entire SDHC_BLKATTR register
 */
/*@{*/
#define HW_SDHC_BLKATTR_ADDR(x)  ((x) + 0x4U)

#define HW_SDHC_BLKATTR(x)       (*(__IO hw_sdhc_blkattr_t *) HW_SDHC_BLKATTR_ADDR(x))
#define HW_SDHC_BLKATTR_RD(x)    (HW_SDHC_BLKATTR(x).U)
#define HW_SDHC_BLKATTR_WR(x, v) (HW_SDHC_BLKATTR(x).U = (v))
#define HW_SDHC_BLKATTR_SET(x, v) (HW_SDHC_BLKATTR_WR(x, HW_SDHC_BLKATTR_RD(x) |  (v)))
#define HW_SDHC_BLKATTR_CLR(x, v) (HW_SDHC_BLKATTR_WR(x, HW_SDHC_BLKATTR_RD(x) & ~(v)))
#define HW_SDHC_BLKATTR_TOG(x, v) (HW_SDHC_BLKATTR_WR(x, HW_SDHC_BLKATTR_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_BLKATTR bitfields
 */

/*!
 * @name Register SDHC_BLKATTR, field BLKSIZE[12:0] (RW)
 *
 * Specifies the block size for block data transfers. Values ranging from 1 byte
 * up to the maximum buffer size can be set. It can be accessed only when no
 * transaction is executing, that is, after a transaction has stopped. Read
 * operations during transfers may return an invalid value, and write operations will be
 * ignored.
 *
 * Values:
 * - 0 - No data transfer.
 * - 1 - 1 Byte
 * - 10 - 2 Bytes
 * - 11 - 3 Bytes
 * - 100 - 4 Bytes
 * - 111111111 - 511 Bytes
 * - 1000000000 - 512 Bytes
 * - 100000000000 - 2048 Bytes
 * - 1000000000000 - 4096 Bytes
 */
/*@{*/
#define BP_SDHC_BLKATTR_BLKSIZE (0U)       /*!< Bit position for SDHC_BLKATTR_BLKSIZE. */
#define BM_SDHC_BLKATTR_BLKSIZE (0x00001FFFU) /*!< Bit mask for SDHC_BLKATTR_BLKSIZE. */
#define BS_SDHC_BLKATTR_BLKSIZE (13U)      /*!< Bit field size in bits for SDHC_BLKATTR_BLKSIZE. */

/*! @brief Read current value of the SDHC_BLKATTR_BLKSIZE field. */
#define BR_SDHC_BLKATTR_BLKSIZE(x) (HW_SDHC_BLKATTR(x).B.BLKSIZE)

/*! @brief Format value for bitfield SDHC_BLKATTR_BLKSIZE. */
#define BF_SDHC_BLKATTR_BLKSIZE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_BLKATTR_BLKSIZE) & BM_SDHC_BLKATTR_BLKSIZE)

/*! @brief Set the BLKSIZE field to a new value. */
#define BW_SDHC_BLKATTR_BLKSIZE(x, v) (HW_SDHC_BLKATTR_WR(x, (HW_SDHC_BLKATTR_RD(x) & ~BM_SDHC_BLKATTR_BLKSIZE) | BF_SDHC_BLKATTR_BLKSIZE(v)))
/*@}*/

/*!
 * @name Register SDHC_BLKATTR, field BLKCNT[31:16] (RW)
 *
 * This register is enabled when XFERTYP[BCEN] is set to 1 and is valid only for
 * multiple block transfers. For single block transfer, this register will
 * always read as 1. The host driver shall set this register to a value between 1 and
 * the maximum block count. The SDHC decrements the block count after each block
 * transfer and stops when the count reaches zero. Setting the block count to 0
 * results in no data blocks being transferred. This register must be accessed
 * only when no transaction is executing, that is, after transactions are stopped.
 * During data transfer, read operations on this register may return an invalid
 * value and write operations are ignored. When saving transfer content as a result
 * of a suspend command, the number of blocks yet to be transferred can be
 * determined by reading this register. The reading of this register must be applied
 * after transfer is paused by stop at block gap operation and before sending the
 * command marked as suspend. This is because when suspend command is sent out,
 * SDHC will regard the current transfer as aborted and change BLKCNT back to its
 * original value instead of keeping the dynamical indicator of remained block
 * count. When restoring transfer content prior to issuing a resume command, the
 * host driver shall restore the previously saved block count. Although the BLKCNT
 * field is 0 after reset, the read of reset value is 0x1. This is because when
 * XFERTYP[MSBSEL] is 0, indicating a single block transfer, the read value of
 * BLKCNT is always 1.
 *
 * Values:
 * - 0 - Stop count.
 * - 1 - 1 block
 * - 10 - 2 blocks
 * - 1111111111111111 - 65535 blocks
 */
/*@{*/
#define BP_SDHC_BLKATTR_BLKCNT (16U)       /*!< Bit position for SDHC_BLKATTR_BLKCNT. */
#define BM_SDHC_BLKATTR_BLKCNT (0xFFFF0000U) /*!< Bit mask for SDHC_BLKATTR_BLKCNT. */
#define BS_SDHC_BLKATTR_BLKCNT (16U)       /*!< Bit field size in bits for SDHC_BLKATTR_BLKCNT. */

/*! @brief Read current value of the SDHC_BLKATTR_BLKCNT field. */
#define BR_SDHC_BLKATTR_BLKCNT(x) (HW_SDHC_BLKATTR(x).B.BLKCNT)

/*! @brief Format value for bitfield SDHC_BLKATTR_BLKCNT. */
#define BF_SDHC_BLKATTR_BLKCNT(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_BLKATTR_BLKCNT) & BM_SDHC_BLKATTR_BLKCNT)

/*! @brief Set the BLKCNT field to a new value. */
#define BW_SDHC_BLKATTR_BLKCNT(x, v) (HW_SDHC_BLKATTR_WR(x, (HW_SDHC_BLKATTR_RD(x) & ~BM_SDHC_BLKATTR_BLKCNT) | BF_SDHC_BLKATTR_BLKCNT(v)))
/*@}*/

/*******************************************************************************
 * HW_SDHC_CMDARG - Command Argument register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_CMDARG - Command Argument register (RW)
 *
 * Reset value: 0x00000000U
 *
 * This register contains the SD/MMC command argument.
 */
typedef union _hw_sdhc_cmdarg
{
    uint32_t U;
    struct _hw_sdhc_cmdarg_bitfields
    {
        uint32_t CMDARG : 32;          /*!< [31:0] Command Argument */
    } B;
} hw_sdhc_cmdarg_t;

/*!
 * @name Constants and macros for entire SDHC_CMDARG register
 */
/*@{*/
#define HW_SDHC_CMDARG_ADDR(x)   ((x) + 0x8U)

#define HW_SDHC_CMDARG(x)        (*(__IO hw_sdhc_cmdarg_t *) HW_SDHC_CMDARG_ADDR(x))
#define HW_SDHC_CMDARG_RD(x)     (HW_SDHC_CMDARG(x).U)
#define HW_SDHC_CMDARG_WR(x, v)  (HW_SDHC_CMDARG(x).U = (v))
#define HW_SDHC_CMDARG_SET(x, v) (HW_SDHC_CMDARG_WR(x, HW_SDHC_CMDARG_RD(x) |  (v)))
#define HW_SDHC_CMDARG_CLR(x, v) (HW_SDHC_CMDARG_WR(x, HW_SDHC_CMDARG_RD(x) & ~(v)))
#define HW_SDHC_CMDARG_TOG(x, v) (HW_SDHC_CMDARG_WR(x, HW_SDHC_CMDARG_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_CMDARG bitfields
 */

/*!
 * @name Register SDHC_CMDARG, field CMDARG[31:0] (RW)
 *
 * The SD/MMC command argument is specified as bits 39-8 of the command format
 * in the SD or MMC specification. This register is write protected when
 * PRSSTAT[CDIHB0] is set.
 */
/*@{*/
#define BP_SDHC_CMDARG_CMDARG (0U)         /*!< Bit position for SDHC_CMDARG_CMDARG. */
#define BM_SDHC_CMDARG_CMDARG (0xFFFFFFFFU) /*!< Bit mask for SDHC_CMDARG_CMDARG. */
#define BS_SDHC_CMDARG_CMDARG (32U)        /*!< Bit field size in bits for SDHC_CMDARG_CMDARG. */

/*! @brief Read current value of the SDHC_CMDARG_CMDARG field. */
#define BR_SDHC_CMDARG_CMDARG(x) (HW_SDHC_CMDARG(x).U)

/*! @brief Format value for bitfield SDHC_CMDARG_CMDARG. */
#define BF_SDHC_CMDARG_CMDARG(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_CMDARG_CMDARG) & BM_SDHC_CMDARG_CMDARG)

/*! @brief Set the CMDARG field to a new value. */
#define BW_SDHC_CMDARG_CMDARG(x, v) (HW_SDHC_CMDARG_WR(x, v))
/*@}*/

/*******************************************************************************
 * HW_SDHC_XFERTYP - Transfer Type register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_XFERTYP - Transfer Type register (RW)
 *
 * Reset value: 0x00000000U
 *
 * This register is used to control the operation of data transfers. The host
 * driver shall set this register before issuing a command followed by a data
 * transfer, or before issuing a resume command. To prevent data loss, the SDHC
 * prevents writing to the bits that are involved in the data transfer of this
 * register, when data transfer is active. These bits are DPSEL, MBSEL, DTDSEL, AC12EN,
 * BCEN, and DMAEN. The host driver shall check PRSSTAT[CDIHB] and PRSSTAT[CIHB]
 * before writing to this register. When PRSSTAT[CDIHB] is set, any attempt to
 * send a command with data by writing to this register is ignored; when
 * PRSSTAT[CIHB] bit is set, any write to this register is ignored. On sending commands with
 * data transfer involved, it is mandatory that the block size is nonzero.
 * Besides, block count must also be nonzero, or indicated as single block transfer
 * (bit 5 of this register is 0 when written), or block count is disabled (bit 1 of
 * this register is 0 when written), otherwise SDHC will ignore the sending of
 * this command and do nothing. For write command, with all above restrictions, it
 * is also mandatory that the write protect switch is not active (WPSPL bit of
 * Present State Register is 1), otherwise SDHC will also ignore the command. If
 * the commands with data transfer does not receive the response in 64 clock
 * cycles, that is, response time-out, SDHC will regard the external device does not
 * accept the command and abort the data transfer. In this scenario, the driver
 * must issue the command again to retry the transfer. It is also possible that,
 * for some reason, the card responds to the command but SDHC does not receive the
 * response, and if it is internal DMA (either simple DMA or ADMA) read
 * operation, the external system memory is over-written by the internal DMA with data
 * sent back from the card. The following table shows the summary of how register
 * settings determine the type of data transfer. Transfer Type register setting for
 * various transfer types Multi/Single block select Block count enable Block
 * count Function 0 Don't care Don't care Single transfer 1 0 Don't care Infinite
 * transfer 1 1 Positive number Multiple transfer 1 1 Zero No data transfer The
 * following table shows the relationship between XFERTYP[CICEN] and XFERTYP[CCCEN],
 * in regards to XFERTYP[RSPTYP] as well as the name of the response type.
 * Relationship between parameters and the name of the response type Response type
 * (RSPTYP) Index check enable (CICEN) CRC check enable (CCCEN) Name of response
 * type 00 0 0 No Response 01 0 1 IR2 10 0 0 R3,R4 10 1 1 R1,R5,R6 11 1 1 R1b,R5b In
 * the SDIO specification, response type notation for R5b is not defined. R5
 * includes R5b in the SDIO specification. But R5b is defined in this specification
 * to specify that the SDHC will check the busy status after receiving a
 * response. For example, usually CMD52 is used with R5, but the I/O abort command shall
 * be used with R5b. The CRC field for R3 and R4 is expected to be all 1 bits.
 * The CRC check shall be disabled for these response types.
 */
typedef union _hw_sdhc_xfertyp
{
    uint32_t U;
    struct _hw_sdhc_xfertyp_bitfields
    {
        uint32_t DMAEN : 1;            /*!< [0] DMA Enable */
        uint32_t BCEN : 1;             /*!< [1] Block Count Enable */
        uint32_t AC12EN : 1;           /*!< [2] Auto CMD12 Enable */
        uint32_t RESERVED0 : 1;        /*!< [3]  */
        uint32_t DTDSEL : 1;           /*!< [4] Data Transfer Direction Select */
        uint32_t MSBSEL : 1;           /*!< [5] Multi/Single Block Select */
        uint32_t RESERVED1 : 10;       /*!< [15:6]  */
        uint32_t RSPTYP : 2;           /*!< [17:16] Response Type Select */
        uint32_t RESERVED2 : 1;        /*!< [18]  */
        uint32_t CCCEN : 1;            /*!< [19] Command CRC Check Enable */
        uint32_t CICEN : 1;            /*!< [20] Command Index Check Enable */
        uint32_t DPSEL : 1;            /*!< [21] Data Present Select */
        uint32_t CMDTYP : 2;           /*!< [23:22] Command Type */
        uint32_t CMDINX : 6;           /*!< [29:24] Command Index */
        uint32_t RESERVED3 : 2;        /*!< [31:30]  */
    } B;
} hw_sdhc_xfertyp_t;

/*!
 * @name Constants and macros for entire SDHC_XFERTYP register
 */
/*@{*/
#define HW_SDHC_XFERTYP_ADDR(x)  ((x) + 0xCU)

#define HW_SDHC_XFERTYP(x)       (*(__IO hw_sdhc_xfertyp_t *) HW_SDHC_XFERTYP_ADDR(x))
#define HW_SDHC_XFERTYP_RD(x)    (HW_SDHC_XFERTYP(x).U)
#define HW_SDHC_XFERTYP_WR(x, v) (HW_SDHC_XFERTYP(x).U = (v))
#define HW_SDHC_XFERTYP_SET(x, v) (HW_SDHC_XFERTYP_WR(x, HW_SDHC_XFERTYP_RD(x) |  (v)))
#define HW_SDHC_XFERTYP_CLR(x, v) (HW_SDHC_XFERTYP_WR(x, HW_SDHC_XFERTYP_RD(x) & ~(v)))
#define HW_SDHC_XFERTYP_TOG(x, v) (HW_SDHC_XFERTYP_WR(x, HW_SDHC_XFERTYP_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_XFERTYP bitfields
 */

/*!
 * @name Register SDHC_XFERTYP, field DMAEN[0] (RW)
 *
 * Enables DMA functionality. If this bit is set to 1, a DMA operation shall
 * begin when the host driver sets the DPSEL bit of this register. Whether the
 * simple DMA, or the advanced DMA, is active depends on PROCTL[DMAS].
 *
 * Values:
 * - 0 - Disable
 * - 1 - Enable
 */
/*@{*/
#define BP_SDHC_XFERTYP_DMAEN (0U)         /*!< Bit position for SDHC_XFERTYP_DMAEN. */
#define BM_SDHC_XFERTYP_DMAEN (0x00000001U) /*!< Bit mask for SDHC_XFERTYP_DMAEN. */
#define BS_SDHC_XFERTYP_DMAEN (1U)         /*!< Bit field size in bits for SDHC_XFERTYP_DMAEN. */

/*! @brief Read current value of the SDHC_XFERTYP_DMAEN field. */
#define BR_SDHC_XFERTYP_DMAEN(x) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_DMAEN))

/*! @brief Format value for bitfield SDHC_XFERTYP_DMAEN. */
#define BF_SDHC_XFERTYP_DMAEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_XFERTYP_DMAEN) & BM_SDHC_XFERTYP_DMAEN)

/*! @brief Set the DMAEN field to a new value. */
#define BW_SDHC_XFERTYP_DMAEN(x, v) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_DMAEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_XFERTYP, field BCEN[1] (RW)
 *
 * Used to enable the Block Count register, which is only relevant for multiple
 * block transfers. When this bit is 0, the internal counter for block is
 * disabled, which is useful in executing an infinite transfer.
 *
 * Values:
 * - 0 - Disable
 * - 1 - Enable
 */
/*@{*/
#define BP_SDHC_XFERTYP_BCEN (1U)          /*!< Bit position for SDHC_XFERTYP_BCEN. */
#define BM_SDHC_XFERTYP_BCEN (0x00000002U) /*!< Bit mask for SDHC_XFERTYP_BCEN. */
#define BS_SDHC_XFERTYP_BCEN (1U)          /*!< Bit field size in bits for SDHC_XFERTYP_BCEN. */

/*! @brief Read current value of the SDHC_XFERTYP_BCEN field. */
#define BR_SDHC_XFERTYP_BCEN(x) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_BCEN))

/*! @brief Format value for bitfield SDHC_XFERTYP_BCEN. */
#define BF_SDHC_XFERTYP_BCEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_XFERTYP_BCEN) & BM_SDHC_XFERTYP_BCEN)

/*! @brief Set the BCEN field to a new value. */
#define BW_SDHC_XFERTYP_BCEN(x, v) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_BCEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_XFERTYP, field AC12EN[2] (RW)
 *
 * Multiple block transfers for memory require a CMD12 to stop the transaction.
 * When this bit is set to 1, the SDHC will issue a CMD12 automatically when the
 * last block transfer has completed. The host driver shall not set this bit to
 * issue commands that do not require CMD12 to stop a multiple block data
 * transfer. In particular, secure commands defined in File Security Specification (see
 * reference list) do not require CMD12. In single block transfer, the SDHC will
 * ignore this bit whether it is set or not.
 *
 * Values:
 * - 0 - Disable
 * - 1 - Enable
 */
/*@{*/
#define BP_SDHC_XFERTYP_AC12EN (2U)        /*!< Bit position for SDHC_XFERTYP_AC12EN. */
#define BM_SDHC_XFERTYP_AC12EN (0x00000004U) /*!< Bit mask for SDHC_XFERTYP_AC12EN. */
#define BS_SDHC_XFERTYP_AC12EN (1U)        /*!< Bit field size in bits for SDHC_XFERTYP_AC12EN. */

/*! @brief Read current value of the SDHC_XFERTYP_AC12EN field. */
#define BR_SDHC_XFERTYP_AC12EN(x) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_AC12EN))

/*! @brief Format value for bitfield SDHC_XFERTYP_AC12EN. */
#define BF_SDHC_XFERTYP_AC12EN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_XFERTYP_AC12EN) & BM_SDHC_XFERTYP_AC12EN)

/*! @brief Set the AC12EN field to a new value. */
#define BW_SDHC_XFERTYP_AC12EN(x, v) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_AC12EN) = (v))
/*@}*/

/*!
 * @name Register SDHC_XFERTYP, field DTDSEL[4] (RW)
 *
 * Defines the direction of DAT line data transfers. The bit is set to 1 by the
 * host driver to transfer data from the SD card to the SDHC and is set to 0 for
 * all other commands.
 *
 * Values:
 * - 0 - Write host to card.
 * - 1 - Read card to host.
 */
/*@{*/
#define BP_SDHC_XFERTYP_DTDSEL (4U)        /*!< Bit position for SDHC_XFERTYP_DTDSEL. */
#define BM_SDHC_XFERTYP_DTDSEL (0x00000010U) /*!< Bit mask for SDHC_XFERTYP_DTDSEL. */
#define BS_SDHC_XFERTYP_DTDSEL (1U)        /*!< Bit field size in bits for SDHC_XFERTYP_DTDSEL. */

/*! @brief Read current value of the SDHC_XFERTYP_DTDSEL field. */
#define BR_SDHC_XFERTYP_DTDSEL(x) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_DTDSEL))

/*! @brief Format value for bitfield SDHC_XFERTYP_DTDSEL. */
#define BF_SDHC_XFERTYP_DTDSEL(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_XFERTYP_DTDSEL) & BM_SDHC_XFERTYP_DTDSEL)

/*! @brief Set the DTDSEL field to a new value. */
#define BW_SDHC_XFERTYP_DTDSEL(x, v) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_DTDSEL) = (v))
/*@}*/

/*!
 * @name Register SDHC_XFERTYP, field MSBSEL[5] (RW)
 *
 * Enables multiple block DAT line data transfers. For any other commands, this
 * bit shall be set to 0. If this bit is 0, it is not necessary to set the block
 * count register.
 *
 * Values:
 * - 0 - Single block.
 * - 1 - Multiple blocks.
 */
/*@{*/
#define BP_SDHC_XFERTYP_MSBSEL (5U)        /*!< Bit position for SDHC_XFERTYP_MSBSEL. */
#define BM_SDHC_XFERTYP_MSBSEL (0x00000020U) /*!< Bit mask for SDHC_XFERTYP_MSBSEL. */
#define BS_SDHC_XFERTYP_MSBSEL (1U)        /*!< Bit field size in bits for SDHC_XFERTYP_MSBSEL. */

/*! @brief Read current value of the SDHC_XFERTYP_MSBSEL field. */
#define BR_SDHC_XFERTYP_MSBSEL(x) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_MSBSEL))

/*! @brief Format value for bitfield SDHC_XFERTYP_MSBSEL. */
#define BF_SDHC_XFERTYP_MSBSEL(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_XFERTYP_MSBSEL) & BM_SDHC_XFERTYP_MSBSEL)

/*! @brief Set the MSBSEL field to a new value. */
#define BW_SDHC_XFERTYP_MSBSEL(x, v) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_MSBSEL) = (v))
/*@}*/

/*!
 * @name Register SDHC_XFERTYP, field RSPTYP[17:16] (RW)
 *
 * Values:
 * - 00 - No response.
 * - 01 - Response length 136.
 * - 10 - Response length 48.
 * - 11 - Response length 48, check busy after response.
 */
/*@{*/
#define BP_SDHC_XFERTYP_RSPTYP (16U)       /*!< Bit position for SDHC_XFERTYP_RSPTYP. */
#define BM_SDHC_XFERTYP_RSPTYP (0x00030000U) /*!< Bit mask for SDHC_XFERTYP_RSPTYP. */
#define BS_SDHC_XFERTYP_RSPTYP (2U)        /*!< Bit field size in bits for SDHC_XFERTYP_RSPTYP. */

/*! @brief Read current value of the SDHC_XFERTYP_RSPTYP field. */
#define BR_SDHC_XFERTYP_RSPTYP(x) (HW_SDHC_XFERTYP(x).B.RSPTYP)

/*! @brief Format value for bitfield SDHC_XFERTYP_RSPTYP. */
#define BF_SDHC_XFERTYP_RSPTYP(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_XFERTYP_RSPTYP) & BM_SDHC_XFERTYP_RSPTYP)

/*! @brief Set the RSPTYP field to a new value. */
#define BW_SDHC_XFERTYP_RSPTYP(x, v) (HW_SDHC_XFERTYP_WR(x, (HW_SDHC_XFERTYP_RD(x) & ~BM_SDHC_XFERTYP_RSPTYP) | BF_SDHC_XFERTYP_RSPTYP(v)))
/*@}*/

/*!
 * @name Register SDHC_XFERTYP, field CCCEN[19] (RW)
 *
 * If this bit is set to 1, the SDHC shall check the CRC field in the response.
 * If an error is detected, it is reported as a Command CRC Error. If this bit is
 * set to 0, the CRC field is not checked. The number of bits checked by the CRC
 * field value changes according to the length of the response.
 *
 * Values:
 * - 0 - Disable
 * - 1 - Enable
 */
/*@{*/
#define BP_SDHC_XFERTYP_CCCEN (19U)        /*!< Bit position for SDHC_XFERTYP_CCCEN. */
#define BM_SDHC_XFERTYP_CCCEN (0x00080000U) /*!< Bit mask for SDHC_XFERTYP_CCCEN. */
#define BS_SDHC_XFERTYP_CCCEN (1U)         /*!< Bit field size in bits for SDHC_XFERTYP_CCCEN. */

/*! @brief Read current value of the SDHC_XFERTYP_CCCEN field. */
#define BR_SDHC_XFERTYP_CCCEN(x) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_CCCEN))

/*! @brief Format value for bitfield SDHC_XFERTYP_CCCEN. */
#define BF_SDHC_XFERTYP_CCCEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_XFERTYP_CCCEN) & BM_SDHC_XFERTYP_CCCEN)

/*! @brief Set the CCCEN field to a new value. */
#define BW_SDHC_XFERTYP_CCCEN(x, v) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_CCCEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_XFERTYP, field CICEN[20] (RW)
 *
 * If this bit is set to 1, the SDHC will check the index field in the response
 * to see if it has the same value as the command index. If it is not, it is
 * reported as a command index error. If this bit is set to 0, the index field is not
 * checked.
 *
 * Values:
 * - 0 - Disable
 * - 1 - Enable
 */
/*@{*/
#define BP_SDHC_XFERTYP_CICEN (20U)        /*!< Bit position for SDHC_XFERTYP_CICEN. */
#define BM_SDHC_XFERTYP_CICEN (0x00100000U) /*!< Bit mask for SDHC_XFERTYP_CICEN. */
#define BS_SDHC_XFERTYP_CICEN (1U)         /*!< Bit field size in bits for SDHC_XFERTYP_CICEN. */

/*! @brief Read current value of the SDHC_XFERTYP_CICEN field. */
#define BR_SDHC_XFERTYP_CICEN(x) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_CICEN))

/*! @brief Format value for bitfield SDHC_XFERTYP_CICEN. */
#define BF_SDHC_XFERTYP_CICEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_XFERTYP_CICEN) & BM_SDHC_XFERTYP_CICEN)

/*! @brief Set the CICEN field to a new value. */
#define BW_SDHC_XFERTYP_CICEN(x, v) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_CICEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_XFERTYP, field DPSEL[21] (RW)
 *
 * This bit is set to 1 to indicate that data is present and shall be
 * transferred using the DAT line. It is set to 0 for the following: Commands using only
 * the CMD line, for example: CMD52. Commands with no data transfer, but using the
 * busy signal on DAT[0] line, R1b or R5b, for example: CMD38. In resume command,
 * this bit shall be set, and other bits in this register shall be set the same
 * as when the transfer was initially launched. When the Write Protect switch is
 * on, that is, the WPSPL bit is active as 0, any command with a write operation
 * will be ignored. That is to say, when this bit is set, while the DTDSEL bit is
 * 0, writes to the register Transfer Type are ignored.
 *
 * Values:
 * - 0 - No data present.
 * - 1 - Data present.
 */
/*@{*/
#define BP_SDHC_XFERTYP_DPSEL (21U)        /*!< Bit position for SDHC_XFERTYP_DPSEL. */
#define BM_SDHC_XFERTYP_DPSEL (0x00200000U) /*!< Bit mask for SDHC_XFERTYP_DPSEL. */
#define BS_SDHC_XFERTYP_DPSEL (1U)         /*!< Bit field size in bits for SDHC_XFERTYP_DPSEL. */

/*! @brief Read current value of the SDHC_XFERTYP_DPSEL field. */
#define BR_SDHC_XFERTYP_DPSEL(x) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_DPSEL))

/*! @brief Format value for bitfield SDHC_XFERTYP_DPSEL. */
#define BF_SDHC_XFERTYP_DPSEL(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_XFERTYP_DPSEL) & BM_SDHC_XFERTYP_DPSEL)

/*! @brief Set the DPSEL field to a new value. */
#define BW_SDHC_XFERTYP_DPSEL(x, v) (BITBAND_ACCESS32(HW_SDHC_XFERTYP_ADDR(x), BP_SDHC_XFERTYP_DPSEL) = (v))
/*@}*/

/*!
 * @name Register SDHC_XFERTYP, field CMDTYP[23:22] (RW)
 *
 * There are three types of special commands: suspend, resume, and abort. These
 * bits shall be set to 00b for all other commands. Suspend command: If the
 * suspend command succeeds, the SDHC shall assume that the card bus has been released
 * and that it is possible to issue the next command which uses the DAT line.
 * Because the SDHC does not monitor the content of command response, it does not
 * know if the suspend command succeeded or not. It is the host driver's
 * responsibility to check the status of the suspend command and send another command
 * marked as suspend to inform the SDHC that a suspend command was successfully
 * issued. After the end bit of command is sent, the SDHC deasserts read wait for read
 * transactions and stops checking busy for write transactions. In 4-bit mode,
 * the interrupt cycle starts. If the suspend command fails, the SDHC will
 * maintain its current state, and the host driver shall restart the transfer by setting
 * PROCTL[CREQ]. Resume command: The host driver restarts the data transfer by
 * restoring the registers saved before sending the suspend command and then sends
 * the resume command. The SDHC will check for a pending busy state before
 * starting write transfers. Abort command: If this command is set when executing a
 * read transfer, the SDHC will stop reads to the buffer. If this command is set
 * when executing a write transfer, the SDHC will stop driving the DAT line. After
 * issuing the abort command, the host driver must issue a software reset (abort
 * transaction).
 *
 * Values:
 * - 00 - Normal other commands.
 * - 01 - Suspend CMD52 for writing bus suspend in CCCR.
 * - 10 - Resume CMD52 for writing function select in CCCR.
 * - 11 - Abort CMD12, CMD52 for writing I/O abort in CCCR.
 */
/*@{*/
#define BP_SDHC_XFERTYP_CMDTYP (22U)       /*!< Bit position for SDHC_XFERTYP_CMDTYP. */
#define BM_SDHC_XFERTYP_CMDTYP (0x00C00000U) /*!< Bit mask for SDHC_XFERTYP_CMDTYP. */
#define BS_SDHC_XFERTYP_CMDTYP (2U)        /*!< Bit field size in bits for SDHC_XFERTYP_CMDTYP. */

/*! @brief Read current value of the SDHC_XFERTYP_CMDTYP field. */
#define BR_SDHC_XFERTYP_CMDTYP(x) (HW_SDHC_XFERTYP(x).B.CMDTYP)

/*! @brief Format value for bitfield SDHC_XFERTYP_CMDTYP. */
#define BF_SDHC_XFERTYP_CMDTYP(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_XFERTYP_CMDTYP) & BM_SDHC_XFERTYP_CMDTYP)

/*! @brief Set the CMDTYP field to a new value. */
#define BW_SDHC_XFERTYP_CMDTYP(x, v) (HW_SDHC_XFERTYP_WR(x, (HW_SDHC_XFERTYP_RD(x) & ~BM_SDHC_XFERTYP_CMDTYP) | BF_SDHC_XFERTYP_CMDTYP(v)))
/*@}*/

/*!
 * @name Register SDHC_XFERTYP, field CMDINX[29:24] (RW)
 *
 * These bits shall be set to the command number that is specified in bits 45-40
 * of the command-format in the SD Memory Card Physical Layer Specification and
 * SDIO Card Specification.
 */
/*@{*/
#define BP_SDHC_XFERTYP_CMDINX (24U)       /*!< Bit position for SDHC_XFERTYP_CMDINX. */
#define BM_SDHC_XFERTYP_CMDINX (0x3F000000U) /*!< Bit mask for SDHC_XFERTYP_CMDINX. */
#define BS_SDHC_XFERTYP_CMDINX (6U)        /*!< Bit field size in bits for SDHC_XFERTYP_CMDINX. */

/*! @brief Read current value of the SDHC_XFERTYP_CMDINX field. */
#define BR_SDHC_XFERTYP_CMDINX(x) (HW_SDHC_XFERTYP(x).B.CMDINX)

/*! @brief Format value for bitfield SDHC_XFERTYP_CMDINX. */
#define BF_SDHC_XFERTYP_CMDINX(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_XFERTYP_CMDINX) & BM_SDHC_XFERTYP_CMDINX)

/*! @brief Set the CMDINX field to a new value. */
#define BW_SDHC_XFERTYP_CMDINX(x, v) (HW_SDHC_XFERTYP_WR(x, (HW_SDHC_XFERTYP_RD(x) & ~BM_SDHC_XFERTYP_CMDINX) | BF_SDHC_XFERTYP_CMDINX(v)))
/*@}*/

/*******************************************************************************
 * HW_SDHC_CMDRSP0 - Command Response 0
 ******************************************************************************/

/*!
 * @brief HW_SDHC_CMDRSP0 - Command Response 0 (RO)
 *
 * Reset value: 0x00000000U
 *
 * This register is used to store part 0 of the response bits from the card.
 */
typedef union _hw_sdhc_cmdrsp0
{
    uint32_t U;
    struct _hw_sdhc_cmdrsp0_bitfields
    {
        uint32_t CMDRSP0 : 32;         /*!< [31:0] Command Response 0 */
    } B;
} hw_sdhc_cmdrsp0_t;

/*!
 * @name Constants and macros for entire SDHC_CMDRSP0 register
 */
/*@{*/
#define HW_SDHC_CMDRSP0_ADDR(x)  ((x) + 0x10U)

#define HW_SDHC_CMDRSP0(x)       (*(__I hw_sdhc_cmdrsp0_t *) HW_SDHC_CMDRSP0_ADDR(x))
#define HW_SDHC_CMDRSP0_RD(x)    (HW_SDHC_CMDRSP0(x).U)
/*@}*/

/*
 * Constants & macros for individual SDHC_CMDRSP0 bitfields
 */

/*!
 * @name Register SDHC_CMDRSP0, field CMDRSP0[31:0] (RO)
 */
/*@{*/
#define BP_SDHC_CMDRSP0_CMDRSP0 (0U)       /*!< Bit position for SDHC_CMDRSP0_CMDRSP0. */
#define BM_SDHC_CMDRSP0_CMDRSP0 (0xFFFFFFFFU) /*!< Bit mask for SDHC_CMDRSP0_CMDRSP0. */
#define BS_SDHC_CMDRSP0_CMDRSP0 (32U)      /*!< Bit field size in bits for SDHC_CMDRSP0_CMDRSP0. */

/*! @brief Read current value of the SDHC_CMDRSP0_CMDRSP0 field. */
#define BR_SDHC_CMDRSP0_CMDRSP0(x) (HW_SDHC_CMDRSP0(x).U)
/*@}*/

/*******************************************************************************
 * HW_SDHC_CMDRSP1 - Command Response 1
 ******************************************************************************/

/*!
 * @brief HW_SDHC_CMDRSP1 - Command Response 1 (RO)
 *
 * Reset value: 0x00000000U
 *
 * This register is used to store part 1 of the response bits from the card.
 */
typedef union _hw_sdhc_cmdrsp1
{
    uint32_t U;
    struct _hw_sdhc_cmdrsp1_bitfields
    {
        uint32_t CMDRSP1 : 32;         /*!< [31:0] Command Response 1 */
    } B;
} hw_sdhc_cmdrsp1_t;

/*!
 * @name Constants and macros for entire SDHC_CMDRSP1 register
 */
/*@{*/
#define HW_SDHC_CMDRSP1_ADDR(x)  ((x) + 0x14U)

#define HW_SDHC_CMDRSP1(x)       (*(__I hw_sdhc_cmdrsp1_t *) HW_SDHC_CMDRSP1_ADDR(x))
#define HW_SDHC_CMDRSP1_RD(x)    (HW_SDHC_CMDRSP1(x).U)
/*@}*/

/*
 * Constants & macros for individual SDHC_CMDRSP1 bitfields
 */

/*!
 * @name Register SDHC_CMDRSP1, field CMDRSP1[31:0] (RO)
 */
/*@{*/
#define BP_SDHC_CMDRSP1_CMDRSP1 (0U)       /*!< Bit position for SDHC_CMDRSP1_CMDRSP1. */
#define BM_SDHC_CMDRSP1_CMDRSP1 (0xFFFFFFFFU) /*!< Bit mask for SDHC_CMDRSP1_CMDRSP1. */
#define BS_SDHC_CMDRSP1_CMDRSP1 (32U)      /*!< Bit field size in bits for SDHC_CMDRSP1_CMDRSP1. */

/*! @brief Read current value of the SDHC_CMDRSP1_CMDRSP1 field. */
#define BR_SDHC_CMDRSP1_CMDRSP1(x) (HW_SDHC_CMDRSP1(x).U)
/*@}*/

/*******************************************************************************
 * HW_SDHC_CMDRSP2 - Command Response 2
 ******************************************************************************/

/*!
 * @brief HW_SDHC_CMDRSP2 - Command Response 2 (RO)
 *
 * Reset value: 0x00000000U
 *
 * This register is used to store part 2 of the response bits from the card.
 */
typedef union _hw_sdhc_cmdrsp2
{
    uint32_t U;
    struct _hw_sdhc_cmdrsp2_bitfields
    {
        uint32_t CMDRSP2 : 32;         /*!< [31:0] Command Response 2 */
    } B;
} hw_sdhc_cmdrsp2_t;

/*!
 * @name Constants and macros for entire SDHC_CMDRSP2 register
 */
/*@{*/
#define HW_SDHC_CMDRSP2_ADDR(x)  ((x) + 0x18U)

#define HW_SDHC_CMDRSP2(x)       (*(__I hw_sdhc_cmdrsp2_t *) HW_SDHC_CMDRSP2_ADDR(x))
#define HW_SDHC_CMDRSP2_RD(x)    (HW_SDHC_CMDRSP2(x).U)
/*@}*/

/*
 * Constants & macros for individual SDHC_CMDRSP2 bitfields
 */

/*!
 * @name Register SDHC_CMDRSP2, field CMDRSP2[31:0] (RO)
 */
/*@{*/
#define BP_SDHC_CMDRSP2_CMDRSP2 (0U)       /*!< Bit position for SDHC_CMDRSP2_CMDRSP2. */
#define BM_SDHC_CMDRSP2_CMDRSP2 (0xFFFFFFFFU) /*!< Bit mask for SDHC_CMDRSP2_CMDRSP2. */
#define BS_SDHC_CMDRSP2_CMDRSP2 (32U)      /*!< Bit field size in bits for SDHC_CMDRSP2_CMDRSP2. */

/*! @brief Read current value of the SDHC_CMDRSP2_CMDRSP2 field. */
#define BR_SDHC_CMDRSP2_CMDRSP2(x) (HW_SDHC_CMDRSP2(x).U)
/*@}*/

/*******************************************************************************
 * HW_SDHC_CMDRSP3 - Command Response 3
 ******************************************************************************/

/*!
 * @brief HW_SDHC_CMDRSP3 - Command Response 3 (RO)
 *
 * Reset value: 0x00000000U
 *
 * This register is used to store part 3 of the response bits from the card. The
 * following table describes the mapping of command responses from the SD bus to
 * command response registers for each response type. In the table, R[ ] refers
 * to a bit range within the response data as transmitted on the SD bus. Response
 * bit definition for each response type Response type Meaning of response
 * Response field Response register R1,R1b (normal response) Card status R[39:8]
 * CMDRSP0 R1b (Auto CMD12 response) Card status for auto CMD12 R[39:8] CMDRSP3 R2
 * (CID, CSD register) CID/CSD register [127:8] R[127:8] {CMDRSP3[23:0], CMDRSP2,
 * CMDRSP1, CMDRSP0} R3 (OCR register) OCR register for memory R[39:8] CMDRSP0 R4
 * (OCR register) OCR register for I/O etc. R[39:8] CMDRSP0 R5, R5b SDIO response
 * R[39:8] CMDRSP0 R6 (Publish RCA) New published RCA[31:16] and card
 * status[15:0] R[39:9] CMDRSP0 This table shows that most responses with a length of 48
 * (R[47:0]) have 32-bit of the response data (R[39:8]) stored in the CMDRSP0
 * register. Responses of type R1b (auto CMD12 responses) have response data bits
 * (R[39:8]) stored in the CMDRSP3 register. Responses with length 136 (R[135:0]) have
 * 120-bit of the response data (R[127:8]) stored in the CMDRSP0, 1, 2, and 3
 * registers. To be able to read the response status efficiently, the SDHC stores
 * only a part of the response data in the command response registers. This
 * enables the host driver to efficiently read 32-bit of response data in one read
 * cycle on a 32-bit bus system. Parts of the response, the index field and the CRC,
 * are checked by the SDHC, as specified by XFERTYP[CICEN] and XFERTYP[CCCEN],
 * and generate an error interrupt if any error is detected. The bit range for the
 * CRC check depends on the response length. If the response length is 48, the
 * SDHC will check R[47:1], and if the response length is 136 the SDHC will check
 * R[119:1]. Because the SDHC may have a multiple block data transfer executing
 * concurrently with a CMD_wo_DAT command, the SDHC stores the auto CMD12 response
 * in the CMDRSP3 register. The CMD_wo_DAT response is stored in CMDRSP0. This
 * allows the SDHC to avoid overwriting the Auto CMD12 response with the CMD_wo_DAT
 * and vice versa. When the SDHC modifies part of the command response
 * registers, as shown in the table above, it preserves the unmodified bits.
 */
typedef union _hw_sdhc_cmdrsp3
{
    uint32_t U;
    struct _hw_sdhc_cmdrsp3_bitfields
    {
        uint32_t CMDRSP3 : 32;         /*!< [31:0] Command Response 3 */
    } B;
} hw_sdhc_cmdrsp3_t;

/*!
 * @name Constants and macros for entire SDHC_CMDRSP3 register
 */
/*@{*/
#define HW_SDHC_CMDRSP3_ADDR(x)  ((x) + 0x1CU)

#define HW_SDHC_CMDRSP3(x)       (*(__I hw_sdhc_cmdrsp3_t *) HW_SDHC_CMDRSP3_ADDR(x))
#define HW_SDHC_CMDRSP3_RD(x)    (HW_SDHC_CMDRSP3(x).U)
/*@}*/

/*
 * Constants & macros for individual SDHC_CMDRSP3 bitfields
 */

/*!
 * @name Register SDHC_CMDRSP3, field CMDRSP3[31:0] (RO)
 */
/*@{*/
#define BP_SDHC_CMDRSP3_CMDRSP3 (0U)       /*!< Bit position for SDHC_CMDRSP3_CMDRSP3. */
#define BM_SDHC_CMDRSP3_CMDRSP3 (0xFFFFFFFFU) /*!< Bit mask for SDHC_CMDRSP3_CMDRSP3. */
#define BS_SDHC_CMDRSP3_CMDRSP3 (32U)      /*!< Bit field size in bits for SDHC_CMDRSP3_CMDRSP3. */

/*! @brief Read current value of the SDHC_CMDRSP3_CMDRSP3 field. */
#define BR_SDHC_CMDRSP3_CMDRSP3(x) (HW_SDHC_CMDRSP3(x).U)
/*@}*/

/*******************************************************************************
 * HW_SDHC_DATPORT - Buffer Data Port register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_DATPORT - Buffer Data Port register (RW)
 *
 * Reset value: 0x00000000U
 *
 * This is a 32-bit data port register used to access the internal buffer and it
 * cannot be updated in Idle mode.
 */
typedef union _hw_sdhc_datport
{
    uint32_t U;
    struct _hw_sdhc_datport_bitfields
    {
        uint32_t DATCONT : 32;         /*!< [31:0] Data Content */
    } B;
} hw_sdhc_datport_t;

/*!
 * @name Constants and macros for entire SDHC_DATPORT register
 */
/*@{*/
#define HW_SDHC_DATPORT_ADDR(x)  ((x) + 0x20U)

#define HW_SDHC_DATPORT(x)       (*(__IO hw_sdhc_datport_t *) HW_SDHC_DATPORT_ADDR(x))
#define HW_SDHC_DATPORT_RD(x)    (HW_SDHC_DATPORT(x).U)
#define HW_SDHC_DATPORT_WR(x, v) (HW_SDHC_DATPORT(x).U = (v))
#define HW_SDHC_DATPORT_SET(x, v) (HW_SDHC_DATPORT_WR(x, HW_SDHC_DATPORT_RD(x) |  (v)))
#define HW_SDHC_DATPORT_CLR(x, v) (HW_SDHC_DATPORT_WR(x, HW_SDHC_DATPORT_RD(x) & ~(v)))
#define HW_SDHC_DATPORT_TOG(x, v) (HW_SDHC_DATPORT_WR(x, HW_SDHC_DATPORT_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_DATPORT bitfields
 */

/*!
 * @name Register SDHC_DATPORT, field DATCONT[31:0] (RW)
 *
 * The Buffer Data Port register is for 32-bit data access by the CPU or the
 * external DMA. When the internal DMA is enabled, any write to this register is
 * ignored, and any read from this register will always yield 0s.
 */
/*@{*/
#define BP_SDHC_DATPORT_DATCONT (0U)       /*!< Bit position for SDHC_DATPORT_DATCONT. */
#define BM_SDHC_DATPORT_DATCONT (0xFFFFFFFFU) /*!< Bit mask for SDHC_DATPORT_DATCONT. */
#define BS_SDHC_DATPORT_DATCONT (32U)      /*!< Bit field size in bits for SDHC_DATPORT_DATCONT. */

/*! @brief Read current value of the SDHC_DATPORT_DATCONT field. */
#define BR_SDHC_DATPORT_DATCONT(x) (HW_SDHC_DATPORT(x).U)

/*! @brief Format value for bitfield SDHC_DATPORT_DATCONT. */
#define BF_SDHC_DATPORT_DATCONT(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_DATPORT_DATCONT) & BM_SDHC_DATPORT_DATCONT)

/*! @brief Set the DATCONT field to a new value. */
#define BW_SDHC_DATPORT_DATCONT(x, v) (HW_SDHC_DATPORT_WR(x, v))
/*@}*/

/*******************************************************************************
 * HW_SDHC_PRSSTAT - Present State register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_PRSSTAT - Present State register (RO)
 *
 * Reset value: 0x00000000U
 *
 * The host driver can get status of the SDHC from this 32-bit read-only
 * register. The host driver can issue CMD0, CMD12, CMD13 (for memory) and CMD52 (for
 * SDIO) when the DAT lines are busy during a data transfer. These commands can be
 * issued when Command Inhibit (CIHB) is set to zero. Other commands shall be
 * issued when Command Inhibit (CDIHB) is set to zero. Possible changes to the SD
 * Physical Specification may add other commands to this list in the future.
 */
typedef union _hw_sdhc_prsstat
{
    uint32_t U;
    struct _hw_sdhc_prsstat_bitfields
    {
        uint32_t CIHB : 1;             /*!< [0] Command Inhibit (CMD) */
        uint32_t CDIHB : 1;            /*!< [1] Command Inhibit (DAT) */
        uint32_t DLA : 1;              /*!< [2] Data Line Active */
        uint32_t SDSTB : 1;            /*!< [3] SD Clock Stable */
        uint32_t IPGOFF : 1;           /*!< [4] Bus Clock Gated Off Internally */
        uint32_t HCKOFF : 1;           /*!< [5] System Clock Gated Off Internally */
        uint32_t PEROFF : 1;           /*!< [6] SDHC clock Gated Off Internally */
        uint32_t SDOFF : 1;            /*!< [7] SD Clock Gated Off Internally */
        uint32_t WTA : 1;              /*!< [8] Write Transfer Active */
        uint32_t RTA : 1;              /*!< [9] Read Transfer Active */
        uint32_t BWEN : 1;             /*!< [10] Buffer Write Enable */
        uint32_t BREN : 1;             /*!< [11] Buffer Read Enable */
        uint32_t RESERVED0 : 4;        /*!< [15:12]  */
        uint32_t CINS : 1;             /*!< [16] Card Inserted */
        uint32_t RESERVED1 : 6;        /*!< [22:17]  */
        uint32_t CLSL : 1;             /*!< [23] CMD Line Signal Level */
        uint32_t DLSL : 8;             /*!< [31:24] DAT Line Signal Level */
    } B;
} hw_sdhc_prsstat_t;

/*!
 * @name Constants and macros for entire SDHC_PRSSTAT register
 */
/*@{*/
#define HW_SDHC_PRSSTAT_ADDR(x)  ((x) + 0x24U)

#define HW_SDHC_PRSSTAT(x)       (*(__I hw_sdhc_prsstat_t *) HW_SDHC_PRSSTAT_ADDR(x))
#define HW_SDHC_PRSSTAT_RD(x)    (HW_SDHC_PRSSTAT(x).U)
/*@}*/

/*
 * Constants & macros for individual SDHC_PRSSTAT bitfields
 */

/*!
 * @name Register SDHC_PRSSTAT, field CIHB[0] (RO)
 *
 * If this status bit is 0, it indicates that the CMD line is not in use and the
 * SDHC can issue a SD/MMC Command using the CMD line. This bit is set also
 * immediately after the Transfer Type register is written. This bit is cleared when
 * the command response is received. Even if the CDIHB bit is set to 1, Commands
 * using only the CMD line can be issued if this bit is 0. Changing from 1 to 0
 * generates a command complete interrupt in the interrupt status register. If the
 * SDHC cannot issue the command because of a command conflict error (see
 * command CRC error) or because of a command not issued by auto CMD12 error, this bit
 * will remain 1 and the command complete is not set. The status of issuing an
 * auto CMD12 does not show on this bit.
 *
 * Values:
 * - 0 - Can issue command using only CMD line.
 * - 1 - Cannot issue command.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_CIHB (0U)          /*!< Bit position for SDHC_PRSSTAT_CIHB. */
#define BM_SDHC_PRSSTAT_CIHB (0x00000001U) /*!< Bit mask for SDHC_PRSSTAT_CIHB. */
#define BS_SDHC_PRSSTAT_CIHB (1U)          /*!< Bit field size in bits for SDHC_PRSSTAT_CIHB. */

/*! @brief Read current value of the SDHC_PRSSTAT_CIHB field. */
#define BR_SDHC_PRSSTAT_CIHB(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_CIHB))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field CDIHB[1] (RO)
 *
 * This status bit is generated if either the DLA or the RTA is set to 1. If
 * this bit is 0, it indicates that the SDHC can issue the next SD/MMC Command.
 * Commands with a busy signal belong to CDIHB, for example, R1b, R5b type. Except in
 * the case when the command busy is finished, changing from 1 to 0 generates a
 * transfer complete interrupt in the Interrupt Status register. The SD host
 * driver can save registers for a suspend transaction after this bit has changed
 * from 1 to 0.
 *
 * Values:
 * - 0 - Can issue command which uses the DAT line.
 * - 1 - Cannot issue command which uses the DAT line.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_CDIHB (1U)         /*!< Bit position for SDHC_PRSSTAT_CDIHB. */
#define BM_SDHC_PRSSTAT_CDIHB (0x00000002U) /*!< Bit mask for SDHC_PRSSTAT_CDIHB. */
#define BS_SDHC_PRSSTAT_CDIHB (1U)         /*!< Bit field size in bits for SDHC_PRSSTAT_CDIHB. */

/*! @brief Read current value of the SDHC_PRSSTAT_CDIHB field. */
#define BR_SDHC_PRSSTAT_CDIHB(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_CDIHB))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field DLA[2] (RO)
 *
 * Indicates whether one of the DAT lines on the SD bus is in use. In the case
 * of read transactions: This status indicates whether a read transfer is
 * executing on the SD bus. Changes in this value from 1 to 0, between data blocks,
 * generates a block gap event interrupt in the Interrupt Status register. This bit
 * will be set in either of the following cases: After the end bit of the read
 * command. When writing a 1 to PROCTL[CREQ] to restart a read transfer. This bit
 * will be cleared in either of the following cases: When the end bit of the last
 * data block is sent from the SD bus to the SDHC. When the read wait state is
 * stopped by a suspend command and the DAT2 line is released. The SDHC will wait at
 * the next block gap by driving read wait at the start of the interrupt cycle.
 * If the read wait signal is already driven (data buffer cannot receive data),
 * the SDHC can wait for a current block gap by continuing to drive the read wait
 * signal. It is necessary to support read wait to use the suspend / resume
 * function. This bit will remain 1 during read wait. In the case of write
 * transactions: This status indicates that a write transfer is executing on the SD bus.
 * Changes in this value from 1 to 0 generate a transfer complete interrupt in the
 * interrupt status register. This bit will be set in either of the following
 * cases: After the end bit of the write command. When writing to 1 to PROCTL[CREQ] to
 * continue a write transfer. This bit will be cleared in either of the
 * following cases: When the SD card releases write busy of the last data block, the SDHC
 * will also detect if the output is not busy. If the SD card does not drive the
 * busy signal after the CRC status is received, the SDHC shall assume the card
 * drive "Not busy". When the SD card releases write busy, prior to waiting for
 * write transfer, and as a result of a stop at block gap request. In the case of
 * command with busy pending: This status indicates that a busy state follows the
 * command and the data line is in use. This bit will be cleared when the DAT0
 * line is released.
 *
 * Values:
 * - 0 - DAT line inactive.
 * - 1 - DAT line active.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_DLA  (2U)          /*!< Bit position for SDHC_PRSSTAT_DLA. */
#define BM_SDHC_PRSSTAT_DLA  (0x00000004U) /*!< Bit mask for SDHC_PRSSTAT_DLA. */
#define BS_SDHC_PRSSTAT_DLA  (1U)          /*!< Bit field size in bits for SDHC_PRSSTAT_DLA. */

/*! @brief Read current value of the SDHC_PRSSTAT_DLA field. */
#define BR_SDHC_PRSSTAT_DLA(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_DLA))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field SDSTB[3] (RO)
 *
 * Indicates that the internal card clock is stable. This bit is for the host
 * driver to poll clock status when changing the clock frequency. It is recommended
 * to clear SYSCTL[SDCLKEN] to remove glitch on the card clock when the
 * frequency is changing.
 *
 * Values:
 * - 0 - Clock is changing frequency and not stable.
 * - 1 - Clock is stable.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_SDSTB (3U)         /*!< Bit position for SDHC_PRSSTAT_SDSTB. */
#define BM_SDHC_PRSSTAT_SDSTB (0x00000008U) /*!< Bit mask for SDHC_PRSSTAT_SDSTB. */
#define BS_SDHC_PRSSTAT_SDSTB (1U)         /*!< Bit field size in bits for SDHC_PRSSTAT_SDSTB. */

/*! @brief Read current value of the SDHC_PRSSTAT_SDSTB field. */
#define BR_SDHC_PRSSTAT_SDSTB(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_SDSTB))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field IPGOFF[4] (RO)
 *
 * Indicates that the bus clock is internally gated off. This bit is for the
 * host driver to debug.
 *
 * Values:
 * - 0 - Bus clock is active.
 * - 1 - Bus clock is gated off.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_IPGOFF (4U)        /*!< Bit position for SDHC_PRSSTAT_IPGOFF. */
#define BM_SDHC_PRSSTAT_IPGOFF (0x00000010U) /*!< Bit mask for SDHC_PRSSTAT_IPGOFF. */
#define BS_SDHC_PRSSTAT_IPGOFF (1U)        /*!< Bit field size in bits for SDHC_PRSSTAT_IPGOFF. */

/*! @brief Read current value of the SDHC_PRSSTAT_IPGOFF field. */
#define BR_SDHC_PRSSTAT_IPGOFF(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_IPGOFF))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field HCKOFF[5] (RO)
 *
 * Indicates that the system clock is internally gated off. This bit is for the
 * host driver to debug during a data transfer.
 *
 * Values:
 * - 0 - System clock is active.
 * - 1 - System clock is gated off.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_HCKOFF (5U)        /*!< Bit position for SDHC_PRSSTAT_HCKOFF. */
#define BM_SDHC_PRSSTAT_HCKOFF (0x00000020U) /*!< Bit mask for SDHC_PRSSTAT_HCKOFF. */
#define BS_SDHC_PRSSTAT_HCKOFF (1U)        /*!< Bit field size in bits for SDHC_PRSSTAT_HCKOFF. */

/*! @brief Read current value of the SDHC_PRSSTAT_HCKOFF field. */
#define BR_SDHC_PRSSTAT_HCKOFF(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_HCKOFF))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field PEROFF[6] (RO)
 *
 * Indicates that the is internally gated off. This bit is for the host driver
 * to debug transaction on the SD bus. When INITA bit is set, SDHC sending 80
 * clock cycles to the card, SDCLKEN must be 1 to enable the output card clock,
 * otherwise the will never be gate off, so and will be always active. SDHC clock SDHC
 * clock SDHC clock bus clock
 *
 * Values:
 * - 0 - SDHC clock is active.
 * - 1 - SDHC clock is gated off.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_PEROFF (6U)        /*!< Bit position for SDHC_PRSSTAT_PEROFF. */
#define BM_SDHC_PRSSTAT_PEROFF (0x00000040U) /*!< Bit mask for SDHC_PRSSTAT_PEROFF. */
#define BS_SDHC_PRSSTAT_PEROFF (1U)        /*!< Bit field size in bits for SDHC_PRSSTAT_PEROFF. */

/*! @brief Read current value of the SDHC_PRSSTAT_PEROFF field. */
#define BR_SDHC_PRSSTAT_PEROFF(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_PEROFF))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field SDOFF[7] (RO)
 *
 * Indicates that the SD clock is internally gated off, because of buffer
 * over/under-run or read pause without read wait assertion, or the driver has cleared
 * SYSCTL[SDCLKEN] to stop the SD clock. This bit is for the host driver to debug
 * data transaction on the SD bus.
 *
 * Values:
 * - 0 - SD clock is active.
 * - 1 - SD clock is gated off.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_SDOFF (7U)         /*!< Bit position for SDHC_PRSSTAT_SDOFF. */
#define BM_SDHC_PRSSTAT_SDOFF (0x00000080U) /*!< Bit mask for SDHC_PRSSTAT_SDOFF. */
#define BS_SDHC_PRSSTAT_SDOFF (1U)         /*!< Bit field size in bits for SDHC_PRSSTAT_SDOFF. */

/*! @brief Read current value of the SDHC_PRSSTAT_SDOFF field. */
#define BR_SDHC_PRSSTAT_SDOFF(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_SDOFF))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field WTA[8] (RO)
 *
 * Indicates that a write transfer is active. If this bit is 0, it means no
 * valid write data exists in the SDHC. This bit is set in either of the following
 * cases: After the end bit of the write command. When writing 1 to PROCTL[CREQ] to
 * restart a write transfer. This bit is cleared in either of the following
 * cases: After getting the CRC status of the last data block as specified by the
 * transfer count (single and multiple). After getting the CRC status of any block
 * where data transmission is about to be stopped by a stop at block gap request.
 * During a write transaction, a block gap event interrupt is generated when this
 * bit is changed to 0, as result of the stop at block gap request being set.
 * This status is useful for the host driver in determining when to issue commands
 * during write busy state.
 *
 * Values:
 * - 0 - No valid data.
 * - 1 - Transferring data.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_WTA  (8U)          /*!< Bit position for SDHC_PRSSTAT_WTA. */
#define BM_SDHC_PRSSTAT_WTA  (0x00000100U) /*!< Bit mask for SDHC_PRSSTAT_WTA. */
#define BS_SDHC_PRSSTAT_WTA  (1U)          /*!< Bit field size in bits for SDHC_PRSSTAT_WTA. */

/*! @brief Read current value of the SDHC_PRSSTAT_WTA field. */
#define BR_SDHC_PRSSTAT_WTA(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_WTA))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field RTA[9] (RO)
 *
 * Used for detecting completion of a read transfer. This bit is set for either
 * of the following conditions: After the end bit of the read command. When
 * writing a 1 to PROCTL[CREQ] to restart a read transfer. A transfer complete
 * interrupt is generated when this bit changes to 0. This bit is cleared for either of
 * the following conditions: When the last data block as specified by block
 * length is transferred to the system, that is, all data are read away from SDHC
 * internal buffer. When all valid data blocks have been transferred from SDHC
 * internal buffer to the system and no current block transfers are being sent as a
 * result of the stop at block gap request being set to 1.
 *
 * Values:
 * - 0 - No valid data.
 * - 1 - Transferring data.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_RTA  (9U)          /*!< Bit position for SDHC_PRSSTAT_RTA. */
#define BM_SDHC_PRSSTAT_RTA  (0x00000200U) /*!< Bit mask for SDHC_PRSSTAT_RTA. */
#define BS_SDHC_PRSSTAT_RTA  (1U)          /*!< Bit field size in bits for SDHC_PRSSTAT_RTA. */

/*! @brief Read current value of the SDHC_PRSSTAT_RTA field. */
#define BR_SDHC_PRSSTAT_RTA(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_RTA))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field BWEN[10] (RO)
 *
 * Used for non-DMA write transfers. The SDHC can implement multiple buffers to
 * transfer data efficiently. This read-only flag indicates whether space is
 * available for write data. If this bit is 1, valid data greater than the watermark
 * level can be written to the buffer. This read-only flag indicates whether
 * space is available for write data.
 *
 * Values:
 * - 0 - Write disable, the buffer can hold valid data less than the write
 *     watermark level.
 * - 1 - Write enable, the buffer can hold valid data greater than the write
 *     watermark level.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_BWEN (10U)         /*!< Bit position for SDHC_PRSSTAT_BWEN. */
#define BM_SDHC_PRSSTAT_BWEN (0x00000400U) /*!< Bit mask for SDHC_PRSSTAT_BWEN. */
#define BS_SDHC_PRSSTAT_BWEN (1U)          /*!< Bit field size in bits for SDHC_PRSSTAT_BWEN. */

/*! @brief Read current value of the SDHC_PRSSTAT_BWEN field. */
#define BR_SDHC_PRSSTAT_BWEN(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_BWEN))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field BREN[11] (RO)
 *
 * Used for non-DMA read transfers. The SDHC may implement multiple buffers to
 * transfer data efficiently. This read-only flag indicates that valid data exists
 * in the host side buffer. If this bit is high, valid data greater than the
 * watermark level exist in the buffer. This read-only flag indicates that valid
 * data exists in the host side buffer.
 *
 * Values:
 * - 0 - Read disable, valid data less than the watermark level exist in the
 *     buffer.
 * - 1 - Read enable, valid data greater than the watermark level exist in the
 *     buffer.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_BREN (11U)         /*!< Bit position for SDHC_PRSSTAT_BREN. */
#define BM_SDHC_PRSSTAT_BREN (0x00000800U) /*!< Bit mask for SDHC_PRSSTAT_BREN. */
#define BS_SDHC_PRSSTAT_BREN (1U)          /*!< Bit field size in bits for SDHC_PRSSTAT_BREN. */

/*! @brief Read current value of the SDHC_PRSSTAT_BREN field. */
#define BR_SDHC_PRSSTAT_BREN(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_BREN))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field CINS[16] (RO)
 *
 * Indicates whether a card has been inserted. The SDHC debounces this signal so
 * that the host driver will not need to wait for it to stabilize. Changing from
 * a 0 to 1 generates a card insertion interrupt in the Interrupt Status
 * register. Changing from a 1 to 0 generates a card removal interrupt in the Interrupt
 * Status register. A write to the force event register does not effect this bit.
 * SYSCTL[RSTA] does not effect this bit. A software reset does not effect this
 * bit.
 *
 * Values:
 * - 0 - Power on reset or no card.
 * - 1 - Card inserted.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_CINS (16U)         /*!< Bit position for SDHC_PRSSTAT_CINS. */
#define BM_SDHC_PRSSTAT_CINS (0x00010000U) /*!< Bit mask for SDHC_PRSSTAT_CINS. */
#define BS_SDHC_PRSSTAT_CINS (1U)          /*!< Bit field size in bits for SDHC_PRSSTAT_CINS. */

/*! @brief Read current value of the SDHC_PRSSTAT_CINS field. */
#define BR_SDHC_PRSSTAT_CINS(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_CINS))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field CLSL[23] (RO)
 *
 * Used to check the CMD line level to recover from errors, and for debugging.
 * The reset value is effected by the external pullup/pulldown resistor, by
 * default, the read value of this bit after reset is 1b, when the command line is
 * pulled up.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_CLSL (23U)         /*!< Bit position for SDHC_PRSSTAT_CLSL. */
#define BM_SDHC_PRSSTAT_CLSL (0x00800000U) /*!< Bit mask for SDHC_PRSSTAT_CLSL. */
#define BS_SDHC_PRSSTAT_CLSL (1U)          /*!< Bit field size in bits for SDHC_PRSSTAT_CLSL. */

/*! @brief Read current value of the SDHC_PRSSTAT_CLSL field. */
#define BR_SDHC_PRSSTAT_CLSL(x) (BITBAND_ACCESS32(HW_SDHC_PRSSTAT_ADDR(x), BP_SDHC_PRSSTAT_CLSL))
/*@}*/

/*!
 * @name Register SDHC_PRSSTAT, field DLSL[31:24] (RO)
 *
 * Used to check the DAT line level to recover from errors, and for debugging.
 * This is especially useful in detecting the busy signal level from DAT[0]. The
 * reset value is effected by the external pullup/pulldown resistors. By default,
 * the read value of this field after reset is 8'b11110111, when DAT[3] is pulled
 * down and the other lines are pulled up.
 */
/*@{*/
#define BP_SDHC_PRSSTAT_DLSL (24U)         /*!< Bit position for SDHC_PRSSTAT_DLSL. */
#define BM_SDHC_PRSSTAT_DLSL (0xFF000000U) /*!< Bit mask for SDHC_PRSSTAT_DLSL. */
#define BS_SDHC_PRSSTAT_DLSL (8U)          /*!< Bit field size in bits for SDHC_PRSSTAT_DLSL. */

/*! @brief Read current value of the SDHC_PRSSTAT_DLSL field. */
#define BR_SDHC_PRSSTAT_DLSL(x) (HW_SDHC_PRSSTAT(x).B.DLSL)
/*@}*/

/*******************************************************************************
 * HW_SDHC_PROCTL - Protocol Control register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_PROCTL - Protocol Control register (RW)
 *
 * Reset value: 0x00000020U
 *
 * There are three cases to restart the transfer after stop at the block gap.
 * Which case is appropriate depends on whether the SDHC issues a suspend command
 * or the SD card accepts the suspend command: If the host driver does not issue a
 * suspend command, the continue request shall be used to restart the transfer.
 * If the host driver issues a suspend command and the SD card accepts it, a
 * resume command shall be used to restart the transfer. If the host driver issues a
 * suspend command and the SD card does not accept it, the continue request shall
 * be used to restart the transfer. Any time stop at block gap request stops the
 * data transfer, the host driver shall wait for a transfer complete (in the
 * interrupt status register), before attempting to restart the transfer. When
 * restarting the data transfer by continue request, the host driver shall clear the
 * stop at block gap request before or simultaneously.
 */
typedef union _hw_sdhc_proctl
{
    uint32_t U;
    struct _hw_sdhc_proctl_bitfields
    {
        uint32_t LCTL : 1;             /*!< [0] LED Control */
        uint32_t DTW : 2;              /*!< [2:1] Data Transfer Width */
        uint32_t D3CD : 1;             /*!< [3] DAT3 As Card Detection Pin */
        uint32_t EMODE : 2;            /*!< [5:4] Endian Mode */
        uint32_t CDTL : 1;             /*!< [6] Card Detect Test Level */
        uint32_t CDSS : 1;             /*!< [7] Card Detect Signal Selection */
        uint32_t DMAS : 2;             /*!< [9:8] DMA Select */
        uint32_t RESERVED0 : 6;        /*!< [15:10]  */
        uint32_t SABGREQ : 1;          /*!< [16] Stop At Block Gap Request */
        uint32_t CREQ : 1;             /*!< [17] Continue Request */
        uint32_t RWCTL : 1;            /*!< [18] Read Wait Control */
        uint32_t IABG : 1;             /*!< [19] Interrupt At Block Gap */
        uint32_t RESERVED1 : 4;        /*!< [23:20]  */
        uint32_t WECINT : 1;           /*!< [24] Wakeup Event Enable On Card Interrupt
                                        * */
        uint32_t WECINS : 1;           /*!< [25] Wakeup Event Enable On SD Card
                                        * Insertion */
        uint32_t WECRM : 1;            /*!< [26] Wakeup Event Enable On SD Card Removal
                                        * */
        uint32_t RESERVED2 : 5;        /*!< [31:27]  */
    } B;
} hw_sdhc_proctl_t;

/*!
 * @name Constants and macros for entire SDHC_PROCTL register
 */
/*@{*/
#define HW_SDHC_PROCTL_ADDR(x)   ((x) + 0x28U)

#define HW_SDHC_PROCTL(x)        (*(__IO hw_sdhc_proctl_t *) HW_SDHC_PROCTL_ADDR(x))
#define HW_SDHC_PROCTL_RD(x)     (HW_SDHC_PROCTL(x).U)
#define HW_SDHC_PROCTL_WR(x, v)  (HW_SDHC_PROCTL(x).U = (v))
#define HW_SDHC_PROCTL_SET(x, v) (HW_SDHC_PROCTL_WR(x, HW_SDHC_PROCTL_RD(x) |  (v)))
#define HW_SDHC_PROCTL_CLR(x, v) (HW_SDHC_PROCTL_WR(x, HW_SDHC_PROCTL_RD(x) & ~(v)))
#define HW_SDHC_PROCTL_TOG(x, v) (HW_SDHC_PROCTL_WR(x, HW_SDHC_PROCTL_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_PROCTL bitfields
 */

/*!
 * @name Register SDHC_PROCTL, field LCTL[0] (RW)
 *
 * This bit, fully controlled by the host driver, is used to caution the user
 * not to remove the card while the card is being accessed. If the software is
 * going to issue multiple SD commands, this bit can be set during all these
 * transactions. It is not necessary to change for each transaction. When the software
 * issues multiple SD commands, setting the bit once before the first command is
 * sufficient: it is not necessary to reset the bit between commands.
 *
 * Values:
 * - 0 - LED off.
 * - 1 - LED on.
 */
/*@{*/
#define BP_SDHC_PROCTL_LCTL  (0U)          /*!< Bit position for SDHC_PROCTL_LCTL. */
#define BM_SDHC_PROCTL_LCTL  (0x00000001U) /*!< Bit mask for SDHC_PROCTL_LCTL. */
#define BS_SDHC_PROCTL_LCTL  (1U)          /*!< Bit field size in bits for SDHC_PROCTL_LCTL. */

/*! @brief Read current value of the SDHC_PROCTL_LCTL field. */
#define BR_SDHC_PROCTL_LCTL(x) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_LCTL))

/*! @brief Format value for bitfield SDHC_PROCTL_LCTL. */
#define BF_SDHC_PROCTL_LCTL(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_LCTL) & BM_SDHC_PROCTL_LCTL)

/*! @brief Set the LCTL field to a new value. */
#define BW_SDHC_PROCTL_LCTL(x, v) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_LCTL) = (v))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field DTW[2:1] (RW)
 *
 * Selects the data width of the SD bus for a data transfer. The host driver
 * shall set it to match the data width of the card. Possible data transfer width is
 * 1-bit, 4-bits or 8-bits.
 *
 * Values:
 * - 00 - 1-bit mode
 * - 01 - 4-bit mode
 * - 10 - 8-bit mode
 * - 11 - Reserved
 */
/*@{*/
#define BP_SDHC_PROCTL_DTW   (1U)          /*!< Bit position for SDHC_PROCTL_DTW. */
#define BM_SDHC_PROCTL_DTW   (0x00000006U) /*!< Bit mask for SDHC_PROCTL_DTW. */
#define BS_SDHC_PROCTL_DTW   (2U)          /*!< Bit field size in bits for SDHC_PROCTL_DTW. */

/*! @brief Read current value of the SDHC_PROCTL_DTW field. */
#define BR_SDHC_PROCTL_DTW(x) (HW_SDHC_PROCTL(x).B.DTW)

/*! @brief Format value for bitfield SDHC_PROCTL_DTW. */
#define BF_SDHC_PROCTL_DTW(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_DTW) & BM_SDHC_PROCTL_DTW)

/*! @brief Set the DTW field to a new value. */
#define BW_SDHC_PROCTL_DTW(x, v) (HW_SDHC_PROCTL_WR(x, (HW_SDHC_PROCTL_RD(x) & ~BM_SDHC_PROCTL_DTW) | BF_SDHC_PROCTL_DTW(v)))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field D3CD[3] (RW)
 *
 * If this bit is set, DAT3 should be pulled down to act as a card detection
 * pin. Be cautious when using this feature, because DAT3 is also a chip-select for
 * the SPI mode. A pulldown on this pin and CMD0 may set the card into the SPI
 * mode, which the SDHC does not support. Note: Keep this bit set if SDIO interrupt
 * is used.
 *
 * Values:
 * - 0 - DAT3 does not monitor card Insertion.
 * - 1 - DAT3 as card detection pin.
 */
/*@{*/
#define BP_SDHC_PROCTL_D3CD  (3U)          /*!< Bit position for SDHC_PROCTL_D3CD. */
#define BM_SDHC_PROCTL_D3CD  (0x00000008U) /*!< Bit mask for SDHC_PROCTL_D3CD. */
#define BS_SDHC_PROCTL_D3CD  (1U)          /*!< Bit field size in bits for SDHC_PROCTL_D3CD. */

/*! @brief Read current value of the SDHC_PROCTL_D3CD field. */
#define BR_SDHC_PROCTL_D3CD(x) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_D3CD))

/*! @brief Format value for bitfield SDHC_PROCTL_D3CD. */
#define BF_SDHC_PROCTL_D3CD(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_D3CD) & BM_SDHC_PROCTL_D3CD)

/*! @brief Set the D3CD field to a new value. */
#define BW_SDHC_PROCTL_D3CD(x, v) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_D3CD) = (v))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field EMODE[5:4] (RW)
 *
 * The SDHC supports all four endian modes in data transfer.
 *
 * Values:
 * - 00 - Big endian mode
 * - 01 - Half word big endian mode
 * - 10 - Little endian mode
 * - 11 - Reserved
 */
/*@{*/
#define BP_SDHC_PROCTL_EMODE (4U)          /*!< Bit position for SDHC_PROCTL_EMODE. */
#define BM_SDHC_PROCTL_EMODE (0x00000030U) /*!< Bit mask for SDHC_PROCTL_EMODE. */
#define BS_SDHC_PROCTL_EMODE (2U)          /*!< Bit field size in bits for SDHC_PROCTL_EMODE. */

/*! @brief Read current value of the SDHC_PROCTL_EMODE field. */
#define BR_SDHC_PROCTL_EMODE(x) (HW_SDHC_PROCTL(x).B.EMODE)

/*! @brief Format value for bitfield SDHC_PROCTL_EMODE. */
#define BF_SDHC_PROCTL_EMODE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_EMODE) & BM_SDHC_PROCTL_EMODE)

/*! @brief Set the EMODE field to a new value. */
#define BW_SDHC_PROCTL_EMODE(x, v) (HW_SDHC_PROCTL_WR(x, (HW_SDHC_PROCTL_RD(x) & ~BM_SDHC_PROCTL_EMODE) | BF_SDHC_PROCTL_EMODE(v)))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field CDTL[6] (RW)
 *
 * Enabled while the CDSS is set to 1 and it indicates card insertion.
 *
 * Values:
 * - 0 - Card detect test level is 0, no card inserted.
 * - 1 - Card detect test level is 1, card inserted.
 */
/*@{*/
#define BP_SDHC_PROCTL_CDTL  (6U)          /*!< Bit position for SDHC_PROCTL_CDTL. */
#define BM_SDHC_PROCTL_CDTL  (0x00000040U) /*!< Bit mask for SDHC_PROCTL_CDTL. */
#define BS_SDHC_PROCTL_CDTL  (1U)          /*!< Bit field size in bits for SDHC_PROCTL_CDTL. */

/*! @brief Read current value of the SDHC_PROCTL_CDTL field. */
#define BR_SDHC_PROCTL_CDTL(x) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_CDTL))

/*! @brief Format value for bitfield SDHC_PROCTL_CDTL. */
#define BF_SDHC_PROCTL_CDTL(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_CDTL) & BM_SDHC_PROCTL_CDTL)

/*! @brief Set the CDTL field to a new value. */
#define BW_SDHC_PROCTL_CDTL(x, v) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_CDTL) = (v))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field CDSS[7] (RW)
 *
 * Selects the source for the card detection.
 *
 * Values:
 * - 0 - Card detection level is selected for normal purpose.
 * - 1 - Card detection test level is selected for test purpose.
 */
/*@{*/
#define BP_SDHC_PROCTL_CDSS  (7U)          /*!< Bit position for SDHC_PROCTL_CDSS. */
#define BM_SDHC_PROCTL_CDSS  (0x00000080U) /*!< Bit mask for SDHC_PROCTL_CDSS. */
#define BS_SDHC_PROCTL_CDSS  (1U)          /*!< Bit field size in bits for SDHC_PROCTL_CDSS. */

/*! @brief Read current value of the SDHC_PROCTL_CDSS field. */
#define BR_SDHC_PROCTL_CDSS(x) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_CDSS))

/*! @brief Format value for bitfield SDHC_PROCTL_CDSS. */
#define BF_SDHC_PROCTL_CDSS(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_CDSS) & BM_SDHC_PROCTL_CDSS)

/*! @brief Set the CDSS field to a new value. */
#define BW_SDHC_PROCTL_CDSS(x, v) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_CDSS) = (v))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field DMAS[9:8] (RW)
 *
 * This field is valid while DMA (SDMA or ADMA) is enabled and selects the DMA
 * operation.
 *
 * Values:
 * - 00 - No DMA or simple DMA is selected.
 * - 01 - ADMA1 is selected.
 * - 10 - ADMA2 is selected.
 * - 11 - Reserved
 */
/*@{*/
#define BP_SDHC_PROCTL_DMAS  (8U)          /*!< Bit position for SDHC_PROCTL_DMAS. */
#define BM_SDHC_PROCTL_DMAS  (0x00000300U) /*!< Bit mask for SDHC_PROCTL_DMAS. */
#define BS_SDHC_PROCTL_DMAS  (2U)          /*!< Bit field size in bits for SDHC_PROCTL_DMAS. */

/*! @brief Read current value of the SDHC_PROCTL_DMAS field. */
#define BR_SDHC_PROCTL_DMAS(x) (HW_SDHC_PROCTL(x).B.DMAS)

/*! @brief Format value for bitfield SDHC_PROCTL_DMAS. */
#define BF_SDHC_PROCTL_DMAS(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_DMAS) & BM_SDHC_PROCTL_DMAS)

/*! @brief Set the DMAS field to a new value. */
#define BW_SDHC_PROCTL_DMAS(x, v) (HW_SDHC_PROCTL_WR(x, (HW_SDHC_PROCTL_RD(x) & ~BM_SDHC_PROCTL_DMAS) | BF_SDHC_PROCTL_DMAS(v)))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field SABGREQ[16] (RW)
 *
 * Used to stop executing a transaction at the next block gap for both DMA and
 * non-DMA transfers. Until the IRQSTATEN[TCSEN] is set to 1, indicating a
 * transfer completion, the host driver shall leave this bit set to 1. Clearing both
 * PROCTL[SABGREQ] and PROCTL[CREQ] does not cause the transaction to restart. Read
 * Wait is used to stop the read transaction at the block gap. The SDHC will
 * honor the PROCTL[SABGREQ] for write transfers, but for read transfers it requires
 * that SDIO card support read wait. Therefore, the host driver shall not set
 * this bit during read transfers unless the SDIO card supports read wait and has
 * set PROCTL[RWCTL] to 1, otherwise the SDHC will stop the SD bus clock to pause
 * the read operation during block gap. In the case of write transfers in which
 * the host driver writes data to the data port register, the host driver shall set
 * this bit after all block data is written. If this bit is set to 1, the host
 * driver shall not write data to the Data Port register after a block is sent.
 * Once this bit is set, the host driver shall not clear this bit before
 * IRQSTATEN[TCSEN] is set, otherwise the SDHC's behavior is undefined. This bit effects
 * PRSSTAT[RTA], PRSSTAT[WTA], and PRSSTAT[CDIHB].
 *
 * Values:
 * - 0 - Transfer
 * - 1 - Stop
 */
/*@{*/
#define BP_SDHC_PROCTL_SABGREQ (16U)       /*!< Bit position for SDHC_PROCTL_SABGREQ. */
#define BM_SDHC_PROCTL_SABGREQ (0x00010000U) /*!< Bit mask for SDHC_PROCTL_SABGREQ. */
#define BS_SDHC_PROCTL_SABGREQ (1U)        /*!< Bit field size in bits for SDHC_PROCTL_SABGREQ. */

/*! @brief Read current value of the SDHC_PROCTL_SABGREQ field. */
#define BR_SDHC_PROCTL_SABGREQ(x) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_SABGREQ))

/*! @brief Format value for bitfield SDHC_PROCTL_SABGREQ. */
#define BF_SDHC_PROCTL_SABGREQ(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_SABGREQ) & BM_SDHC_PROCTL_SABGREQ)

/*! @brief Set the SABGREQ field to a new value. */
#define BW_SDHC_PROCTL_SABGREQ(x, v) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_SABGREQ) = (v))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field CREQ[17] (RW)
 *
 * Used to restart a transaction which was stopped using the PROCTL[SABGREQ].
 * When a suspend operation is not accepted by the card, it is also by setting this
 * bit to restart the paused transfer. To cancel stop at the block gap, set
 * PROCTL[SABGREQ] to 0 and set this bit to 1 to restart the transfer. The SDHC
 * automatically clears this bit, therefore it is not necessary for the host driver to
 * set this bit to 0. If both PROCTL[SABGREQ] and this bit are 1, the continue
 * request is ignored.
 *
 * Values:
 * - 0 - No effect.
 * - 1 - Restart
 */
/*@{*/
#define BP_SDHC_PROCTL_CREQ  (17U)         /*!< Bit position for SDHC_PROCTL_CREQ. */
#define BM_SDHC_PROCTL_CREQ  (0x00020000U) /*!< Bit mask for SDHC_PROCTL_CREQ. */
#define BS_SDHC_PROCTL_CREQ  (1U)          /*!< Bit field size in bits for SDHC_PROCTL_CREQ. */

/*! @brief Read current value of the SDHC_PROCTL_CREQ field. */
#define BR_SDHC_PROCTL_CREQ(x) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_CREQ))

/*! @brief Format value for bitfield SDHC_PROCTL_CREQ. */
#define BF_SDHC_PROCTL_CREQ(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_CREQ) & BM_SDHC_PROCTL_CREQ)

/*! @brief Set the CREQ field to a new value. */
#define BW_SDHC_PROCTL_CREQ(x, v) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_CREQ) = (v))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field RWCTL[18] (RW)
 *
 * The read wait function is optional for SDIO cards. If the card supports read
 * wait, set this bit to enable use of the read wait protocol to stop read data
 * using the DAT[2] line. Otherwise, the SDHC has to stop the SD Clock to hold
 * read data, which restricts commands generation. When the host driver detects an
 * SDIO card insertion, it shall set this bit according to the CCCR of the card.
 * If the card does not support read wait, this bit shall never be set to 1,
 * otherwise DAT line conflicts may occur. If this bit is set to 0, stop at block gap
 * during read operation is also supported, but the SDHC will stop the SD Clock
 * to pause reading operation.
 *
 * Values:
 * - 0 - Disable read wait control, and stop SD clock at block gap when SABGREQ
 *     is set.
 * - 1 - Enable read wait control, and assert read wait without stopping SD
 *     clock at block gap when SABGREQ bit is set.
 */
/*@{*/
#define BP_SDHC_PROCTL_RWCTL (18U)         /*!< Bit position for SDHC_PROCTL_RWCTL. */
#define BM_SDHC_PROCTL_RWCTL (0x00040000U) /*!< Bit mask for SDHC_PROCTL_RWCTL. */
#define BS_SDHC_PROCTL_RWCTL (1U)          /*!< Bit field size in bits for SDHC_PROCTL_RWCTL. */

/*! @brief Read current value of the SDHC_PROCTL_RWCTL field. */
#define BR_SDHC_PROCTL_RWCTL(x) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_RWCTL))

/*! @brief Format value for bitfield SDHC_PROCTL_RWCTL. */
#define BF_SDHC_PROCTL_RWCTL(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_RWCTL) & BM_SDHC_PROCTL_RWCTL)

/*! @brief Set the RWCTL field to a new value. */
#define BW_SDHC_PROCTL_RWCTL(x, v) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_RWCTL) = (v))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field IABG[19] (RW)
 *
 * Valid only in 4-bit mode, of the SDIO card, and selects a sample point in the
 * interrupt cycle. Setting to 1 enables interrupt detection at the block gap
 * for a multiple block transfer. Setting to 0 disables interrupt detection during
 * a multiple block transfer. If the SDIO card can't signal an interrupt during a
 * multiple block transfer, this bit must be set to 0 to avoid an inadvertent
 * interrupt. When the host driver detects an SDIO card insertion, it shall set
 * this bit according to the CCCR of the card.
 *
 * Values:
 * - 0 - Disabled
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_PROCTL_IABG  (19U)         /*!< Bit position for SDHC_PROCTL_IABG. */
#define BM_SDHC_PROCTL_IABG  (0x00080000U) /*!< Bit mask for SDHC_PROCTL_IABG. */
#define BS_SDHC_PROCTL_IABG  (1U)          /*!< Bit field size in bits for SDHC_PROCTL_IABG. */

/*! @brief Read current value of the SDHC_PROCTL_IABG field. */
#define BR_SDHC_PROCTL_IABG(x) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_IABG))

/*! @brief Format value for bitfield SDHC_PROCTL_IABG. */
#define BF_SDHC_PROCTL_IABG(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_IABG) & BM_SDHC_PROCTL_IABG)

/*! @brief Set the IABG field to a new value. */
#define BW_SDHC_PROCTL_IABG(x, v) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_IABG) = (v))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field WECINT[24] (RW)
 *
 * Enables a wakeup event, via IRQSTAT[CINT]. This bit can be set to 1 if FN_WUS
 * (Wake Up Support) in CIS is set to 1. When this bit is set, the card
 * interrupt status and the SDHC interrupt can be asserted without SD_CLK toggling. When
 * the wakeup feature is not enabled, the SD_CLK must be active to assert the
 * card interrupt status and the SDHC interrupt.
 *
 * Values:
 * - 0 - Disabled
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_PROCTL_WECINT (24U)        /*!< Bit position for SDHC_PROCTL_WECINT. */
#define BM_SDHC_PROCTL_WECINT (0x01000000U) /*!< Bit mask for SDHC_PROCTL_WECINT. */
#define BS_SDHC_PROCTL_WECINT (1U)         /*!< Bit field size in bits for SDHC_PROCTL_WECINT. */

/*! @brief Read current value of the SDHC_PROCTL_WECINT field. */
#define BR_SDHC_PROCTL_WECINT(x) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_WECINT))

/*! @brief Format value for bitfield SDHC_PROCTL_WECINT. */
#define BF_SDHC_PROCTL_WECINT(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_WECINT) & BM_SDHC_PROCTL_WECINT)

/*! @brief Set the WECINT field to a new value. */
#define BW_SDHC_PROCTL_WECINT(x, v) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_WECINT) = (v))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field WECINS[25] (RW)
 *
 * Enables a wakeup event, via IRQSTAT[CINS]. FN_WUS (Wake Up Support) in CIS
 * does not effect this bit. When this bit is set, IRQSTATEN[CINSEN] and the SDHC
 * interrupt can be asserted without SD_CLK toggling. When the wakeup feature is
 * not enabled, the SD_CLK must be active to assert IRQSTATEN[CINSEN] and the SDHC
 * interrupt.
 *
 * Values:
 * - 0 - Disabled
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_PROCTL_WECINS (25U)        /*!< Bit position for SDHC_PROCTL_WECINS. */
#define BM_SDHC_PROCTL_WECINS (0x02000000U) /*!< Bit mask for SDHC_PROCTL_WECINS. */
#define BS_SDHC_PROCTL_WECINS (1U)         /*!< Bit field size in bits for SDHC_PROCTL_WECINS. */

/*! @brief Read current value of the SDHC_PROCTL_WECINS field. */
#define BR_SDHC_PROCTL_WECINS(x) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_WECINS))

/*! @brief Format value for bitfield SDHC_PROCTL_WECINS. */
#define BF_SDHC_PROCTL_WECINS(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_WECINS) & BM_SDHC_PROCTL_WECINS)

/*! @brief Set the WECINS field to a new value. */
#define BW_SDHC_PROCTL_WECINS(x, v) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_WECINS) = (v))
/*@}*/

/*!
 * @name Register SDHC_PROCTL, field WECRM[26] (RW)
 *
 * Enables a wakeup event, via IRQSTAT[CRM]. FN_WUS (Wake Up Support) in CIS
 * does not effect this bit. When this bit is set, IRQSTAT[CRM] and the SDHC
 * interrupt can be asserted without SD_CLK toggling. When the wakeup feature is not
 * enabled, the SD_CLK must be active to assert IRQSTAT[CRM] and the SDHC interrupt.
 *
 * Values:
 * - 0 - Disabled
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_PROCTL_WECRM (26U)         /*!< Bit position for SDHC_PROCTL_WECRM. */
#define BM_SDHC_PROCTL_WECRM (0x04000000U) /*!< Bit mask for SDHC_PROCTL_WECRM. */
#define BS_SDHC_PROCTL_WECRM (1U)          /*!< Bit field size in bits for SDHC_PROCTL_WECRM. */

/*! @brief Read current value of the SDHC_PROCTL_WECRM field. */
#define BR_SDHC_PROCTL_WECRM(x) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_WECRM))

/*! @brief Format value for bitfield SDHC_PROCTL_WECRM. */
#define BF_SDHC_PROCTL_WECRM(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_PROCTL_WECRM) & BM_SDHC_PROCTL_WECRM)

/*! @brief Set the WECRM field to a new value. */
#define BW_SDHC_PROCTL_WECRM(x, v) (BITBAND_ACCESS32(HW_SDHC_PROCTL_ADDR(x), BP_SDHC_PROCTL_WECRM) = (v))
/*@}*/

/*******************************************************************************
 * HW_SDHC_SYSCTL - System Control register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_SYSCTL - System Control register (RW)
 *
 * Reset value: 0x00008008U
 */
typedef union _hw_sdhc_sysctl
{
    uint32_t U;
    struct _hw_sdhc_sysctl_bitfields
    {
        uint32_t IPGEN : 1;            /*!< [0] IPG Clock Enable */
        uint32_t HCKEN : 1;            /*!< [1] System Clock Enable */
        uint32_t PEREN : 1;            /*!< [2] Peripheral Clock Enable */
        uint32_t SDCLKEN : 1;          /*!< [3] SD Clock Enable */
        uint32_t DVS : 4;              /*!< [7:4] Divisor */
        uint32_t SDCLKFS : 8;          /*!< [15:8] SDCLK Frequency Select */
        uint32_t DTOCV : 4;            /*!< [19:16] Data Timeout Counter Value */
        uint32_t RESERVED0 : 4;        /*!< [23:20]  */
        uint32_t RSTA : 1;             /*!< [24] Software Reset For ALL */
        uint32_t RSTC : 1;             /*!< [25] Software Reset For CMD Line */
        uint32_t RSTD : 1;             /*!< [26] Software Reset For DAT Line */
        uint32_t INITA : 1;            /*!< [27] Initialization Active */
        uint32_t RESERVED1 : 4;        /*!< [31:28]  */
    } B;
} hw_sdhc_sysctl_t;

/*!
 * @name Constants and macros for entire SDHC_SYSCTL register
 */
/*@{*/
#define HW_SDHC_SYSCTL_ADDR(x)   ((x) + 0x2CU)

#define HW_SDHC_SYSCTL(x)        (*(__IO hw_sdhc_sysctl_t *) HW_SDHC_SYSCTL_ADDR(x))
#define HW_SDHC_SYSCTL_RD(x)     (HW_SDHC_SYSCTL(x).U)
#define HW_SDHC_SYSCTL_WR(x, v)  (HW_SDHC_SYSCTL(x).U = (v))
#define HW_SDHC_SYSCTL_SET(x, v) (HW_SDHC_SYSCTL_WR(x, HW_SDHC_SYSCTL_RD(x) |  (v)))
#define HW_SDHC_SYSCTL_CLR(x, v) (HW_SDHC_SYSCTL_WR(x, HW_SDHC_SYSCTL_RD(x) & ~(v)))
#define HW_SDHC_SYSCTL_TOG(x, v) (HW_SDHC_SYSCTL_WR(x, HW_SDHC_SYSCTL_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_SYSCTL bitfields
 */

/*!
 * @name Register SDHC_SYSCTL, field IPGEN[0] (RW)
 *
 * If this bit is set, bus clock will always be active and no automatic gating
 * is applied. The bus clock will be internally gated off, if none of the
 * following factors are met: The cmd part is reset, or Data part is reset, or Soft
 * reset, or The cmd is about to send, or Clock divisor is just updated, or Continue
 * request is just set, or This bit is set, or Card insertion is detected, or Card
 * removal is detected, or Card external interrupt is detected, or The SDHC
 * clock is not gated off The bus clock will not be auto gated off if the SDHC clock
 * is not gated off. So clearing only this bit has no effect unless the PEREN bit
 * is also cleared.
 *
 * Values:
 * - 0 - Bus clock will be internally gated off.
 * - 1 - Bus clock will not be automatically gated off.
 */
/*@{*/
#define BP_SDHC_SYSCTL_IPGEN (0U)          /*!< Bit position for SDHC_SYSCTL_IPGEN. */
#define BM_SDHC_SYSCTL_IPGEN (0x00000001U) /*!< Bit mask for SDHC_SYSCTL_IPGEN. */
#define BS_SDHC_SYSCTL_IPGEN (1U)          /*!< Bit field size in bits for SDHC_SYSCTL_IPGEN. */

/*! @brief Read current value of the SDHC_SYSCTL_IPGEN field. */
#define BR_SDHC_SYSCTL_IPGEN(x) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_IPGEN))

/*! @brief Format value for bitfield SDHC_SYSCTL_IPGEN. */
#define BF_SDHC_SYSCTL_IPGEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_SYSCTL_IPGEN) & BM_SDHC_SYSCTL_IPGEN)

/*! @brief Set the IPGEN field to a new value. */
#define BW_SDHC_SYSCTL_IPGEN(x, v) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_IPGEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_SYSCTL, field HCKEN[1] (RW)
 *
 * If this bit is set, system clock will always be active and no automatic
 * gating is applied. When this bit is cleared, system clock will be automatically off
 * when no data transfer is on the SD bus.
 *
 * Values:
 * - 0 - System clock will be internally gated off.
 * - 1 - System clock will not be automatically gated off.
 */
/*@{*/
#define BP_SDHC_SYSCTL_HCKEN (1U)          /*!< Bit position for SDHC_SYSCTL_HCKEN. */
#define BM_SDHC_SYSCTL_HCKEN (0x00000002U) /*!< Bit mask for SDHC_SYSCTL_HCKEN. */
#define BS_SDHC_SYSCTL_HCKEN (1U)          /*!< Bit field size in bits for SDHC_SYSCTL_HCKEN. */

/*! @brief Read current value of the SDHC_SYSCTL_HCKEN field. */
#define BR_SDHC_SYSCTL_HCKEN(x) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_HCKEN))

/*! @brief Format value for bitfield SDHC_SYSCTL_HCKEN. */
#define BF_SDHC_SYSCTL_HCKEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_SYSCTL_HCKEN) & BM_SDHC_SYSCTL_HCKEN)

/*! @brief Set the HCKEN field to a new value. */
#define BW_SDHC_SYSCTL_HCKEN(x, v) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_HCKEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_SYSCTL, field PEREN[2] (RW)
 *
 * If this bit is set, SDHC clock will always be active and no automatic gating
 * is applied. Thus the SDCLK is active except for when auto gating-off during
 * buffer danger (buffer about to over-run or under-run). When this bit is cleared,
 * the SDHC clock will be automatically off whenever there is no transaction on
 * the SD bus. Because this bit is only a feature enabling bit, clearing this bit
 * does not stop SDCLK immediately. The SDHC clock will be internally gated off,
 * if none of the following factors are met: The cmd part is reset, or Data part
 * is reset, or A soft reset, or The cmd is about to send, or Clock divisor is
 * just updated, or Continue request is just set, or This bit is set, or Card
 * insertion is detected, or Card removal is detected, or Card external interrupt is
 * detected, or 80 clocks for initialization phase is ongoing
 *
 * Values:
 * - 0 - SDHC clock will be internally gated off.
 * - 1 - SDHC clock will not be automatically gated off.
 */
/*@{*/
#define BP_SDHC_SYSCTL_PEREN (2U)          /*!< Bit position for SDHC_SYSCTL_PEREN. */
#define BM_SDHC_SYSCTL_PEREN (0x00000004U) /*!< Bit mask for SDHC_SYSCTL_PEREN. */
#define BS_SDHC_SYSCTL_PEREN (1U)          /*!< Bit field size in bits for SDHC_SYSCTL_PEREN. */

/*! @brief Read current value of the SDHC_SYSCTL_PEREN field. */
#define BR_SDHC_SYSCTL_PEREN(x) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_PEREN))

/*! @brief Format value for bitfield SDHC_SYSCTL_PEREN. */
#define BF_SDHC_SYSCTL_PEREN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_SYSCTL_PEREN) & BM_SDHC_SYSCTL_PEREN)

/*! @brief Set the PEREN field to a new value. */
#define BW_SDHC_SYSCTL_PEREN(x, v) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_PEREN) = (v))
/*@}*/

/*!
 * @name Register SDHC_SYSCTL, field SDCLKEN[3] (RW)
 *
 * The host controller shall stop SDCLK when writing this bit to 0. SDCLK
 * frequency can be changed when this bit is 0. Then, the host controller shall
 * maintain the same clock frequency until SDCLK is stopped (stop at SDCLK = 0). If the
 * IRQSTAT[CINS] is cleared, this bit must be cleared by the host driver to save
 * power.
 */
/*@{*/
#define BP_SDHC_SYSCTL_SDCLKEN (3U)        /*!< Bit position for SDHC_SYSCTL_SDCLKEN. */
#define BM_SDHC_SYSCTL_SDCLKEN (0x00000008U) /*!< Bit mask for SDHC_SYSCTL_SDCLKEN. */
#define BS_SDHC_SYSCTL_SDCLKEN (1U)        /*!< Bit field size in bits for SDHC_SYSCTL_SDCLKEN. */

/*! @brief Read current value of the SDHC_SYSCTL_SDCLKEN field. */
#define BR_SDHC_SYSCTL_SDCLKEN(x) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_SDCLKEN))

/*! @brief Format value for bitfield SDHC_SYSCTL_SDCLKEN. */
#define BF_SDHC_SYSCTL_SDCLKEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_SYSCTL_SDCLKEN) & BM_SDHC_SYSCTL_SDCLKEN)

/*! @brief Set the SDCLKEN field to a new value. */
#define BW_SDHC_SYSCTL_SDCLKEN(x, v) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_SDCLKEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_SYSCTL, field DVS[7:4] (RW)
 *
 * Used to provide a more exact divisor to generate the desired SD clock
 * frequency. Note the divider can even support odd divisor without deterioration of
 * duty cycle. The setting are as following:
 *
 * Values:
 * - 0 - Divisor by 1.
 * - 1 - Divisor by 2.
 * - 1110 - Divisor by 15.
 * - 1111 - Divisor by 16.
 */
/*@{*/
#define BP_SDHC_SYSCTL_DVS   (4U)          /*!< Bit position for SDHC_SYSCTL_DVS. */
#define BM_SDHC_SYSCTL_DVS   (0x000000F0U) /*!< Bit mask for SDHC_SYSCTL_DVS. */
#define BS_SDHC_SYSCTL_DVS   (4U)          /*!< Bit field size in bits for SDHC_SYSCTL_DVS. */

/*! @brief Read current value of the SDHC_SYSCTL_DVS field. */
#define BR_SDHC_SYSCTL_DVS(x) (HW_SDHC_SYSCTL(x).B.DVS)

/*! @brief Format value for bitfield SDHC_SYSCTL_DVS. */
#define BF_SDHC_SYSCTL_DVS(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_SYSCTL_DVS) & BM_SDHC_SYSCTL_DVS)

/*! @brief Set the DVS field to a new value. */
#define BW_SDHC_SYSCTL_DVS(x, v) (HW_SDHC_SYSCTL_WR(x, (HW_SDHC_SYSCTL_RD(x) & ~BM_SDHC_SYSCTL_DVS) | BF_SDHC_SYSCTL_DVS(v)))
/*@}*/

/*!
 * @name Register SDHC_SYSCTL, field SDCLKFS[15:8] (RW)
 *
 * Used to select the frequency of the SDCLK pin. The frequency is not
 * programmed directly. Rather this register holds the prescaler (this register) and
 * divisor (next register) of the base clock frequency register. Setting 00h bypasses
 * the frequency prescaler of the SD Clock. Multiple bits must not be set, or the
 * behavior of this prescaler is undefined. The two default divider values can
 * be calculated by the frequency of SDHC clock and the following divisor bits.
 * The frequency of SDCLK is set by the following formula: Clock frequency = (Base
 * clock) / (prescaler x divisor) For example, if the base clock frequency is 96
 * MHz, and the target frequency is 25 MHz, then choosing the prescaler value of
 * 01h and divisor value of 1h will yield 24 MHz, which is the nearest frequency
 * less than or equal to the target. Similarly, to approach a clock value of 400
 * kHz, the prescaler value of 08h and divisor value of eh yields the exact clock
 * value of 400 kHz. The reset value of this field is 80h, so if the input base
 * clock ( SDHC clock ) is about 96 MHz, the default SD clock after reset is 375
 * kHz. According to the SD Physical Specification Version 1.1 and the SDIO Card
 * Specification Version 1.2, the maximum SD clock frequency is 50 MHz and shall
 * never exceed this limit. Only the following settings are allowed:
 *
 * Values:
 * - 1 - Base clock divided by 2.
 * - 10 - Base clock divided by 4.
 * - 100 - Base clock divided by 8.
 * - 1000 - Base clock divided by 16.
 * - 10000 - Base clock divided by 32.
 * - 100000 - Base clock divided by 64.
 * - 1000000 - Base clock divided by 128.
 * - 10000000 - Base clock divided by 256.
 */
/*@{*/
#define BP_SDHC_SYSCTL_SDCLKFS (8U)        /*!< Bit position for SDHC_SYSCTL_SDCLKFS. */
#define BM_SDHC_SYSCTL_SDCLKFS (0x0000FF00U) /*!< Bit mask for SDHC_SYSCTL_SDCLKFS. */
#define BS_SDHC_SYSCTL_SDCLKFS (8U)        /*!< Bit field size in bits for SDHC_SYSCTL_SDCLKFS. */

/*! @brief Read current value of the SDHC_SYSCTL_SDCLKFS field. */
#define BR_SDHC_SYSCTL_SDCLKFS(x) (HW_SDHC_SYSCTL(x).B.SDCLKFS)

/*! @brief Format value for bitfield SDHC_SYSCTL_SDCLKFS. */
#define BF_SDHC_SYSCTL_SDCLKFS(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_SYSCTL_SDCLKFS) & BM_SDHC_SYSCTL_SDCLKFS)

/*! @brief Set the SDCLKFS field to a new value. */
#define BW_SDHC_SYSCTL_SDCLKFS(x, v) (HW_SDHC_SYSCTL_WR(x, (HW_SDHC_SYSCTL_RD(x) & ~BM_SDHC_SYSCTL_SDCLKFS) | BF_SDHC_SYSCTL_SDCLKFS(v)))
/*@}*/

/*!
 * @name Register SDHC_SYSCTL, field DTOCV[19:16] (RW)
 *
 * Determines the interval by which DAT line timeouts are detected. See
 * IRQSTAT[DTOE] for information on factors that dictate time-out generation. Time-out
 * clock frequency will be generated by dividing the base clock SDCLK value by this
 * value. The host driver can clear IRQSTATEN[DTOESEN] to prevent inadvertent
 * time-out events.
 *
 * Values:
 * - 0000 - SDCLK x 2 13
 * - 0001 - SDCLK x 2 14
 * - 1110 - SDCLK x 2 27
 * - 1111 - Reserved
 */
/*@{*/
#define BP_SDHC_SYSCTL_DTOCV (16U)         /*!< Bit position for SDHC_SYSCTL_DTOCV. */
#define BM_SDHC_SYSCTL_DTOCV (0x000F0000U) /*!< Bit mask for SDHC_SYSCTL_DTOCV. */
#define BS_SDHC_SYSCTL_DTOCV (4U)          /*!< Bit field size in bits for SDHC_SYSCTL_DTOCV. */

/*! @brief Read current value of the SDHC_SYSCTL_DTOCV field. */
#define BR_SDHC_SYSCTL_DTOCV(x) (HW_SDHC_SYSCTL(x).B.DTOCV)

/*! @brief Format value for bitfield SDHC_SYSCTL_DTOCV. */
#define BF_SDHC_SYSCTL_DTOCV(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_SYSCTL_DTOCV) & BM_SDHC_SYSCTL_DTOCV)

/*! @brief Set the DTOCV field to a new value. */
#define BW_SDHC_SYSCTL_DTOCV(x, v) (HW_SDHC_SYSCTL_WR(x, (HW_SDHC_SYSCTL_RD(x) & ~BM_SDHC_SYSCTL_DTOCV) | BF_SDHC_SYSCTL_DTOCV(v)))
/*@}*/

/*!
 * @name Register SDHC_SYSCTL, field RSTA[24] (WORZ)
 *
 * Effects the entire host controller except for the card detection circuit.
 * Register bits of type ROC, RW, RW1C, RWAC are cleared. During its initialization,
 * the host driver shall set this bit to 1 to reset the SDHC. The SDHC shall
 * reset this bit to 0 when the capabilities registers are valid and the host driver
 * can read them. Additional use of software reset for all does not affect the
 * value of the capabilities registers. After this bit is set, it is recommended
 * that the host driver reset the external card and reinitialize it.
 *
 * Values:
 * - 0 - No reset.
 * - 1 - Reset.
 */
/*@{*/
#define BP_SDHC_SYSCTL_RSTA  (24U)         /*!< Bit position for SDHC_SYSCTL_RSTA. */
#define BM_SDHC_SYSCTL_RSTA  (0x01000000U) /*!< Bit mask for SDHC_SYSCTL_RSTA. */
#define BS_SDHC_SYSCTL_RSTA  (1U)          /*!< Bit field size in bits for SDHC_SYSCTL_RSTA. */

/*! @brief Format value for bitfield SDHC_SYSCTL_RSTA. */
#define BF_SDHC_SYSCTL_RSTA(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_SYSCTL_RSTA) & BM_SDHC_SYSCTL_RSTA)

/*! @brief Set the RSTA field to a new value. */
#define BW_SDHC_SYSCTL_RSTA(x, v) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_RSTA) = (v))
/*@}*/

/*!
 * @name Register SDHC_SYSCTL, field RSTC[25] (WORZ)
 *
 * Only part of the command circuit is reset. The following registers and bits
 * are cleared by this bit: PRSSTAT[CIHB] IRQSTAT[CC]
 *
 * Values:
 * - 0 - No reset.
 * - 1 - Reset.
 */
/*@{*/
#define BP_SDHC_SYSCTL_RSTC  (25U)         /*!< Bit position for SDHC_SYSCTL_RSTC. */
#define BM_SDHC_SYSCTL_RSTC  (0x02000000U) /*!< Bit mask for SDHC_SYSCTL_RSTC. */
#define BS_SDHC_SYSCTL_RSTC  (1U)          /*!< Bit field size in bits for SDHC_SYSCTL_RSTC. */

/*! @brief Format value for bitfield SDHC_SYSCTL_RSTC. */
#define BF_SDHC_SYSCTL_RSTC(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_SYSCTL_RSTC) & BM_SDHC_SYSCTL_RSTC)

/*! @brief Set the RSTC field to a new value. */
#define BW_SDHC_SYSCTL_RSTC(x, v) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_RSTC) = (v))
/*@}*/

/*!
 * @name Register SDHC_SYSCTL, field RSTD[26] (WORZ)
 *
 * Only part of the data circuit is reset. DMA circuit is also reset. The
 * following registers and bits are cleared by this bit: Data Port register Buffer Is
 * Cleared And Initialized.Present State register Buffer Read Enable Buffer Write
 * Enable Read Transfer Active Write Transfer Active DAT Line Active Command
 * Inhibit (DAT) Protocol Control register Continue Request Stop At Block Gap Request
 * Interrupt Status register Buffer Read Ready Buffer Write Ready DMA Interrupt
 * Block Gap Event Transfer Complete
 *
 * Values:
 * - 0 - No reset.
 * - 1 - Reset.
 */
/*@{*/
#define BP_SDHC_SYSCTL_RSTD  (26U)         /*!< Bit position for SDHC_SYSCTL_RSTD. */
#define BM_SDHC_SYSCTL_RSTD  (0x04000000U) /*!< Bit mask for SDHC_SYSCTL_RSTD. */
#define BS_SDHC_SYSCTL_RSTD  (1U)          /*!< Bit field size in bits for SDHC_SYSCTL_RSTD. */

/*! @brief Format value for bitfield SDHC_SYSCTL_RSTD. */
#define BF_SDHC_SYSCTL_RSTD(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_SYSCTL_RSTD) & BM_SDHC_SYSCTL_RSTD)

/*! @brief Set the RSTD field to a new value. */
#define BW_SDHC_SYSCTL_RSTD(x, v) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_RSTD) = (v))
/*@}*/

/*!
 * @name Register SDHC_SYSCTL, field INITA[27] (RW)
 *
 * When this bit is set, 80 SD-clocks are sent to the card. After the 80 clocks
 * are sent, this bit is self-cleared. This bit is very useful during the card
 * power-up period when 74 SD-clocks are needed and the clock auto gating feature
 * is enabled. Writing 1 to this bit when this bit is already 1 has no effect.
 * Writing 0 to this bit at any time has no effect. When either of the PRSSTAT[CIHB]
 * and PRSSTAT[CDIHB] bits are set, writing 1 to this bit is ignored, that is,
 * when command line or data lines are active, write to this bit is not allowed.
 * On the otherhand, when this bit is set, that is, during intialization active
 * period, it is allowed to issue command, and the command bit stream will appear
 * on the CMD pad after all 80 clock cycles are done. So when this command ends,
 * the driver can make sure the 80 clock cycles are sent out. This is very useful
 * when the driver needs send 80 cycles to the card and does not want to wait
 * till this bit is self-cleared.
 */
/*@{*/
#define BP_SDHC_SYSCTL_INITA (27U)         /*!< Bit position for SDHC_SYSCTL_INITA. */
#define BM_SDHC_SYSCTL_INITA (0x08000000U) /*!< Bit mask for SDHC_SYSCTL_INITA. */
#define BS_SDHC_SYSCTL_INITA (1U)          /*!< Bit field size in bits for SDHC_SYSCTL_INITA. */

/*! @brief Read current value of the SDHC_SYSCTL_INITA field. */
#define BR_SDHC_SYSCTL_INITA(x) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_INITA))

/*! @brief Format value for bitfield SDHC_SYSCTL_INITA. */
#define BF_SDHC_SYSCTL_INITA(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_SYSCTL_INITA) & BM_SDHC_SYSCTL_INITA)

/*! @brief Set the INITA field to a new value. */
#define BW_SDHC_SYSCTL_INITA(x, v) (BITBAND_ACCESS32(HW_SDHC_SYSCTL_ADDR(x), BP_SDHC_SYSCTL_INITA) = (v))
/*@}*/

/*******************************************************************************
 * HW_SDHC_IRQSTAT - Interrupt Status register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_IRQSTAT - Interrupt Status register (RW)
 *
 * Reset value: 0x00000000U
 *
 * An interrupt is generated when the Normal Interrupt Signal Enable is enabled
 * and at least one of the status bits is set to 1. For all bits, writing 1 to a
 * bit clears it; writing to 0 keeps the bit unchanged. More than one status can
 * be cleared with a single register write. For Card Interrupt, before writing 1
 * to clear, it is required that the card stops asserting the interrupt, meaning
 * that when the Card Driver services the interrupt condition, otherwise the CINT
 * bit will be asserted again. The table below shows the relationship between
 * the CTOE and the CC bits. SDHC status for CTOE/CC bit combinations Command
 * complete Command timeout error Meaning of the status 0 0 X X 1 Response not
 * received within 64 SDCLK cycles 1 0 Response received The table below shows the
 * relationship between the Transfer Complete and the Data Timeout Error. SDHC status
 * for data timeout error/transfer complete bit combinations Transfer complete
 * Data timeout error Meaning of the status 0 0 X 0 1 Timeout occurred during
 * transfer 1 X Data transfer complete The table below shows the relationship between
 * the command CRC Error (CCE) and Command Timeout Error (CTOE). SDHC status for
 * CCE/CTOE Bit Combinations Command complete Command timeout error Meaning of
 * the status 0 0 No error 0 1 Response timeout error 1 0 Response CRC error 1 1
 * CMD line conflict
 */
typedef union _hw_sdhc_irqstat
{
    uint32_t U;
    struct _hw_sdhc_irqstat_bitfields
    {
        uint32_t CC : 1;               /*!< [0] Command Complete */
        uint32_t TC : 1;               /*!< [1] Transfer Complete */
        uint32_t BGE : 1;              /*!< [2] Block Gap Event */
        uint32_t DINT : 1;             /*!< [3] DMA Interrupt */
        uint32_t BWR : 1;              /*!< [4] Buffer Write Ready */
        uint32_t BRR : 1;              /*!< [5] Buffer Read Ready */
        uint32_t CINS : 1;             /*!< [6] Card Insertion */
        uint32_t CRM : 1;              /*!< [7] Card Removal */
        uint32_t CINT : 1;             /*!< [8] Card Interrupt */
        uint32_t RESERVED0 : 7;        /*!< [15:9]  */
        uint32_t CTOE : 1;             /*!< [16] Command Timeout Error */
        uint32_t CCE : 1;              /*!< [17] Command CRC Error */
        uint32_t CEBE : 1;             /*!< [18] Command End Bit Error */
        uint32_t CIE : 1;              /*!< [19] Command Index Error */
        uint32_t DTOE : 1;             /*!< [20] Data Timeout Error */
        uint32_t DCE : 1;              /*!< [21] Data CRC Error */
        uint32_t DEBE : 1;             /*!< [22] Data End Bit Error */
        uint32_t RESERVED1 : 1;        /*!< [23]  */
        uint32_t AC12E : 1;            /*!< [24] Auto CMD12 Error */
        uint32_t RESERVED2 : 3;        /*!< [27:25]  */
        uint32_t DMAE : 1;             /*!< [28] DMA Error */
        uint32_t RESERVED3 : 3;        /*!< [31:29]  */
    } B;
} hw_sdhc_irqstat_t;

/*!
 * @name Constants and macros for entire SDHC_IRQSTAT register
 */
/*@{*/
#define HW_SDHC_IRQSTAT_ADDR(x)  ((x) + 0x30U)

#define HW_SDHC_IRQSTAT(x)       (*(__IO hw_sdhc_irqstat_t *) HW_SDHC_IRQSTAT_ADDR(x))
#define HW_SDHC_IRQSTAT_RD(x)    (HW_SDHC_IRQSTAT(x).U)
#define HW_SDHC_IRQSTAT_WR(x, v) (HW_SDHC_IRQSTAT(x).U = (v))
#define HW_SDHC_IRQSTAT_SET(x, v) (HW_SDHC_IRQSTAT_WR(x, HW_SDHC_IRQSTAT_RD(x) |  (v)))
#define HW_SDHC_IRQSTAT_CLR(x, v) (HW_SDHC_IRQSTAT_WR(x, HW_SDHC_IRQSTAT_RD(x) & ~(v)))
#define HW_SDHC_IRQSTAT_TOG(x, v) (HW_SDHC_IRQSTAT_WR(x, HW_SDHC_IRQSTAT_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_IRQSTAT bitfields
 */

/*!
 * @name Register SDHC_IRQSTAT, field CC[0] (W1C)
 *
 * This bit is set when you receive the end bit of the command response, except
 * Auto CMD12. See PRSSTAT[CIHB].
 *
 * Values:
 * - 0 - Command not complete.
 * - 1 - Command complete.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_CC   (0U)          /*!< Bit position for SDHC_IRQSTAT_CC. */
#define BM_SDHC_IRQSTAT_CC   (0x00000001U) /*!< Bit mask for SDHC_IRQSTAT_CC. */
#define BS_SDHC_IRQSTAT_CC   (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_CC. */

/*! @brief Read current value of the SDHC_IRQSTAT_CC field. */
#define BR_SDHC_IRQSTAT_CC(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CC))

/*! @brief Format value for bitfield SDHC_IRQSTAT_CC. */
#define BF_SDHC_IRQSTAT_CC(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_CC) & BM_SDHC_IRQSTAT_CC)

/*! @brief Set the CC field to a new value. */
#define BW_SDHC_IRQSTAT_CC(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CC) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field TC[1] (W1C)
 *
 * This bit is set when a read or write transfer is completed. In the case of a
 * read transaction: This bit is set at the falling edge of the read transfer
 * active status. There are two cases in which this interrupt is generated. The
 * first is when a data transfer is completed as specified by the data length, after
 * the last data has been read to the host system. The second is when data has
 * stopped at the block gap and completed the data transfer by setting
 * PROCTL[SABGREQ], after valid data has been read to the host system. In the case of a write
 * transaction: This bit is set at the falling edge of the DAT line active
 * status. There are two cases in which this interrupt is generated. The first is when
 * the last data is written to the SD card as specified by the data length and
 * the busy signal is released. The second is when data transfers are stopped at
 * the block gap, by setting PROCTL[SABGREQ], and the data transfers are
 * completed,after valid data is written to the SD card and the busy signal released.
 *
 * Values:
 * - 0 - Transfer not complete.
 * - 1 - Transfer complete.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_TC   (1U)          /*!< Bit position for SDHC_IRQSTAT_TC. */
#define BM_SDHC_IRQSTAT_TC   (0x00000002U) /*!< Bit mask for SDHC_IRQSTAT_TC. */
#define BS_SDHC_IRQSTAT_TC   (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_TC. */

/*! @brief Read current value of the SDHC_IRQSTAT_TC field. */
#define BR_SDHC_IRQSTAT_TC(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_TC))

/*! @brief Format value for bitfield SDHC_IRQSTAT_TC. */
#define BF_SDHC_IRQSTAT_TC(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_TC) & BM_SDHC_IRQSTAT_TC)

/*! @brief Set the TC field to a new value. */
#define BW_SDHC_IRQSTAT_TC(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_TC) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field BGE[2] (W1C)
 *
 * If PROCTL[SABGREQ] is set, this bit is set when a read or write transaction
 * is stopped at a block gap. If PROCTL[SABGREQ] is not set to 1, this bit is not
 * set to 1. In the case of a read transaction: This bit is set at the falling
 * edge of the DAT line active status, when the transaction is stopped at SD Bus
 * timing. The read wait must be supported in order to use this function. In the
 * case of write transaction: This bit is set at the falling edge of write transfer
 * active status, after getting CRC status at SD bus timing.
 *
 * Values:
 * - 0 - No block gap event.
 * - 1 - Transaction stopped at block gap.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_BGE  (2U)          /*!< Bit position for SDHC_IRQSTAT_BGE. */
#define BM_SDHC_IRQSTAT_BGE  (0x00000004U) /*!< Bit mask for SDHC_IRQSTAT_BGE. */
#define BS_SDHC_IRQSTAT_BGE  (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_BGE. */

/*! @brief Read current value of the SDHC_IRQSTAT_BGE field. */
#define BR_SDHC_IRQSTAT_BGE(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_BGE))

/*! @brief Format value for bitfield SDHC_IRQSTAT_BGE. */
#define BF_SDHC_IRQSTAT_BGE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_BGE) & BM_SDHC_IRQSTAT_BGE)

/*! @brief Set the BGE field to a new value. */
#define BW_SDHC_IRQSTAT_BGE(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_BGE) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field DINT[3] (W1C)
 *
 * Occurs only when the internal DMA finishes the data transfer successfully.
 * Whenever errors occur during data transfer, this bit will not be set. Instead,
 * the DMAE bit will be set. Either Simple DMA or ADMA finishes data transferring,
 * this bit will be set.
 *
 * Values:
 * - 0 - No DMA Interrupt.
 * - 1 - DMA Interrupt is generated.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_DINT (3U)          /*!< Bit position for SDHC_IRQSTAT_DINT. */
#define BM_SDHC_IRQSTAT_DINT (0x00000008U) /*!< Bit mask for SDHC_IRQSTAT_DINT. */
#define BS_SDHC_IRQSTAT_DINT (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_DINT. */

/*! @brief Read current value of the SDHC_IRQSTAT_DINT field. */
#define BR_SDHC_IRQSTAT_DINT(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_DINT))

/*! @brief Format value for bitfield SDHC_IRQSTAT_DINT. */
#define BF_SDHC_IRQSTAT_DINT(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_DINT) & BM_SDHC_IRQSTAT_DINT)

/*! @brief Set the DINT field to a new value. */
#define BW_SDHC_IRQSTAT_DINT(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_DINT) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field BWR[4] (W1C)
 *
 * This status bit is set if the Buffer Write Enable bit, in the Present State
 * register, changes from 0 to 1. See the Buffer Write Enable bit in the Present
 * State register for additional information.
 *
 * Values:
 * - 0 - Not ready to write buffer.
 * - 1 - Ready to write buffer.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_BWR  (4U)          /*!< Bit position for SDHC_IRQSTAT_BWR. */
#define BM_SDHC_IRQSTAT_BWR  (0x00000010U) /*!< Bit mask for SDHC_IRQSTAT_BWR. */
#define BS_SDHC_IRQSTAT_BWR  (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_BWR. */

/*! @brief Read current value of the SDHC_IRQSTAT_BWR field. */
#define BR_SDHC_IRQSTAT_BWR(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_BWR))

/*! @brief Format value for bitfield SDHC_IRQSTAT_BWR. */
#define BF_SDHC_IRQSTAT_BWR(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_BWR) & BM_SDHC_IRQSTAT_BWR)

/*! @brief Set the BWR field to a new value. */
#define BW_SDHC_IRQSTAT_BWR(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_BWR) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field BRR[5] (W1C)
 *
 * This status bit is set if the Buffer Read Enable bit, in the Present State
 * register, changes from 0 to 1. See the Buffer Read Enable bit in the Present
 * State register for additional information.
 *
 * Values:
 * - 0 - Not ready to read buffer.
 * - 1 - Ready to read buffer.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_BRR  (5U)          /*!< Bit position for SDHC_IRQSTAT_BRR. */
#define BM_SDHC_IRQSTAT_BRR  (0x00000020U) /*!< Bit mask for SDHC_IRQSTAT_BRR. */
#define BS_SDHC_IRQSTAT_BRR  (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_BRR. */

/*! @brief Read current value of the SDHC_IRQSTAT_BRR field. */
#define BR_SDHC_IRQSTAT_BRR(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_BRR))

/*! @brief Format value for bitfield SDHC_IRQSTAT_BRR. */
#define BF_SDHC_IRQSTAT_BRR(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_BRR) & BM_SDHC_IRQSTAT_BRR)

/*! @brief Set the BRR field to a new value. */
#define BW_SDHC_IRQSTAT_BRR(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_BRR) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field CINS[6] (W1C)
 *
 * This status bit is set if the Card Inserted bit in the Present State register
 * changes from 0 to 1. When the host driver writes this bit to 1 to clear this
 * status, the status of the Card Inserted in the Present State register must be
 * confirmed. Because the card state may possibly be changed when the host driver
 * clears this bit and the interrupt event may not be generated. When this bit
 * is cleared, it will be set again if a card is inserted. To leave it cleared,
 * clear the Card Inserted Status Enable bit in Interrupt Status Enable register.
 *
 * Values:
 * - 0 - Card state unstable or removed.
 * - 1 - Card inserted.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_CINS (6U)          /*!< Bit position for SDHC_IRQSTAT_CINS. */
#define BM_SDHC_IRQSTAT_CINS (0x00000040U) /*!< Bit mask for SDHC_IRQSTAT_CINS. */
#define BS_SDHC_IRQSTAT_CINS (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_CINS. */

/*! @brief Read current value of the SDHC_IRQSTAT_CINS field. */
#define BR_SDHC_IRQSTAT_CINS(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CINS))

/*! @brief Format value for bitfield SDHC_IRQSTAT_CINS. */
#define BF_SDHC_IRQSTAT_CINS(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_CINS) & BM_SDHC_IRQSTAT_CINS)

/*! @brief Set the CINS field to a new value. */
#define BW_SDHC_IRQSTAT_CINS(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CINS) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field CRM[7] (W1C)
 *
 * This status bit is set if the Card Inserted bit in the Present State register
 * changes from 1 to 0. When the host driver writes this bit to 1 to clear this
 * status, the status of the Card Inserted in the Present State register must be
 * confirmed. Because the card state may possibly be changed when the host driver
 * clears this bit and the interrupt event may not be generated. When this bit
 * is cleared, it will be set again if no card is inserted. To leave it cleared,
 * clear the Card Removal Status Enable bit in Interrupt Status Enable register.
 *
 * Values:
 * - 0 - Card state unstable or inserted.
 * - 1 - Card removed.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_CRM  (7U)          /*!< Bit position for SDHC_IRQSTAT_CRM. */
#define BM_SDHC_IRQSTAT_CRM  (0x00000080U) /*!< Bit mask for SDHC_IRQSTAT_CRM. */
#define BS_SDHC_IRQSTAT_CRM  (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_CRM. */

/*! @brief Read current value of the SDHC_IRQSTAT_CRM field. */
#define BR_SDHC_IRQSTAT_CRM(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CRM))

/*! @brief Format value for bitfield SDHC_IRQSTAT_CRM. */
#define BF_SDHC_IRQSTAT_CRM(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_CRM) & BM_SDHC_IRQSTAT_CRM)

/*! @brief Set the CRM field to a new value. */
#define BW_SDHC_IRQSTAT_CRM(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CRM) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field CINT[8] (W1C)
 *
 * This status bit is set when an interrupt signal is detected from the external
 * card. In 1-bit mode, the SDHC will detect the Card Interrupt without the SD
 * Clock to support wakeup. In 4-bit mode, the card interrupt signal is sampled
 * during the interrupt cycle, so the interrupt from card can only be sampled
 * during interrupt cycle, introducing some delay between the interrupt signal from
 * the SDIO card and the interrupt to the host system. Writing this bit to 1 can
 * clear this bit, but as the interrupt factor from the SDIO card does not clear,
 * this bit is set again. To clear this bit, it is required to reset the interrupt
 * factor from the external card followed by a writing 1 to this bit. When this
 * status has been set, and the host driver needs to service this interrupt, the
 * Card Interrupt Signal Enable in the Interrupt Signal Enable register should be
 * 0 to stop driving the interrupt signal to the host system. After completion
 * of the card interrupt service (it must reset the interrupt factors in the SDIO
 * card and the interrupt signal may not be asserted), write 1 to clear this bit,
 * set the Card Interrupt Signal Enable to 1, and start sampling the interrupt
 * signal again.
 *
 * Values:
 * - 0 - No Card Interrupt.
 * - 1 - Generate Card Interrupt.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_CINT (8U)          /*!< Bit position for SDHC_IRQSTAT_CINT. */
#define BM_SDHC_IRQSTAT_CINT (0x00000100U) /*!< Bit mask for SDHC_IRQSTAT_CINT. */
#define BS_SDHC_IRQSTAT_CINT (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_CINT. */

/*! @brief Read current value of the SDHC_IRQSTAT_CINT field. */
#define BR_SDHC_IRQSTAT_CINT(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CINT))

/*! @brief Format value for bitfield SDHC_IRQSTAT_CINT. */
#define BF_SDHC_IRQSTAT_CINT(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_CINT) & BM_SDHC_IRQSTAT_CINT)

/*! @brief Set the CINT field to a new value. */
#define BW_SDHC_IRQSTAT_CINT(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CINT) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field CTOE[16] (W1C)
 *
 * Occurs only if no response is returned within 64 SDCLK cycles from the end
 * bit of the command. If the SDHC detects a CMD line conflict, in which case a
 * Command CRC Error shall also be set, this bit shall be set without waiting for 64
 * SDCLK cycles. This is because the command will be aborted by the SDHC.
 *
 * Values:
 * - 0 - No error.
 * - 1 - Time out.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_CTOE (16U)         /*!< Bit position for SDHC_IRQSTAT_CTOE. */
#define BM_SDHC_IRQSTAT_CTOE (0x00010000U) /*!< Bit mask for SDHC_IRQSTAT_CTOE. */
#define BS_SDHC_IRQSTAT_CTOE (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_CTOE. */

/*! @brief Read current value of the SDHC_IRQSTAT_CTOE field. */
#define BR_SDHC_IRQSTAT_CTOE(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CTOE))

/*! @brief Format value for bitfield SDHC_IRQSTAT_CTOE. */
#define BF_SDHC_IRQSTAT_CTOE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_CTOE) & BM_SDHC_IRQSTAT_CTOE)

/*! @brief Set the CTOE field to a new value. */
#define BW_SDHC_IRQSTAT_CTOE(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CTOE) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field CCE[17] (W1C)
 *
 * Command CRC Error is generated in two cases. If a response is returned and
 * the Command Timeout Error is set to 0, indicating no time-out, this bit is set
 * when detecting a CRC error in the command response. The SDHC detects a CMD line
 * conflict by monitoring the CMD line when a command is issued. If the SDHC
 * drives the CMD line to 1, but detects 0 on the CMD line at the next SDCLK edge,
 * then the SDHC shall abort the command (Stop driving CMD line) and set this bit
 * to 1. The Command Timeout Error shall also be set to 1 to distinguish CMD line
 * conflict.
 *
 * Values:
 * - 0 - No error.
 * - 1 - CRC Error generated.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_CCE  (17U)         /*!< Bit position for SDHC_IRQSTAT_CCE. */
#define BM_SDHC_IRQSTAT_CCE  (0x00020000U) /*!< Bit mask for SDHC_IRQSTAT_CCE. */
#define BS_SDHC_IRQSTAT_CCE  (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_CCE. */

/*! @brief Read current value of the SDHC_IRQSTAT_CCE field. */
#define BR_SDHC_IRQSTAT_CCE(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CCE))

/*! @brief Format value for bitfield SDHC_IRQSTAT_CCE. */
#define BF_SDHC_IRQSTAT_CCE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_CCE) & BM_SDHC_IRQSTAT_CCE)

/*! @brief Set the CCE field to a new value. */
#define BW_SDHC_IRQSTAT_CCE(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CCE) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field CEBE[18] (W1C)
 *
 * Occurs when detecting that the end bit of a command response is 0.
 *
 * Values:
 * - 0 - No error.
 * - 1 - End Bit Error generated.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_CEBE (18U)         /*!< Bit position for SDHC_IRQSTAT_CEBE. */
#define BM_SDHC_IRQSTAT_CEBE (0x00040000U) /*!< Bit mask for SDHC_IRQSTAT_CEBE. */
#define BS_SDHC_IRQSTAT_CEBE (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_CEBE. */

/*! @brief Read current value of the SDHC_IRQSTAT_CEBE field. */
#define BR_SDHC_IRQSTAT_CEBE(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CEBE))

/*! @brief Format value for bitfield SDHC_IRQSTAT_CEBE. */
#define BF_SDHC_IRQSTAT_CEBE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_CEBE) & BM_SDHC_IRQSTAT_CEBE)

/*! @brief Set the CEBE field to a new value. */
#define BW_SDHC_IRQSTAT_CEBE(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CEBE) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field CIE[19] (W1C)
 *
 * Occurs if a Command Index error occurs in the command response.
 *
 * Values:
 * - 0 - No error.
 * - 1 - Error.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_CIE  (19U)         /*!< Bit position for SDHC_IRQSTAT_CIE. */
#define BM_SDHC_IRQSTAT_CIE  (0x00080000U) /*!< Bit mask for SDHC_IRQSTAT_CIE. */
#define BS_SDHC_IRQSTAT_CIE  (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_CIE. */

/*! @brief Read current value of the SDHC_IRQSTAT_CIE field. */
#define BR_SDHC_IRQSTAT_CIE(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CIE))

/*! @brief Format value for bitfield SDHC_IRQSTAT_CIE. */
#define BF_SDHC_IRQSTAT_CIE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_CIE) & BM_SDHC_IRQSTAT_CIE)

/*! @brief Set the CIE field to a new value. */
#define BW_SDHC_IRQSTAT_CIE(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_CIE) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field DTOE[20] (W1C)
 *
 * Occurs when detecting one of following time-out conditions. Busy time-out for
 * R1b,R5b type Busy time-out after Write CRC status Read Data time-out
 *
 * Values:
 * - 0 - No error.
 * - 1 - Time out.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_DTOE (20U)         /*!< Bit position for SDHC_IRQSTAT_DTOE. */
#define BM_SDHC_IRQSTAT_DTOE (0x00100000U) /*!< Bit mask for SDHC_IRQSTAT_DTOE. */
#define BS_SDHC_IRQSTAT_DTOE (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_DTOE. */

/*! @brief Read current value of the SDHC_IRQSTAT_DTOE field. */
#define BR_SDHC_IRQSTAT_DTOE(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_DTOE))

/*! @brief Format value for bitfield SDHC_IRQSTAT_DTOE. */
#define BF_SDHC_IRQSTAT_DTOE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_DTOE) & BM_SDHC_IRQSTAT_DTOE)

/*! @brief Set the DTOE field to a new value. */
#define BW_SDHC_IRQSTAT_DTOE(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_DTOE) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field DCE[21] (W1C)
 *
 * Occurs when detecting a CRC error when transferring read data, which uses the
 * DAT line, or when detecting the Write CRC status having a value other than
 * 010.
 *
 * Values:
 * - 0 - No error.
 * - 1 - Error.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_DCE  (21U)         /*!< Bit position for SDHC_IRQSTAT_DCE. */
#define BM_SDHC_IRQSTAT_DCE  (0x00200000U) /*!< Bit mask for SDHC_IRQSTAT_DCE. */
#define BS_SDHC_IRQSTAT_DCE  (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_DCE. */

/*! @brief Read current value of the SDHC_IRQSTAT_DCE field. */
#define BR_SDHC_IRQSTAT_DCE(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_DCE))

/*! @brief Format value for bitfield SDHC_IRQSTAT_DCE. */
#define BF_SDHC_IRQSTAT_DCE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_DCE) & BM_SDHC_IRQSTAT_DCE)

/*! @brief Set the DCE field to a new value. */
#define BW_SDHC_IRQSTAT_DCE(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_DCE) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field DEBE[22] (W1C)
 *
 * Occurs either when detecting 0 at the end bit position of read data, which
 * uses the DAT line, or at the end bit position of the CRC.
 *
 * Values:
 * - 0 - No error.
 * - 1 - Error.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_DEBE (22U)         /*!< Bit position for SDHC_IRQSTAT_DEBE. */
#define BM_SDHC_IRQSTAT_DEBE (0x00400000U) /*!< Bit mask for SDHC_IRQSTAT_DEBE. */
#define BS_SDHC_IRQSTAT_DEBE (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_DEBE. */

/*! @brief Read current value of the SDHC_IRQSTAT_DEBE field. */
#define BR_SDHC_IRQSTAT_DEBE(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_DEBE))

/*! @brief Format value for bitfield SDHC_IRQSTAT_DEBE. */
#define BF_SDHC_IRQSTAT_DEBE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_DEBE) & BM_SDHC_IRQSTAT_DEBE)

/*! @brief Set the DEBE field to a new value. */
#define BW_SDHC_IRQSTAT_DEBE(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_DEBE) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field AC12E[24] (W1C)
 *
 * Occurs when detecting that one of the bits in the Auto CMD12 Error Status
 * register has changed from 0 to 1. This bit is set to 1, not only when the errors
 * in Auto CMD12 occur, but also when the Auto CMD12 is not executed due to the
 * previous command error.
 *
 * Values:
 * - 0 - No error.
 * - 1 - Error.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_AC12E (24U)        /*!< Bit position for SDHC_IRQSTAT_AC12E. */
#define BM_SDHC_IRQSTAT_AC12E (0x01000000U) /*!< Bit mask for SDHC_IRQSTAT_AC12E. */
#define BS_SDHC_IRQSTAT_AC12E (1U)         /*!< Bit field size in bits for SDHC_IRQSTAT_AC12E. */

/*! @brief Read current value of the SDHC_IRQSTAT_AC12E field. */
#define BR_SDHC_IRQSTAT_AC12E(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_AC12E))

/*! @brief Format value for bitfield SDHC_IRQSTAT_AC12E. */
#define BF_SDHC_IRQSTAT_AC12E(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_AC12E) & BM_SDHC_IRQSTAT_AC12E)

/*! @brief Set the AC12E field to a new value. */
#define BW_SDHC_IRQSTAT_AC12E(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_AC12E) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTAT, field DMAE[28] (W1C)
 *
 * Occurs when an Internal DMA transfer has failed. This bit is set to 1, when
 * some error occurs in the data transfer. This error can be caused by either
 * Simple DMA or ADMA, depending on which DMA is in use. The value in DMA System
 * Address register is the next fetch address where the error occurs. Because any
 * error corrupts the whole data block, the host driver shall restart the transfer
 * from the corrupted block boundary. The address of the block boundary can be
 * calculated either from the current DSADDR value or from the remaining number of
 * blocks and the block size.
 *
 * Values:
 * - 0 - No error.
 * - 1 - Error.
 */
/*@{*/
#define BP_SDHC_IRQSTAT_DMAE (28U)         /*!< Bit position for SDHC_IRQSTAT_DMAE. */
#define BM_SDHC_IRQSTAT_DMAE (0x10000000U) /*!< Bit mask for SDHC_IRQSTAT_DMAE. */
#define BS_SDHC_IRQSTAT_DMAE (1U)          /*!< Bit field size in bits for SDHC_IRQSTAT_DMAE. */

/*! @brief Read current value of the SDHC_IRQSTAT_DMAE field. */
#define BR_SDHC_IRQSTAT_DMAE(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_DMAE))

/*! @brief Format value for bitfield SDHC_IRQSTAT_DMAE. */
#define BF_SDHC_IRQSTAT_DMAE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTAT_DMAE) & BM_SDHC_IRQSTAT_DMAE)

/*! @brief Set the DMAE field to a new value. */
#define BW_SDHC_IRQSTAT_DMAE(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTAT_ADDR(x), BP_SDHC_IRQSTAT_DMAE) = (v))
/*@}*/

/*******************************************************************************
 * HW_SDHC_IRQSTATEN - Interrupt Status Enable register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_IRQSTATEN - Interrupt Status Enable register (RW)
 *
 * Reset value: 0x117F013FU
 *
 * Setting the bits in this register to 1 enables the corresponding interrupt
 * status to be set by the specified event. If any bit is cleared, the
 * corresponding interrupt status bit is also cleared, that is, when the bit in this register
 * is cleared, the corresponding bit in interrupt status register is always 0.
 * Depending on PROCTL[IABG] bit setting, SDHC may be programmed to sample the
 * card interrupt signal during the interrupt period and hold its value in the
 * flip-flop. There will be some delays on the card interrupt, asserted from the card,
 * to the time the host system is informed. To detect a CMD line conflict, the
 * host driver must set both IRQSTATEN[CTOESEN] and IRQSTATEN[CCESEN] to 1.
 */
typedef union _hw_sdhc_irqstaten
{
    uint32_t U;
    struct _hw_sdhc_irqstaten_bitfields
    {
        uint32_t CCSEN : 1;            /*!< [0] Command Complete Status Enable */
        uint32_t TCSEN : 1;            /*!< [1] Transfer Complete Status Enable */
        uint32_t BGESEN : 1;           /*!< [2] Block Gap Event Status Enable */
        uint32_t DINTSEN : 1;          /*!< [3] DMA Interrupt Status Enable */
        uint32_t BWRSEN : 1;           /*!< [4] Buffer Write Ready Status Enable */
        uint32_t BRRSEN : 1;           /*!< [5] Buffer Read Ready Status Enable */
        uint32_t CINSEN : 1;           /*!< [6] Card Insertion Status Enable */
        uint32_t CRMSEN : 1;           /*!< [7] Card Removal Status Enable */
        uint32_t CINTSEN : 1;          /*!< [8] Card Interrupt Status Enable */
        uint32_t RESERVED0 : 7;        /*!< [15:9]  */
        uint32_t CTOESEN : 1;          /*!< [16] Command Timeout Error Status Enable */
        uint32_t CCESEN : 1;           /*!< [17] Command CRC Error Status Enable */
        uint32_t CEBESEN : 1;          /*!< [18] Command End Bit Error Status Enable */
        uint32_t CIESEN : 1;           /*!< [19] Command Index Error Status Enable */
        uint32_t DTOESEN : 1;          /*!< [20] Data Timeout Error Status Enable */
        uint32_t DCESEN : 1;           /*!< [21] Data CRC Error Status Enable */
        uint32_t DEBESEN : 1;          /*!< [22] Data End Bit Error Status Enable */
        uint32_t RESERVED1 : 1;        /*!< [23]  */
        uint32_t AC12ESEN : 1;         /*!< [24] Auto CMD12 Error Status Enable */
        uint32_t RESERVED2 : 3;        /*!< [27:25]  */
        uint32_t DMAESEN : 1;          /*!< [28] DMA Error Status Enable */
        uint32_t RESERVED3 : 3;        /*!< [31:29]  */
    } B;
} hw_sdhc_irqstaten_t;

/*!
 * @name Constants and macros for entire SDHC_IRQSTATEN register
 */
/*@{*/
#define HW_SDHC_IRQSTATEN_ADDR(x) ((x) + 0x34U)

#define HW_SDHC_IRQSTATEN(x)     (*(__IO hw_sdhc_irqstaten_t *) HW_SDHC_IRQSTATEN_ADDR(x))
#define HW_SDHC_IRQSTATEN_RD(x)  (HW_SDHC_IRQSTATEN(x).U)
#define HW_SDHC_IRQSTATEN_WR(x, v) (HW_SDHC_IRQSTATEN(x).U = (v))
#define HW_SDHC_IRQSTATEN_SET(x, v) (HW_SDHC_IRQSTATEN_WR(x, HW_SDHC_IRQSTATEN_RD(x) |  (v)))
#define HW_SDHC_IRQSTATEN_CLR(x, v) (HW_SDHC_IRQSTATEN_WR(x, HW_SDHC_IRQSTATEN_RD(x) & ~(v)))
#define HW_SDHC_IRQSTATEN_TOG(x, v) (HW_SDHC_IRQSTATEN_WR(x, HW_SDHC_IRQSTATEN_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_IRQSTATEN bitfields
 */

/*!
 * @name Register SDHC_IRQSTATEN, field CCSEN[0] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_CCSEN (0U)       /*!< Bit position for SDHC_IRQSTATEN_CCSEN. */
#define BM_SDHC_IRQSTATEN_CCSEN (0x00000001U) /*!< Bit mask for SDHC_IRQSTATEN_CCSEN. */
#define BS_SDHC_IRQSTATEN_CCSEN (1U)       /*!< Bit field size in bits for SDHC_IRQSTATEN_CCSEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_CCSEN field. */
#define BR_SDHC_IRQSTATEN_CCSEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CCSEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_CCSEN. */
#define BF_SDHC_IRQSTATEN_CCSEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_CCSEN) & BM_SDHC_IRQSTATEN_CCSEN)

/*! @brief Set the CCSEN field to a new value. */
#define BW_SDHC_IRQSTATEN_CCSEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CCSEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field TCSEN[1] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_TCSEN (1U)       /*!< Bit position for SDHC_IRQSTATEN_TCSEN. */
#define BM_SDHC_IRQSTATEN_TCSEN (0x00000002U) /*!< Bit mask for SDHC_IRQSTATEN_TCSEN. */
#define BS_SDHC_IRQSTATEN_TCSEN (1U)       /*!< Bit field size in bits for SDHC_IRQSTATEN_TCSEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_TCSEN field. */
#define BR_SDHC_IRQSTATEN_TCSEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_TCSEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_TCSEN. */
#define BF_SDHC_IRQSTATEN_TCSEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_TCSEN) & BM_SDHC_IRQSTATEN_TCSEN)

/*! @brief Set the TCSEN field to a new value. */
#define BW_SDHC_IRQSTATEN_TCSEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_TCSEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field BGESEN[2] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_BGESEN (2U)      /*!< Bit position for SDHC_IRQSTATEN_BGESEN. */
#define BM_SDHC_IRQSTATEN_BGESEN (0x00000004U) /*!< Bit mask for SDHC_IRQSTATEN_BGESEN. */
#define BS_SDHC_IRQSTATEN_BGESEN (1U)      /*!< Bit field size in bits for SDHC_IRQSTATEN_BGESEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_BGESEN field. */
#define BR_SDHC_IRQSTATEN_BGESEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_BGESEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_BGESEN. */
#define BF_SDHC_IRQSTATEN_BGESEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_BGESEN) & BM_SDHC_IRQSTATEN_BGESEN)

/*! @brief Set the BGESEN field to a new value. */
#define BW_SDHC_IRQSTATEN_BGESEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_BGESEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field DINTSEN[3] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_DINTSEN (3U)     /*!< Bit position for SDHC_IRQSTATEN_DINTSEN. */
#define BM_SDHC_IRQSTATEN_DINTSEN (0x00000008U) /*!< Bit mask for SDHC_IRQSTATEN_DINTSEN. */
#define BS_SDHC_IRQSTATEN_DINTSEN (1U)     /*!< Bit field size in bits for SDHC_IRQSTATEN_DINTSEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_DINTSEN field. */
#define BR_SDHC_IRQSTATEN_DINTSEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_DINTSEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_DINTSEN. */
#define BF_SDHC_IRQSTATEN_DINTSEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_DINTSEN) & BM_SDHC_IRQSTATEN_DINTSEN)

/*! @brief Set the DINTSEN field to a new value. */
#define BW_SDHC_IRQSTATEN_DINTSEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_DINTSEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field BWRSEN[4] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_BWRSEN (4U)      /*!< Bit position for SDHC_IRQSTATEN_BWRSEN. */
#define BM_SDHC_IRQSTATEN_BWRSEN (0x00000010U) /*!< Bit mask for SDHC_IRQSTATEN_BWRSEN. */
#define BS_SDHC_IRQSTATEN_BWRSEN (1U)      /*!< Bit field size in bits for SDHC_IRQSTATEN_BWRSEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_BWRSEN field. */
#define BR_SDHC_IRQSTATEN_BWRSEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_BWRSEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_BWRSEN. */
#define BF_SDHC_IRQSTATEN_BWRSEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_BWRSEN) & BM_SDHC_IRQSTATEN_BWRSEN)

/*! @brief Set the BWRSEN field to a new value. */
#define BW_SDHC_IRQSTATEN_BWRSEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_BWRSEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field BRRSEN[5] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_BRRSEN (5U)      /*!< Bit position for SDHC_IRQSTATEN_BRRSEN. */
#define BM_SDHC_IRQSTATEN_BRRSEN (0x00000020U) /*!< Bit mask for SDHC_IRQSTATEN_BRRSEN. */
#define BS_SDHC_IRQSTATEN_BRRSEN (1U)      /*!< Bit field size in bits for SDHC_IRQSTATEN_BRRSEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_BRRSEN field. */
#define BR_SDHC_IRQSTATEN_BRRSEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_BRRSEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_BRRSEN. */
#define BF_SDHC_IRQSTATEN_BRRSEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_BRRSEN) & BM_SDHC_IRQSTATEN_BRRSEN)

/*! @brief Set the BRRSEN field to a new value. */
#define BW_SDHC_IRQSTATEN_BRRSEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_BRRSEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field CINSEN[6] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_CINSEN (6U)      /*!< Bit position for SDHC_IRQSTATEN_CINSEN. */
#define BM_SDHC_IRQSTATEN_CINSEN (0x00000040U) /*!< Bit mask for SDHC_IRQSTATEN_CINSEN. */
#define BS_SDHC_IRQSTATEN_CINSEN (1U)      /*!< Bit field size in bits for SDHC_IRQSTATEN_CINSEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_CINSEN field. */
#define BR_SDHC_IRQSTATEN_CINSEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CINSEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_CINSEN. */
#define BF_SDHC_IRQSTATEN_CINSEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_CINSEN) & BM_SDHC_IRQSTATEN_CINSEN)

/*! @brief Set the CINSEN field to a new value. */
#define BW_SDHC_IRQSTATEN_CINSEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CINSEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field CRMSEN[7] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_CRMSEN (7U)      /*!< Bit position for SDHC_IRQSTATEN_CRMSEN. */
#define BM_SDHC_IRQSTATEN_CRMSEN (0x00000080U) /*!< Bit mask for SDHC_IRQSTATEN_CRMSEN. */
#define BS_SDHC_IRQSTATEN_CRMSEN (1U)      /*!< Bit field size in bits for SDHC_IRQSTATEN_CRMSEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_CRMSEN field. */
#define BR_SDHC_IRQSTATEN_CRMSEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CRMSEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_CRMSEN. */
#define BF_SDHC_IRQSTATEN_CRMSEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_CRMSEN) & BM_SDHC_IRQSTATEN_CRMSEN)

/*! @brief Set the CRMSEN field to a new value. */
#define BW_SDHC_IRQSTATEN_CRMSEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CRMSEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field CINTSEN[8] (RW)
 *
 * If this bit is set to 0, the SDHC will clear 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 must clear the this bit
 * before servicing the card interrupt and must set this bit again after all interrupt
 * requests from the card are cleared to prevent inadvertent interrupts.
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_CINTSEN (8U)     /*!< Bit position for SDHC_IRQSTATEN_CINTSEN. */
#define BM_SDHC_IRQSTATEN_CINTSEN (0x00000100U) /*!< Bit mask for SDHC_IRQSTATEN_CINTSEN. */
#define BS_SDHC_IRQSTATEN_CINTSEN (1U)     /*!< Bit field size in bits for SDHC_IRQSTATEN_CINTSEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_CINTSEN field. */
#define BR_SDHC_IRQSTATEN_CINTSEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CINTSEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_CINTSEN. */
#define BF_SDHC_IRQSTATEN_CINTSEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_CINTSEN) & BM_SDHC_IRQSTATEN_CINTSEN)

/*! @brief Set the CINTSEN field to a new value. */
#define BW_SDHC_IRQSTATEN_CINTSEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CINTSEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field CTOESEN[16] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_CTOESEN (16U)    /*!< Bit position for SDHC_IRQSTATEN_CTOESEN. */
#define BM_SDHC_IRQSTATEN_CTOESEN (0x00010000U) /*!< Bit mask for SDHC_IRQSTATEN_CTOESEN. */
#define BS_SDHC_IRQSTATEN_CTOESEN (1U)     /*!< Bit field size in bits for SDHC_IRQSTATEN_CTOESEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_CTOESEN field. */
#define BR_SDHC_IRQSTATEN_CTOESEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CTOESEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_CTOESEN. */
#define BF_SDHC_IRQSTATEN_CTOESEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_CTOESEN) & BM_SDHC_IRQSTATEN_CTOESEN)

/*! @brief Set the CTOESEN field to a new value. */
#define BW_SDHC_IRQSTATEN_CTOESEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CTOESEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field CCESEN[17] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_CCESEN (17U)     /*!< Bit position for SDHC_IRQSTATEN_CCESEN. */
#define BM_SDHC_IRQSTATEN_CCESEN (0x00020000U) /*!< Bit mask for SDHC_IRQSTATEN_CCESEN. */
#define BS_SDHC_IRQSTATEN_CCESEN (1U)      /*!< Bit field size in bits for SDHC_IRQSTATEN_CCESEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_CCESEN field. */
#define BR_SDHC_IRQSTATEN_CCESEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CCESEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_CCESEN. */
#define BF_SDHC_IRQSTATEN_CCESEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_CCESEN) & BM_SDHC_IRQSTATEN_CCESEN)

/*! @brief Set the CCESEN field to a new value. */
#define BW_SDHC_IRQSTATEN_CCESEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CCESEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field CEBESEN[18] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_CEBESEN (18U)    /*!< Bit position for SDHC_IRQSTATEN_CEBESEN. */
#define BM_SDHC_IRQSTATEN_CEBESEN (0x00040000U) /*!< Bit mask for SDHC_IRQSTATEN_CEBESEN. */
#define BS_SDHC_IRQSTATEN_CEBESEN (1U)     /*!< Bit field size in bits for SDHC_IRQSTATEN_CEBESEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_CEBESEN field. */
#define BR_SDHC_IRQSTATEN_CEBESEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CEBESEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_CEBESEN. */
#define BF_SDHC_IRQSTATEN_CEBESEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_CEBESEN) & BM_SDHC_IRQSTATEN_CEBESEN)

/*! @brief Set the CEBESEN field to a new value. */
#define BW_SDHC_IRQSTATEN_CEBESEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CEBESEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field CIESEN[19] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_CIESEN (19U)     /*!< Bit position for SDHC_IRQSTATEN_CIESEN. */
#define BM_SDHC_IRQSTATEN_CIESEN (0x00080000U) /*!< Bit mask for SDHC_IRQSTATEN_CIESEN. */
#define BS_SDHC_IRQSTATEN_CIESEN (1U)      /*!< Bit field size in bits for SDHC_IRQSTATEN_CIESEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_CIESEN field. */
#define BR_SDHC_IRQSTATEN_CIESEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CIESEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_CIESEN. */
#define BF_SDHC_IRQSTATEN_CIESEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_CIESEN) & BM_SDHC_IRQSTATEN_CIESEN)

/*! @brief Set the CIESEN field to a new value. */
#define BW_SDHC_IRQSTATEN_CIESEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_CIESEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field DTOESEN[20] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_DTOESEN (20U)    /*!< Bit position for SDHC_IRQSTATEN_DTOESEN. */
#define BM_SDHC_IRQSTATEN_DTOESEN (0x00100000U) /*!< Bit mask for SDHC_IRQSTATEN_DTOESEN. */
#define BS_SDHC_IRQSTATEN_DTOESEN (1U)     /*!< Bit field size in bits for SDHC_IRQSTATEN_DTOESEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_DTOESEN field. */
#define BR_SDHC_IRQSTATEN_DTOESEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_DTOESEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_DTOESEN. */
#define BF_SDHC_IRQSTATEN_DTOESEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_DTOESEN) & BM_SDHC_IRQSTATEN_DTOESEN)

/*! @brief Set the DTOESEN field to a new value. */
#define BW_SDHC_IRQSTATEN_DTOESEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_DTOESEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field DCESEN[21] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_DCESEN (21U)     /*!< Bit position for SDHC_IRQSTATEN_DCESEN. */
#define BM_SDHC_IRQSTATEN_DCESEN (0x00200000U) /*!< Bit mask for SDHC_IRQSTATEN_DCESEN. */
#define BS_SDHC_IRQSTATEN_DCESEN (1U)      /*!< Bit field size in bits for SDHC_IRQSTATEN_DCESEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_DCESEN field. */
#define BR_SDHC_IRQSTATEN_DCESEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_DCESEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_DCESEN. */
#define BF_SDHC_IRQSTATEN_DCESEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_DCESEN) & BM_SDHC_IRQSTATEN_DCESEN)

/*! @brief Set the DCESEN field to a new value. */
#define BW_SDHC_IRQSTATEN_DCESEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_DCESEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field DEBESEN[22] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_DEBESEN (22U)    /*!< Bit position for SDHC_IRQSTATEN_DEBESEN. */
#define BM_SDHC_IRQSTATEN_DEBESEN (0x00400000U) /*!< Bit mask for SDHC_IRQSTATEN_DEBESEN. */
#define BS_SDHC_IRQSTATEN_DEBESEN (1U)     /*!< Bit field size in bits for SDHC_IRQSTATEN_DEBESEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_DEBESEN field. */
#define BR_SDHC_IRQSTATEN_DEBESEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_DEBESEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_DEBESEN. */
#define BF_SDHC_IRQSTATEN_DEBESEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_DEBESEN) & BM_SDHC_IRQSTATEN_DEBESEN)

/*! @brief Set the DEBESEN field to a new value. */
#define BW_SDHC_IRQSTATEN_DEBESEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_DEBESEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field AC12ESEN[24] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_AC12ESEN (24U)   /*!< Bit position for SDHC_IRQSTATEN_AC12ESEN. */
#define BM_SDHC_IRQSTATEN_AC12ESEN (0x01000000U) /*!< Bit mask for SDHC_IRQSTATEN_AC12ESEN. */
#define BS_SDHC_IRQSTATEN_AC12ESEN (1U)    /*!< Bit field size in bits for SDHC_IRQSTATEN_AC12ESEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_AC12ESEN field. */
#define BR_SDHC_IRQSTATEN_AC12ESEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_AC12ESEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_AC12ESEN. */
#define BF_SDHC_IRQSTATEN_AC12ESEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_AC12ESEN) & BM_SDHC_IRQSTATEN_AC12ESEN)

/*! @brief Set the AC12ESEN field to a new value. */
#define BW_SDHC_IRQSTATEN_AC12ESEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_AC12ESEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSTATEN, field DMAESEN[28] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSTATEN_DMAESEN (28U)    /*!< Bit position for SDHC_IRQSTATEN_DMAESEN. */
#define BM_SDHC_IRQSTATEN_DMAESEN (0x10000000U) /*!< Bit mask for SDHC_IRQSTATEN_DMAESEN. */
#define BS_SDHC_IRQSTATEN_DMAESEN (1U)     /*!< Bit field size in bits for SDHC_IRQSTATEN_DMAESEN. */

/*! @brief Read current value of the SDHC_IRQSTATEN_DMAESEN field. */
#define BR_SDHC_IRQSTATEN_DMAESEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_DMAESEN))

/*! @brief Format value for bitfield SDHC_IRQSTATEN_DMAESEN. */
#define BF_SDHC_IRQSTATEN_DMAESEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSTATEN_DMAESEN) & BM_SDHC_IRQSTATEN_DMAESEN)

/*! @brief Set the DMAESEN field to a new value. */
#define BW_SDHC_IRQSTATEN_DMAESEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSTATEN_ADDR(x), BP_SDHC_IRQSTATEN_DMAESEN) = (v))
/*@}*/

/*******************************************************************************
 * HW_SDHC_IRQSIGEN - Interrupt Signal Enable register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_IRQSIGEN - Interrupt Signal Enable register (RW)
 *
 * Reset value: 0x00000000U
 *
 * This register is used to select which interrupt status is indicated to the
 * host system as the interrupt. All of these status bits share the same interrupt
 * line. Setting any of these bits to 1 enables interrupt generation. The
 * corresponding status register bit will generate an interrupt when the corresponding
 * interrupt signal enable bit is set.
 */
typedef union _hw_sdhc_irqsigen
{
    uint32_t U;
    struct _hw_sdhc_irqsigen_bitfields
    {
        uint32_t CCIEN : 1;            /*!< [0] Command Complete Interrupt Enable */
        uint32_t TCIEN : 1;            /*!< [1] Transfer Complete Interrupt Enable */
        uint32_t BGEIEN : 1;           /*!< [2] Block Gap Event Interrupt Enable */
        uint32_t DINTIEN : 1;          /*!< [3] DMA Interrupt Enable */
        uint32_t BWRIEN : 1;           /*!< [4] Buffer Write Ready Interrupt Enable */
        uint32_t BRRIEN : 1;           /*!< [5] Buffer Read Ready Interrupt Enable */
        uint32_t CINSIEN : 1;          /*!< [6] Card Insertion Interrupt Enable */
        uint32_t CRMIEN : 1;           /*!< [7] Card Removal Interrupt Enable */
        uint32_t CINTIEN : 1;          /*!< [8] Card Interrupt Enable */
        uint32_t RESERVED0 : 7;        /*!< [15:9]  */
        uint32_t CTOEIEN : 1;          /*!< [16] Command Timeout Error Interrupt
                                        * Enable */
        uint32_t CCEIEN : 1;           /*!< [17] Command CRC Error Interrupt Enable */
        uint32_t CEBEIEN : 1;          /*!< [18] Command End Bit Error Interrupt
                                        * Enable */
        uint32_t CIEIEN : 1;           /*!< [19] Command Index Error Interrupt Enable */
        uint32_t DTOEIEN : 1;          /*!< [20] Data Timeout Error Interrupt Enable */
        uint32_t DCEIEN : 1;           /*!< [21] Data CRC Error Interrupt Enable */
        uint32_t DEBEIEN : 1;          /*!< [22] Data End Bit Error Interrupt Enable */
        uint32_t RESERVED1 : 1;        /*!< [23]  */
        uint32_t AC12EIEN : 1;         /*!< [24] Auto CMD12 Error Interrupt Enable */
        uint32_t RESERVED2 : 3;        /*!< [27:25]  */
        uint32_t DMAEIEN : 1;          /*!< [28] DMA Error Interrupt Enable */
        uint32_t RESERVED3 : 3;        /*!< [31:29]  */
    } B;
} hw_sdhc_irqsigen_t;

/*!
 * @name Constants and macros for entire SDHC_IRQSIGEN register
 */
/*@{*/
#define HW_SDHC_IRQSIGEN_ADDR(x) ((x) + 0x38U)

#define HW_SDHC_IRQSIGEN(x)      (*(__IO hw_sdhc_irqsigen_t *) HW_SDHC_IRQSIGEN_ADDR(x))
#define HW_SDHC_IRQSIGEN_RD(x)   (HW_SDHC_IRQSIGEN(x).U)
#define HW_SDHC_IRQSIGEN_WR(x, v) (HW_SDHC_IRQSIGEN(x).U = (v))
#define HW_SDHC_IRQSIGEN_SET(x, v) (HW_SDHC_IRQSIGEN_WR(x, HW_SDHC_IRQSIGEN_RD(x) |  (v)))
#define HW_SDHC_IRQSIGEN_CLR(x, v) (HW_SDHC_IRQSIGEN_WR(x, HW_SDHC_IRQSIGEN_RD(x) & ~(v)))
#define HW_SDHC_IRQSIGEN_TOG(x, v) (HW_SDHC_IRQSIGEN_WR(x, HW_SDHC_IRQSIGEN_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_IRQSIGEN bitfields
 */

/*!
 * @name Register SDHC_IRQSIGEN, field CCIEN[0] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_CCIEN (0U)        /*!< Bit position for SDHC_IRQSIGEN_CCIEN. */
#define BM_SDHC_IRQSIGEN_CCIEN (0x00000001U) /*!< Bit mask for SDHC_IRQSIGEN_CCIEN. */
#define BS_SDHC_IRQSIGEN_CCIEN (1U)        /*!< Bit field size in bits for SDHC_IRQSIGEN_CCIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_CCIEN field. */
#define BR_SDHC_IRQSIGEN_CCIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CCIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_CCIEN. */
#define BF_SDHC_IRQSIGEN_CCIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_CCIEN) & BM_SDHC_IRQSIGEN_CCIEN)

/*! @brief Set the CCIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_CCIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CCIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field TCIEN[1] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_TCIEN (1U)        /*!< Bit position for SDHC_IRQSIGEN_TCIEN. */
#define BM_SDHC_IRQSIGEN_TCIEN (0x00000002U) /*!< Bit mask for SDHC_IRQSIGEN_TCIEN. */
#define BS_SDHC_IRQSIGEN_TCIEN (1U)        /*!< Bit field size in bits for SDHC_IRQSIGEN_TCIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_TCIEN field. */
#define BR_SDHC_IRQSIGEN_TCIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_TCIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_TCIEN. */
#define BF_SDHC_IRQSIGEN_TCIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_TCIEN) & BM_SDHC_IRQSIGEN_TCIEN)

/*! @brief Set the TCIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_TCIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_TCIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field BGEIEN[2] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_BGEIEN (2U)       /*!< Bit position for SDHC_IRQSIGEN_BGEIEN. */
#define BM_SDHC_IRQSIGEN_BGEIEN (0x00000004U) /*!< Bit mask for SDHC_IRQSIGEN_BGEIEN. */
#define BS_SDHC_IRQSIGEN_BGEIEN (1U)       /*!< Bit field size in bits for SDHC_IRQSIGEN_BGEIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_BGEIEN field. */
#define BR_SDHC_IRQSIGEN_BGEIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_BGEIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_BGEIEN. */
#define BF_SDHC_IRQSIGEN_BGEIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_BGEIEN) & BM_SDHC_IRQSIGEN_BGEIEN)

/*! @brief Set the BGEIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_BGEIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_BGEIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field DINTIEN[3] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_DINTIEN (3U)      /*!< Bit position for SDHC_IRQSIGEN_DINTIEN. */
#define BM_SDHC_IRQSIGEN_DINTIEN (0x00000008U) /*!< Bit mask for SDHC_IRQSIGEN_DINTIEN. */
#define BS_SDHC_IRQSIGEN_DINTIEN (1U)      /*!< Bit field size in bits for SDHC_IRQSIGEN_DINTIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_DINTIEN field. */
#define BR_SDHC_IRQSIGEN_DINTIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_DINTIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_DINTIEN. */
#define BF_SDHC_IRQSIGEN_DINTIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_DINTIEN) & BM_SDHC_IRQSIGEN_DINTIEN)

/*! @brief Set the DINTIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_DINTIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_DINTIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field BWRIEN[4] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_BWRIEN (4U)       /*!< Bit position for SDHC_IRQSIGEN_BWRIEN. */
#define BM_SDHC_IRQSIGEN_BWRIEN (0x00000010U) /*!< Bit mask for SDHC_IRQSIGEN_BWRIEN. */
#define BS_SDHC_IRQSIGEN_BWRIEN (1U)       /*!< Bit field size in bits for SDHC_IRQSIGEN_BWRIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_BWRIEN field. */
#define BR_SDHC_IRQSIGEN_BWRIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_BWRIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_BWRIEN. */
#define BF_SDHC_IRQSIGEN_BWRIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_BWRIEN) & BM_SDHC_IRQSIGEN_BWRIEN)

/*! @brief Set the BWRIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_BWRIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_BWRIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field BRRIEN[5] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_BRRIEN (5U)       /*!< Bit position for SDHC_IRQSIGEN_BRRIEN. */
#define BM_SDHC_IRQSIGEN_BRRIEN (0x00000020U) /*!< Bit mask for SDHC_IRQSIGEN_BRRIEN. */
#define BS_SDHC_IRQSIGEN_BRRIEN (1U)       /*!< Bit field size in bits for SDHC_IRQSIGEN_BRRIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_BRRIEN field. */
#define BR_SDHC_IRQSIGEN_BRRIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_BRRIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_BRRIEN. */
#define BF_SDHC_IRQSIGEN_BRRIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_BRRIEN) & BM_SDHC_IRQSIGEN_BRRIEN)

/*! @brief Set the BRRIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_BRRIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_BRRIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field CINSIEN[6] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_CINSIEN (6U)      /*!< Bit position for SDHC_IRQSIGEN_CINSIEN. */
#define BM_SDHC_IRQSIGEN_CINSIEN (0x00000040U) /*!< Bit mask for SDHC_IRQSIGEN_CINSIEN. */
#define BS_SDHC_IRQSIGEN_CINSIEN (1U)      /*!< Bit field size in bits for SDHC_IRQSIGEN_CINSIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_CINSIEN field. */
#define BR_SDHC_IRQSIGEN_CINSIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CINSIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_CINSIEN. */
#define BF_SDHC_IRQSIGEN_CINSIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_CINSIEN) & BM_SDHC_IRQSIGEN_CINSIEN)

/*! @brief Set the CINSIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_CINSIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CINSIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field CRMIEN[7] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_CRMIEN (7U)       /*!< Bit position for SDHC_IRQSIGEN_CRMIEN. */
#define BM_SDHC_IRQSIGEN_CRMIEN (0x00000080U) /*!< Bit mask for SDHC_IRQSIGEN_CRMIEN. */
#define BS_SDHC_IRQSIGEN_CRMIEN (1U)       /*!< Bit field size in bits for SDHC_IRQSIGEN_CRMIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_CRMIEN field. */
#define BR_SDHC_IRQSIGEN_CRMIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CRMIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_CRMIEN. */
#define BF_SDHC_IRQSIGEN_CRMIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_CRMIEN) & BM_SDHC_IRQSIGEN_CRMIEN)

/*! @brief Set the CRMIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_CRMIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CRMIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field CINTIEN[8] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_CINTIEN (8U)      /*!< Bit position for SDHC_IRQSIGEN_CINTIEN. */
#define BM_SDHC_IRQSIGEN_CINTIEN (0x00000100U) /*!< Bit mask for SDHC_IRQSIGEN_CINTIEN. */
#define BS_SDHC_IRQSIGEN_CINTIEN (1U)      /*!< Bit field size in bits for SDHC_IRQSIGEN_CINTIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_CINTIEN field. */
#define BR_SDHC_IRQSIGEN_CINTIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CINTIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_CINTIEN. */
#define BF_SDHC_IRQSIGEN_CINTIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_CINTIEN) & BM_SDHC_IRQSIGEN_CINTIEN)

/*! @brief Set the CINTIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_CINTIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CINTIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field CTOEIEN[16] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_CTOEIEN (16U)     /*!< Bit position for SDHC_IRQSIGEN_CTOEIEN. */
#define BM_SDHC_IRQSIGEN_CTOEIEN (0x00010000U) /*!< Bit mask for SDHC_IRQSIGEN_CTOEIEN. */
#define BS_SDHC_IRQSIGEN_CTOEIEN (1U)      /*!< Bit field size in bits for SDHC_IRQSIGEN_CTOEIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_CTOEIEN field. */
#define BR_SDHC_IRQSIGEN_CTOEIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CTOEIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_CTOEIEN. */
#define BF_SDHC_IRQSIGEN_CTOEIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_CTOEIEN) & BM_SDHC_IRQSIGEN_CTOEIEN)

/*! @brief Set the CTOEIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_CTOEIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CTOEIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field CCEIEN[17] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_CCEIEN (17U)      /*!< Bit position for SDHC_IRQSIGEN_CCEIEN. */
#define BM_SDHC_IRQSIGEN_CCEIEN (0x00020000U) /*!< Bit mask for SDHC_IRQSIGEN_CCEIEN. */
#define BS_SDHC_IRQSIGEN_CCEIEN (1U)       /*!< Bit field size in bits for SDHC_IRQSIGEN_CCEIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_CCEIEN field. */
#define BR_SDHC_IRQSIGEN_CCEIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CCEIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_CCEIEN. */
#define BF_SDHC_IRQSIGEN_CCEIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_CCEIEN) & BM_SDHC_IRQSIGEN_CCEIEN)

/*! @brief Set the CCEIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_CCEIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CCEIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field CEBEIEN[18] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_CEBEIEN (18U)     /*!< Bit position for SDHC_IRQSIGEN_CEBEIEN. */
#define BM_SDHC_IRQSIGEN_CEBEIEN (0x00040000U) /*!< Bit mask for SDHC_IRQSIGEN_CEBEIEN. */
#define BS_SDHC_IRQSIGEN_CEBEIEN (1U)      /*!< Bit field size in bits for SDHC_IRQSIGEN_CEBEIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_CEBEIEN field. */
#define BR_SDHC_IRQSIGEN_CEBEIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CEBEIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_CEBEIEN. */
#define BF_SDHC_IRQSIGEN_CEBEIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_CEBEIEN) & BM_SDHC_IRQSIGEN_CEBEIEN)

/*! @brief Set the CEBEIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_CEBEIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CEBEIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field CIEIEN[19] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_CIEIEN (19U)      /*!< Bit position for SDHC_IRQSIGEN_CIEIEN. */
#define BM_SDHC_IRQSIGEN_CIEIEN (0x00080000U) /*!< Bit mask for SDHC_IRQSIGEN_CIEIEN. */
#define BS_SDHC_IRQSIGEN_CIEIEN (1U)       /*!< Bit field size in bits for SDHC_IRQSIGEN_CIEIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_CIEIEN field. */
#define BR_SDHC_IRQSIGEN_CIEIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CIEIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_CIEIEN. */
#define BF_SDHC_IRQSIGEN_CIEIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_CIEIEN) & BM_SDHC_IRQSIGEN_CIEIEN)

/*! @brief Set the CIEIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_CIEIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_CIEIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field DTOEIEN[20] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_DTOEIEN (20U)     /*!< Bit position for SDHC_IRQSIGEN_DTOEIEN. */
#define BM_SDHC_IRQSIGEN_DTOEIEN (0x00100000U) /*!< Bit mask for SDHC_IRQSIGEN_DTOEIEN. */
#define BS_SDHC_IRQSIGEN_DTOEIEN (1U)      /*!< Bit field size in bits for SDHC_IRQSIGEN_DTOEIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_DTOEIEN field. */
#define BR_SDHC_IRQSIGEN_DTOEIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_DTOEIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_DTOEIEN. */
#define BF_SDHC_IRQSIGEN_DTOEIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_DTOEIEN) & BM_SDHC_IRQSIGEN_DTOEIEN)

/*! @brief Set the DTOEIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_DTOEIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_DTOEIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field DCEIEN[21] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_DCEIEN (21U)      /*!< Bit position for SDHC_IRQSIGEN_DCEIEN. */
#define BM_SDHC_IRQSIGEN_DCEIEN (0x00200000U) /*!< Bit mask for SDHC_IRQSIGEN_DCEIEN. */
#define BS_SDHC_IRQSIGEN_DCEIEN (1U)       /*!< Bit field size in bits for SDHC_IRQSIGEN_DCEIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_DCEIEN field. */
#define BR_SDHC_IRQSIGEN_DCEIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_DCEIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_DCEIEN. */
#define BF_SDHC_IRQSIGEN_DCEIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_DCEIEN) & BM_SDHC_IRQSIGEN_DCEIEN)

/*! @brief Set the DCEIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_DCEIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_DCEIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field DEBEIEN[22] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_DEBEIEN (22U)     /*!< Bit position for SDHC_IRQSIGEN_DEBEIEN. */
#define BM_SDHC_IRQSIGEN_DEBEIEN (0x00400000U) /*!< Bit mask for SDHC_IRQSIGEN_DEBEIEN. */
#define BS_SDHC_IRQSIGEN_DEBEIEN (1U)      /*!< Bit field size in bits for SDHC_IRQSIGEN_DEBEIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_DEBEIEN field. */
#define BR_SDHC_IRQSIGEN_DEBEIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_DEBEIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_DEBEIEN. */
#define BF_SDHC_IRQSIGEN_DEBEIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_DEBEIEN) & BM_SDHC_IRQSIGEN_DEBEIEN)

/*! @brief Set the DEBEIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_DEBEIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_DEBEIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field AC12EIEN[24] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_AC12EIEN (24U)    /*!< Bit position for SDHC_IRQSIGEN_AC12EIEN. */
#define BM_SDHC_IRQSIGEN_AC12EIEN (0x01000000U) /*!< Bit mask for SDHC_IRQSIGEN_AC12EIEN. */
#define BS_SDHC_IRQSIGEN_AC12EIEN (1U)     /*!< Bit field size in bits for SDHC_IRQSIGEN_AC12EIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_AC12EIEN field. */
#define BR_SDHC_IRQSIGEN_AC12EIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_AC12EIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_AC12EIEN. */
#define BF_SDHC_IRQSIGEN_AC12EIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_AC12EIEN) & BM_SDHC_IRQSIGEN_AC12EIEN)

/*! @brief Set the AC12EIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_AC12EIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_AC12EIEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_IRQSIGEN, field DMAEIEN[28] (RW)
 *
 * Values:
 * - 0 - Masked
 * - 1 - Enabled
 */
/*@{*/
#define BP_SDHC_IRQSIGEN_DMAEIEN (28U)     /*!< Bit position for SDHC_IRQSIGEN_DMAEIEN. */
#define BM_SDHC_IRQSIGEN_DMAEIEN (0x10000000U) /*!< Bit mask for SDHC_IRQSIGEN_DMAEIEN. */
#define BS_SDHC_IRQSIGEN_DMAEIEN (1U)      /*!< Bit field size in bits for SDHC_IRQSIGEN_DMAEIEN. */

/*! @brief Read current value of the SDHC_IRQSIGEN_DMAEIEN field. */
#define BR_SDHC_IRQSIGEN_DMAEIEN(x) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_DMAEIEN))

/*! @brief Format value for bitfield SDHC_IRQSIGEN_DMAEIEN. */
#define BF_SDHC_IRQSIGEN_DMAEIEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_IRQSIGEN_DMAEIEN) & BM_SDHC_IRQSIGEN_DMAEIEN)

/*! @brief Set the DMAEIEN field to a new value. */
#define BW_SDHC_IRQSIGEN_DMAEIEN(x, v) (BITBAND_ACCESS32(HW_SDHC_IRQSIGEN_ADDR(x), BP_SDHC_IRQSIGEN_DMAEIEN) = (v))
/*@}*/

/*******************************************************************************
 * HW_SDHC_AC12ERR - Auto CMD12 Error Status Register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_AC12ERR - Auto CMD12 Error Status Register (RO)
 *
 * Reset value: 0x00000000U
 *
 * When the AC12ESEN bit in the Status register is set, the host driver shall
 * check this register to identify what kind of error the Auto CMD12 indicated.
 * This register is valid only when the Auto CMD12 Error status bit is set. The
 * following table shows the relationship between the Auto CMGD12 CRC error and the
 * Auto CMD12 command timeout error. Relationship between Command CRC Error and
 * Command Timeout Error For Auto CMD12 Auto CMD12 CRC error Auto CMD12 timeout
 * error Type of error 0 0 No error 0 1 Response timeout error 1 0 Response CRC
 * error 1 1 CMD line conflict Changes in Auto CMD12 Error Status register can be
 * classified in three scenarios: When the SDHC is going to issue an Auto CMD12: Set
 * bit 0 to 1 if the Auto CMD12 can't be issued due to an error in the previous
 * command. Set bit 0 to 0 if the auto CMD12 is issued. At the end bit of an auto
 * CMD12 response: Check errors corresponding to bits 1-4. Set bits 1-4
 * corresponding to detected errors. Clear bits 1-4 corresponding to detected errors.
 * Before reading the Auto CMD12 error status bit 7: Set bit 7 to 1 if there is a
 * command that can't be issued. Clear bit 7 if there is no command to issue. The
 * timing for generating the auto CMD12 error and writing to the command register
 * are asynchronous. After that, bit 7 shall be sampled when the driver is not
 * writing to the command register. So it is suggested to read this register only
 * when IRQSTAT[AC12E] is set. An Auto CMD12 error interrupt is generated when one
 * of the error bits (0-4) is set to 1. The command not issued by auto CMD12
 * error does not generate an interrupt.
 */
typedef union _hw_sdhc_ac12err
{
    uint32_t U;
    struct _hw_sdhc_ac12err_bitfields
    {
        uint32_t AC12NE : 1;           /*!< [0] Auto CMD12 Not Executed */
        uint32_t AC12TOE : 1;          /*!< [1] Auto CMD12 Timeout Error */
        uint32_t AC12EBE : 1;          /*!< [2] Auto CMD12 End Bit Error */
        uint32_t AC12CE : 1;           /*!< [3] Auto CMD12 CRC Error */
        uint32_t AC12IE : 1;           /*!< [4] Auto CMD12 Index Error */
        uint32_t RESERVED0 : 2;        /*!< [6:5]  */
        uint32_t CNIBAC12E : 1;        /*!< [7] Command Not Issued By Auto CMD12
                                        * Error */
        uint32_t RESERVED1 : 24;       /*!< [31:8]  */
    } B;
} hw_sdhc_ac12err_t;

/*!
 * @name Constants and macros for entire SDHC_AC12ERR register
 */
/*@{*/
#define HW_SDHC_AC12ERR_ADDR(x)  ((x) + 0x3CU)

#define HW_SDHC_AC12ERR(x)       (*(__I hw_sdhc_ac12err_t *) HW_SDHC_AC12ERR_ADDR(x))
#define HW_SDHC_AC12ERR_RD(x)    (HW_SDHC_AC12ERR(x).U)
/*@}*/

/*
 * Constants & macros for individual SDHC_AC12ERR bitfields
 */

/*!
 * @name Register SDHC_AC12ERR, field AC12NE[0] (RO)
 *
 * If memory multiple 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 the SDHC cannot issue the auto CMD12 to stop a memory
 * multiple block data transfer due to some error. If this bit is set to 1, other
 * error status bits (1-4) have no meaning.
 *
 * Values:
 * - 0 - Executed.
 * - 1 - Not executed.
 */
/*@{*/
#define BP_SDHC_AC12ERR_AC12NE (0U)        /*!< Bit position for SDHC_AC12ERR_AC12NE. */
#define BM_SDHC_AC12ERR_AC12NE (0x00000001U) /*!< Bit mask for SDHC_AC12ERR_AC12NE. */
#define BS_SDHC_AC12ERR_AC12NE (1U)        /*!< Bit field size in bits for SDHC_AC12ERR_AC12NE. */

/*! @brief Read current value of the SDHC_AC12ERR_AC12NE field. */
#define BR_SDHC_AC12ERR_AC12NE(x) (BITBAND_ACCESS32(HW_SDHC_AC12ERR_ADDR(x), BP_SDHC_AC12ERR_AC12NE))
/*@}*/

/*!
 * @name Register SDHC_AC12ERR, field AC12TOE[1] (RO)
 *
 * Occurs if no response is returned within 64 SDCLK cycles from the end bit of
 * the command. If this bit is set to 1, the other error status bits (2-4) have
 * no meaning.
 *
 * Values:
 * - 0 - No error.
 * - 1 - Time out.
 */
/*@{*/
#define BP_SDHC_AC12ERR_AC12TOE (1U)       /*!< Bit position for SDHC_AC12ERR_AC12TOE. */
#define BM_SDHC_AC12ERR_AC12TOE (0x00000002U) /*!< Bit mask for SDHC_AC12ERR_AC12TOE. */
#define BS_SDHC_AC12ERR_AC12TOE (1U)       /*!< Bit field size in bits for SDHC_AC12ERR_AC12TOE. */

/*! @brief Read current value of the SDHC_AC12ERR_AC12TOE field. */
#define BR_SDHC_AC12ERR_AC12TOE(x) (BITBAND_ACCESS32(HW_SDHC_AC12ERR_ADDR(x), BP_SDHC_AC12ERR_AC12TOE))
/*@}*/

/*!
 * @name Register SDHC_AC12ERR, field AC12EBE[2] (RO)
 *
 * Occurs when detecting that the end bit of command response is 0 which must be
 * 1.
 *
 * Values:
 * - 0 - No error.
 * - 1 - End bit error generated.
 */
/*@{*/
#define BP_SDHC_AC12ERR_AC12EBE (2U)       /*!< Bit position for SDHC_AC12ERR_AC12EBE. */
#define BM_SDHC_AC12ERR_AC12EBE (0x00000004U) /*!< Bit mask for SDHC_AC12ERR_AC12EBE. */
#define BS_SDHC_AC12ERR_AC12EBE (1U)       /*!< Bit field size in bits for SDHC_AC12ERR_AC12EBE. */

/*! @brief Read current value of the SDHC_AC12ERR_AC12EBE field. */
#define BR_SDHC_AC12ERR_AC12EBE(x) (BITBAND_ACCESS32(HW_SDHC_AC12ERR_ADDR(x), BP_SDHC_AC12ERR_AC12EBE))
/*@}*/

/*!
 * @name Register SDHC_AC12ERR, field AC12CE[3] (RO)
 *
 * Occurs when detecting a CRC error in the command response.
 *
 * Values:
 * - 0 - No CRC error.
 * - 1 - CRC error met in Auto CMD12 response.
 */
/*@{*/
#define BP_SDHC_AC12ERR_AC12CE (3U)        /*!< Bit position for SDHC_AC12ERR_AC12CE. */
#define BM_SDHC_AC12ERR_AC12CE (0x00000008U) /*!< Bit mask for SDHC_AC12ERR_AC12CE. */
#define BS_SDHC_AC12ERR_AC12CE (1U)        /*!< Bit field size in bits for SDHC_AC12ERR_AC12CE. */

/*! @brief Read current value of the SDHC_AC12ERR_AC12CE field. */
#define BR_SDHC_AC12ERR_AC12CE(x) (BITBAND_ACCESS32(HW_SDHC_AC12ERR_ADDR(x), BP_SDHC_AC12ERR_AC12CE))
/*@}*/

/*!
 * @name Register SDHC_AC12ERR, field AC12IE[4] (RO)
 *
 * Occurs if the command index error occurs in response to a command.
 *
 * Values:
 * - 0 - No error.
 * - 1 - Error, the CMD index in response is not CMD12.
 */
/*@{*/
#define BP_SDHC_AC12ERR_AC12IE (4U)        /*!< Bit position for SDHC_AC12ERR_AC12IE. */
#define BM_SDHC_AC12ERR_AC12IE (0x00000010U) /*!< Bit mask for SDHC_AC12ERR_AC12IE. */
#define BS_SDHC_AC12ERR_AC12IE (1U)        /*!< Bit field size in bits for SDHC_AC12ERR_AC12IE. */

/*! @brief Read current value of the SDHC_AC12ERR_AC12IE field. */
#define BR_SDHC_AC12ERR_AC12IE(x) (BITBAND_ACCESS32(HW_SDHC_AC12ERR_ADDR(x), BP_SDHC_AC12ERR_AC12IE))
/*@}*/

/*!
 * @name Register SDHC_AC12ERR, field CNIBAC12E[7] (RO)
 *
 * Setting this bit to 1 means CMD_wo_DAT is not executed due to an auto CMD12
 * error (D04-D01) in this register.
 *
 * Values:
 * - 0 - No error.
 * - 1 - Not issued.
 */
/*@{*/
#define BP_SDHC_AC12ERR_CNIBAC12E (7U)     /*!< Bit position for SDHC_AC12ERR_CNIBAC12E. */
#define BM_SDHC_AC12ERR_CNIBAC12E (0x00000080U) /*!< Bit mask for SDHC_AC12ERR_CNIBAC12E. */
#define BS_SDHC_AC12ERR_CNIBAC12E (1U)     /*!< Bit field size in bits for SDHC_AC12ERR_CNIBAC12E. */

/*! @brief Read current value of the SDHC_AC12ERR_CNIBAC12E field. */
#define BR_SDHC_AC12ERR_CNIBAC12E(x) (BITBAND_ACCESS32(HW_SDHC_AC12ERR_ADDR(x), BP_SDHC_AC12ERR_CNIBAC12E))
/*@}*/

/*******************************************************************************
 * HW_SDHC_HTCAPBLT - Host Controller Capabilities
 ******************************************************************************/

/*!
 * @brief HW_SDHC_HTCAPBLT - Host Controller Capabilities (RO)
 *
 * Reset value: 0x07F30000U
 *
 * This register provides the host driver with information specific to the SDHC
 * implementation. The value in this register is the power-on-reset value, and
 * does not change with a software reset. Any write to this register is ignored.
 */
typedef union _hw_sdhc_htcapblt
{
    uint32_t U;
    struct _hw_sdhc_htcapblt_bitfields
    {
        uint32_t RESERVED0 : 16;       /*!< [15:0]  */
        uint32_t MBL : 3;              /*!< [18:16] Max Block Length */
        uint32_t RESERVED1 : 1;        /*!< [19]  */
        uint32_t ADMAS : 1;            /*!< [20] ADMA Support */
        uint32_t HSS : 1;              /*!< [21] High Speed Support */
        uint32_t DMAS : 1;             /*!< [22] DMA Support */
        uint32_t SRS : 1;              /*!< [23] Suspend/Resume Support */
        uint32_t VS33 : 1;             /*!< [24] Voltage Support 3.3 V */
        uint32_t RESERVED2 : 7;        /*!< [31:25]  */
    } B;
} hw_sdhc_htcapblt_t;

/*!
 * @name Constants and macros for entire SDHC_HTCAPBLT register
 */
/*@{*/
#define HW_SDHC_HTCAPBLT_ADDR(x) ((x) + 0x40U)

#define HW_SDHC_HTCAPBLT(x)      (*(__I hw_sdhc_htcapblt_t *) HW_SDHC_HTCAPBLT_ADDR(x))
#define HW_SDHC_HTCAPBLT_RD(x)   (HW_SDHC_HTCAPBLT(x).U)
/*@}*/

/*
 * Constants & macros for individual SDHC_HTCAPBLT bitfields
 */

/*!
 * @name Register SDHC_HTCAPBLT, field MBL[18:16] (RO)
 *
 * This value indicates the maximum block size that the host driver can read and
 * write to the buffer in the SDHC. The buffer shall transfer block size without
 * wait cycles.
 *
 * Values:
 * - 000 - 512 bytes
 * - 001 - 1024 bytes
 * - 010 - 2048 bytes
 * - 011 - 4096 bytes
 */
/*@{*/
#define BP_SDHC_HTCAPBLT_MBL (16U)         /*!< Bit position for SDHC_HTCAPBLT_MBL. */
#define BM_SDHC_HTCAPBLT_MBL (0x00070000U) /*!< Bit mask for SDHC_HTCAPBLT_MBL. */
#define BS_SDHC_HTCAPBLT_MBL (3U)          /*!< Bit field size in bits for SDHC_HTCAPBLT_MBL. */

/*! @brief Read current value of the SDHC_HTCAPBLT_MBL field. */
#define BR_SDHC_HTCAPBLT_MBL(x) (HW_SDHC_HTCAPBLT(x).B.MBL)
/*@}*/

/*!
 * @name Register SDHC_HTCAPBLT, field ADMAS[20] (RO)
 *
 * This bit indicates whether the SDHC supports the ADMA feature.
 *
 * Values:
 * - 0 - Advanced DMA not supported.
 * - 1 - Advanced DMA supported.
 */
/*@{*/
#define BP_SDHC_HTCAPBLT_ADMAS (20U)       /*!< Bit position for SDHC_HTCAPBLT_ADMAS. */
#define BM_SDHC_HTCAPBLT_ADMAS (0x00100000U) /*!< Bit mask for SDHC_HTCAPBLT_ADMAS. */
#define BS_SDHC_HTCAPBLT_ADMAS (1U)        /*!< Bit field size in bits for SDHC_HTCAPBLT_ADMAS. */

/*! @brief Read current value of the SDHC_HTCAPBLT_ADMAS field. */
#define BR_SDHC_HTCAPBLT_ADMAS(x) (BITBAND_ACCESS32(HW_SDHC_HTCAPBLT_ADDR(x), BP_SDHC_HTCAPBLT_ADMAS))
/*@}*/

/*!
 * @name Register SDHC_HTCAPBLT, field HSS[21] (RO)
 *
 * This bit indicates whether the SDHC supports high speed mode and the host
 * system can supply a SD Clock frequency from 25 MHz to 50 MHz.
 *
 * Values:
 * - 0 - High speed not supported.
 * - 1 - High speed supported.
 */
/*@{*/
#define BP_SDHC_HTCAPBLT_HSS (21U)         /*!< Bit position for SDHC_HTCAPBLT_HSS. */
#define BM_SDHC_HTCAPBLT_HSS (0x00200000U) /*!< Bit mask for SDHC_HTCAPBLT_HSS. */
#define BS_SDHC_HTCAPBLT_HSS (1U)          /*!< Bit field size in bits for SDHC_HTCAPBLT_HSS. */

/*! @brief Read current value of the SDHC_HTCAPBLT_HSS field. */
#define BR_SDHC_HTCAPBLT_HSS(x) (BITBAND_ACCESS32(HW_SDHC_HTCAPBLT_ADDR(x), BP_SDHC_HTCAPBLT_HSS))
/*@}*/

/*!
 * @name Register SDHC_HTCAPBLT, field DMAS[22] (RO)
 *
 * This bit indicates whether the SDHC is capable of using the internal DMA to
 * transfer data between system memory and the data buffer directly.
 *
 * Values:
 * - 0 - DMA not supported.
 * - 1 - DMA supported.
 */
/*@{*/
#define BP_SDHC_HTCAPBLT_DMAS (22U)        /*!< Bit position for SDHC_HTCAPBLT_DMAS. */
#define BM_SDHC_HTCAPBLT_DMAS (0x00400000U) /*!< Bit mask for SDHC_HTCAPBLT_DMAS. */
#define BS_SDHC_HTCAPBLT_DMAS (1U)         /*!< Bit field size in bits for SDHC_HTCAPBLT_DMAS. */

/*! @brief Read current value of the SDHC_HTCAPBLT_DMAS field. */
#define BR_SDHC_HTCAPBLT_DMAS(x) (BITBAND_ACCESS32(HW_SDHC_HTCAPBLT_ADDR(x), BP_SDHC_HTCAPBLT_DMAS))
/*@}*/

/*!
 * @name Register SDHC_HTCAPBLT, field SRS[23] (RO)
 *
 * This bit indicates whether the SDHC supports suspend / resume functionality.
 * If this bit is 0, the suspend and resume mechanism, as well as the read Wwait,
 * are not supported, and the host driver shall not issue either suspend or
 * resume commands.
 *
 * Values:
 * - 0 - Not supported.
 * - 1 - Supported.
 */
/*@{*/
#define BP_SDHC_HTCAPBLT_SRS (23U)         /*!< Bit position for SDHC_HTCAPBLT_SRS. */
#define BM_SDHC_HTCAPBLT_SRS (0x00800000U) /*!< Bit mask for SDHC_HTCAPBLT_SRS. */
#define BS_SDHC_HTCAPBLT_SRS (1U)          /*!< Bit field size in bits for SDHC_HTCAPBLT_SRS. */

/*! @brief Read current value of the SDHC_HTCAPBLT_SRS field. */
#define BR_SDHC_HTCAPBLT_SRS(x) (BITBAND_ACCESS32(HW_SDHC_HTCAPBLT_ADDR(x), BP_SDHC_HTCAPBLT_SRS))
/*@}*/

/*!
 * @name Register SDHC_HTCAPBLT, field VS33[24] (RO)
 *
 * This bit shall depend on the host system ability.
 *
 * Values:
 * - 0 - 3.3 V not supported.
 * - 1 - 3.3 V supported.
 */
/*@{*/
#define BP_SDHC_HTCAPBLT_VS33 (24U)        /*!< Bit position for SDHC_HTCAPBLT_VS33. */
#define BM_SDHC_HTCAPBLT_VS33 (0x01000000U) /*!< Bit mask for SDHC_HTCAPBLT_VS33. */
#define BS_SDHC_HTCAPBLT_VS33 (1U)         /*!< Bit field size in bits for SDHC_HTCAPBLT_VS33. */

/*! @brief Read current value of the SDHC_HTCAPBLT_VS33 field. */
#define BR_SDHC_HTCAPBLT_VS33(x) (BITBAND_ACCESS32(HW_SDHC_HTCAPBLT_ADDR(x), BP_SDHC_HTCAPBLT_VS33))
/*@}*/

/*******************************************************************************
 * HW_SDHC_WML - Watermark Level Register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_WML - Watermark Level Register (RW)
 *
 * Reset value: 0x00100010U
 *
 * Both write and read watermark levels (FIFO threshold) are configurable. There
 * value can range from 1 to 128 words. Both write and read burst lengths are
 * also configurable. There value can range from 1 to 31 words.
 */
typedef union _hw_sdhc_wml
{
    uint32_t U;
    struct _hw_sdhc_wml_bitfields
    {
        uint32_t RDWML : 8;            /*!< [7:0] Read Watermark Level */
        uint32_t RESERVED0 : 8;        /*!< [15:8]  */
        uint32_t WRWML : 8;            /*!< [23:16] Write Watermark Level */
        uint32_t RESERVED1 : 8;        /*!< [31:24]  */
    } B;
} hw_sdhc_wml_t;

/*!
 * @name Constants and macros for entire SDHC_WML register
 */
/*@{*/
#define HW_SDHC_WML_ADDR(x)      ((x) + 0x44U)

#define HW_SDHC_WML(x)           (*(__IO hw_sdhc_wml_t *) HW_SDHC_WML_ADDR(x))
#define HW_SDHC_WML_RD(x)        (HW_SDHC_WML(x).U)
#define HW_SDHC_WML_WR(x, v)     (HW_SDHC_WML(x).U = (v))
#define HW_SDHC_WML_SET(x, v)    (HW_SDHC_WML_WR(x, HW_SDHC_WML_RD(x) |  (v)))
#define HW_SDHC_WML_CLR(x, v)    (HW_SDHC_WML_WR(x, HW_SDHC_WML_RD(x) & ~(v)))
#define HW_SDHC_WML_TOG(x, v)    (HW_SDHC_WML_WR(x, HW_SDHC_WML_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_WML bitfields
 */

/*!
 * @name Register SDHC_WML, field RDWML[7:0] (RW)
 *
 * The number of words used as the watermark level (FIFO threshold) in a DMA
 * read operation. Also the number of words as a sequence of read bursts in
 * back-to-back mode. The maximum legal value for the read water mark level is 128.
 */
/*@{*/
#define BP_SDHC_WML_RDWML    (0U)          /*!< Bit position for SDHC_WML_RDWML. */
#define BM_SDHC_WML_RDWML    (0x000000FFU) /*!< Bit mask for SDHC_WML_RDWML. */
#define BS_SDHC_WML_RDWML    (8U)          /*!< Bit field size in bits for SDHC_WML_RDWML. */

/*! @brief Read current value of the SDHC_WML_RDWML field. */
#define BR_SDHC_WML_RDWML(x) (HW_SDHC_WML(x).B.RDWML)

/*! @brief Format value for bitfield SDHC_WML_RDWML. */
#define BF_SDHC_WML_RDWML(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_WML_RDWML) & BM_SDHC_WML_RDWML)

/*! @brief Set the RDWML field to a new value. */
#define BW_SDHC_WML_RDWML(x, v) (HW_SDHC_WML_WR(x, (HW_SDHC_WML_RD(x) & ~BM_SDHC_WML_RDWML) | BF_SDHC_WML_RDWML(v)))
/*@}*/

/*!
 * @name Register SDHC_WML, field WRWML[23:16] (RW)
 *
 * The number of words used as the watermark level (FIFO threshold) in a DMA
 * write operation. Also the number of words as a sequence of write bursts in
 * back-to-back mode. The maximum legal value for the write watermark level is 128.
 */
/*@{*/
#define BP_SDHC_WML_WRWML    (16U)         /*!< Bit position for SDHC_WML_WRWML. */
#define BM_SDHC_WML_WRWML    (0x00FF0000U) /*!< Bit mask for SDHC_WML_WRWML. */
#define BS_SDHC_WML_WRWML    (8U)          /*!< Bit field size in bits for SDHC_WML_WRWML. */

/*! @brief Read current value of the SDHC_WML_WRWML field. */
#define BR_SDHC_WML_WRWML(x) (HW_SDHC_WML(x).B.WRWML)

/*! @brief Format value for bitfield SDHC_WML_WRWML. */
#define BF_SDHC_WML_WRWML(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_WML_WRWML) & BM_SDHC_WML_WRWML)

/*! @brief Set the WRWML field to a new value. */
#define BW_SDHC_WML_WRWML(x, v) (HW_SDHC_WML_WR(x, (HW_SDHC_WML_RD(x) & ~BM_SDHC_WML_WRWML) | BF_SDHC_WML_WRWML(v)))
/*@}*/

/*******************************************************************************
 * HW_SDHC_FEVT - Force Event register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_FEVT - Force Event register (WO)
 *
 * Reset value: 0x00000000U
 *
 * The Force Event (FEVT) register is not a physically implemented register.
 * Rather, it is an address at which the Interrupt Status register can be written if
 * the corresponding bit of the Interrupt Status Enable register is set. This
 * register is a write only register and writing 0 to it has no effect. Writing 1
 * to this register actually sets the corresponding bit of Interrupt Status
 * register. A read from this register always results in 0's. To change the
 * corresponding status bits in the interrupt status register, make sure to set
 * SYSCTL[IPGEN] so that bus clock is always active. Forcing a card interrupt will generate a
 * short pulse on the DAT[1] line, and the driver may treat this interrupt as a
 * normal interrupt. The interrupt service routine may skip polling the card
 * interrupt factor as the interrupt is selfcleared.
 */
typedef union _hw_sdhc_fevt
{
    uint32_t U;
    struct _hw_sdhc_fevt_bitfields
    {
        uint32_t AC12NE : 1;           /*!< [0] Force Event Auto Command 12 Not
                                        * Executed */
        uint32_t AC12TOE : 1;          /*!< [1] Force Event Auto Command 12 Time Out
                                        * Error */
        uint32_t AC12CE : 1;           /*!< [2] Force Event Auto Command 12 CRC Error */
        uint32_t AC12EBE : 1;          /*!< [3] Force Event Auto Command 12 End Bit
                                        * Error */
        uint32_t AC12IE : 1;           /*!< [4] Force Event Auto Command 12 Index Error
                                        * */
        uint32_t RESERVED0 : 2;        /*!< [6:5]  */
        uint32_t CNIBAC12E : 1;        /*!< [7] Force Event Command Not Executed By
                                        * Auto Command 12 Error */
        uint32_t RESERVED1 : 8;        /*!< [15:8]  */
        uint32_t CTOE : 1;             /*!< [16] Force Event Command Time Out Error */
        uint32_t CCE : 1;              /*!< [17] Force Event Command CRC Error */
        uint32_t CEBE : 1;             /*!< [18] Force Event Command End Bit Error */
        uint32_t CIE : 1;              /*!< [19] Force Event Command Index Error */
        uint32_t DTOE : 1;             /*!< [20] Force Event Data Time Out Error */
        uint32_t DCE : 1;              /*!< [21] Force Event Data CRC Error */
        uint32_t DEBE : 1;             /*!< [22] Force Event Data End Bit Error */
        uint32_t RESERVED2 : 1;        /*!< [23]  */
        uint32_t AC12E : 1;            /*!< [24] Force Event Auto Command 12 Error */
        uint32_t RESERVED3 : 3;        /*!< [27:25]  */
        uint32_t DMAE : 1;             /*!< [28] Force Event DMA Error */
        uint32_t RESERVED4 : 2;        /*!< [30:29]  */
        uint32_t CINT : 1;             /*!< [31] Force Event Card Interrupt */
    } B;
} hw_sdhc_fevt_t;

/*!
 * @name Constants and macros for entire SDHC_FEVT register
 */
/*@{*/
#define HW_SDHC_FEVT_ADDR(x)     ((x) + 0x50U)

#define HW_SDHC_FEVT(x)          (*(__O hw_sdhc_fevt_t *) HW_SDHC_FEVT_ADDR(x))
#define HW_SDHC_FEVT_RD(x)       (HW_SDHC_FEVT(x).U)
#define HW_SDHC_FEVT_WR(x, v)    (HW_SDHC_FEVT(x).U = (v))
/*@}*/

/*
 * Constants & macros for individual SDHC_FEVT bitfields
 */

/*!
 * @name Register SDHC_FEVT, field AC12NE[0] (WORZ)
 *
 * Forces AC12ERR[AC12NE] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_AC12NE  (0U)          /*!< Bit position for SDHC_FEVT_AC12NE. */
#define BM_SDHC_FEVT_AC12NE  (0x00000001U) /*!< Bit mask for SDHC_FEVT_AC12NE. */
#define BS_SDHC_FEVT_AC12NE  (1U)          /*!< Bit field size in bits for SDHC_FEVT_AC12NE. */

/*! @brief Format value for bitfield SDHC_FEVT_AC12NE. */
#define BF_SDHC_FEVT_AC12NE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_AC12NE) & BM_SDHC_FEVT_AC12NE)

/*! @brief Set the AC12NE field to a new value. */
#define BW_SDHC_FEVT_AC12NE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_AC12NE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field AC12TOE[1] (WORZ)
 *
 * Forces AC12ERR[AC12TOE] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_AC12TOE (1U)          /*!< Bit position for SDHC_FEVT_AC12TOE. */
#define BM_SDHC_FEVT_AC12TOE (0x00000002U) /*!< Bit mask for SDHC_FEVT_AC12TOE. */
#define BS_SDHC_FEVT_AC12TOE (1U)          /*!< Bit field size in bits for SDHC_FEVT_AC12TOE. */

/*! @brief Format value for bitfield SDHC_FEVT_AC12TOE. */
#define BF_SDHC_FEVT_AC12TOE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_AC12TOE) & BM_SDHC_FEVT_AC12TOE)

/*! @brief Set the AC12TOE field to a new value. */
#define BW_SDHC_FEVT_AC12TOE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_AC12TOE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field AC12CE[2] (WORZ)
 *
 * Forces AC12ERR[AC12CE] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_AC12CE  (2U)          /*!< Bit position for SDHC_FEVT_AC12CE. */
#define BM_SDHC_FEVT_AC12CE  (0x00000004U) /*!< Bit mask for SDHC_FEVT_AC12CE. */
#define BS_SDHC_FEVT_AC12CE  (1U)          /*!< Bit field size in bits for SDHC_FEVT_AC12CE. */

/*! @brief Format value for bitfield SDHC_FEVT_AC12CE. */
#define BF_SDHC_FEVT_AC12CE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_AC12CE) & BM_SDHC_FEVT_AC12CE)

/*! @brief Set the AC12CE field to a new value. */
#define BW_SDHC_FEVT_AC12CE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_AC12CE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field AC12EBE[3] (WORZ)
 *
 * Forces AC12ERR[AC12EBE] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_AC12EBE (3U)          /*!< Bit position for SDHC_FEVT_AC12EBE. */
#define BM_SDHC_FEVT_AC12EBE (0x00000008U) /*!< Bit mask for SDHC_FEVT_AC12EBE. */
#define BS_SDHC_FEVT_AC12EBE (1U)          /*!< Bit field size in bits for SDHC_FEVT_AC12EBE. */

/*! @brief Format value for bitfield SDHC_FEVT_AC12EBE. */
#define BF_SDHC_FEVT_AC12EBE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_AC12EBE) & BM_SDHC_FEVT_AC12EBE)

/*! @brief Set the AC12EBE field to a new value. */
#define BW_SDHC_FEVT_AC12EBE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_AC12EBE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field AC12IE[4] (WORZ)
 *
 * Forces AC12ERR[AC12IE] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_AC12IE  (4U)          /*!< Bit position for SDHC_FEVT_AC12IE. */
#define BM_SDHC_FEVT_AC12IE  (0x00000010U) /*!< Bit mask for SDHC_FEVT_AC12IE. */
#define BS_SDHC_FEVT_AC12IE  (1U)          /*!< Bit field size in bits for SDHC_FEVT_AC12IE. */

/*! @brief Format value for bitfield SDHC_FEVT_AC12IE. */
#define BF_SDHC_FEVT_AC12IE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_AC12IE) & BM_SDHC_FEVT_AC12IE)

/*! @brief Set the AC12IE field to a new value. */
#define BW_SDHC_FEVT_AC12IE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_AC12IE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field CNIBAC12E[7] (WORZ)
 *
 * Forces AC12ERR[CNIBAC12E] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_CNIBAC12E (7U)        /*!< Bit position for SDHC_FEVT_CNIBAC12E. */
#define BM_SDHC_FEVT_CNIBAC12E (0x00000080U) /*!< Bit mask for SDHC_FEVT_CNIBAC12E. */
#define BS_SDHC_FEVT_CNIBAC12E (1U)        /*!< Bit field size in bits for SDHC_FEVT_CNIBAC12E. */

/*! @brief Format value for bitfield SDHC_FEVT_CNIBAC12E. */
#define BF_SDHC_FEVT_CNIBAC12E(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_CNIBAC12E) & BM_SDHC_FEVT_CNIBAC12E)

/*! @brief Set the CNIBAC12E field to a new value. */
#define BW_SDHC_FEVT_CNIBAC12E(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_CNIBAC12E) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field CTOE[16] (WORZ)
 *
 * Forces IRQSTAT[CTOE] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_CTOE    (16U)         /*!< Bit position for SDHC_FEVT_CTOE. */
#define BM_SDHC_FEVT_CTOE    (0x00010000U) /*!< Bit mask for SDHC_FEVT_CTOE. */
#define BS_SDHC_FEVT_CTOE    (1U)          /*!< Bit field size in bits for SDHC_FEVT_CTOE. */

/*! @brief Format value for bitfield SDHC_FEVT_CTOE. */
#define BF_SDHC_FEVT_CTOE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_CTOE) & BM_SDHC_FEVT_CTOE)

/*! @brief Set the CTOE field to a new value. */
#define BW_SDHC_FEVT_CTOE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_CTOE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field CCE[17] (WORZ)
 *
 * Forces IRQSTAT[CCE] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_CCE     (17U)         /*!< Bit position for SDHC_FEVT_CCE. */
#define BM_SDHC_FEVT_CCE     (0x00020000U) /*!< Bit mask for SDHC_FEVT_CCE. */
#define BS_SDHC_FEVT_CCE     (1U)          /*!< Bit field size in bits for SDHC_FEVT_CCE. */

/*! @brief Format value for bitfield SDHC_FEVT_CCE. */
#define BF_SDHC_FEVT_CCE(v)  ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_CCE) & BM_SDHC_FEVT_CCE)

/*! @brief Set the CCE field to a new value. */
#define BW_SDHC_FEVT_CCE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_CCE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field CEBE[18] (WORZ)
 *
 * Forces IRQSTAT[CEBE] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_CEBE    (18U)         /*!< Bit position for SDHC_FEVT_CEBE. */
#define BM_SDHC_FEVT_CEBE    (0x00040000U) /*!< Bit mask for SDHC_FEVT_CEBE. */
#define BS_SDHC_FEVT_CEBE    (1U)          /*!< Bit field size in bits for SDHC_FEVT_CEBE. */

/*! @brief Format value for bitfield SDHC_FEVT_CEBE. */
#define BF_SDHC_FEVT_CEBE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_CEBE) & BM_SDHC_FEVT_CEBE)

/*! @brief Set the CEBE field to a new value. */
#define BW_SDHC_FEVT_CEBE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_CEBE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field CIE[19] (WORZ)
 *
 * Forces IRQSTAT[CCE] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_CIE     (19U)         /*!< Bit position for SDHC_FEVT_CIE. */
#define BM_SDHC_FEVT_CIE     (0x00080000U) /*!< Bit mask for SDHC_FEVT_CIE. */
#define BS_SDHC_FEVT_CIE     (1U)          /*!< Bit field size in bits for SDHC_FEVT_CIE. */

/*! @brief Format value for bitfield SDHC_FEVT_CIE. */
#define BF_SDHC_FEVT_CIE(v)  ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_CIE) & BM_SDHC_FEVT_CIE)

/*! @brief Set the CIE field to a new value. */
#define BW_SDHC_FEVT_CIE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_CIE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field DTOE[20] (WORZ)
 *
 * Forces IRQSTAT[DTOE] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_DTOE    (20U)         /*!< Bit position for SDHC_FEVT_DTOE. */
#define BM_SDHC_FEVT_DTOE    (0x00100000U) /*!< Bit mask for SDHC_FEVT_DTOE. */
#define BS_SDHC_FEVT_DTOE    (1U)          /*!< Bit field size in bits for SDHC_FEVT_DTOE. */

/*! @brief Format value for bitfield SDHC_FEVT_DTOE. */
#define BF_SDHC_FEVT_DTOE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_DTOE) & BM_SDHC_FEVT_DTOE)

/*! @brief Set the DTOE field to a new value. */
#define BW_SDHC_FEVT_DTOE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_DTOE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field DCE[21] (WORZ)
 *
 * Forces IRQSTAT[DCE] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_DCE     (21U)         /*!< Bit position for SDHC_FEVT_DCE. */
#define BM_SDHC_FEVT_DCE     (0x00200000U) /*!< Bit mask for SDHC_FEVT_DCE. */
#define BS_SDHC_FEVT_DCE     (1U)          /*!< Bit field size in bits for SDHC_FEVT_DCE. */

/*! @brief Format value for bitfield SDHC_FEVT_DCE. */
#define BF_SDHC_FEVT_DCE(v)  ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_DCE) & BM_SDHC_FEVT_DCE)

/*! @brief Set the DCE field to a new value. */
#define BW_SDHC_FEVT_DCE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_DCE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field DEBE[22] (WORZ)
 *
 * Forces IRQSTAT[DEBE] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_DEBE    (22U)         /*!< Bit position for SDHC_FEVT_DEBE. */
#define BM_SDHC_FEVT_DEBE    (0x00400000U) /*!< Bit mask for SDHC_FEVT_DEBE. */
#define BS_SDHC_FEVT_DEBE    (1U)          /*!< Bit field size in bits for SDHC_FEVT_DEBE. */

/*! @brief Format value for bitfield SDHC_FEVT_DEBE. */
#define BF_SDHC_FEVT_DEBE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_DEBE) & BM_SDHC_FEVT_DEBE)

/*! @brief Set the DEBE field to a new value. */
#define BW_SDHC_FEVT_DEBE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_DEBE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field AC12E[24] (WORZ)
 *
 * Forces IRQSTAT[AC12E] to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_AC12E   (24U)         /*!< Bit position for SDHC_FEVT_AC12E. */
#define BM_SDHC_FEVT_AC12E   (0x01000000U) /*!< Bit mask for SDHC_FEVT_AC12E. */
#define BS_SDHC_FEVT_AC12E   (1U)          /*!< Bit field size in bits for SDHC_FEVT_AC12E. */

/*! @brief Format value for bitfield SDHC_FEVT_AC12E. */
#define BF_SDHC_FEVT_AC12E(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_AC12E) & BM_SDHC_FEVT_AC12E)

/*! @brief Set the AC12E field to a new value. */
#define BW_SDHC_FEVT_AC12E(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_AC12E) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field DMAE[28] (WORZ)
 *
 * Forces the DMAE bit of Interrupt Status Register to be set.
 */
/*@{*/
#define BP_SDHC_FEVT_DMAE    (28U)         /*!< Bit position for SDHC_FEVT_DMAE. */
#define BM_SDHC_FEVT_DMAE    (0x10000000U) /*!< Bit mask for SDHC_FEVT_DMAE. */
#define BS_SDHC_FEVT_DMAE    (1U)          /*!< Bit field size in bits for SDHC_FEVT_DMAE. */

/*! @brief Format value for bitfield SDHC_FEVT_DMAE. */
#define BF_SDHC_FEVT_DMAE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_DMAE) & BM_SDHC_FEVT_DMAE)

/*! @brief Set the DMAE field to a new value. */
#define BW_SDHC_FEVT_DMAE(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_DMAE) = (v))
/*@}*/

/*!
 * @name Register SDHC_FEVT, field CINT[31] (WORZ)
 *
 * Writing 1 to this bit generates a short low-level pulse on the internal
 * DAT[1] line, as if a self-clearing interrupt was received from the external card.
 * If enabled, the CINT bit will be set and the interrupt service routine may
 * treat this interrupt as a normal interrupt from the external card.
 */
/*@{*/
#define BP_SDHC_FEVT_CINT    (31U)         /*!< Bit position for SDHC_FEVT_CINT. */
#define BM_SDHC_FEVT_CINT    (0x80000000U) /*!< Bit mask for SDHC_FEVT_CINT. */
#define BS_SDHC_FEVT_CINT    (1U)          /*!< Bit field size in bits for SDHC_FEVT_CINT. */

/*! @brief Format value for bitfield SDHC_FEVT_CINT. */
#define BF_SDHC_FEVT_CINT(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_FEVT_CINT) & BM_SDHC_FEVT_CINT)

/*! @brief Set the CINT field to a new value. */
#define BW_SDHC_FEVT_CINT(x, v) (BITBAND_ACCESS32(HW_SDHC_FEVT_ADDR(x), BP_SDHC_FEVT_CINT) = (v))
/*@}*/

/*******************************************************************************
 * HW_SDHC_ADMAES - ADMA Error Status register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_ADMAES - ADMA Error Status register (RO)
 *
 * Reset value: 0x00000000U
 *
 * When an ADMA error interrupt has occurred, the ADMA Error States field in
 * this register holds the ADMA state and the ADMA System Address register holds the
 * address around the error descriptor. For recovering from this error, the host
 * driver requires the ADMA state to identify the error descriptor address as
 * follows: ST_STOP: Previous location set in the ADMA System Address register is
 * the error descriptor address. ST_FDS: Current location set in the ADMA System
 * Address register is the error descriptor address. ST_CADR: This state is never
 * set because it only increments the descriptor pointer and doesn't generate an
 * ADMA error. ST_TFR: Previous location set in the ADMA System Address register
 * is the error descriptor address. In case of a write operation, the host driver
 * must use the ACMD22 to get the number of the written block, rather than using
 * this information, because unwritten data may exist in the host controller.
 * The host controller generates the ADMA error interrupt when it detects invalid
 * descriptor data (valid = 0) in the ST_FDS state. The host driver can
 * distinguish this error by reading the valid bit of the error descriptor. ADMA Error
 * State coding D01-D00 ADMA Error State when error has occurred Contents of ADMA
 * System Address register 00 ST_STOP (Stop DMA) Holds the address of the next
 * executable descriptor command 01 ST_FDS (fetch descriptor) Holds the valid
 * descriptor address 10 ST_CADR (change address) No ADMA error is generated 11 ST_TFR
 * (Transfer Data) Holds the address of the next executable descriptor command
 */
typedef union _hw_sdhc_admaes
{
    uint32_t U;
    struct _hw_sdhc_admaes_bitfields
    {
        uint32_t ADMAES : 2;           /*!< [1:0] ADMA Error State (When ADMA Error Is
                                        * Occurred.) */
        uint32_t ADMALME : 1;          /*!< [2] ADMA Length Mismatch Error */
        uint32_t ADMADCE : 1;          /*!< [3] ADMA Descriptor Error */
        uint32_t RESERVED0 : 28;       /*!< [31:4]  */
    } B;
} hw_sdhc_admaes_t;

/*!
 * @name Constants and macros for entire SDHC_ADMAES register
 */
/*@{*/
#define HW_SDHC_ADMAES_ADDR(x)   ((x) + 0x54U)

#define HW_SDHC_ADMAES(x)        (*(__I hw_sdhc_admaes_t *) HW_SDHC_ADMAES_ADDR(x))
#define HW_SDHC_ADMAES_RD(x)     (HW_SDHC_ADMAES(x).U)
/*@}*/

/*
 * Constants & macros for individual SDHC_ADMAES bitfields
 */

/*!
 * @name Register SDHC_ADMAES, field ADMAES[1:0] (RO)
 *
 * Indicates the state of the ADMA when an error has occurred during an ADMA
 * data transfer.
 */
/*@{*/
#define BP_SDHC_ADMAES_ADMAES (0U)         /*!< Bit position for SDHC_ADMAES_ADMAES. */
#define BM_SDHC_ADMAES_ADMAES (0x00000003U) /*!< Bit mask for SDHC_ADMAES_ADMAES. */
#define BS_SDHC_ADMAES_ADMAES (2U)         /*!< Bit field size in bits for SDHC_ADMAES_ADMAES. */

/*! @brief Read current value of the SDHC_ADMAES_ADMAES field. */
#define BR_SDHC_ADMAES_ADMAES(x) (HW_SDHC_ADMAES(x).B.ADMAES)
/*@}*/

/*!
 * @name Register SDHC_ADMAES, field ADMALME[2] (RO)
 *
 * This error occurs in the following 2 cases: 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. Total data length
 * can not be divided by the block length.
 *
 * Values:
 * - 0 - No error.
 * - 1 - Error.
 */
/*@{*/
#define BP_SDHC_ADMAES_ADMALME (2U)        /*!< Bit position for SDHC_ADMAES_ADMALME. */
#define BM_SDHC_ADMAES_ADMALME (0x00000004U) /*!< Bit mask for SDHC_ADMAES_ADMALME. */
#define BS_SDHC_ADMAES_ADMALME (1U)        /*!< Bit field size in bits for SDHC_ADMAES_ADMALME. */

/*! @brief Read current value of the SDHC_ADMAES_ADMALME field. */
#define BR_SDHC_ADMAES_ADMALME(x) (BITBAND_ACCESS32(HW_SDHC_ADMAES_ADDR(x), BP_SDHC_ADMAES_ADMALME))
/*@}*/

/*!
 * @name Register SDHC_ADMAES, field ADMADCE[3] (RO)
 *
 * This error occurs when an invalid descriptor is fetched by ADMA.
 *
 * Values:
 * - 0 - No error.
 * - 1 - Error.
 */
/*@{*/
#define BP_SDHC_ADMAES_ADMADCE (3U)        /*!< Bit position for SDHC_ADMAES_ADMADCE. */
#define BM_SDHC_ADMAES_ADMADCE (0x00000008U) /*!< Bit mask for SDHC_ADMAES_ADMADCE. */
#define BS_SDHC_ADMAES_ADMADCE (1U)        /*!< Bit field size in bits for SDHC_ADMAES_ADMADCE. */

/*! @brief Read current value of the SDHC_ADMAES_ADMADCE field. */
#define BR_SDHC_ADMAES_ADMADCE(x) (BITBAND_ACCESS32(HW_SDHC_ADMAES_ADDR(x), BP_SDHC_ADMAES_ADMADCE))
/*@}*/

/*******************************************************************************
 * HW_SDHC_ADSADDR - ADMA System Addressregister
 ******************************************************************************/

/*!
 * @brief HW_SDHC_ADSADDR - ADMA System Addressregister (RW)
 *
 * Reset value: 0x00000000U
 *
 * This register contains the physical system memory address used for ADMA
 * transfers.
 */
typedef union _hw_sdhc_adsaddr
{
    uint32_t U;
    struct _hw_sdhc_adsaddr_bitfields
    {
        uint32_t RESERVED0 : 2;        /*!< [1:0]  */
        uint32_t ADSADDR : 30;         /*!< [31:2] ADMA System Address */
    } B;
} hw_sdhc_adsaddr_t;

/*!
 * @name Constants and macros for entire SDHC_ADSADDR register
 */
/*@{*/
#define HW_SDHC_ADSADDR_ADDR(x)  ((x) + 0x58U)

#define HW_SDHC_ADSADDR(x)       (*(__IO hw_sdhc_adsaddr_t *) HW_SDHC_ADSADDR_ADDR(x))
#define HW_SDHC_ADSADDR_RD(x)    (HW_SDHC_ADSADDR(x).U)
#define HW_SDHC_ADSADDR_WR(x, v) (HW_SDHC_ADSADDR(x).U = (v))
#define HW_SDHC_ADSADDR_SET(x, v) (HW_SDHC_ADSADDR_WR(x, HW_SDHC_ADSADDR_RD(x) |  (v)))
#define HW_SDHC_ADSADDR_CLR(x, v) (HW_SDHC_ADSADDR_WR(x, HW_SDHC_ADSADDR_RD(x) & ~(v)))
#define HW_SDHC_ADSADDR_TOG(x, v) (HW_SDHC_ADSADDR_WR(x, HW_SDHC_ADSADDR_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_ADSADDR bitfields
 */

/*!
 * @name Register SDHC_ADSADDR, field ADSADDR[31:2] (RW)
 *
 * Holds the word address of the executing command in the descriptor table. At
 * the start of ADMA, the host driver shall set the start address of the
 * Descriptor table. The ADMA engine increments this register address whenever fetching a
 * descriptor command. When the ADMA is stopped at the block gap, this register
 * indicates the address of the next executable descriptor command. When the ADMA
 * error interrupt is generated, this register shall hold the valid descriptor
 * address depending on the ADMA state. The lower 2 bits of this register is tied
 * to '0' so the ADMA address is always word-aligned. Because this register
 * supports dynamic address reflecting, when TC bit is set, it automatically alters the
 * value of internal address counter, so SW cannot change this register when TC
 * bit is set.
 */
/*@{*/
#define BP_SDHC_ADSADDR_ADSADDR (2U)       /*!< Bit position for SDHC_ADSADDR_ADSADDR. */
#define BM_SDHC_ADSADDR_ADSADDR (0xFFFFFFFCU) /*!< Bit mask for SDHC_ADSADDR_ADSADDR. */
#define BS_SDHC_ADSADDR_ADSADDR (30U)      /*!< Bit field size in bits for SDHC_ADSADDR_ADSADDR. */

/*! @brief Read current value of the SDHC_ADSADDR_ADSADDR field. */
#define BR_SDHC_ADSADDR_ADSADDR(x) (HW_SDHC_ADSADDR(x).B.ADSADDR)

/*! @brief Format value for bitfield SDHC_ADSADDR_ADSADDR. */
#define BF_SDHC_ADSADDR_ADSADDR(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_ADSADDR_ADSADDR) & BM_SDHC_ADSADDR_ADSADDR)

/*! @brief Set the ADSADDR field to a new value. */
#define BW_SDHC_ADSADDR_ADSADDR(x, v) (HW_SDHC_ADSADDR_WR(x, (HW_SDHC_ADSADDR_RD(x) & ~BM_SDHC_ADSADDR_ADSADDR) | BF_SDHC_ADSADDR_ADSADDR(v)))
/*@}*/

/*******************************************************************************
 * HW_SDHC_VENDOR - Vendor Specific register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_VENDOR - Vendor Specific register (RW)
 *
 * Reset value: 0x00000001U
 *
 * This register contains the vendor-specific control/status register.
 */
typedef union _hw_sdhc_vendor
{
    uint32_t U;
    struct _hw_sdhc_vendor_bitfields
    {
        uint32_t EXTDMAEN : 1;         /*!< [0] External DMA Request Enable */
        uint32_t EXBLKNU : 1;          /*!< [1] Exact Block Number Block Read Enable
                                        * For SDIO CMD53 */
        uint32_t RESERVED0 : 14;       /*!< [15:2]  */
        uint32_t INTSTVAL : 8;         /*!< [23:16] Internal State Value */
        uint32_t RESERVED1 : 8;        /*!< [31:24]  */
    } B;
} hw_sdhc_vendor_t;

/*!
 * @name Constants and macros for entire SDHC_VENDOR register
 */
/*@{*/
#define HW_SDHC_VENDOR_ADDR(x)   ((x) + 0xC0U)

#define HW_SDHC_VENDOR(x)        (*(__IO hw_sdhc_vendor_t *) HW_SDHC_VENDOR_ADDR(x))
#define HW_SDHC_VENDOR_RD(x)     (HW_SDHC_VENDOR(x).U)
#define HW_SDHC_VENDOR_WR(x, v)  (HW_SDHC_VENDOR(x).U = (v))
#define HW_SDHC_VENDOR_SET(x, v) (HW_SDHC_VENDOR_WR(x, HW_SDHC_VENDOR_RD(x) |  (v)))
#define HW_SDHC_VENDOR_CLR(x, v) (HW_SDHC_VENDOR_WR(x, HW_SDHC_VENDOR_RD(x) & ~(v)))
#define HW_SDHC_VENDOR_TOG(x, v) (HW_SDHC_VENDOR_WR(x, HW_SDHC_VENDOR_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_VENDOR bitfields
 */

/*!
 * @name Register SDHC_VENDOR, field EXTDMAEN[0] (RW)
 *
 * Enables the request to external DMA. When the internal DMA (either simple DMA
 * or advanced DMA) is not in use, and this bit is set, SDHC will send out DMA
 * request when the internal buffer is ready. This bit is particularly useful when
 * transferring data by CPU polling mode, and it is not allowed to send out the
 * external DMA request. By default, this bit is set.
 *
 * Values:
 * - 0 - In any scenario, SDHC does not send out the external DMA request.
 * - 1 - When internal DMA is not active, the external DMA request will be sent
 *     out.
 */
/*@{*/
#define BP_SDHC_VENDOR_EXTDMAEN (0U)       /*!< Bit position for SDHC_VENDOR_EXTDMAEN. */
#define BM_SDHC_VENDOR_EXTDMAEN (0x00000001U) /*!< Bit mask for SDHC_VENDOR_EXTDMAEN. */
#define BS_SDHC_VENDOR_EXTDMAEN (1U)       /*!< Bit field size in bits for SDHC_VENDOR_EXTDMAEN. */

/*! @brief Read current value of the SDHC_VENDOR_EXTDMAEN field. */
#define BR_SDHC_VENDOR_EXTDMAEN(x) (BITBAND_ACCESS32(HW_SDHC_VENDOR_ADDR(x), BP_SDHC_VENDOR_EXTDMAEN))

/*! @brief Format value for bitfield SDHC_VENDOR_EXTDMAEN. */
#define BF_SDHC_VENDOR_EXTDMAEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_VENDOR_EXTDMAEN) & BM_SDHC_VENDOR_EXTDMAEN)

/*! @brief Set the EXTDMAEN field to a new value. */
#define BW_SDHC_VENDOR_EXTDMAEN(x, v) (BITBAND_ACCESS32(HW_SDHC_VENDOR_ADDR(x), BP_SDHC_VENDOR_EXTDMAEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_VENDOR, field EXBLKNU[1] (RW)
 *
 * This bit must be set before S/W issues CMD53 multi-block read with exact
 * block number. This bit must not be set if the CMD53 multi-block read is not exact
 * block number.
 *
 * Values:
 * - 0 - None exact block read.
 * - 1 - Exact block read for SDIO CMD53.
 */
/*@{*/
#define BP_SDHC_VENDOR_EXBLKNU (1U)        /*!< Bit position for SDHC_VENDOR_EXBLKNU. */
#define BM_SDHC_VENDOR_EXBLKNU (0x00000002U) /*!< Bit mask for SDHC_VENDOR_EXBLKNU. */
#define BS_SDHC_VENDOR_EXBLKNU (1U)        /*!< Bit field size in bits for SDHC_VENDOR_EXBLKNU. */

/*! @brief Read current value of the SDHC_VENDOR_EXBLKNU field. */
#define BR_SDHC_VENDOR_EXBLKNU(x) (BITBAND_ACCESS32(HW_SDHC_VENDOR_ADDR(x), BP_SDHC_VENDOR_EXBLKNU))

/*! @brief Format value for bitfield SDHC_VENDOR_EXBLKNU. */
#define BF_SDHC_VENDOR_EXBLKNU(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_VENDOR_EXBLKNU) & BM_SDHC_VENDOR_EXBLKNU)

/*! @brief Set the EXBLKNU field to a new value. */
#define BW_SDHC_VENDOR_EXBLKNU(x, v) (BITBAND_ACCESS32(HW_SDHC_VENDOR_ADDR(x), BP_SDHC_VENDOR_EXBLKNU) = (v))
/*@}*/

/*!
 * @name Register SDHC_VENDOR, field INTSTVAL[23:16] (RO)
 *
 * Internal state value, reflecting the corresponding state value selected by
 * Debug Select field. This field is read-only and write to this field does not
 * have effect.
 */
/*@{*/
#define BP_SDHC_VENDOR_INTSTVAL (16U)      /*!< Bit position for SDHC_VENDOR_INTSTVAL. */
#define BM_SDHC_VENDOR_INTSTVAL (0x00FF0000U) /*!< Bit mask for SDHC_VENDOR_INTSTVAL. */
#define BS_SDHC_VENDOR_INTSTVAL (8U)       /*!< Bit field size in bits for SDHC_VENDOR_INTSTVAL. */

/*! @brief Read current value of the SDHC_VENDOR_INTSTVAL field. */
#define BR_SDHC_VENDOR_INTSTVAL(x) (HW_SDHC_VENDOR(x).B.INTSTVAL)
/*@}*/

/*******************************************************************************
 * HW_SDHC_MMCBOOT - MMC Boot register
 ******************************************************************************/

/*!
 * @brief HW_SDHC_MMCBOOT - MMC Boot register (RW)
 *
 * Reset value: 0x00000000U
 *
 * This register contains the MMC fast boot control register.
 */
typedef union _hw_sdhc_mmcboot
{
    uint32_t U;
    struct _hw_sdhc_mmcboot_bitfields
    {
        uint32_t DTOCVACK : 4;         /*!< [3:0] Boot ACK Time Out Counter Value */
        uint32_t BOOTACK : 1;          /*!< [4] Boot Ack Mode Select */
        uint32_t BOOTMODE : 1;         /*!< [5] Boot Mode Select */
        uint32_t BOOTEN : 1;           /*!< [6] Boot Mode Enable */
        uint32_t AUTOSABGEN : 1;       /*!< [7]  */
        uint32_t RESERVED0 : 8;        /*!< [15:8]  */
        uint32_t BOOTBLKCNT : 16;      /*!< [31:16]  */
    } B;
} hw_sdhc_mmcboot_t;

/*!
 * @name Constants and macros for entire SDHC_MMCBOOT register
 */
/*@{*/
#define HW_SDHC_MMCBOOT_ADDR(x)  ((x) + 0xC4U)

#define HW_SDHC_MMCBOOT(x)       (*(__IO hw_sdhc_mmcboot_t *) HW_SDHC_MMCBOOT_ADDR(x))
#define HW_SDHC_MMCBOOT_RD(x)    (HW_SDHC_MMCBOOT(x).U)
#define HW_SDHC_MMCBOOT_WR(x, v) (HW_SDHC_MMCBOOT(x).U = (v))
#define HW_SDHC_MMCBOOT_SET(x, v) (HW_SDHC_MMCBOOT_WR(x, HW_SDHC_MMCBOOT_RD(x) |  (v)))
#define HW_SDHC_MMCBOOT_CLR(x, v) (HW_SDHC_MMCBOOT_WR(x, HW_SDHC_MMCBOOT_RD(x) & ~(v)))
#define HW_SDHC_MMCBOOT_TOG(x, v) (HW_SDHC_MMCBOOT_WR(x, HW_SDHC_MMCBOOT_RD(x) ^  (v)))
/*@}*/

/*
 * Constants & macros for individual SDHC_MMCBOOT bitfields
 */

/*!
 * @name Register SDHC_MMCBOOT, field DTOCVACK[3:0] (RW)
 *
 * Values:
 * - 0000 - SDCLK x 2^8
 * - 0001 - SDCLK x 2^9
 * - 0010 - SDCLK x 2^10
 * - 0011 - SDCLK x 2^11
 * - 0100 - SDCLK x 2^12
 * - 0101 - SDCLK x 2^13
 * - 0110 - SDCLK x 2^14
 * - 0111 - SDCLK x 2^15
 * - 1110 - SDCLK x 2^22
 * - 1111 - Reserved
 */
/*@{*/
#define BP_SDHC_MMCBOOT_DTOCVACK (0U)      /*!< Bit position for SDHC_MMCBOOT_DTOCVACK. */
#define BM_SDHC_MMCBOOT_DTOCVACK (0x0000000FU) /*!< Bit mask for SDHC_MMCBOOT_DTOCVACK. */
#define BS_SDHC_MMCBOOT_DTOCVACK (4U)      /*!< Bit field size in bits for SDHC_MMCBOOT_DTOCVACK. */

/*! @brief Read current value of the SDHC_MMCBOOT_DTOCVACK field. */
#define BR_SDHC_MMCBOOT_DTOCVACK(x) (HW_SDHC_MMCBOOT(x).B.DTOCVACK)

/*! @brief Format value for bitfield SDHC_MMCBOOT_DTOCVACK. */
#define BF_SDHC_MMCBOOT_DTOCVACK(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_MMCBOOT_DTOCVACK) & BM_SDHC_MMCBOOT_DTOCVACK)

/*! @brief Set the DTOCVACK field to a new value. */
#define BW_SDHC_MMCBOOT_DTOCVACK(x, v) (HW_SDHC_MMCBOOT_WR(x, (HW_SDHC_MMCBOOT_RD(x) & ~BM_SDHC_MMCBOOT_DTOCVACK) | BF_SDHC_MMCBOOT_DTOCVACK(v)))
/*@}*/

/*!
 * @name Register SDHC_MMCBOOT, field BOOTACK[4] (RW)
 *
 * Values:
 * - 0 - No ack.
 * - 1 - Ack.
 */
/*@{*/
#define BP_SDHC_MMCBOOT_BOOTACK (4U)       /*!< Bit position for SDHC_MMCBOOT_BOOTACK. */
#define BM_SDHC_MMCBOOT_BOOTACK (0x00000010U) /*!< Bit mask for SDHC_MMCBOOT_BOOTACK. */
#define BS_SDHC_MMCBOOT_BOOTACK (1U)       /*!< Bit field size in bits for SDHC_MMCBOOT_BOOTACK. */

/*! @brief Read current value of the SDHC_MMCBOOT_BOOTACK field. */
#define BR_SDHC_MMCBOOT_BOOTACK(x) (BITBAND_ACCESS32(HW_SDHC_MMCBOOT_ADDR(x), BP_SDHC_MMCBOOT_BOOTACK))

/*! @brief Format value for bitfield SDHC_MMCBOOT_BOOTACK. */
#define BF_SDHC_MMCBOOT_BOOTACK(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_MMCBOOT_BOOTACK) & BM_SDHC_MMCBOOT_BOOTACK)

/*! @brief Set the BOOTACK field to a new value. */
#define BW_SDHC_MMCBOOT_BOOTACK(x, v) (BITBAND_ACCESS32(HW_SDHC_MMCBOOT_ADDR(x), BP_SDHC_MMCBOOT_BOOTACK) = (v))
/*@}*/

/*!
 * @name Register SDHC_MMCBOOT, field BOOTMODE[5] (RW)
 *
 * Values:
 * - 0 - Normal boot.
 * - 1 - Alternative boot.
 */
/*@{*/
#define BP_SDHC_MMCBOOT_BOOTMODE (5U)      /*!< Bit position for SDHC_MMCBOOT_BOOTMODE. */
#define BM_SDHC_MMCBOOT_BOOTMODE (0x00000020U) /*!< Bit mask for SDHC_MMCBOOT_BOOTMODE. */
#define BS_SDHC_MMCBOOT_BOOTMODE (1U)      /*!< Bit field size in bits for SDHC_MMCBOOT_BOOTMODE. */

/*! @brief Read current value of the SDHC_MMCBOOT_BOOTMODE field. */
#define BR_SDHC_MMCBOOT_BOOTMODE(x) (BITBAND_ACCESS32(HW_SDHC_MMCBOOT_ADDR(x), BP_SDHC_MMCBOOT_BOOTMODE))

/*! @brief Format value for bitfield SDHC_MMCBOOT_BOOTMODE. */
#define BF_SDHC_MMCBOOT_BOOTMODE(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_MMCBOOT_BOOTMODE) & BM_SDHC_MMCBOOT_BOOTMODE)

/*! @brief Set the BOOTMODE field to a new value. */
#define BW_SDHC_MMCBOOT_BOOTMODE(x, v) (BITBAND_ACCESS32(HW_SDHC_MMCBOOT_ADDR(x), BP_SDHC_MMCBOOT_BOOTMODE) = (v))
/*@}*/

/*!
 * @name Register SDHC_MMCBOOT, field BOOTEN[6] (RW)
 *
 * Values:
 * - 0 - Fast boot disable.
 * - 1 - Fast boot enable.
 */
/*@{*/
#define BP_SDHC_MMCBOOT_BOOTEN (6U)        /*!< Bit position for SDHC_MMCBOOT_BOOTEN. */
#define BM_SDHC_MMCBOOT_BOOTEN (0x00000040U) /*!< Bit mask for SDHC_MMCBOOT_BOOTEN. */
#define BS_SDHC_MMCBOOT_BOOTEN (1U)        /*!< Bit field size in bits for SDHC_MMCBOOT_BOOTEN. */

/*! @brief Read current value of the SDHC_MMCBOOT_BOOTEN field. */
#define BR_SDHC_MMCBOOT_BOOTEN(x) (BITBAND_ACCESS32(HW_SDHC_MMCBOOT_ADDR(x), BP_SDHC_MMCBOOT_BOOTEN))

/*! @brief Format value for bitfield SDHC_MMCBOOT_BOOTEN. */
#define BF_SDHC_MMCBOOT_BOOTEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_MMCBOOT_BOOTEN) & BM_SDHC_MMCBOOT_BOOTEN)

/*! @brief Set the BOOTEN field to a new value. */
#define BW_SDHC_MMCBOOT_BOOTEN(x, v) (BITBAND_ACCESS32(HW_SDHC_MMCBOOT_ADDR(x), BP_SDHC_MMCBOOT_BOOTEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_MMCBOOT, field AUTOSABGEN[7] (RW)
 *
 * When boot, enable auto stop at block gap function. This function will be
 * triggered, and host will stop at block gap when received card block cnt is equal
 * to BOOTBLKCNT.
 */
/*@{*/
#define BP_SDHC_MMCBOOT_AUTOSABGEN (7U)    /*!< Bit position for SDHC_MMCBOOT_AUTOSABGEN. */
#define BM_SDHC_MMCBOOT_AUTOSABGEN (0x00000080U) /*!< Bit mask for SDHC_MMCBOOT_AUTOSABGEN. */
#define BS_SDHC_MMCBOOT_AUTOSABGEN (1U)    /*!< Bit field size in bits for SDHC_MMCBOOT_AUTOSABGEN. */

/*! @brief Read current value of the SDHC_MMCBOOT_AUTOSABGEN field. */
#define BR_SDHC_MMCBOOT_AUTOSABGEN(x) (BITBAND_ACCESS32(HW_SDHC_MMCBOOT_ADDR(x), BP_SDHC_MMCBOOT_AUTOSABGEN))

/*! @brief Format value for bitfield SDHC_MMCBOOT_AUTOSABGEN. */
#define BF_SDHC_MMCBOOT_AUTOSABGEN(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_MMCBOOT_AUTOSABGEN) & BM_SDHC_MMCBOOT_AUTOSABGEN)

/*! @brief Set the AUTOSABGEN field to a new value. */
#define BW_SDHC_MMCBOOT_AUTOSABGEN(x, v) (BITBAND_ACCESS32(HW_SDHC_MMCBOOT_ADDR(x), BP_SDHC_MMCBOOT_AUTOSABGEN) = (v))
/*@}*/

/*!
 * @name Register SDHC_MMCBOOT, field BOOTBLKCNT[31:16] (RW)
 *
 * Defines the stop at block gap value of automatic mode. When received card
 * block cnt is equal to BOOTBLKCNT and AUTOSABGEN is 1, then stop at block gap.
 */
/*@{*/
#define BP_SDHC_MMCBOOT_BOOTBLKCNT (16U)   /*!< Bit position for SDHC_MMCBOOT_BOOTBLKCNT. */
#define BM_SDHC_MMCBOOT_BOOTBLKCNT (0xFFFF0000U) /*!< Bit mask for SDHC_MMCBOOT_BOOTBLKCNT. */
#define BS_SDHC_MMCBOOT_BOOTBLKCNT (16U)   /*!< Bit field size in bits for SDHC_MMCBOOT_BOOTBLKCNT. */

/*! @brief Read current value of the SDHC_MMCBOOT_BOOTBLKCNT field. */
#define BR_SDHC_MMCBOOT_BOOTBLKCNT(x) (HW_SDHC_MMCBOOT(x).B.BOOTBLKCNT)

/*! @brief Format value for bitfield SDHC_MMCBOOT_BOOTBLKCNT. */
#define BF_SDHC_MMCBOOT_BOOTBLKCNT(v) ((uint32_t)((uint32_t)(v) << BP_SDHC_MMCBOOT_BOOTBLKCNT) & BM_SDHC_MMCBOOT_BOOTBLKCNT)

/*! @brief Set the BOOTBLKCNT field to a new value. */
#define BW_SDHC_MMCBOOT_BOOTBLKCNT(x, v) (HW_SDHC_MMCBOOT_WR(x, (HW_SDHC_MMCBOOT_RD(x) & ~BM_SDHC_MMCBOOT_BOOTBLKCNT) | BF_SDHC_MMCBOOT_BOOTBLKCNT(v)))
/*@}*/

/*******************************************************************************
 * HW_SDHC_HOSTVER - Host Controller Version
 ******************************************************************************/

/*!
 * @brief HW_SDHC_HOSTVER - Host Controller Version (RO)
 *
 * Reset value: 0x00001201U
 *
 * This register contains the vendor host controller version information. All
 * bits are read only and will read the same as the power-reset value.
 */
typedef union _hw_sdhc_hostver
{
    uint32_t U;
    struct _hw_sdhc_hostver_bitfields
    {
        uint32_t SVN : 8;              /*!< [7:0] Specification Version Number */
        uint32_t VVN : 8;              /*!< [15:8] Vendor Version Number */
        uint32_t RESERVED0 : 16;       /*!< [31:16]  */
    } B;
} hw_sdhc_hostver_t;

/*!
 * @name Constants and macros for entire SDHC_HOSTVER register
 */
/*@{*/
#define HW_SDHC_HOSTVER_ADDR(x)  ((x) + 0xFCU)

#define HW_SDHC_HOSTVER(x)       (*(__I hw_sdhc_hostver_t *) HW_SDHC_HOSTVER_ADDR(x))
#define HW_SDHC_HOSTVER_RD(x)    (HW_SDHC_HOSTVER(x).U)
/*@}*/

/*
 * Constants & macros for individual SDHC_HOSTVER bitfields
 */

/*!
 * @name Register SDHC_HOSTVER, field SVN[7:0] (RO)
 *
 * These status bits indicate the host controller specification version.
 *
 * Values:
 * - 1 - SD host specification version 2.0, supports test event register and
 *     ADMA.
 */
/*@{*/
#define BP_SDHC_HOSTVER_SVN  (0U)          /*!< Bit position for SDHC_HOSTVER_SVN. */
#define BM_SDHC_HOSTVER_SVN  (0x000000FFU) /*!< Bit mask for SDHC_HOSTVER_SVN. */
#define BS_SDHC_HOSTVER_SVN  (8U)          /*!< Bit field size in bits for SDHC_HOSTVER_SVN. */

/*! @brief Read current value of the SDHC_HOSTVER_SVN field. */
#define BR_SDHC_HOSTVER_SVN(x) (HW_SDHC_HOSTVER(x).B.SVN)
/*@}*/

/*!
 * @name Register SDHC_HOSTVER, field VVN[15:8] (RO)
 *
 * These status bits are reserved for the vendor version number. The host driver
 * shall not use this status.
 *
 * Values:
 * - 0 - Freescale SDHC version 1.0
 * - 10000 - Freescale SDHC version 2.0
 * - 10001 - Freescale SDHC version 2.1
 * - 10010 - Freescale SDHC version 2.2
 */
/*@{*/
#define BP_SDHC_HOSTVER_VVN  (8U)          /*!< Bit position for SDHC_HOSTVER_VVN. */
#define BM_SDHC_HOSTVER_VVN  (0x0000FF00U) /*!< Bit mask for SDHC_HOSTVER_VVN. */
#define BS_SDHC_HOSTVER_VVN  (8U)          /*!< Bit field size in bits for SDHC_HOSTVER_VVN. */

/*! @brief Read current value of the SDHC_HOSTVER_VVN field. */
#define BR_SDHC_HOSTVER_VVN(x) (HW_SDHC_HOSTVER(x).B.VVN)
/*@}*/

/*******************************************************************************
 * hw_sdhc_t - module struct
 ******************************************************************************/
/*!
 * @brief All SDHC module registers.
 */
#pragma pack(1)
typedef struct _hw_sdhc
{
    __IO hw_sdhc_dsaddr_t DSADDR;          /*!< [0x0] DMA System Address register */
    __IO hw_sdhc_blkattr_t BLKATTR;        /*!< [0x4] Block Attributes register */
    __IO hw_sdhc_cmdarg_t CMDARG;          /*!< [0x8] Command Argument register */
    __IO hw_sdhc_xfertyp_t XFERTYP;        /*!< [0xC] Transfer Type register */
    __I hw_sdhc_cmdrsp0_t CMDRSP0;         /*!< [0x10] Command Response 0 */
    __I hw_sdhc_cmdrsp1_t CMDRSP1;         /*!< [0x14] Command Response 1 */
    __I hw_sdhc_cmdrsp2_t CMDRSP2;         /*!< [0x18] Command Response 2 */
    __I hw_sdhc_cmdrsp3_t CMDRSP3;         /*!< [0x1C] Command Response 3 */
    __IO hw_sdhc_datport_t DATPORT;        /*!< [0x20] Buffer Data Port register */
    __I hw_sdhc_prsstat_t PRSSTAT;         /*!< [0x24] Present State register */
    __IO hw_sdhc_proctl_t PROCTL;          /*!< [0x28] Protocol Control register */
    __IO hw_sdhc_sysctl_t SYSCTL;          /*!< [0x2C] System Control register */
    __IO hw_sdhc_irqstat_t IRQSTAT;        /*!< [0x30] Interrupt Status register */
    __IO hw_sdhc_irqstaten_t IRQSTATEN;    /*!< [0x34] Interrupt Status Enable register */
    __IO hw_sdhc_irqsigen_t IRQSIGEN;      /*!< [0x38] Interrupt Signal Enable register */
    __I hw_sdhc_ac12err_t AC12ERR;         /*!< [0x3C] Auto CMD12 Error Status Register */
    __I hw_sdhc_htcapblt_t HTCAPBLT;       /*!< [0x40] Host Controller Capabilities */
    __IO hw_sdhc_wml_t WML;                /*!< [0x44] Watermark Level Register */
    uint8_t _reserved0[8];
    __O hw_sdhc_fevt_t FEVT;               /*!< [0x50] Force Event register */
    __I hw_sdhc_admaes_t ADMAES;           /*!< [0x54] ADMA Error Status register */
    __IO hw_sdhc_adsaddr_t ADSADDR;        /*!< [0x58] ADMA System Addressregister */
    uint8_t _reserved1[100];
    __IO hw_sdhc_vendor_t VENDOR;          /*!< [0xC0] Vendor Specific register */
    __IO hw_sdhc_mmcboot_t MMCBOOT;        /*!< [0xC4] MMC Boot register */
    uint8_t _reserved2[52];
    __I hw_sdhc_hostver_t HOSTVER;         /*!< [0xFC] Host Controller Version */
} hw_sdhc_t;
#pragma pack()

/*! @brief Macro to access all SDHC registers. */
/*! @param x SDHC module instance base address. */
/*! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
 *     use the '&' operator, like <code>&HW_SDHC(SDHC_BASE)</code>. */
#define HW_SDHC(x)     (*(hw_sdhc_t *)(x))

#endif /* __HW_SDHC_REGISTERS_H__ */
/* EOF */