| | |
| | | void PendSV_Handler(void)
|
| | | {
|
| | | /* USER CODE BEGIN PendSV_IRQn 0 */
|
| | | NVIC_ClearPendingIRQ(PendSV_IRQn); |
| | | SCB->ICSR=SCB_ICSR_PENDSVCLR_Msk; //1<<SCB_ICSR_PENDSVCLR_Pos;
|
| | | // NVIC_ClearPendingIRQ(PendSV_IRQn); |
| | | PendSvCount++;
|
| | | NVIC_DisableIRQ(PendSV_IRQn);
|
| | | // NVIC_DisableIRQ(PendSV_IRQn);
|
| | | PendSvCallBack();
|
| | | /* USER CODE END PendSV_IRQn 0 */
|
| | | /* USER CODE BEGIN PendSV_IRQn 1 */
|
| | |
|
| | |
| | | Uart2DmaInts++;
|
| | | if (LL_DMA_IsActiveFlag_TC4(DMA1))
|
| | | {
|
| | |
|
| | | LL_DMA_ClearFlag_TC4(DMA1);
|
| | | /* |
| | | Uart2Stat.SendBytes+=Uart2Stat.DMASendLen;
|
| | | DelData(&Uart2Stat.QTx,Uart2Stat.DMASendLen);
|
| | | LL_DMA_ClearFlag_TC4(DMA1);
|
| | |
|
| | |
|
| | | if (!IsEmpty(&Uart2Stat.QTx))
|
| | | {
|
| | |
| | | LL_USART_EnableDMAReq_TX(USART2);
|
| | | }
|
| | | else
|
| | | */ |
| | | {
|
| | | Uart2Stat.DMASendLen=0;
|
| | | Uart2Stat.Sending=0;
|
| | |
| | | if (LL_DMA_IsActiveFlag_TC5(DMA1))
|
| | | {
|
| | | LL_DMA_ClearFlag_TC5(DMA1);
|
| | | |
| | |
|
| | | }
|
| | | /* USER CODE END DMA1_Channel4_5_IRQn 1 */
|
| | |
| | | Uart1BaudFirstGot=1;
|
| | | Uart1Stat.RXNECount++;
|
| | | unsigned char ch=LL_USART_ReceiveData8(USART1);
|
| | | PushOne(&Uart1Stat.QRx,ch);
|
| | | // PushOne(&Uart1Stat.QRx,ch);
|
| | | Uart1Stat.RecvBytes++;
|
| | | Uart1RecvBuf1[Uart1RecvBuf1DataLen++]=ch;
|
| | | //LL_USART_TransmitData8(USART1,ch);
|
| | |
| | |
|
| | | if (LL_USART_IsActiveFlag_RXNE(USART2))
|
| | | {
|
| | | Uart2BaudGot=1;
|
| | | Uart2BaudFirstGot=1;
|
| | | Uart2Stat.RXNECount++;
|
| | | unsigned char ch=LL_USART_ReceiveData8(USART2);
|
| | | PushOne(&Uart2Stat.QRx,ch);
|
| | | Uart2Stat.RecvBytes++;
|
| | | Uart2RecvBuf1[Uart2RecvBuf1DataLen++]=ch;
|
| | | // unsigned char ch=LL_USART_ReceiveData8(USART2);
|
| | | // Uart2Stat.RXNECount++;
|
| | | // PushOne(&Uart2Stat.QRx,ch);
|
| | | // Uart2Stat.RecvBytes++;
|
| | | // Uart2RecvBuf1[Uart2RecvBuf1DataLen++]=ch;
|
| | |
|
| | | //LL_USART_TransmitData8(USART2,ch);
|
| | | }
|