/* UART DMA send finished callback function. 
This function is called when UART DMA send finished. It disables the UART TX DMA request and sends kStatus_UART_TxIdle to UART callback. */
static void UART_TransferSendDMACallback(dma_handle_t *handle, void *param)
/* UART DMA send finished callback function. 
This function is called when UART DMA send finished. It disables the UART TX DMA request and sends kStatus_UART_TxIdle to UART callback. */
static void UART_TransferSendDMACallback(dma_handle_t *handle, void *param)
{
    uart_dma_private_handle_t *uartPrivateHandle = (uart_dma_private_handle_t *)param;
    UART_EnableTxDMA(uartPrivateHandle->base, false);
    DMA_DisableInterrupts(handle->base, handle->channel);
    uartPrivateHandle->handle->txState = kUART_TxIdle;
    if (uartPrivateHandle->handle->callback)
    {
        uartPrivateHandle->handle->callback(uartPrivateHandle->base, uartPrivateHandle->handle, kStatus_UART_TxIdle,
                                            uartPrivateHandle->handle->userData);
    }
}