在TI C6000 里面如何定义中断是否有 案例,文档可供参考。
另外问一下, CSL API 是否有 详细的说明文档,一边看HELP 一边看 手册,对起来满费劲的!
写了一个外部IO 中断:
vectId = CSL_INTC_VECTID_13;
IO14IntcHandle = CSL_intcOpen(&IO14IntcObj, CSL_GEM_GPINT14, &vectId, NULL);
// Bind ISR to Interrupt
EventRecord.handler = (CSL_IntcEventHandler)&IO14InterruptHandler;
EventRecord.arg = (void *)CSL_GEM_GPINT14;
CSL_intcPlugEventHandler(IO14IntcHandle, &EventRecord);
// Event Enable
CSL_intcHwControl(IO14IntcHandle, CSL_INTC_CMD_EVTENABLE, NULL);
一直 不能进入 static void IO14InterruptHandler (void *arg) 中断函数中。请教各位,我是哪里写错了还是漏掉了什么东西。
类似的写法:
// Open INTC
vectId = CSL_INTC_VECTID_12;
tmrIntcHandle = CSL_intcOpen(&tmrIntcObj, CSL_GEM_TINTLN, &vectId, NULL);
// Bind ISR to Interrupt
EventRecord.handler = (CSL_IntcEventHandler)&TimerInterruptHandler;
EventRecord.arg = (void *)CSL_GEM_TINTLN;
CSL_intcPlugEventHandler(tmrIntcHandle, &EventRecord);
// Event Enable
CSL_intcHwControl(tmrIntcHandle, CSL_INTC_CMD_EVTENABLE, NULL);
定时中断跑的倒是没问题。