我现在阅读的是C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl\example\cpintc\cpintc_test.c中的代码(硬件平台是C6678),557~577行代码内容如下:
hnd = CSL_CPINTC_open(1);
if (hnd == 0)
{
printf ("Error: Unable to open CPINT instance 1\n");
return;
}
/* Disable all host interrupts. */
CSL_CPINTC_disableAllHostInterrupt(hnd);
/* Configure no nesting support in the CPINTC Module. */
CSL_CPINTC_setNestingMode (hnd, CPINTC_NO_NESTING);
/* We now map System Interrupt 5 to channel 0 */
CSL_CPINTC_mapSystemIntrToChannel (hnd, 5 , 0);
/* We now enable system interrupt 5 */
CSL_CPINTC_enableSysInterrupt (hnd, 5);
/* We enable host interrupts. */
CSL_CPINTC_enableHostInterrupt (hnd, 10);
这里将system interrupt 5映射到通道0, 我的理解是 channel 与host interrupt是 一 对 一, 且关系是固定的, 所以下面利用CSL_CPINTC_enableHostInterrupt 应该使能 host 0, 这里使能的是 host 10,这里该怎么理解呢, 麻烦大家指点下, 感谢~!