Lines Matching refs:uartDmaHandle

286     hal_uart_dma_state_t *uartDmaHandle = s_UartDmaState[instance];  in HAL_UartGetDmaReceivedBytes()  local
289 …EDMA_GetRemainingMajorLoopCount(uartDmaHandle->rxEdmaHandle.base, uartDmaHandle->rxEdmaHandle.chan… in HAL_UartGetDmaReceivedBytes()
312 hal_uart_dma_state_t *uartDmaHandle = s_UartDmaState[instance]; in HAL_UartDMAIdlelineInterruptHandle() local
320 assert(uartDmaHandle); in HAL_UartDMAIdlelineInterruptHandle()
322 if ((NULL != uartDmaHandle->dma_callback) && (NULL != uartDmaHandle->dma_rx.buffer)) in HAL_UartDMAIdlelineInterruptHandle()
330 if (uartDmaHandle->dma_rx.receiveAll == true) in HAL_UartDMAIdlelineInterruptHandle()
332 if (receiveLength < uartDmaHandle->dma_rx.bufferLength) in HAL_UartDMAIdlelineInterruptHandle()
340 …(receiveLength < uartDmaHandle->dma_rx.bufferLength) ? receiveLength : uartDmaHandle->dma_rx.buffe… in HAL_UartDMAIdlelineInterruptHandle()
348 … (void)memcpy(uartDmaHandle->dma_rx.buffer, &s_ringBuffer[instance][ringBufferIndex[instance]], in HAL_UartDMAIdlelineInterruptHandle()
355 … (void)memcpy(uartDmaHandle->dma_rx.buffer, &s_ringBuffer[instance][ringBufferIndex[instance]], in HAL_UartDMAIdlelineInterruptHandle()
357 …(void)memcpy(uartDmaHandle->dma_rx.buffer + (callbackLength - remianLength), &s_ringBuffer[instanc… in HAL_UartDMAIdlelineInterruptHandle()
361 dmaMsg.data = uartDmaHandle->dma_rx.buffer; in HAL_UartDMAIdlelineInterruptHandle()
362 uartDmaHandle->dma_rx.buffer = NULL; in HAL_UartDMAIdlelineInterruptHandle()
364 uartDmaHandle->dma_callback(uartDmaHandle, &dmaMsg, uartDmaHandle->dma_callback_param); in HAL_UartDMAIdlelineInterruptHandle()
369 if ((NULL != uartDmaHandle->dma_callback) && (NULL != uartDmaHandle->dma_rx.buffer)) in HAL_UartDMAIdlelineInterruptHandle()
375 (void)LPUART_TransferGetReceiveCountEDMA(s_LpuartAdapterBase[uartDmaHandle->instance], in HAL_UartDMAIdlelineInterruptHandle()
376 &uartDmaHandle->edmaHandle, &dmaMsg.dataSize); in HAL_UartDMAIdlelineInterruptHandle()
377 …LPUART_TransferAbortReceiveEDMA(s_LpuartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->edma… in HAL_UartDMAIdlelineInterruptHandle()
381 dmaMsg.data = uartDmaHandle->dma_rx.buffer; in HAL_UartDMAIdlelineInterruptHandle()
382 uartDmaHandle->dma_rx.buffer = NULL; in HAL_UartDMAIdlelineInterruptHandle()
384 uartDmaHandle->dma_callback(uartDmaHandle, &dmaMsg, uartDmaHandle->dma_callback_param); in HAL_UartDMAIdlelineInterruptHandle()
423 hal_uart_dma_state_t *uartDmaHandle = s_UartDmaState[instance]; in HAL_UartInterruptHandle()
441 if ((NULL != uartDmaHandle) && (instance == uartDmaHandle->instance)) in HAL_UartInterruptHandle()
443 if (NULL != uartDmaHandle->dma_tx.buffer) in HAL_UartInterruptHandle()
452 (void)LPUART_TransferGetSendCountEDMA(s_LpuartAdapterBase[uartDmaHandle->instance], in HAL_UartInterruptHandle()
453 &uartDmaHandle->edmaHandle, &sentCount); in HAL_UartInterruptHandle()
459 uartDmaHandle->edmaHandle.txState = 0; in HAL_UartInterruptHandle()
461 dmaMsg.data = uartDmaHandle->dma_tx.buffer; in HAL_UartInterruptHandle()
462 dmaMsg.dataSize = uartDmaHandle->dma_tx.bufferLength; in HAL_UartInterruptHandle()
463 uartDmaHandle->dma_tx.buffer = NULL; in HAL_UartInterruptHandle()
464uartDmaHandle->dma_callback(uartDmaHandle, &dmaMsg, uartDmaHandle->dma_callback_param); in HAL_UartInterruptHandle()
469 if (NULL != uartDmaHandle->dma_rx.buffer) in HAL_UartInterruptHandle()
471 if ((NULL != uartDmaHandle->dma_rx.buffer) && (false == uartDmaHandle->dma_rx.receiveAll)) in HAL_UartInterruptHandle()
1159 hal_uart_dma_state_t *uartDmaHandle = s_UartDmaState[uartHandle->instance]; in HAL_UartIsrFunction() local
1171 if ((NULL != uartDmaHandle) && (uartDmaHandle->dma_tx.buffer != NULL)) in HAL_UartIsrFunction()
1698 hal_uart_dma_state_t *uartDmaHandle; in LPUART_StartRingBufferEDMA() local
1703 uartDmaHandle = uartHandle->dmaHandle; in LPUART_StartRingBufferEDMA()
1708 …EDMA_InstallTCDMemory(&uartDmaHandle->rxEdmaHandle, (edma_tcd_t *)&tcdMemoryPoolPtr[uartHandle->in… in LPUART_StartRingBufferEDMA()
1717 uartDmaHandle->rxEdmaHandle.tcdUsed = 1U; in LPUART_StartRingBufferEDMA()
1718 uartDmaHandle->rxEdmaHandle.tail = 0U; in LPUART_StartRingBufferEDMA()
1719 EDMA_TcdReset(&uartDmaHandle->rxEdmaHandle.tcdPool[0U]); in LPUART_StartRingBufferEDMA()
1720 EDMA_TcdSetTransferConfig(&uartDmaHandle->rxEdmaHandle.tcdPool[0U], &xferConfig, in LPUART_StartRingBufferEDMA()
1724 uartDmaHandle->rxEdmaHandle.tcdPool[0U].CSR |= 0x2U; in LPUART_StartRingBufferEDMA()
1727 EDMA_InstallTCD(uartDmaHandle->rxEdmaHandle.base, uartDmaHandle->rxEdmaHandle.channel, in LPUART_StartRingBufferEDMA()
1728 &uartDmaHandle->rxEdmaHandle.tcdPool[0U]); in LPUART_StartRingBufferEDMA()
1731 EDMA_SetCallback(&uartDmaHandle->rxEdmaHandle, LPUART_RxEDMACallback, NULL); in LPUART_StartRingBufferEDMA()
1734 EDMA_StartTransfer(&uartDmaHandle->rxEdmaHandle); in LPUART_StartRingBufferEDMA()
1747 hal_uart_dma_state_t *uartDmaHandle; in LPUART_DMACallbacks() local
1752 uartDmaHandle = (hal_uart_dma_state_t *)userData; in LPUART_DMACallbacks()
1754 if (NULL != uartDmaHandle->dma_callback) in LPUART_DMACallbacks()
1759 dmaMsg.data = uartDmaHandle->dma_tx.buffer; in LPUART_DMACallbacks()
1760 dmaMsg.dataSize = uartDmaHandle->dma_tx.bufferLength; in LPUART_DMACallbacks()
1761 uartDmaHandle->dma_tx.buffer = NULL; in LPUART_DMACallbacks()
1766 dmaMsg.data = uartDmaHandle->dma_rx.buffer; in LPUART_DMACallbacks()
1767 dmaMsg.dataSize = uartDmaHandle->dma_rx.bufferLength; in LPUART_DMACallbacks()
1768 uartDmaHandle->dma_rx.buffer = NULL; in LPUART_DMACallbacks()
1775 uartDmaHandle->dma_callback(uartDmaHandle, &dmaMsg, uartDmaHandle->dma_callback_param); in LPUART_DMACallbacks()
1783 hal_uart_dma_state_t *uartDmaHandle; in TimeoutTimer_Callbcak() local
1788 uartDmaHandle = uartDmaHandleList->dma_list; in TimeoutTimer_Callbcak()
1790 while (NULL != uartDmaHandle) in TimeoutTimer_Callbcak()
1792 if ((NULL != uartDmaHandle->dma_rx.buffer) && (false == uartDmaHandle->dma_rx.receiveAll)) in TimeoutTimer_Callbcak()
1798 …LPUART_TransferGetReceiveCountEDMA(s_LpuartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->e… in TimeoutTimer_Callbcak()
1801 newReceived = dmaMsg.dataSize - uartDmaHandle->dma_rx.bufferSofar; in TimeoutTimer_Callbcak()
1802 uartDmaHandle->dma_rx.bufferSofar = dmaMsg.dataSize; in TimeoutTimer_Callbcak()
1805 if ((0U == newReceived) && (0U < uartDmaHandle->dma_rx.bufferSofar)) in TimeoutTimer_Callbcak()
1807 uartDmaHandle->dma_rx.timeout++; in TimeoutTimer_Callbcak()
1808 if (uartDmaHandle->dma_rx.timeout >= HAL_UART_DMA_IDLELINE_TIMEOUT) in TimeoutTimer_Callbcak()
1814 LPUART_TransferAbortReceiveEDMA(s_LpuartAdapterBase[uartDmaHandle->instance], in TimeoutTimer_Callbcak()
1815 &uartDmaHandle->edmaHandle); in TimeoutTimer_Callbcak()
1817 dmaMsg.data = uartDmaHandle->dma_rx.buffer; in TimeoutTimer_Callbcak()
1819 uartDmaHandle->dma_rx.buffer = NULL; in TimeoutTimer_Callbcak()
1820uartDmaHandle->dma_callback(uartDmaHandle, &dmaMsg, uartDmaHandle->dma_callback_param); in TimeoutTimer_Callbcak()
1824 if ((0U < newReceived) && (0U < uartDmaHandle->dma_rx.bufferSofar)) in TimeoutTimer_Callbcak()
1826 uartDmaHandle->dma_rx.timeout = 0U; in TimeoutTimer_Callbcak()
1830 uartDmaHandle = uartDmaHandle->next; in TimeoutTimer_Callbcak()
1840 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMAInit() local
1849 uartDmaHandle = (hal_uart_dma_state_t *)dmaHandle; in HAL_UartDMAInit()
1850 uartHandle->dmaHandle = uartDmaHandle; in HAL_UartDMAInit()
1853 uartDmaHandle->instance = dmaConfig->uart_instance; in HAL_UartDMAInit()
1868 …(void)memcpy(&uartDmaHandle->dma_mux_configure, dmaConfig->dma_mux_configure, sizeof(dma_mux_confi… in HAL_UartDMAInit()
1898 …EDMA_CreateHandle(&uartDmaHandle->txEdmaHandle, dmaBases[dmaConfig->dma_instance], dmaConfig->tx_c… in HAL_UartDMAInit()
1899 …EDMA_CreateHandle(&uartDmaHandle->rxEdmaHandle, dmaBases[dmaConfig->dma_instance], dmaConfig->rx_c… in HAL_UartDMAInit()
1907 (void)memcpy(&uartDmaHandle->dma_channel_mux_configure, dmaConfig->dma_channel_mux_configure, in HAL_UartDMAInit()
1912 (void)memcpy(&uartDmaHandle->hal_uart_dma_config, dmaConfig, sizeof(hal_uart_dma_config_t)); in HAL_UartDMAInit()
1913uartDmaHandle->hal_uart_dma_config.dma_mux_configure = &uartDmaHandle->dma_mux_configure; in HAL_UartDMAInit()
1914uartDmaHandle->hal_uart_dma_config.dma_channel_mux_configure = &uartDmaHandle->dma_channel_mux_con… in HAL_UartDMAInit()
1924 s_UartDmaState[uartDmaHandle->instance] = uartDmaHandle; in HAL_UartDMAInit()
1937 s_dmaHandleList.dma_list = uartDmaHandle; in HAL_UartDMAInit()
1938 uartDmaHandle->next = NULL; in HAL_UartDMAInit()
1957 uartDmaHandle->next = s_dmaHandleList.dma_list; in HAL_UartDMAInit()
1958 s_dmaHandleList.dma_list = uartDmaHandle; in HAL_UartDMAInit()
1967 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMADeinit() local
1974 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMADeinit()
1978 assert(uartDmaHandle); in HAL_UartDMADeinit()
1984 if (NULL != uartDmaHandle->edmaHandle.rxEdmaHandle) in HAL_UartDMADeinit()
1986 …LPUART_TransferAbortReceiveEDMA(s_LpuartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->edma… in HAL_UartDMADeinit()
1988 if (NULL != uartDmaHandle->edmaHandle.txEdmaHandle) in HAL_UartDMADeinit()
1990 …LPUART_TransferAbortSendEDMA(s_LpuartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->edmaHan… in HAL_UartDMADeinit()
2003 if (curr == uartDmaHandle) in HAL_UartDMADeinit()
2028 (void)memset(uartDmaHandle, 0, sizeof(hal_uart_dma_state_t)); in HAL_UartDMADeinit()
2046 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMATransferInstallCallback() local
2051 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMATransferInstallCallback()
2053 assert(uartDmaHandle); in HAL_UartDMATransferInstallCallback()
2055 uartDmaHandle->dma_callback = callback; in HAL_UartDMATransferInstallCallback()
2056 uartDmaHandle->dma_callback_param = callbackParam; in HAL_UartDMATransferInstallCallback()
2059 …LPUART_TransferCreateHandleEDMA(s_LpuartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->edma… in HAL_UartDMATransferInstallCallback()
2060 … LPUART_DMACallbacks, uartDmaHandle, &uartDmaHandle->txEdmaHandle, in HAL_UartDMATransferInstallCallback()
2061 &uartDmaHandle->rxEdmaHandle); in HAL_UartDMATransferInstallCallback()
2085 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMATransferReceive() local
2091 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMATransferReceive()
2093 assert(uartDmaHandle); in HAL_UartDMATransferReceive()
2095 if (NULL == uartDmaHandle->dma_rx.buffer) in HAL_UartDMATransferReceive()
2097 uartDmaHandle->dma_rx.buffer = data; in HAL_UartDMATransferReceive()
2098 uartDmaHandle->dma_rx.bufferLength = length; in HAL_UartDMATransferReceive()
2099 uartDmaHandle->dma_rx.bufferSofar = 0U; in HAL_UartDMATransferReceive()
2100 uartDmaHandle->dma_rx.timeout = 0U; in HAL_UartDMATransferReceive()
2101 uartDmaHandle->dma_rx.receiveAll = receiveAll; in HAL_UartDMATransferReceive()
2123 …(void)LPUART_ReceiveEDMA(s_LpuartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->edmaHandle,… in HAL_UartDMATransferReceive()
2138 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMATransferSend() local
2146 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMATransferSend()
2148 assert(uartDmaHandle); in HAL_UartDMATransferSend()
2150 if (NULL == uartDmaHandle->dma_tx.buffer) in HAL_UartDMATransferSend()
2152 uartDmaHandle->dma_tx.buffer = data; in HAL_UartDMATransferSend()
2153 uartDmaHandle->dma_tx.bufferLength = length; in HAL_UartDMATransferSend()
2154 uartDmaHandle->dma_tx.bufferSofar = 0U; in HAL_UartDMATransferSend()
2165 …(void)LPUART_SendEDMA(s_LpuartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->edmaHandle, &x… in HAL_UartDMATransferSend()
2181 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMAGetReceiveCount() local
2186 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMAGetReceiveCount()
2188 assert(uartDmaHandle); in HAL_UartDMAGetReceiveCount()
2189 (void)uartDmaHandle; in HAL_UartDMAGetReceiveCount()
2194 *reCount = HAL_UartGetDmaReceivedBytes(uartDmaHandle->instance); in HAL_UartDMAGetReceiveCount()
2199 …if (kStatus_Success != LPUART_TransferGetReceiveCountEDMA(s_LpuartAdapterBase[uartDmaHandle->insta… in HAL_UartDMAGetReceiveCount()
2200 &uartDmaHandle->edmaHandle, reCount)) in HAL_UartDMAGetReceiveCount()
2219 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMAGetSendCount() local
2224 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMAGetSendCount()
2226 assert(uartDmaHandle); in HAL_UartDMAGetSendCount()
2229 …if (kStatus_Success != LPUART_TransferGetSendCountEDMA(s_LpuartAdapterBase[uartDmaHandle->instance… in HAL_UartDMAGetSendCount()
2230 &uartDmaHandle->edmaHandle, seCount)) in HAL_UartDMAGetSendCount()
2244 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMAAbortReceive() local
2249 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMAAbortReceive()
2251 assert(uartDmaHandle); in HAL_UartDMAAbortReceive()
2255 ringBufferIndex[uartDmaHandle->instance] = 0U; in HAL_UartDMAAbortReceive()
2259 …LPUART_TransferAbortReceiveEDMA(s_LpuartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->edma… in HAL_UartDMAAbortReceive()
2269 hal_uart_dma_state_t *uartDmaHandle; in HAL_UartDMAAbortSend() local
2274 uartDmaHandle = uartHandle->dmaHandle; in HAL_UartDMAAbortSend()
2276 assert(uartDmaHandle); in HAL_UartDMAAbortSend()
2279 …LPUART_TransferAbortSendEDMA(s_LpuartAdapterBase[uartDmaHandle->instance], &uartDmaHandle->edmaHan… in HAL_UartDMAAbortSend()