From 6ea1a42391f86e72f53042a966dae970a3fd77cb Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Fri, 17 May 2024 17:18:57 +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