/* param base USART peripheral base address. param handle USART handle pointer.  */
void USART_TransferStopRingBuffer(USART_Type *base, usart_handle_t *handle)
/* param base USART peripheral base address. param handle USART handle pointer.  */
void USART_TransferStopRingBuffer(USART_Type *base, usart_handle_t *handle)
{
    assert(NULL != base);
    assert(NULL != handle);
    if (handle->rxState == (uint8_t)kUSART_RxIdle)
    {
        base->FIFOINTENCLR = USART_FIFOINTENCLR_RXLVL_MASK | USART_FIFOINTENCLR_RXERR_MASK;
    }
    handle->rxRingBuffer     = NULL;
    handle->rxRingBufferSize = 0U;
    handle->rxRingBufferHead = 0U;
    handle->rxRingBufferTail = 0U;
}