/* Send GET_INTERFACE_CONDITION command to get card interface condition. 
This function checks card interface condition, which includes host supply voltage information and asks the card whether card supports the specified host voltage. */
static status_t SD_SendInterfaceCondition(sd_card_t *card)
/* Send GET_INTERFACE_CONDITION command to get card interface condition. 
This function checks card interface condition, which includes host supply voltage information and asks the card whether card supports the specified host voltage. */
static status_t SD_SendInterfaceCondition(sd_card_t *card)
{
    assert(card);
    sdhc_transfer_t content = {0};
    sdhc_command_t command = {0};
    command.index = kSD_SendInterfaceCondition;
    command.argument = 0x1AAU;
    command.responseType = kSDHC_ResponseTypeR7;
    content.command = &command;
    content.data = NULL;
    if (kStatus_Success != card->host.transfer(card->host.base, &content))
    {
        return kStatus_SDMMC_TransferFailed;
    }
    else
    {
        if ((command.response[0U] & 0xFFU) != 0xAAU)
        {
            return kStatus_SDMMC_CardNotSupport;
        }
    }
    return kStatus_Success;
}