From 9aed5d7e7b3c7bf09da712e9c272ece401a7acc9 Mon Sep 17 00:00:00 2001
From: QuakeGod <QuakeGod@sina.com>
Date: 星期一, 25 十一月 2024 14:51:23 +0800
Subject: [PATCH] add UltraSonic and MultiWireLess

---
 ComLib/Src/stm32f0xx_it.c |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/ComLib/Src/stm32f0xx_it.c b/ComLib/Src/stm32f0xx_it.c
index c8006ab..0ee5932 100644
--- a/ComLib/Src/stm32f0xx_it.c
+++ b/ComLib/Src/stm32f0xx_it.c
@@ -134,7 +134,7 @@
 {
   /* USER CODE BEGIN TIM6_IRQn 0 */
 	if (LL_TIM_IsActiveFlag_UPDATE(TIM6)) {	LL_TIM_ClearFlag_UPDATE(TIM6);}
-	
+	KMem.WDB[130]++;
 //		KMem.SDD[46]+=1000;
 //	  KMem.SDT[93] = LL_TIM_GetCounter(TIM6);
   /* USER CODE END TIM6_IRQn 0 */
@@ -143,6 +143,21 @@
   /* USER CODE END TIM6_IRQn 1 */
 }
 
+/**
+  * @brief This function handles TIM6 global interrupt.
+  */
+void TIM16_IRQHandler(void)
+{
+  /* USER CODE BEGIN TIM6_IRQn 0 */
+	if (LL_TIM_IsActiveFlag_UPDATE(TIM16)) {	LL_TIM_ClearFlag_UPDATE(TIM16);}
+	KMem.WDB[132]++;
+//		KMem.SDD[46]+=1000;
+//	  KMem.SDT[93] = LL_TIM_GetCounter(TIM6);
+  /* USER CODE END TIM6_IRQn 0 */
+  /* USER CODE BEGIN TIM6_IRQn 1 */
+
+  /* USER CODE END TIM6_IRQn 1 */
+}
 /**
 * @brief This function handles DMA1 channel 2 and 3 interrupts.
 */
@@ -254,8 +269,8 @@
 		// PushOne(&Uart1Stat.QRx,ch);
 		Uart1Stat.RecvBytes++;
 		
-		Uart1RecvBuf1[Uart1RecvBuf1DataLen]=ch;
-		if (Uart1RecvBuf1DataLen < Uart1RecvBufSize -1 ) {Uart1RecvBuf1DataLen++;}
+		Uart1RxBuf1[Uart1RxBuf1DataLen]=ch;
+		if (Uart1RxBuf1DataLen < Uart1RxBufSize -1 ) {Uart1RxBuf1DataLen++;}
 		//LL_USART_TransmitData8(USART1,ch);
 	}
 	if (LL_USART_IsActiveFlag_ORE(USART1))

--
Gitblit v1.9.1