From ee3c90168f81ce19529904d80f9c9de4fed23bb8 Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Tue, 30 Apr 2024 16:30:45 +0800
Subject: [PATCH] 继续完善

---
 CORE/main.c |   64 +++++++++++++++++++++-----------
 1 files changed, 42 insertions(+), 22 deletions(-)

diff --git a/CORE/main.c b/CORE/main.c
index a7982b9..600734c 100644
--- a/CORE/main.c
+++ b/CORE/main.c
@@ -14,6 +14,12 @@
 #include "flash.h"
 #include "system_run_fun.h"
 #include "system_general_para.h"
+#include "lcd.h"
+#include "upper_com.h"
+#include "rs485_read_data.h"
+#include "valve_control.h"
+#include "wireless_remote_comm.h"
+#include "sizhu_ctrl_word.h"
 
 FlagStatus key_awaken_flag_g = RESET;
 //uint8_t lcd_only_one_flag = 0;
@@ -34,7 +40,9 @@
 	//ϵͳ��ʼ״̬���
 	
 	
-	//�������ⲿ�����ж�
+	
+	
+	//����Ҫһֱ�������ⲿ�����ж�
 	allExtiIRQ();
 	IWDT_Clr();
 	while(1)
@@ -46,40 +54,52 @@
 			
 			if(Get_Extern_Rtc_Time(&sys_clockBCD_g) ==FAIL) //��ȡʱ��
 			{
-				//RTCʱ���쳣����
+				//?RTCʱ���쳣����
+				__SYS_STATUS_ALARM_BYTES_SET(rtc_err);
 			}
 			
-			//����ʶ��
+			/*����ʶ��*/
+			//����������Ҫ�ж�ʶ�𣬳�������ѭ�����ȡIO״̬ʶ��
+			keyPro();
+					
+			/*LCD��ʾ*/
+			lcdDisplayPro();
+			
+			/*�������*/
+			upperComPro();
 			
 			
-			//LCD��ʾ
+			/*�ɼ����ϱ��������������*/
+			//?���߲�ͬʱ���У��ɼ������ϱ�֮ǰ��ͬʱ�����Ļ����Ȳɼ���
+			//���������ϱ��ж��߼����ڲɼ�ǰ�棬�ȴ����ɼ����ٴ����ϱ�
+			sysRunFunCtrlPro(&sys_fun_run_ctrl_g,sys_clockBCD_g);
 			
-			//�������
+			/*485�ɼ�*/
+			rs485ReadDataPro(&sys_fun_run_ctrl_g);
 			
-			//�ɼ����ϱ��������������
-			
-			//485�ɼ�
-			
-			//����
-			
-			//״̬�֡������ִ���
+			/*������ʷ��¼�洢*/
+			//������ʷ��¼�洢��������ɼ��У����Ӻ�ȴ��ɼ�����ٴ洢
 			
 			
-			//����������ͨѶ��Ԥ��
-			
-			//˼��ƽ̨����ͨѶ
+			/*����*/
+			valveCtrlPro(&sys_fun_run_ctrl_g);
 			
 			
-			//modbus��ַ�����ݸ���
+			/*״̬�֡������ִ���*/
+			
+			
+			/*����������ͨѶ��Ԥ��*/
+			
+			
+			/*˼��ƽ̨����ͨѶ*/
+			WirelessRemoteCommPro(&sys_fun_run_ctrl_g);
+			
+			/*modbus��ַ�����ݸ���*/
 			
 			
 			
-			
-			
-			
-			
-			//����
-			
+			/*����*/ 
+			//��������²������ߣ�Ҫ���жϣ��������⹩�硢RS485�ɼ������С�Զ��������
 			
 			
 		}

--
Gitblit v1.9.3