TI中文支持网
TI专业的中文技术问题搜集分享网站

C++ 中断

在C++程序中进行中断配置时,Hwi_create(7, &CpIntc_dispatch, &params, &eb);

会出错:argument of type "void (*)(xdc_UInt) C" is incompatible with parameter of type "ti_sysbios_hal_Hwi_FuncPtr" 

应该怎么做呢?

Shine:

请问是否有参考过下面文档中的1.5 Using C++ with SYS/BIOS
www.ti.com/…/spruex3t.pdf

user5119696:

回复 Shine:

里面唯一有帮助的就是把函数声明写在extern "C"{ }中,但是还是有问题,主要是中断配置
CpIntc_dispatchPlug(156, &uPPIsr, 156, TRUE);
Hwi_create(7, &CpIntc_dispatch, &params, &eb);
这两句,错误是
#169 argument of type "void (*)(UArg) C" is incompatible with parameter of type "ti_sysbios_family_c66_tci66xx_CpIntc_FuncPtr"
#169 argument of type "void (*)(xdc_UInt) C" is incompatible with parameter of type "ti_sysbios_hal_Hwi_FuncPtr"

赞(0)
未经允许不得转载:TI中文支持网 » C++ 中断
分享到: 更多 (0)