|
2410 I2C 的 ISR,看不懂,帮忙解释一下!
[复制链接]
本人在调 CE5.0 + 2410 的 I2C 流驱动,其中 I2C 中断的 ISR 部分有些看不懂,如下:
- //
- // IIC Interrupt
- //
- else if ( IntPendVal == INTSRC_IIC )
- {
- s2410INT->rSRCPND = BIT_IIC; // 清除中断
- if (s2410INT->rINTPND & BIT_IIC) s2410INT->rINTPND = BIT_IIC;
- s2410INT->rINTMSK = BIT_IIC; // I2C中断禁止
- return (SYSINTR_IIC);
- }
复制代码
#define BIT_IIC (0x1<<27)
-----------------------------------------------------------------------
其中【s2410INT->rINTMSK = BIT_IIC;】这句我可以看懂,是屏蔽 I2C 中断;
但是上边两句就看不懂是什么意思了:
s2410INT->rSRCPND = BIT_IIC; // 清除中断
if (s2410INT->rINTPND & BIT_IIC) s2410INT->rINTPND = BIT_IIC;
请大家简单解释一下!多谢!
|
|