当前位置:首页 > 红外遥控解码程序
}
}
return; //停止解码 } } IR_table[IR_cnt] = Key_Temp; }
if(((IR_table[0]+IR_table[1])==0xFF)&&((IR_table[2]+IR_table[3])==0xFF)) //验证接收到的数据是否正确,原码加反码等于全1,也就是FF {
Key_Temp = IR_table[2]; //将存储的按键值赋给Key_Temp Long_Press = 0; } else Key_Temp = 0; //若验证的数据有误,则赋0
else if((L_Time>8000)&&(L_Time<10000)&&(H_Time>1950)&&(H_Time<2350)) //长按 { Long_Press++; //长按计数 }
INT_CLKO |= 0x10;
//处理完毕,打开外部中断
共分享92篇相关文档