forked from SZV10X_Software/SZV103_FM33A0xxEV_SiZhu

jinlicong
2024-04-19 d91ac630ac0e13ea31919052ea2bc54cafef583b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#include "main.h"
#include "gpio.h"
#include "rcc_config.h"
#include "uart.h"
#include "tim.h"
#include "rtc.h"
#include "exti.h"
#include "adc.h"
#include "i2c.h"
#include "extern_rtc.h"
#include "spi.h"
#include "eeprom.h"
#include "key.h"
#include "flash.h"
#include "system_run_fun.h"
#include "system_general_para.h"
 
FlagStatus key_awaken_flag_g = RESET;
//uint8_t lcd_only_one_flag = 0;
 
 
int main(void)
{
    System_power_on_init();
 
    /*¸÷ÖÖ³õʼ»¯*/
    //Ó²¼þÇý¶¯³õʼ»¯
    hardwareDriversInit();
    //´æ´¢µÄ²ÎÊý³õʼ»¯
    sysStoredParaInit();
    //ÔËÐй¦ÄܲÎÊý³õʼ»¯
    sysRunFunParaInit();
    
    //ϵͳ³õʼ״̬¼ì²â
    
    
    //´ò¿ªËùÓÐÍⲿÒý½ÅÖжÏ
    allExtiIRQ();
    IWDT_Clr();
    while(1)
    {
        if(sys_run_period==SET) 
        {
            sys_run_period = RESET;
            IWDT_Clr();
            
            if(Get_Extern_Rtc_Time(&sys_clockBCD_g) ==FAIL) //»ñȡʱ¼ä
            {
                //RTCʱ¼äÒì³£±¨¾¯
            }
            
            //°´¼üʶ±ð
            
            
            //LCDÏÔʾ
            
            //ÉÏλ»ú½»»¥
            
            //²É¼¯¡¢Éϱ¨¡¢·§¿ØÈÎÎñ¿ØÖÆ
            
            //485²É¼¯
            
            //·§¿Ø
            
            //״̬×Ö¡¢±¨¾¯×Ö´¦Àí
            
            
            //µÚÈý·½ÎÞÏßͨѶ£¬Ô¤Áô
            
            //˼Öþƽ̨ÎÞÏßͨѶ
            
            
            //modbusµØÖ·±íÊý¾Ý¸üÐÂ
            
            
            
            
            
            
            
            //ÐÝÃß
            
            
            
        }
    }
}