diff --git a/components/drivers/include/drivers/mmcsd_card.h b/components/drivers/include/drivers/mmcsd_card.h index 6d86760a78..dc70fdb46a 100644 --- a/components/drivers/include/drivers/mmcsd_card.h +++ b/components/drivers/include/drivers/mmcsd_card.h @@ -110,7 +110,7 @@ union rt_sd_status { rt_uint32_t : 7; rt_uint32_t secured_mode: 1; rt_uint32_t data_bus_width: 2; - }; + } fields; }; /* diff --git a/components/drivers/sdio/dev_sd.c b/components/drivers/sdio/dev_sd.c index d0193bdd1d..3d6dcd9512 100644 --- a/components/drivers/sdio/dev_sd.c +++ b/components/drivers/sdio/dev_sd.c @@ -744,7 +744,7 @@ static rt_int32_t mmcsd_sd_init_card(struct rt_mmcsd_host *host, err = mmcsd_read_sd_status(card, sd_status.status_words); if (err) goto err1; - if ((sd_status.uhs_speed_grade > 0) && (ocr & VDD_165_195)) + if ((sd_status.fields.uhs_speed_grade > 0) && (ocr & VDD_165_195)) { /* Assume the card supports all UHS-I modes because we cannot find any mainstreaming card * that can support only part of the following modes.