From a05cacad5239ab3f35ffb58f443356b484e6cc1b Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Tue, 21 May 2024 19:17:22 +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