📄 lpwr_check.c
字号:
#include "sfr_r81b.h"
#include "global.h"
#include "iic.h"
void interrupt_int0_init(void)
{
inten = 0x01 ; //96h
int0f = 0x01 ; //1eh
int0ic = 0x11 ; //5dh
pd4_5 = 0 ;
}
#pragma interrupt_int0_lpwr(void)
void interrupt_int0_lpwr(void)
{
//Write_EeprData(0xa6,TEST1,16,0x60 );
// asm("nop") ;
// asm("nop") ;
// pd1_2 = 1 ;
// p1_2 = 0 ;
uchar int0_temp[3] ;
int0_temp[0] = power_counter%256 ;
int0_temp[1] = power_counter/256 ;
data_add(int0_temp,2) ;
Write_eeprom_function(0xa0,int0_temp,3 ,save_pulse) ;
Write_eeprom_function(0xa2,int0_temp,3 ,save_pulse) ;
int0_temp[0] = fu_power_counter%256 ;
int0_temp[1] = fu_power_counter/256 ;
data_add(int0_temp,2) ;
Write_eeprom_function(0xa0,int0_temp,3 ,fu_pulse) ;
Write_eeprom_function(0xa2,int0_temp,3 ,fu_pulse) ;
power_count+=1;
Write_eeprom_function(0xa4,&power_count,1 ,0x0200) ;
//int0_temp[0] = jdq_xian;
//int0_temp[1] = jdq_xian;
//Write_eeprom_function(0xa0,int0_temp,2 ,jdq_save) ;
//Write_eeprom_function(0xa2,int0_temp,2 ,jdq_save) ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -