1 /*
2  * Copyright (c) 2020-2020, BLUETRUM Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef AB32VG1_HAL_SDIO_H__
8 #define AB32VG1_HAL_SDIO_H__
9 
10 #include "ab32vg1_hal_def.h"
11 
12 struct sdio_init
13 {
14     uint32_t clock_power_save;      /*!< Specifies whether SDMMC Clock output is enabled or
15                                         disabled when the bus is idle.                                      */
16     uint32_t clock_div;             /*!< Specifies the clock frequency of the SDMMC controller.
17                                       This parameter can be a value between Min_Data = 0 and Max_Data = 255 */
18 };
19 typedef struct sdio_init* sdio_init_t;
20 
21 #define SDMMC_CLOCK_POWER_SAVE_DISABLE      (0x00u)
22 #define SDMMC_CLOCK_POWER_SAVE_ENABLE       (0x01u)
23 
24 enum
25 {
26     SDxCON = 0, /* [20]:BUSY [19:17]:CRCS [16]:DCRCE [15]:NRPS [1]:Data bus width [0]:SD enable */
27     SDxCPND,
28     SDxBAUD,
29     SDxCMD,
30     SDxARG3,
31     SDxARG2,
32     SDxARG1,
33     SDxARG0,
34     SDxDMAADR,
35     SDxDMACNT,
36 };
37 
38 #endif
39