/* Send SEND_CSD command to get CSD from card.  */
static status_t MMC_SendCsd(mmc_card_t *card)
/* Send SEND_CSD command to get CSD from card.  */
static status_t MMC_SendCsd(mmc_card_t *card)
{
    assert(card);
    assert(card->host.transfer);
    sdhc_command_t command = {0};
    sdhc_transfer_t content = {0};
    command.index = kSDMMC_SendCsd;
    command.argument = (card->relativeAddress << 16U);
    command.responseType = kSDHC_ResponseTypeR2;
    content.command = &command;
    content.data = 0U;
    if (kStatus_Success == card->host.transfer(card->host.base, &content))
    {
        memcpy(card->rawCsd, command.response, sizeof(card->rawCsd));
        MMC_DecodeCsd(card, card->rawCsd);
        return kStatus_Success;
    }
    return kStatus_SDMMC_TransferFailed;
}