/* param base LPUART peripheral base address. param handle LPUART handle pointer. param ringBuffer Start address of ring buffer for background receiving. Pass NULL to disable the ring buffer. param ringBufferSize size of the ring buffer.  */
void LPUART_TransferStartRingBuffer(LPUART_Type *base, lpuart_handle_t *handle, uint8_t *ringBuffer, size_t ringBufferSize)
/* param base LPUART peripheral base address. param handle LPUART handle pointer. param ringBuffer Start address of ring buffer for background receiving. Pass NULL to disable the ring buffer. param ringBufferSize size of the ring buffer.  */
void LPUART_TransferStartRingBuffer(LPUART_Type *base, lpuart_handle_t *handle, uint8_t *ringBuffer, size_t ringBufferSize)
{
    assert(NULL != handle);
    assert(NULL != ringBuffer);
    handle->rxRingBuffer     = ringBuffer;
    handle->rxRingBufferSize = ringBufferSize;
    handle->rxRingBufferHead = 0U;
    handle->rxRingBufferTail = 0U;
    LPUART_EnableInterrupts(
        base, (uint32_t)kLPUART_RxDataRegFullInterruptEnable | (uint32_t)kLPUART_RxOverrunInterruptEnable);
}