| | |
| | | #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" |
| | | |
| | | 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²É¼¯ |
| | | |
| | | //·§¿Ø |
| | | |
| | | //״̬×Ö¡¢±¨¾¯×Ö´¦Àí |
| | | |
| | | |
| | | //µÚÈý·½ÎÞÏßͨѶ£¬Ô¤Áô |
| | | |
| | | //˼Öþƽ̨ÎÞÏßͨѶ |
| | | |
| | | |
| | | //modbusµØÖ·±íÊý¾Ý¸üР|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //ÐÝÃß |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | System_power_on_init(); |
| | | All_GPIO_Init_test(); |
| | | UART_Init_test(); |
| | | ALL_ADC_Init_Test(); |
| | | Iic_Init_Test(); |
| | | project_test_9();// ʱÖÓ¾«¶È²âÁ¿ |
| | | project_test_7(); // Òº¾§ÏÔʾ |
| | | ALL_GPIO_EXTI_test(); |
| | | #if Debug_Model |
| | | AppNvr_Print(); |
| | | #endif |
| | | while (1) |
| | | { |
| | | Project_Test(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |