📄 pearmain_re.c
字号:
#include "extern.h"
uchar fhh_decode()
{
uchar a=0,b=0,c=0,j=0,i=0;
uint x;
a=t[2];
b=a&0x07;//
j=a>>4;
j=j-1-b;
i=t[0]+b+3;
a=(t[1]-1)/i;
x=100*t[0]+10*a+j;
if(hard_address!=255)
if(hard_address!=255)
if(x!=0x255)
if(x!=hard_address)
{
SM2=1;
return 0 ;
}
else
return 1;
}
void recieve513(){
uchar xdata j, i=0;
j=S0BUF;
EA=0;
EA=1;
if(RB8==1){
RB8=0;
if(((j&0xd0)==0xd0)||(j==0x24)){
// f_display_adot_data(j,mytest927);
// mytest927=mytest927+1;
return;
}
if(((j&0xe0)==0xe0)||((j&0x30)==0x30)){
// f_display_adot_data(j,mytest927);
// mytest927=mytest927+1;
return;
}
else{ msec=0;
recieve_data_flag=0;
t[0]=j; //camh
num521k=0x0ff;
SM2=0;
sub_sendbyte=0;
return;
}
}
else{
iic_recieve_time=0;
recieve_data_flag++;
t[recieve_data_flag]=j;
// f_display_adot_data(j,mytest927);
// mytest927=mytest927+1;
num521k--;
if (recieve_data_flag==2){
num521k=j&0x07;
//num521k=num521k+2;
}
if (num521k==0){
i= fhh_decode();
if(i==0)
{
return;
}
for(i=0;i<7;i++)
{
pe[i]=t[i];
}
if(direction==0)
{
if(pe[4]==0)
{
return;
}
}
os_anlay_data_all();
recieve_data_flag=0;
SM2=1;
}
}
}
void test521()
{
if(RI){
RI=0;
recieve513();
}
if(TI)
{
TI=0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -