| | |
| | | |
| | | if (LL_USART_IsActiveFlag_RXNE(USART1)) |
| | | { |
| | | Uart1BaudGot=1; |
| | | Uart1BaudFirstGot=1; |
| | | Uart1Stat.RXNECount++; |
| | | // Uart1BaudGot=1; |
| | | // Uart1BaudFirstGot=1; |
| | | // Uart1Stat.RXNECount++; |
| | | unsigned char ch=LL_USART_ReceiveData8(USART1); |
| | | // PushOne(&Uart1Stat.QRx,ch); |
| | | Uart1Stat.RecvBytes++; |
| | | Uart1RecvBuf1[Uart1RecvBuf1DataLen++]=ch; |
| | | Uart1RecvBuf1[Uart1RecvBuf1DataLen]=ch; |
| | | if (Uart1RecvBuf1DataLen <RX1BUFSIZE -1 ) { |
| | | Uart1RecvBuf1DataLen++; |
| | | } |
| | | //LL_USART_TransmitData8(USART1,ch); |
| | | } |
| | | if (LL_USART_IsActiveFlag_ORE(USART1)) |
| | | { |
| | | LL_USART_ClearFlag_ORE(USART1); |
| | | LL_USART_DisableOverrunDetect(USART1); |
| | | Uart1Stat.OverRunCount++; |
| | | } |
| | | if (LL_USART_IsEnabledIT_IDLE(USART1)&&LL_USART_IsActiveFlag_IDLE(USART1)) |
| | |
| | | if (LL_USART_IsActiveFlag_ORE(USART2)) |
| | | { |
| | | LL_USART_ClearFlag_ORE(USART2); |
| | | LL_USART_DisableOverrunDetect(USART2); |
| | | Uart2Stat.OverRunCount++; |
| | | } |
| | | if (LL_USART_IsEnabledIT_IDLE(USART2)&&LL_USART_IsActiveFlag_IDLE(USART2)) |
| | |
| | | if (LL_USART_IsActiveFlag_ORE(USART3)) |
| | | { |
| | | LL_USART_ClearFlag_ORE(USART3); |
| | | LL_USART_DisableOverrunDetect(USART3); |
| | | // Uart3Stat.OverRunCount++; |
| | | } |
| | | if (LL_USART_IsEnabledIT_IDLE(USART3)&&LL_USART_IsActiveFlag_IDLE(USART3)) |