From d14dd3a2106de793fbe08dc5a12cf80defd3258a Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Wed, 15 May 2024 17:34:14 +0800
Subject: [PATCH] 继续脉冲和报警线处理
---
Soft/system_general_para.c | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/Soft/system_general_para.c b/Soft/system_general_para.c
index b861d7c..790c20c 100644
--- a/Soft/system_general_para.c
+++ b/Soft/system_general_para.c
@@ -143,4 +143,25 @@
}
return RESET;
-}
\ No newline at end of file
+}
+
+//IO���ӳ��������
+FlagStatus IO_JitterEliminationCheck(GPIO_Type* GPIOx, uint32_t GPIO_Pin,uint16_t delay_time_ms,BitAction bit_status)
+{
+ if(delay_time_ms>1000) //Ŀǰ�����1000ms��ʱ��̫����ϵͳ���Ӱ��
+ return RESET;
+
+ if(GPIO_ReadInputDataBit(GPIOx, GPIO_Pin) == bit_status){
+ if(delay_time_ms > 0)
+ delay_ms(delay_time_ms);
+ if(GPIO_ReadInputDataBit(GPIOx, GPIO_Pin) == bit_status){
+ return SET;
+ }else{
+ return RESET;
+ }
+
+ }else{
+ return RESET;
+ }
+
+}
--
Gitblit v1.9.3