| | |
| | | #include "billing.h" |
| | | #include "linked_list.h" |
| | | #include "other_fun.h" |
| | | #include "sys_sleep.h" |
| | | |
| | | |
| | | FlagStatus key_awaken_flag_g = RESET; |
| | |
| | | int main(void) |
| | | { |
| | | System_power_on_init(); |
| | | |
| | | |
| | | /*¸÷ÖÖ³õʼ»¯*/ |
| | | //Ó²¼þÇý¶¯³õʼ»¯ |
| | | hardwareDriversInit(); |
| | |
| | | allExtiIRQ(); |
| | | |
| | | IWDT_Clr(); |
| | | |
| | | lcdDisplayPro(); //¸´Î»ÏÔʾÏÈ´ò¿ª |
| | | |
| | | while(1) |
| | | { |
| | | { |
| | | if(sys_run_period==SET) |
| | | { |
| | | sys_run_period = RESET; |
| | | IWDT_Clr(); |
| | | |
| | | |
| | | if(Get_Extern_Rtc_Time(&sys_clockBCD_g) ==FAIL) //»ñȡʱ¼ä |
| | | { |
| | | //?RTCʱ¼äÒì³£±¨¾¯ |
| | |
| | | SysAlarmCtrlPro(); |
| | | |
| | | |
| | | /*µÚÈý·½ÎÞÏßͨѶ£¬Ô¤Áô*/ |
| | | |
| | | |
| | | /*˼Öþƽ̨ÎÞÏßͨѶ*/ |
| | | WirelessRemoteCommPro(&sys_fun_run_ctrl_g); |
| | | |
| | | /*modbusµØÖ·±íÊý¾Ý¸üÐÂ*/ |
| | | |
| | | |
| | | |
| | | /*ÐÝÃß*/ |
| | | //²¿·ÖÇé¿öϲ»ÄÜÐÝÃߣ¬Òª×öÅжϣ¬±ÈÈçÓÐÍ⹩µç¡¢RS485²É¼¯¹ý³ÌÖС¢Ô¶´«¹ý³ÌÖÐ |
| | | if(SysKeepRunningStatusGet(sys_fun_run_ctrl_g)==RESET){ |
| | | //ÐÝÃß´¦Àí |
| | | if(pulse_exti_flag==SET){ //µÈ´ýÂö³å¼ì²âÍê±Ï |
| | | for(uint8_t count_i=0;count_i<(PULSE_CHECK_DELAY_MS &0xff);count_i++){ |
| | | delay_ms(1); |
| | | if(pulse_exti_flag == RESET) |
| | | break; |
| | | } |
| | | } |
| | | //ÐÝÃß |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | // /*µÚÈý·½ÎÞÏßͨѶ£¬Ô¤Áô*/ |
| | | // |
| | | // |
| | | // /*˼Öþƽ̨ÎÞÏßͨѶ*/ |
| | | //// WirelessRemoteCommPro(&sys_fun_run_ctrl_g); |
| | | // |
| | | // /*modbusµØÖ·±íÊý¾Ý¸üÐÂ*/ |
| | | // |
| | | // |
| | | // |
| | | // /*ÐÝÃß*/ |
| | | // //²¿·ÖÇé¿öϲ»ÄÜÐÝÃߣ¬Òª×öÅжϣ¬±ÈÈçÓÐÍ⹩µç¡¢RS485²É¼¯¹ý³ÌÖС¢Ô¶´«¹ý³ÌÖÐ |
| | | // if(SysKeepRunningStatusGet(sys_fun_run_ctrl_g)==RESET){ |
| | | // //ÐÝÃß´¦Àí |
| | | // if(pulse_exti_flag==SET){ //µÈ´ýÂö³å¼ì²âÍê±Ï |
| | | // for(uint8_t count_i=0;count_i<(PULSE_CHECK_DELAY_MS &0xff);count_i++){ |
| | | // delay_ms(1); |
| | | // if(pulse_exti_flag == RESET) |
| | | // break; |
| | | // } |
| | | // } |
| | | // //ÐÝÃß |
| | | // DeepSleepMode(); |
| | | // } |
| | | } |
| | | |
| | | if(lcd_wake_up_flag_g) //ΪÁ˰´¼üÏÔʾûÓÐÑӳٸР|
| | | if(lcd_wake_up_flag_g == SET) //ΪÁ˰´¼üÏÔʾûÓÐÑӳٸР|
| | | lcdDisplayPro(); |
| | | |
| | | } |