[其它应用] 配置有问题吗?

[复制链接]
626|2
 楼主| gongche 发表于 2016-10-7 23:00 | 显示全部楼层 |阅读模式

//-------------------------------------------------------------------------
void init_exint2(void)
{
//P0.6:INT2---input port & pull high
        P0CR &= ~BIT_6;
        P0PCR |= BIT_6;
        
        //IT3=1;//falling edge trig
        //IE0=0;
        //IPH0|=0x01;//PX0H //exint 0 interrupt priority 2
        //priority affect timer3
#if 1        
        IT20=0;
        IT21=1;//rising edge trigger
#else
        IT20=1;
        IT21=0;//falling edge trigger
#endif
        IE2=0;
//--interrupt priority
        //IPL1|=BIT_1;
        //IPH1|=BIT_1;
        
        IEN1|=BIT_1;//enable external interrupt 2
}

//-------------------------------------------------------------------------

void exint2(void) interrupt 8  //IR
{

}

中断2死活进不去
huanghuac 发表于 2016-10-7 23:01 | 显示全部楼层
没看出来
 楼主| gongche 发表于 2016-10-7 23:03 | 显示全部楼层
其实还是不大明白,我再琢磨琢磨吧,多谢了哈,结贴了先
您需要登录后才可以回帖 登录 | 注册

本版积分规则

768

主题

9410

帖子

2

粉丝
快速回复 在线客服 返回列表 返回顶部