/* Send GET_RCA command to get card relative address.  */
static status_t SD_SendRca(sd_card_t *card)
/* Send GET_RCA command to get card relative address.  */
static status_t SD_SendRca(sd_card_t *card)
{
    assert(card);
    SDMMCHOST_TRANSFER content = {0};
    SDMMCHOST_COMMAND command = {0};
    status_t error = kStatus_Success;
    command.index = kSD_SendRelativeAddress;
    command.argument = 0U;
    command.responseType = kCARD_ResponseTypeR6;
    content.command = &command;
    content.data = NULL;
    error = card->host.transfer(card->host.base, &content);
    if (kStatus_Success == error)
    {
        card->relativeAddress = (command.response[0U] >> 16U);
    }
    else
    {
        SDMMC_LOG("\r\nError: send CMD3 failed with host error %d, response %x", error, command.response[0U]);
    }
    return error;
}