#include "include.h" #include "app_variable.h" #define TRACE_EN 1 #if TRACE_EN #define TRACE(...) printf(__VA_ARGS__) AT(.com_rodata.halt) const char str_halt[] = "<<< Halt >>>: %X\n"; #else #define TRACE(...) #endif AT(.com_text.halt) void halt(u32 halt_no) { int reset_cnt = 15000000; TRACE(str_halt, halt_no); PICCON = 0; /* >>>>>>>>>>>>>>>>>>已知故障处理 START<<<<<<<<<<<<<<<<<< */ /* 表盘错误 */ if ((func_cb.sta == FUNC_CLOCK) && (halt_no == HALT_GUI_DIALPLATE_HEAD)) { SysVariable.dial_watch = 0; SysVariable.dialplate_index = 0; user_cfg_info_write(); } /* >>>>>>>>>>>>>>>>>>已知故障处理 END<<<<<<<<<<<<<<<<<<<< */ gui_halt(halt_no); while (1) { WDT_CLR(); if (reset_cnt-- <= 0) { WDT_RST_DELAY(); } } }