/* param base The LPI2C peripheral base address. param handle Pointer to the LPI2C master driver handle. retval #kStatus_Success A transaction was successfully aborted. retval #kStatus_LPI2C_Idle There is not a DMA transaction currently in progress.  */
status_t LPI2C_MasterTransferAbortEDMA(LPI2C_Type *base, lpi2c_master_edma_handle_t *handle)
/* param base The LPI2C peripheral base address. param handle Pointer to the LPI2C master driver handle. retval #kStatus_Success A transaction was successfully aborted. retval #kStatus_LPI2C_Idle There is not a DMA transaction currently in progress.  */
status_t LPI2C_MasterTransferAbortEDMA(LPI2C_Type *base, lpi2c_master_edma_handle_t *handle)
{
    if (!handle->isBusy)
    {
        return kStatus_LPI2C_Idle;
    }
    EDMA_AbortTransfer(handle->rx);
    if (FSL_FEATURE_LPI2C_HAS_SEPARATE_DMA_RX_TX_REQn(base))
    {
        EDMA_AbortTransfer(handle->tx);
    }
    base->MCR |= LPI2C_MCR_RRF_MASK | LPI2C_MCR_RTF_MASK;
    base->MTDR = kStopCmd;
    handle->isBusy = false;
    return kStatus_Success;
}