提交 8b68c3aa 编写于 作者: L luohui2320@gmail.com

rename some variable and add comment

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1982 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 cc4874a8
......@@ -65,12 +65,27 @@ struct rt_sd_scr {
struct rt_sdio_cccr {
rt_uint8_t sdio_version;
rt_uint8_t sd_version;
rt_uint8_t multi_block:1,
low_speed:1,
wide_bus:1,
high_power:1,
high_speed:1,
disable_cd:1;
rt_uint8_t direct_cmd:1, /* Card Supports Direct Commands during data transfer
only SD mode, not used for SPI mode */
multi_block:1, /* Card Supports Multi-Block */
read_wait:1, /* Card Supports Read Wait
only SD mode, not used for SPI mode */
suspend_resume:1, /* Card supports Suspend/Resume
only SD mode, not used for SPI mode */
s4mi:1, /* generate interrupts during a 4-bit
multi-block data transfer */
e4mi:1, /* Enable the multi-block IRQ during
4-bit transfer for the SDIO card */
low_speed:1, /* Card is a Low-Speed card */
low_speed_4:1; /* 4-bit support for Low-Speed cards */
rt_uint8_t bus_width:1, /* Support SDIO bus width, 1:4bit, 0:1bit */
cd_disable:1, /* Connect[0]/Disconnect[1] the 10K-90K ohm pull-up
resistor on CD/DAT[3] (pin 1) of the card */
power_ctrl:1, /* Support Master Power Control */
high_speed:1; /* Support High-Speed */
};
struct rt_sdio_cis {
......
......@@ -397,7 +397,9 @@ static rt_int32_t sdio_read_cccr(struct rt_mmcsd_card *card)
if (data & SDIO_CCCR_CAP_LSC)
card->cccr.low_speed = 1;
if (data & SDIO_CCCR_CAP_4BLS)
card->cccr.wide_bus = 1;
card->cccr.low_speed_4 = 1;
if (data & SDIO_CCCR_CAP_4BLS)
card->cccr.bus_width = 1;
if (cccr_version >= SDIO_CCCR_REV_1_10)
{
......@@ -406,7 +408,7 @@ static rt_int32_t sdio_read_cccr(struct rt_mmcsd_card *card)
goto out;
if (data & SDIO_POWER_SMPC)
card->cccr.high_power = 1;
card->cccr.power_ctrl = 1;
}
if (cccr_version >= SDIO_CCCR_REV_1_20)
......@@ -707,7 +709,7 @@ static rt_int32_t sdio_set_bus_wide(struct rt_mmcsd_card *card)
if (!(card->host->flags & MMCSD_BUSWIDTH_4))
return 0;
if (card->cccr.low_speed && !card->cccr.wide_bus)
if (card->cccr.low_speed && !card->cccr.bus_width)
return 0;
busif = sdio_io_readb(card->sdio_func0, SDIO_REG_CCCR_BUS_IF, &ret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册