MK64F12_sdhc.h 231.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761
/*
 * Copyright (c) 2014, Freescale Semiconductor, Inc.
 * All rights reserved.
 *
 * THIS SOFTWARE IS PROVIDED BY FREESCALE "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 FREESCALE 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.
 */
/*
 * 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 "regs.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.
 */

//! @name Module base addresses
//@{
#ifndef REGS_SDHC_BASE
#define HW_SDHC_INSTANCE_COUNT (1U) //!< Number of instances of the SDHC module.
#define REGS_SDHC_BASE (0x400B1000U) //!< Base address for SDHC.
#endif
//@}

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

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

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

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

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

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

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

/*!
 * @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.

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

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

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

#ifndef __LANGUAGE_ASM__
//! @brief Read current value of the SDHC_CMDARG_CMDARG field.
#define BR_SDHC_CMDARG_CMDARG (HW_SDHC_CMDARG.U)
#endif

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

#ifndef __LANGUAGE_ASM__
//! @brief Set the CMDARG field to a new value.
#define BW_SDHC_CMDARG_CMDARG(v) (HW_SDHC_CMDARG_WR(v))
#endif
//@}

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

#ifndef __LANGUAGE_ASM__
#define HW_SDHC_CMDRSP0          (*(__I hw_sdhc_cmdrsp0_t *) HW_SDHC_CMDRSP0_ADDR)
#define HW_SDHC_CMDRSP0_RD()     (HW_SDHC_CMDRSP0.U)
#endif
//@}

/*
 * 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.

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

#ifndef __LANGUAGE_ASM__
#define HW_SDHC_CMDRSP1          (*(__I hw_sdhc_cmdrsp1_t *) HW_SDHC_CMDRSP1_ADDR)
#define HW_SDHC_CMDRSP1_RD()     (HW_SDHC_CMDRSP1.U)
#endif
//@}

/*
 * 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.

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

#ifndef __LANGUAGE_ASM__
#define HW_SDHC_CMDRSP2          (*(__I hw_sdhc_cmdrsp2_t *) HW_SDHC_CMDRSP2_ADDR)
#define HW_SDHC_CMDRSP2_RD()     (HW_SDHC_CMDRSP2.U)
#endif
//@}

/*
 * 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.

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

#ifndef __LANGUAGE_ASM__
#define HW_SDHC_CMDRSP3          (*(__I hw_sdhc_cmdrsp3_t *) HW_SDHC_CMDRSP3_ADDR)
#define HW_SDHC_CMDRSP3_RD()     (HW_SDHC_CMDRSP3.U)
#endif
//@}

/*
 * 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.

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

#ifndef __LANGUAGE_ASM__
//! @brief Read current value of the SDHC_DATPORT_DATCONT field.
#define BR_SDHC_DATPORT_DATCONT (HW_SDHC_DATPORT.U)
#endif

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

#ifndef __LANGUAGE_ASM__
//! @brief Set the DATCONT field to a new value.
#define BW_SDHC_DATPORT_DATCONT(v) (HW_SDHC_DATPORT_WR(v))
#endif
//@}

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

#ifndef __LANGUAGE_ASM__
#define HW_SDHC_PRSSTAT          (*(__I hw_sdhc_prsstat_t *) HW_SDHC_PRSSTAT_ADDR)
#define HW_SDHC_PRSSTAT_RD()     (HW_SDHC_PRSSTAT.U)
#endif
//@}

/*
 * 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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_SYSCTL_RSTA), uint32_t) & BM_SDHC_SYSCTL_RSTA)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_SYSCTL_RSTC), uint32_t) & BM_SDHC_SYSCTL_RSTC)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_SYSCTL_RSTD), uint32_t) & BM_SDHC_SYSCTL_RSTD)

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

/*!
 * @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.

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

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

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

#ifndef __LANGUAGE_ASM__
#define HW_SDHC_AC12ERR          (*(__I hw_sdhc_ac12err_t *) HW_SDHC_AC12ERR_ADDR)
#define HW_SDHC_AC12ERR_RD()     (HW_SDHC_AC12ERR.U)
#endif
//@}

/*
 * 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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

#ifndef __LANGUAGE_ASM__
#define HW_SDHC_HTCAPBLT         (*(__I hw_sdhc_htcapblt_t *) HW_SDHC_HTCAPBLT_ADDR)
#define HW_SDHC_HTCAPBLT_RD()    (HW_SDHC_HTCAPBLT.U)
#endif
//@}

/*
 * 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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

/*!
 * @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.

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

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

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

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

/*!
 * @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.

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

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

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

#ifndef __LANGUAGE_ASM__
#define HW_SDHC_FEVT             (*(__O hw_sdhc_fevt_t *) HW_SDHC_FEVT_ADDR)
#define HW_SDHC_FEVT_RD()        (HW_SDHC_FEVT.U)
#define HW_SDHC_FEVT_WR(v)       (HW_SDHC_FEVT.U = (v))
#endif
//@}

/*
 * 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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_AC12NE), uint32_t) & BM_SDHC_FEVT_AC12NE)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_AC12TOE), uint32_t) & BM_SDHC_FEVT_AC12TOE)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_AC12CE), uint32_t) & BM_SDHC_FEVT_AC12CE)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_AC12EBE), uint32_t) & BM_SDHC_FEVT_AC12EBE)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_AC12IE), uint32_t) & BM_SDHC_FEVT_AC12IE)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_CNIBAC12E), uint32_t) & BM_SDHC_FEVT_CNIBAC12E)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_CTOE), uint32_t) & BM_SDHC_FEVT_CTOE)

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

/*!
 * @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)  (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_CCE), uint32_t) & BM_SDHC_FEVT_CCE)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_CEBE), uint32_t) & BM_SDHC_FEVT_CEBE)

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

/*!
 * @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)  (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_CIE), uint32_t) & BM_SDHC_FEVT_CIE)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_DTOE), uint32_t) & BM_SDHC_FEVT_DTOE)

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

/*!
 * @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)  (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_DCE), uint32_t) & BM_SDHC_FEVT_DCE)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_DEBE), uint32_t) & BM_SDHC_FEVT_DEBE)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_AC12E), uint32_t) & BM_SDHC_FEVT_AC12E)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_DMAE), uint32_t) & BM_SDHC_FEVT_DMAE)

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

/*!
 * @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) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_SDHC_FEVT_CINT), uint32_t) & BM_SDHC_FEVT_CINT)

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

#ifndef __LANGUAGE_ASM__
#define HW_SDHC_ADMAES           (*(__I hw_sdhc_admaes_t *) HW_SDHC_ADMAES_ADDR)
#define HW_SDHC_ADMAES_RD()      (HW_SDHC_ADMAES.U)
#endif
//@}

/*
 * 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.

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

/*!
 * @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.

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

/*!
 * @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.

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

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

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

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

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

/*
 * 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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

/*!
 * @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.

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

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

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

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

#ifndef __LANGUAGE_ASM__
/*!
 * @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;
#endif

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

#ifndef __LANGUAGE_ASM__
#define HW_SDHC_HOSTVER          (*(__I hw_sdhc_hostver_t *) HW_SDHC_HOSTVER_ADDR)
#define HW_SDHC_HOSTVER_RD()     (HW_SDHC_HOSTVER.U)
#endif
//@}

/*
 * 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.

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

/*!
 * @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.

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

//-------------------------------------------------------------------------------------------
// hw_sdhc_t - module struct
//-------------------------------------------------------------------------------------------
/*!
 * @brief All SDHC module registers.
 */
#ifndef __LANGUAGE_ASM__
#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.
//! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
//!     use the '&' operator, like <code>&HW_SDHC</code>.
#define HW_SDHC        (*(hw_sdhc_t *) REGS_SDHC_BASE)
#endif

#endif // __HW_SDHC_REGISTERS_H__
// v22/130726/0.9
// EOF