31#define MMCSD_BUSMODE_OPENDRAIN 1
32#define MMCSD_BUSMODE_PUSHPULL 2
36#define MMCSD_CS_IGNORE 0
37#define MMCSD_CS_HIGH 1
42#define MMCSD_POWER_OFF 0
43#define MMCSD_POWER_UP 1
44#define MMCSD_POWER_ON 2
48#define MMCSD_BUS_WIDTH_1 0
49#define MMCSD_BUS_WIDTH_4 2
50#define MMCSD_BUS_WIDTH_8 3
54#define MMCSD_TIMING_LEGACY 0
55#define MMCSD_TIMING_MMC_HS 1
56#define MMCSD_TIMING_SD_HS 2
57#define MMCSD_TIMING_UHS_SDR12 3
58#define MMCSD_TIMING_UHS_SDR25 4
59#define MMCSD_TIMING_UHS_SDR50 5
60#define MMCSD_TIMING_UHS_SDR104 6
61#define MMCSD_TIMING_UHS_DDR50 7
62#define MMCSD_TIMING_MMC_DDR52 8
63#define MMCSD_TIMING_MMC_HS200 9
64#define MMCSD_TIMING_MMC_HS400 10
65#define MMCSD_TIMING_MMC_HS400_ENH_DS 11
69#define MMCSD_SET_DRIVER_TYPE_B 0
70#define MMCSD_SET_DRIVER_TYPE_A 1
71#define MMCSD_SET_DRIVER_TYPE_C 2
72#define MMCSD_SET_DRIVER_TYPE_D 3
76#define MMCSD_SIGNAL_VOLTAGE_330 0
77#define MMCSD_SIGNAL_VOLTAGE_180 1
78#define MMCSD_SIGNAL_VOLTAGE_120 2
103#define VDD_165_195 (1 << 7)
104#define VDD_20_21 (1 << 8)
105#define VDD_21_22 (1 << 9)
106#define VDD_22_23 (1 << 10)
107#define VDD_23_24 (1 << 11)
108#define VDD_24_25 (1 << 12)
109#define VDD_25_26 (1 << 13)
110#define VDD_26_27 (1 << 14)
111#define VDD_27_28 (1 << 15)
112#define VDD_28_29 (1 << 16)
113#define VDD_29_30 (1 << 17)
114#define VDD_30_31 (1 << 18)
115#define VDD_31_32 (1 << 19)
116#define VDD_32_33 (1 << 20)
117#define VDD_33_34 (1 << 21)
118#define VDD_34_35 (1 << 22)
119#define VDD_35_36 (1 << 23)
120#define OCR_S18R (1 << 24)
122#define MMCSD_BUSWIDTH_4 (1 << 0)
123#define MMCSD_BUSWIDTH_8 (1 << 1)
124#define MMCSD_MUTBLKWRITE (1 << 2)
125#define MMCSD_HOST_IS_SPI (1 << 3)
126#define controller_is_spi(host) (host->flags & MMCSD_HOST_IS_SPI)
127#define MMCSD_SUP_SDIO_IRQ (1 << 4)
128#define MMCSD_SUP_HIGHSPEED (1 << 5)
129#define MMCSD_SUP_DDR_3V3 (1 << 6)
130#define MMCSD_SUP_DDR_1V8 (1 << 7)
131#define MMCSD_SUP_DDR_1V2 (1 << 8)
132#define MMCSD_SUP_HIGHSPEED_DDR (MMCSD_SUP_DDR_3V3 | MMCSD_SUP_DDR_1V8 | MMCSD_SUP_DDR_1V2)
133#define MMCSD_SUP_HS200_1V8 (1 << 9)
134#define MMCSD_SUP_HS200_1V2 (1 << 10)
135#define MMCSD_SUP_HS200 (MMCSD_SUP_HS200_1V2 | MMCSD_SUP_HS200_1V8)
136#define MMCSD_SUP_NONREMOVABLE (1 << 11)
137#define controller_is_removable(host) (!(host->flags & MMCSD_SUP_NONREMOVABLE))
138#define MMCSD_SUP_HS400_1V8 (1 << 12)
139#define MMCSD_SUP_HS400_1V2 (1 << 13)
140#define MMCSD_SUP_HS400 (MMCSD_SUP_HS400_1V2 | MMCSD_SUP_HS400_1V8)
141#define MMCSD_SUP_ENH_DS (1 << 14)
142#define MMCSD_SUP_SDR50 (1 << 15)
143#define MMCSD_SUP_SDR104 (1 << 16)
144#define MMCSD_SUP_DDR50 (1 << 17)
unsigned short rt_uint16_t
void(* request)(struct rt_mmcsd_host *host, struct rt_mmcsd_req *req)
rt_int32_t(* execute_tuning)(struct rt_mmcsd_host *host, rt_int32_t opcode)
void(* set_iocfg)(struct rt_mmcsd_host *host, struct rt_mmcsd_io_cfg *io_cfg)
rt_int32_t(* switch_uhs_voltage)(struct rt_mmcsd_host *host)
rt_int32_t(* get_card_status)(struct rt_mmcsd_host *host)
void(* enable_sdio_irq)(struct rt_mmcsd_host *host, rt_int32_t en)
struct rt_semaphore sem_ack
rt_uint32_t max_blk_count
const struct rt_mmcsd_host_ops * ops
struct rt_semaphore * sdio_irq_sem
struct rt_mmcsd_io_cfg io_cfg
struct rt_mmcsd_card * card
struct rt_thread * sdio_irq_thread
unsigned char signal_voltage