From 64cf4a779ef5c16c79bbbee27370169dc8d69499 Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Mon, 06 May 2024 20:08:30 +0800
Subject: [PATCH] 继续开发
---
CORE/main.c | 80 ++++++++++++++++++++++++++++------------
1 files changed, 56 insertions(+), 24 deletions(-)
diff --git a/CORE/main.c b/CORE/main.c
index a7982b9..0eb7dfd 100644
--- a/CORE/main.c
+++ b/CORE/main.c
@@ -14,6 +14,15 @@
#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"
+#include "sizhu_history_record.h"
+
+
FlagStatus key_awaken_flag_g = RESET;
//uint8_t lcd_only_one_flag = 0;
@@ -34,7 +43,9 @@
//ϵͳ��ʼ״̬���
- //�������ⲿ�����ж�
+
+
+ //����Ҫһֱ�������ⲿ�����ж�
allExtiIRQ();
IWDT_Clr();
while(1)
@@ -46,41 +57,62 @@
if(Get_Extern_Rtc_Time(&sys_clockBCD_g) ==FAIL) //��ȡʱ��
{
- //RTCʱ���쳣����
+ //?RTCʱ���쳣����
+ __SYS_STATUS_ALARM_BYTES_SET(rtc_err);
}
- //����ʶ��
+ /*����ʶ��*/
+ //����������Ҫ�ж�ʶ�𣬳�������ѭ�����ȡIO״̬ʶ��
+ keyPro();
+
+ /*LCD��ʾ*/
+ lcdDisplayPro();
+ /*�������*/
+ upperComPro();
- //LCD��ʾ
-
- //�������
-
- //�ɼ����ϱ��������������
-
- //485�ɼ�
-
- //����
-
- //״̬�֡������ִ���
-
-
- //����������ͨѶ��Ԥ��
-
- //˼��ƽ̨����ͨѶ
-
-
- //modbus��ַ�����ݸ���
+ /*�����ɼ�*/
+ /*�ɼ����ϱ��������������*/
+ //?���߲�ͬʱ���У��ɼ������ϱ�֮ǰ��ͬʱ�����Ļ����Ȳɼ���
+ //���������ϱ��ж������ڲɼ�ǰ�棬�ȴ����ɼ����ٴ����ϱ�
+ sysRunFunCtrlPro(&sys_fun_run_ctrl_g,sys_clockBCD_g);
+
+ /*485�ɼ�*/
+ rs485ReadDataPro(&sys_fun_run_ctrl_g);
+
+ /*������ʷ��¼�洢*/
+ //������ʷ��¼�洢��������ɼ��У����Ӻ�ȴ��ɼ�����ٴ洢
+ sizhuHistoryRecord(sys_clockBCD_g);
+
+
+ /*����*/
+ valveCtrlPro(&sys_fun_run_ctrl_g);
+
+
+ /*״̬�֡������ִ���*/
-
- //����
+ /*����������ͨѶ��Ԥ��*/
+ /*˼��ƽ̨����ͨѶ*/
+ WirelessRemoteCommPro(&sys_fun_run_ctrl_g);
+
+ /*modbus��ַ�����ݸ���*/
+
+
+
+ /*����*/
+ //��������²������ߣ�Ҫ���жϣ���������硢RS485�ɼ������С�Զ��������
+ if(SysKeepRunningStatusGet(sys_fun_run_ctrl_g)==RESET){
+ //���ߴ���
+
+ }
+
}
}
--
Gitblit v1.9.3