/* Send STOP_TRANSMISSION command to card to stop ongoing data transferring.  */
static status_t MMC_StopTransmission(mmc_card_t *card)
/* Send STOP_TRANSMISSION command to card to stop ongoing data transferring.  */
static status_t MMC_StopTransmission(mmc_card_t *card)
{
    assert(card);
    HOST_TRANSFER content = {0};
    HOST_COMMAND command = {0};
    command.index = kSDMMC_StopTransmission;
    command.argument = 0U;
    command.type = kCARD_CommandTypeAbort;
    command.responseType = kCARD_ResponseTypeR1b;
    command.responseErrorFlags = kSDMMC_R1ErrorAllFlag;
    content.command = &command;
    content.data = 0U;
    if (kStatus_Success != MMC_Transfer(card, &content, 2U))
    {
        return kStatus_SDMMC_TransferFailed;
    }
    return kStatus_Success;
}