大家好,在看这一个例子的中断配置部分时,我发现在调用了CSL_intcPlugEventHandler()函数后调用如下语句
/* clear the events. */
if (CSL_intcHwControl(hintc[vector],CSL_INTC_CMD_EVTCLEAR, NULL) != CSL_SOK)
{
printf("Error: GEM-INTC CSL_INTC_CMD_EVTCLEAR command failed\n");
return -1;
}
/* Enabling the events. */
if (CSL_intcHwControl(hintc[vector],CSL_INTC_CMD_EVTENABLE, NULL) != CSL_SOK)
{
printf("Error: GEM-INTC CSL_INTC_CMD_EVTENABLE command failed\n");
return -1;
}
看注释应该是对事件进行清空和使能,请问这两步的意义是什么呢?谢谢大家了