From 66ea95dcb8fd91d29465c2f11ced4dd6153a2504 Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Wed, 22 May 2024 17:15:02 +0800
Subject: [PATCH] 继续完善远传

---
 Soft/system_general_para.c |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/Soft/system_general_para.c b/Soft/system_general_para.c
index b861d7c..9e15a90 100644
--- a/Soft/system_general_para.c
+++ b/Soft/system_general_para.c
@@ -8,8 +8,8 @@
 
 __IO FlagStatus sys_run_period = RESET; // ϵͳ��������
 
-SYS_DELAY_SEC_PARA_T sys_delay_sec_para_g = { .gprs_timeout_para.delay_flag = RESET,  \
-		.gprs_timeout_para.delay_time = 0,	\
+SYS_DELAY_SEC_PARA_T sys_delay_sec_para_g = { .wrc_timeout_para.delay_flag = RESET,  \
+		.wrc_timeout_para.delay_time = 0,	\
 		.sys_active_time.delay_flag = RESET, 	\
 		.sys_active_time.delay_time = SYS_WAKE_UP_TIME,	\
 		.sys_restart_delay_time.delay_flag = RESET, 	\
@@ -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