/* param base Pointer to the FLEXIO_MCULCD_Type structure. param handle Pointer to the flexio_mculcd_handle_t structure to store the transfer state.  */
void FLEXIO_MCULCD_TransferAbort(FLEXIO_MCULCD_Type *base, flexio_mculcd_handle_t *handle)
/* param base Pointer to the FLEXIO_MCULCD_Type structure. param handle Pointer to the flexio_mculcd_handle_t structure to store the transfer state.  */
void FLEXIO_MCULCD_TransferAbort(FLEXIO_MCULCD_Type *base, flexio_mculcd_handle_t *handle)
{
    if (kFLEXIO_MCULCD_StateIdle == handle->state)
    {
        return;
    }
    FLEXIO_MCULCD_DisableInterrupts(base, kFLEXIO_MCULCD_RxFullInterruptEnable | kFLEXIO_MCULCD_TxEmptyInterruptEnable);
    if (kFLEXIO_MCULCD_ReadArray == handle->state)
    {
        FLEXIO_MCULCD_ClearSingleBeatReadConfig(base);
    }
    else
    {
        FLEXIO_MCULCD_ClearSingleBeatWriteConfig(base);
    }
    FLEXIO_MCULCD_ClearStatusFlags(base, kFLEXIO_MCULCD_TxEmptyFlag | kFLEXIO_MCULCD_RxFullFlag);
    FLEXIO_MCULCD_StopTransfer(base);
    handle->dataCount      = 0;
    handle->remainingCount = 0;
    handle->state          = kFLEXIO_MCULCD_StateIdle;
}