From 0e4f298824b83e1a1e81ec8ced2e6c007a1c8961 Mon Sep 17 00:00:00 2001
From: guanjiao <sqrgj@163.com>
Date: 星期三, 29 八月 2018 21:10:40 +0800
Subject: [PATCH] 1. 修改为外部晶振 2. 修改led与蜂鸣器pin角

---
 源码/核心板/Src/OnChipDevices/Rcc_Nvic_Systick.c |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Rcc_Nvic_Systick.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Rcc_Nvic_Systick.c"
index cd517b6..e021ee3 100644
--- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Rcc_Nvic_Systick.c"
+++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Rcc_Nvic_Systick.c"
@@ -48,7 +48,7 @@
 	NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4);
 	
 	/* Enable and set EXTI Interrupt to the lowest priority */
-    NVIC_InitStructure.NVIC_IRQChannel = EXTI2_IRQn;
+    NVIC_InitStructure.NVIC_IRQChannel = DECAIRQ_EXTI_IRQn;
     NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 15;
     NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
     NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
@@ -65,8 +65,28 @@
         while (time_retry--);
 		return 1;
     }
-    NVIC_SetPriority (SysTick_IRQn, 5);
+    NVIC_SetPriority(SysTick_IRQn, 5);
 
     return 0;
 	
 }
+
+void delay_us(uint32_t nTimer)  
+{  
+    uint32_t i=0;  
+    for(i=0;i<nTimer;i++){  
+        __NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();
+		__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();
+		__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();  
+        __NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();
+		__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();
+		__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();__NOP();  
+        __NOP();__NOP();__NOP();__NOP(); 
+    }  
+}
+
+void delay_ms(uint32_t nTimer)  
+{  
+    uint32_t i=1000*nTimer;  
+    delay_us(i);  
+}  

--
Gitblit v1.9.3