Lines Matching refs:uartDmaHandle

738     hal_uart_dma_state_t *uartDmaHandle;  in USART_DMACallbacks()  local
743 uartDmaHandle = (hal_uart_dma_state_t *)userData; in USART_DMACallbacks()
745 if (NULL != uartDmaHandle->dma_callback) in USART_DMACallbacks()
750 msg.data = uartDmaHandle->dma_tx.buffer; in USART_DMACallbacks()
751 msg.dataSize = uartDmaHandle->dma_tx.bufferLength; in USART_DMACallbacks()
752 uartDmaHandle->dma_tx.buffer = NULL; in USART_DMACallbacks()
757 msg.data = uartDmaHandle->dma_rx.buffer; in USART_DMACallbacks()
758 msg.dataSize = uartDmaHandle->dma_rx.bufferLength; in USART_DMACallbacks()
759 uartDmaHandle->dma_rx.buffer = NULL; in USART_DMACallbacks()
762 uartDmaHandle->dma_callback(uartDmaHandle, &msg, uartDmaHandle->dma_callback_param); in USART_DMACallbacks()
769 hal_uart_dma_state_t *uartDmaHandle; in TimeoutTimer_Callbcak() local
774 uartDmaHandle = uartDmaHandleList->dma_list; in TimeoutTimer_Callbcak()
776 while (NULL != uartDmaHandle) in TimeoutTimer_Callbcak()
778 if ((NULL != uartDmaHandle->dma_rx.buffer) && (false == uartDmaHandle->dma_rx.receiveAll)) in TimeoutTimer_Callbcak()
781 …USART_TransferGetReceiveCountDMA(s_UsartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->dmaH… in TimeoutTimer_Callbcak()
783 newReceived = msg.dataSize - uartDmaHandle->dma_rx.bufferSofar; in TimeoutTimer_Callbcak()
784 uartDmaHandle->dma_rx.bufferSofar = msg.dataSize; in TimeoutTimer_Callbcak()
787 if ((0U == newReceived) && (0U < uartDmaHandle->dma_rx.bufferSofar)) in TimeoutTimer_Callbcak()
789 uartDmaHandle->dma_rx.timeout++; in TimeoutTimer_Callbcak()
790 if (uartDmaHandle->dma_rx.timeout >= HAL_UART_DMA_IDLELINE_TIMEOUT) in TimeoutTimer_Callbcak()
793 USART_TransferAbortReceiveDMA(s_UsartAdapterBase[uartDmaHandle->instance], in TimeoutTimer_Callbcak()
794 &uartDmaHandle->dmaHandle); in TimeoutTimer_Callbcak()
795 msg.data = uartDmaHandle->dma_rx.buffer; in TimeoutTimer_Callbcak()
797 uartDmaHandle->dma_rx.buffer = NULL; in TimeoutTimer_Callbcak()
798uartDmaHandle->dma_callback(uartDmaHandle, &msg, uartDmaHandle->dma_callback_param); in TimeoutTimer_Callbcak()
802 if ((0U < newReceived) && (0U < uartDmaHandle->dma_rx.bufferSofar)) in TimeoutTimer_Callbcak()
804 uartDmaHandle->dma_rx.timeout = 0U; in TimeoutTimer_Callbcak()
808 uartDmaHandle = uartDmaHandle->next; in TimeoutTimer_Callbcak()
817 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMAInit() local
824 uartDmaHandle = (hal_uart_dma_state_t *)dmaHandle; in HAL_UartDMAInit()
826 uartHandle->dmaHandle = uartDmaHandle; in HAL_UartDMAInit()
828 uartDmaHandle->instance = dmaConfig->uart_instance; in HAL_UartDMAInit()
834 …DMA_CreateHandle(&uartDmaHandle->txDmaHandle, dmaBases[dmaConfig->dma_instance], dmaConfig->tx_cha… in HAL_UartDMAInit()
835 …DMA_CreateHandle(&uartDmaHandle->rxDmaHandle, dmaBases[dmaConfig->dma_instance], dmaConfig->rx_cha… in HAL_UartDMAInit()
840 s_dmaHandleList.dma_list = uartDmaHandle; in HAL_UartDMAInit()
841 uartDmaHandle->next = NULL; in HAL_UartDMAInit()
858 uartDmaHandle->next = s_dmaHandleList.dma_list; in HAL_UartDMAInit()
859 s_dmaHandleList.dma_list = uartDmaHandle; in HAL_UartDMAInit()
868 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMADeinit() local
875 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMADeinit()
879 assert(uartDmaHandle); in HAL_UartDMADeinit()
883 if (NULL != uartDmaHandle->dmaHandle.txDmaHandle) in HAL_UartDMADeinit()
885 …USART_TransferAbortSendDMA(s_UsartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->dmaHandle); in HAL_UartDMADeinit()
887 if (NULL != uartDmaHandle->dmaHandle.rxDmaHandle) in HAL_UartDMADeinit()
889 …USART_TransferAbortReceiveDMA(s_UsartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->dmaHand… in HAL_UartDMADeinit()
894 if (NULL != uartDmaHandle->dmaHandle.txDmaHandle) in HAL_UartDMADeinit()
896 DMA_DisableChannel(uartDmaHandle->txDmaHandle.base, uartDmaHandle->txDmaHandle.channel); in HAL_UartDMADeinit()
898 if (NULL != uartDmaHandle->dmaHandle.rxDmaHandle) in HAL_UartDMADeinit()
900 DMA_DisableChannel(uartDmaHandle->rxDmaHandle.base, uartDmaHandle->rxDmaHandle.channel); in HAL_UartDMADeinit()
908 if (curr == uartDmaHandle) in HAL_UartDMADeinit()
933 (void)memset(uartDmaHandle, 0, sizeof(hal_uart_dma_state_t)); in HAL_UartDMADeinit()
949 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMATransferInstallCallback() local
954 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMATransferInstallCallback()
956 assert(uartDmaHandle); in HAL_UartDMATransferInstallCallback()
958 uartDmaHandle->dma_callback = callback; in HAL_UartDMATransferInstallCallback()
959 uartDmaHandle->dma_callback_param = callbackParam; in HAL_UartDMATransferInstallCallback()
961 …USART_TransferCreateHandleDMA(s_UsartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->dmaHand… in HAL_UartDMATransferInstallCallback()
962 USART_DMACallbacks, uartDmaHandle, &uartDmaHandle->txDmaHandle, in HAL_UartDMATransferInstallCallback()
963 &uartDmaHandle->rxDmaHandle); in HAL_UartDMATransferInstallCallback()
974 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMATransferReceive() local
981 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMATransferReceive()
983 assert(uartDmaHandle); in HAL_UartDMATransferReceive()
985 if (NULL == uartDmaHandle->dma_rx.buffer) in HAL_UartDMATransferReceive()
987 uartDmaHandle->dma_rx.buffer = data; in HAL_UartDMATransferReceive()
988 uartDmaHandle->dma_rx.bufferLength = length; in HAL_UartDMATransferReceive()
989 uartDmaHandle->dma_rx.timeout = 0U; in HAL_UartDMATransferReceive()
990 uartDmaHandle->dma_rx.receiveAll = receiveAll; in HAL_UartDMATransferReceive()
1001 …USART_TransferReceiveDMA(s_UsartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->dmaHandle, &… in HAL_UartDMATransferReceive()
1009 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMATransferSend() local
1016 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMATransferSend()
1018 assert(uartDmaHandle); in HAL_UartDMATransferSend()
1020 if (NULL == uartDmaHandle->dma_tx.buffer) in HAL_UartDMATransferSend()
1022 uartDmaHandle->dma_tx.buffer = data; in HAL_UartDMATransferSend()
1023 uartDmaHandle->dma_tx.bufferLength = length; in HAL_UartDMATransferSend()
1024 uartDmaHandle->dma_tx.bufferSofar = 0U; in HAL_UartDMATransferSend()
1025 uartDmaHandle->dma_tx.timeout = 0U; in HAL_UartDMATransferSend()
1036 …USART_TransferSendDMA(s_UsartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->dmaHandle, &xfe… in HAL_UartDMATransferSend()
1044 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMAGetReceiveCount() local
1049 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMAGetReceiveCount()
1051 assert(uartDmaHandle); in HAL_UartDMAGetReceiveCount()
1053 …if (kStatus_Success != USART_TransferGetReceiveCountDMA(s_UsartAdapterBase[uartDmaHandle->instance… in HAL_UartDMAGetReceiveCount()
1054 &uartDmaHandle->dmaHandle, reCount)) in HAL_UartDMAGetReceiveCount()
1071 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMAAbortReceive() local
1076 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMAAbortReceive()
1078 assert(uartDmaHandle); in HAL_UartDMAAbortReceive()
1080 …USART_TransferAbortReceiveDMA(s_UsartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->dmaHand… in HAL_UartDMAAbortReceive()
1088 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMAAbortSend() local
1093 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMAAbortSend()
1095 assert(uartDmaHandle); in HAL_UartDMAAbortSend()
1097 …USART_TransferAbortSendDMA(s_UsartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->dmaHandle); in HAL_UartDMAAbortSend()