| | |
| | | l_astUartInfo[_eUartID].m_mutexLock = osMutexCreate(HIDO_NULL); |
| | | #endif |
| | | |
| | | struct UART_CFG_T uart_cfg = |
| | | struct UART_CFG_T uart_cfg = |
| | | { |
| | | .parity = UART_PARITY_NONE, |
| | | .stop = UART_STOP_BITS_1, |
| | |
| | | *******************************************************************************/ |
| | | static void uart_receive_callback(void *dev, uint32_t err_code) |
| | | { |
| | | E_UartID eUartID = (E_UartID) 0; |
| | | E_UartID eUartID = UART_ID_4G; |
| | | |
| | | HIDO_UINT8 u8RecvByte = l_astUartInfo[eUartID].m_u8RxValue; |
| | | |
| | | for (eUartID = (E_UartID) 0; eUartID < UART_ID_LAST; eUartID++) |
| | | { |
| | | if (l_astUartInfo[eUartID].m_eUartPort == *(enum UART_DEV_T *)dev) |
| | | { |
| | | if(UART_RX_MODE_INT == l_astUartInfo[eUartID].m_eRxMode) |
| | | { |
| | | HIDO_UINT8 u8RecvByte = l_astUartInfo[eUartID].m_u8RxValue; |
| | | HIDO_ArraryQueueIn(&l_astUartInfo[eUartID].m_stRxArraryQueue, &u8RecvByte); |
| | | |
| | | HIDO_ArraryQueueIn(&l_astUartInfo[eUartID].m_stRxArraryQueue, &u8RecvByte); |
| | | |
| | | /* 启动INT接收 */ |
| | | uart_receive(l_astUartInfo[eUartID].m_eUartPort, &l_astUartInfo[eUartID].m_u8RxValue, 1, uart_receive_callback); |
| | | } |
| | | |
| | | break; |
| | | } |
| | | } |
| | | /* 启动INT接收 */ |
| | | uart_receive(l_astUartInfo[eUartID].m_eUartPort, &l_astUartInfo[eUartID].m_u8RxValue, 1, uart_receive_callback); |
| | | } |
| | | |
| | | /******************************************************************************* |