This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
FR2433的用户指南指出、输入中断只能在正边沿或负边沿发生、
0b = PxIFG 标志被一个低电平到高电平转换置位
1b = PxIFG 标志被一个高电平到低电平转换置位
是否有办法在正边沿和负边沿触发中断?
谢谢 Vadim
>反向=反向^(0x1);
尝试:
>反向=反向^ GPIO_PIN4;
还要确保"反向"被适当初始化。
[编辑:错误。 见下文。]
很抱歉、我应该更仔细地看一下库源代码。 您的原始代码应该可以正常工作、并为"反向"提供适当的初始值。
我个人本会使用:
> P2IES ^= BIT4; //反向 P2.4中断检测