From d89e79dc80bfca12189f77498ef0dcd652731d9d Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期一, 04 十一月 2019 19:46:03 +0800
Subject: [PATCH] 修改晶振频率到16M

---
 源码/核心板/Src/ExternalDevices/dw_driver.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/ExternalDevices/dw_driver.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/ExternalDevices/dw_driver.c"
index 6c030b9..a4c252b 100644
--- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/ExternalDevices/dw_driver.c"
+++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/ExternalDevices/dw_driver.c"
@@ -1,4 +1,5 @@
 #include "dw_driver.h"
+#include "deca_device_api.h"
 
 void Reset_DW1000(void)
 {
@@ -49,12 +50,16 @@
     EXTI_InitStructure.EXTI_Line = DECAIRQ_EXTI;
     EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
     EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;	//MPW3 IRQ polarity is high by default
-    EXTI_InitStructure.EXTI_LineCmd = DISABLE;
+    EXTI_InitStructure.EXTI_LineCmd = ENABLE;
     EXTI_Init(&EXTI_InitStructure);
 
 }
 
 //读取外部中断状态
+ITStatus Get_Ext_IRQ_Statues(void)
+{
+	return EXTI_GetITStatus(DECAIRQ_EXTI);
+}
 
 
 //使能外部中断
@@ -66,7 +71,7 @@
 //禁止外部中断
 void Disable_Ext_IRQ(void)
 {
-	NVIC_DisnableIRQ(DECAIRQ_EXTI_IRQn);
+	NVIC_DisableIRQ(DECAIRQ_EXTI_IRQn);
 }
 
 /*! ------------------------------------------------------------------------------------------------------------------
@@ -85,11 +90,11 @@
  */
 decaIrqStatus_t decamutexon(void)
 {
-    decaIrqStatus_t s = port_GetEXT_IRQStatus();
+    decaIrqStatus_t s = Get_Ext_IRQ_Statues();
 
     if(s)
     {
-        port_DisableEXT_IRQ(); //disable the external interrupt line
+        Disable_Ext_IRQ(); //disable the external interrupt line
     }
     return s ;   // return state before disable, value is used to re-enable in decamutexoff call
 }
@@ -113,6 +118,7 @@
 {
     if(s)   //need to check the port state as we can't use level sensitive interrupt on the STM ARM
     {
-        port_EnableEXT_IRQ();
+        Enable_Ext_IRQ();
     }
-}
\ No newline at end of file
+}
+

--
Gitblit v1.9.3