/* param base USART peripheral base address. param handle USART handle pointer. param ringBuffer Start address of the ring buffer for background receiving. Pass NULL to disable the ring buffer. param ringBufferSize size of the ring buffer.  */
void USART_TransferStartRingBuffer(USART_Type *base, usart_handle_t *handle, uint8_t *ringBuffer, size_t ringBufferSize)
/* param base USART peripheral base address. param handle USART handle pointer. param ringBuffer Start address of the ring buffer for background receiving. Pass NULL to disable the ring buffer. param ringBufferSize size of the ring buffer.  */
void USART_TransferStartRingBuffer(USART_Type *base, usart_handle_t *handle, uint8_t *ringBuffer, size_t ringBufferSize)
{
    assert(NULL != base);
    assert(NULL != handle);
    assert(NULL != ringBuffer);
    handle->rxRingBuffer     = ringBuffer;
    handle->rxRingBufferSize = ringBufferSize;
    handle->rxRingBufferHead = 0U;
    handle->rxRingBufferTail = 0U;
    base->FIFOINTENSET = USART_FIFOINTENSET_RXLVL_MASK | USART_FIFOINTENSET_RXERR_MASK;
}