CC2530 上升沿输入中断为什么不进中断呢?这样配置不对吗?
时间:10-02
整理:3721RD
点击:
P0DIR &= ~BIT1;
P0SEL &= ~BIT1;
P2INP |= BIT5;
P0INP &= ~BIT1; //pull up/pull down
P0IEN |= BIT1;
PICTL &= ~BIT0; //bit0 1下降沿触发 /0上升沿
EA = 1;
IEN1 |= 0X20; // P0设置为中断方式;
P0IFG &= ~0x02; //初始化中断标志位
P0DIR &= ~0x02;
/* Set as Input */
P0INP |= 0x02;
/* Set as tri-state */
P0IFG = 0;
P0IF = 0;
PICTL &= ~0x01;
/* Set P0 to Rising Edge Interrupt */
IEN1 |= 0x20;
/* Enable P0 interrupts */
</span>