From 9e334e88f1d1d7aeb89f38ff72f4ae3dca078762 Mon Sep 17 00:00:00 2001 From: yincheng.zhong <634916154@qq.com> Date: 星期日, 16 三月 2025 16:58:50 +0800 Subject: [PATCH] 外包开发完ntrip,支持shell配置ID,测试ID正常,ntrip正常 --- keil/include/components/hal/UART.c | 33 ++++++++++++++++++++++++++++----- 1 files changed, 28 insertions(+), 5 deletions(-) diff --git a/keil/include/components/hal/UART.c b/keil/include/components/hal/UART.c index 4839aaf..b409785 100644 --- a/keil/include/components/hal/UART.c +++ b/keil/include/components/hal/UART.c @@ -168,8 +168,12 @@ l_astUartInfo[_eUartID].m_u32RxBufSize = _pstInit->m_u32RxBufSize; if(UART_RX_MODE_DMA == _pstInit->m_eRxMode) { - l_astUartInfo[_eUartID].m_pu8RxLastPos= l_astUartInfo[_eUartID].m_pu8RxBuf; - l_astUartInfo[_eUartID].m_pu8RxBufEnd = l_astUartInfo[_eUartID].m_pu8RxBuf + l_astUartInfo[_eUartID].m_u32RxBufSize - 1; + HIDO_ArraryQueueInit( + &l_astUartInfo[_eUartID].m_stRxArraryQueue, + _pstInit->m_pu8RxBuf, + _pstInit->m_u32RxBufSize, + sizeof(HIDO_UINT8)); + return HIDO_OK; } else if(UART_RX_MODE_INT == _pstInit->m_eRxMode) { @@ -369,11 +373,16 @@ osMutexWait(l_astUartInfo[_eUartID].m_mutexLock, osWaitForever); #endif - if (UART_RX_MODE_INT == l_astUartInfo[_eUartID].m_eRxMode) + switch(l_astUartInfo[_eUartID].m_eRxMode) { - if (HIDO_ArraryQueueOut(&l_astUartInfo[_eUartID].m_stRxArraryQueue, _pu8Char) == HIDO_OK) + case UART_RX_MODE_INT: + case UART_RX_MODE_DMA: { - i32Result = HIDO_OK; + if (HIDO_ArraryQueueOut(&l_astUartInfo[_eUartID].m_stRxArraryQueue, _pu8Char) == HIDO_OK) + { + i32Result = HIDO_OK; + } + break; } } @@ -385,6 +394,20 @@ } /******************************************************************************* + * Function Name : Uart_SetChar + * Description : + * Input : + * Output : + * Return : + * Author : 杜键 + * Modified Date: : 2018年4月24日 + *******************************************************************************/ +HIDO_VOID Uart_SetChar(E_UartID _eUartID, HIDO_UINT8 _u8Data) +{ + HIDO_ArraryQueueIn(&l_astUartInfo[_eUartID].m_stRxArraryQueue, &_u8Data); +} + +/******************************************************************************* * Function Name : * Description : * Input : -- Gitblit v1.9.3