Exemple #1
0
bool sdmmcShowDeviceInfo(SdmmcDriver *sdmmcp)
{
	sSdCard *pSd =&sdmmcp->card;
		TRACE_INFO("Show Device Info:\n\r");

	#ifndef SDMMC_TRIM_INFO
		const uint8_t card_type = sdmmcp->card.bCardType;
		TRACE_INFO_1("Card Type: %d\n\r", card_type);
	#endif
		TRACE_INFO("Dumping Status ... \n\r");
		SD_DumpStatus(pSd);
	#ifndef SDMMC_TRIM_INFO
		if (card_type & CARD_TYPE_bmSDMMC)
			SD_DumpCID(pSd);
		if (card_type & CARD_TYPE_bmSD) {
			SD_DumpSCR(pSd->SCR);
			SD_DumpSSR(pSd->SSR);
		}
		if (card_type & CARD_TYPE_bmSDMMC)
			SD_DumpCSD(pSd);
	#ifndef SDMMC_TRIM_MMC
		if (card_type & CARD_TYPE_bmMMC)
			SD_DumpExtCSD(pSd->EXT);
	#endif
	#ifndef SDMMC_TRIM_SDIO
		if (card_type & CARD_TYPE_bmSDIO)
			SDIO_DumpCardInformation(sdmmcp);
	#endif

	#endif
		return true;
}
Exemple #2
0
/**
 * Dump card registers
 * \param iMci Controller number.
 */
static void DumpCardInfo(uint8_t iMci)
{
    sSdCard *pSd = &sdDrv[iMci];

    if (SD_GetCardType(pSd) & CARD_TYPE_bmSDIO)
    {
        SDIO_DumpCardInformation(pSd);
    }

    if (SD_GetCardType(pSd) & CARD_TYPE_bmSDMMC)
    {
        SD_DumpCID(pSd->CID);
        SD_DumpCSD(pSd->CSD);
    }
}