打印
[其它应用]

配置有问题吗?

[复制链接]
298|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
gongche|  楼主 | 2019-9-14 10:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
//-------------------------------------------------------------------------
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| | 2019-9-14 10:39 | 只看该作者
没看出来

使用特权

评论回复
板凳
gongche|  楼主 | 2019-9-14 10:42 | 只看该作者
其实还是不大明白,我再琢磨琢磨吧,多谢了哈,结贴了先

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

768

主题

9410

帖子

2

粉丝