/* Send GET_INTERFACE_CONDITION command. 
This function checks card interface condition, which includes host supply voltage information and asks the card whether it supports voltage. */
static status_t SDSPI_SendInterfaceCondition(sdspi_card_t *card, uint8_t pattern, uint8_t *response)
/* Send GET_INTERFACE_CONDITION command. 
This function checks card interface condition, which includes host supply voltage information and asks the card whether it supports voltage. */
static status_t SDSPI_SendInterfaceCondition(sdspi_card_t *card, uint8_t pattern, uint8_t *response)
{
    assert(card);
    assert(card->host);
    sdspi_command_t command = {0};
    sdspi_host_t *host;
    host = card->host;
    command.index = kSD_SendInterfaceCondition;
    command.argument = (0x100U | (pattern & 0xFFU));
    command.responseType = kSDSPI_ResponseTypeR7;
    if (kStatus_Success != SDSPI_SendCommand(host, &command, FSL_SDSPI_TIMEOUT))
    {
        return kStatus_SDSPI_SendCommandFailed;
    }
    memcpy(response, command.response, sizeof(command.response));
    return kStatus_Success;
}