};
-void sd_dumpCsd(SDcsd *csd);
-void sd_dumpCid(SDcid *cid);
-void sd_dumpSsr(SDssr *ssr);
+void sd_dumpCsd(SdCSD *csd);
+void sd_dumpCid(SdCID *cid);
+void sd_dumpSsr(SdSSR *ssr);
void sd_sendInit(void);
void sd_goIdle(void);
int sd_sendIfCond(Sd *sd);
int sd_sendAppOpCond(Sd *sd);
-int sd_getCid(Sd *sd, SDcid *cid, uint32_t addr, uint8_t flag);
-int sd_getCsd(Sd *sd, SDcsd *csd);
+int sd_getCid(Sd *sd, SdCID *cid, uint32_t addr, uint8_t flag);
+int sd_getCsd(Sd *sd, SdCSD *csd);
int sd_getSrc(Sd *sd);
int sd_appStatus(Sd *sd);
int sd_getRelativeAddr(Sd *sd);
-int sd_getStatus(Sd *sd, SDssr *ssr, uint32_t *buf, size_t words);
+int sd_getStatus(Sd *sd, SdSSR *ssr, uint32_t *buf, size_t words);
int sd_selectCard(Sd *sd);
int sd_deSelectCard(Sd *sd);
}
)
-void sd_dumpCsd(SDcsd *csd)
+void sd_dumpCsd(SdCSD *csd)
{
ASSERT(csd);
}
-void sd_dumpCid(SDcid *cid)
+void sd_dumpCid(SdCID *cid)
{
ASSERT(cid);
(BCD_TO_INT_32BIT(cid->year_off) % 12));
}
-void sd_dumpSsr(SDssr *ssr)
+void sd_dumpSsr(SdSSR *ssr)
{
ASSERT(ssr);
}
-static int sd_decodeCsd(SDcsd *csd, uint32_t *resp, size_t len)
+static int sd_decodeCsd(SdCSD *csd, uint32_t *resp, size_t len)
{
ASSERT(csd);
ASSERT(resp);
}
-int sd_getCid(Sd *sd, SDcid *cid, uint32_t addr, uint8_t flag)
+int sd_getCid(Sd *sd, SdCID *cid, uint32_t addr, uint8_t flag)
{
ASSERT(sd);
ASSERT(cid);
- memset(cid, 0, sizeof(SDcid));
+ memset(cid, 0, sizeof(SdCID));
uint8_t idx = 9; // CMD9 get cid from gived sd address (RCA)
if (flag & SD_SEND_ALL_CID)
return 0;
}
-int sd_getCsd(Sd *sd, SDcsd *csd)
+int sd_getCsd(Sd *sd, SdCSD *csd)
{
ASSERT(sd);
ASSERT(csd);
- memset(csd, 0, sizeof(SDcsd));
+ memset(csd, 0, sizeof(SdCSD));
LOG_INFO("Send to RCA: %lx\n", SD_ADDR_TO_RCA(sd->addr));
if (hsmci_sendCmd(9, SD_ADDR_TO_RCA(sd->addr), HSMCI_CMDR_RSPTYP_136_BIT))
return -1;
}
-int sd_getStatus(Sd *sd, SDssr *ssr, uint32_t *buf, size_t words)
+int sd_getStatus(Sd *sd, SdSSR *ssr, uint32_t *buf, size_t words)
{
ASSERT(sd);
ASSERT(ssr);
hsmci_waitTransfer();
LOG_INFOB(dump("STATUS", buf, words););
- memset(ssr, 0, sizeof(SDssr));
+ memset(ssr, 0, sizeof(SdSSR));
ssr->bus_width = UNSTUFF_BITS(buf, 510, 2);
ssr->card_type = UNSTUFF_BITS(buf, 480, 16);
ssr->au_size = UNSTUFF_BITS(buf, 432, 8);
if (sd_power_on)
{
- SDcid cid;
+ SdCID cid;
if(sd_getCid(sd, &cid, 0, SD_SEND_ALL_CID) < 0)
return false;
else
LOG_INFO("RCA: %0lx\n", sd->addr);
}
- SDcsd csd;
+ SdCSD csd;
if (sd_getCsd(sd, &csd) < 0)
return false;
else