/* param base MIPI DSI host peripheral base address. param handle pointer to dsi_handle_t structure which stores the transfer state.  */
void DSI_TransferAbort(const MIPI_DSI_Type *base, dsi_handle_t *handle)
/* param base MIPI DSI host peripheral base address. param handle pointer to dsi_handle_t structure which stores the transfer state.  */
void DSI_TransferAbort(const MIPI_DSI_Type *base, dsi_handle_t *handle)
{
    assert(handle);
    if (handle->isBusy)
    {
        DSI_DisableInterrupts(base,
                              (uint32_t)kDSI_InterruptGroup1ApbTxDone | DSI_INT_STATUS_TRIGGER_MASK |
                                  DSI_INT_STATUS_ERROR_REPORT_MASK | (uint32_t)kDSI_InterruptGroup1ApbRxHeaderReceived |
                                  (uint32_t)kDSI_InterruptGroup1ApbRxPacketReceived |
                                  (uint32_t)kDSI_InterruptGroup1BtaTo | (uint32_t)kDSI_InterruptGroup1LrxTo |
                                  (uint32_t)kDSI_InterruptGroup1HtxTo,
                              (uint32_t)kDSI_InterruptGroup2EccMultiBit | (uint32_t)kDSI_InterruptGroup2CrcError);
        (void)memset(&handle->xfer, 0, sizeof(handle->xfer));
        handle->isBusy = false;
    }
}