最后在SC_it.c这里发现了问题,本来接收管脚是属于int1,生成的红外解码代码却在int2里面:
void INT2Interrupt() interrupt 10
{
/*INT2_it write here begin*/
/*INT2_it write here*/
/*<Generated by EasyCodeCube begin>*/
/*<UserCodeStart>*//*<SinOne-Tag><23>*/
//INT2Interrupt
{
/*<UserCodeStart>*//*<SinOne-Tag><24>*/
SCD_IR_Decode();
/*<UserCodeEnd>*//*<SinOne-Tag><24>*/
}
/*<UserCodeEnd>*//*<SinOne-Tag><23>*/
/*<Generated by EasyCodeCube end>*/
/*INT2Interrupt Flag Clear begin*/
/*INT2Interrupt Flag Clear end*/
}
现在把这个复制到int1里:
void INT1Interrupt() interrupt 2
{
TCON &= 0XF7;//Clear interrupt flag bit
/*INT1_it write here begin*/
/*INT1_it write here*/
/*<Generated by EasyCodeCube begin>*/
SCD_IR_Decode();
/*<Generated by EasyCodeCube end>*/
/*INT1Interrupt Flag Clear begin*/
/*INT1Interrupt Flag Clear end*/
}
|