標(biāo)題:
這段單片機紅外解碼的代碼怎么理解?
[打印本頁]
作者:
kfwxfl
時間:
2019-4-23 18:54
標(biāo)題:
這段單片機紅外解碼的代碼怎么理解?
void Timer0 interrupt 1()
{
irTime++;
if(irTime==240)
{
irTime--;
codeCnt=0x3f;
}
if(IR_IO) Irprot_LastState=1;
else if(Irprot_LastState)
{
Irprot_LastState = 0;
if(irTime<24)
{
codeCnt++;
codeCnt &= 0x1f;
IR_data[codeCnt>>3] <<= 1;
if( irTime>15)
IR_data[codeCnt>>3]++;
}
irTime = 0;
}
}
歡迎光臨 (http://www.torrancerestoration.com/bbs/)
Powered by Discuz! X3.1