| | |
| | | #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" |
| | | #include "lcd.h" |
| | | #include "upper_com.h" |
| | | #include "rs485_read_data.h" |
| | | |
| | | FlagStatus key_awaken_flag_g = RESET; |
| | | //uint8_t lcd_only_one_flag = 0; |
| | | #include "project_test.h" |
| | | |
| | | |
| | | 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ʱ¼äÒì³£±¨¾¯ |
| | | } |
| | | |
| | | /*°´¼üʶ±ð*/ |
| | | //µ¥»÷²Ù×÷Ö÷ÒªÖжÏʶ±ð£¬³¤°´·ÅÔÚÑ»·Àïʶ±ð |
| | | keyPro(); |
| | | |
| | | /*LCDÏÔʾ*/ |
| | | lcdDisplayPro(); |
| | | |
| | | /*ÉÏλ»ú½»»¥*/ |
| | | upperComPro(); |
| | | |
| | | |
| | | /*²É¼¯¡¢Éϱ¨¡¢·§¿ØÈÎÎñ¿ØÖÆ*/ |
| | | //ÈýÕß²»Í¬Ê±½øÐУ¬²É¼¯·ÅÔÚÉϱ¨Ö®Ç°£¬Í¬Ê±´¥·¢µÄ»°ÓÅÏȲɼ¯£¬ |
| | | //±¨¾¯´¥·¢Éϱ¨ÅжÏÂß¼·ÅÔڲɼ¯Ç°Ã棬ÏÈ´¥·¢²É¼¯£¬ÔÙ´¥·¢Éϱ¨ |
| | | // |
| | | |
| | | /*485²É¼¯*/ |
| | | rs485ReadDataPro(); |
| | | |
| | | /*Êý¾ÝÀúÊ·¼Ç¼´æ´¢*/ |
| | | //Êý¾ÝÀúÊ·¼Ç¼´æ´¢Èç¹ûÓöµ½²É¼¯ÖУ¬ÔòÑÓºóµÈ´ý²É¼¯Íê³ÉÔÙ´æ´¢ |
| | | |
| | | /*·§¿Ø*/ |
| | | |
| | | /*״̬×Ö¡¢±¨¾¯×Ö´¦Àí*/ |
| | | |
| | | |
| | | /*µÚÈý·½ÎÞÏßͨѶ£¬Ô¤Áô*/ |
| | | |
| | | /*˼Öþƽ̨ÎÞÏßͨѶ*/ |
| | | |
| | | |
| | | /*modbusµØÖ·±íÊý¾Ý¸üÐÂ*/ |
| | | |
| | | |
| | | |
| | | /*ÐÝÃß*/ |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | System_power_on_init(); |
| | | All_GPIO_Init_test(); |
| | | UART_Init_test(); |
| | | ALL_ADC_Init_Test(); |
| | | Iic_Init_Test(); |
| | | // ALL_GPIO_EXTI_test(); |
| | | #if Debug_Model |
| | | AppNvr_Print(); |
| | | project_test_9();// ʱÖÓ¾«¶È²âÁ¿ |
| | | project_test_7(); // Òº¾§ÏÔʾ |
| | | #endif |
| | | while (1) |
| | | { |
| | | Project_Test(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |