/* param base UART peripheral base address. param handle UART handle pointer.  */
void UART_TransferAbortReceive(UART_Type *base, uart_handle_t *handle)
/* param base UART peripheral base address. param handle UART handle pointer.  */
void UART_TransferAbortReceive(UART_Type *base, uart_handle_t *handle)
{
    assert(handle);
    if (!handle->rxRingBuffer)
    {
        UART_DisableInterrupts(base, kUART_RxDataRegFullInterruptEnable | kUART_RxOverrunInterruptEnable |
                                         kUART_FramingErrorInterruptEnable | kUART_IdleLineInterruptEnable);
        if (UART_C1_PE_MASK & base->C1)
        {
            UART_DisableInterrupts(base, kUART_ParityErrorInterruptEnable);
        }
    }
    handle->rxDataSize = 0U;
    handle->rxState = kUART_RxIdle;
}