📄 main.c
字号:
//ICC-AVR application builder : 2007-6-22 15:16:02
// Target : M128
// Crystal: 8.0000Mhz
#include <iom128v.h>
#include <macros.h>
#include "main.h"
#include <uart0.h>
#include <can0.h>
#include <uart3.h>
//extern unsigned char state_counter_sec;
//extern unsigned char state_counter_min;
extern void can_485_test (void);
extern void uart1_handle (void);
extern unsigned char tx0_period_en;
extern unsigned char tx1_period_en;
extern void bat_sent_handle (void);
extern void state_sent (void);
extern void power_out_add (void);
extern void uart3_handle (void);
//
void main(void)
{
unsigned char temp_state=0x00;
init_devices();
pca9554init();
uart0_init();
wellcome();
para_init();
uart0_init();
// CAN0_INIT ();
screen_flag=0;
page_flag=0;
change_flag=1;
lcd_clear();
// can_485_test ();
while(1)
{
if(timeup)
{
WDR();
timeup=0;
//tx0_period_en=1;
//tx1_period_en=1;
adc_handle(); //AD采样,计算
adjust_handle(); //调压,调流
shift_handle(); //充电状态判断,转换
uart0_handle();
uart1_handle();
state_sent();
bat_sent_handle();
// power_out_add();
// uart3_turn_on();
uart3_handle();
//com_handle(); //串口通讯处理
sound_handle(); //声音处理
save_handle(); //EEPROM参数保存
alarm_handle(); //告警处理
blight_handle(); //背光处理
display_handle(); //LCD显示处理
}
NOP();
NOP();
temp_state = MCUCSR;
NOP();
NOP();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -