This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TMS570LS3137:SPI_PBcfg.c 中的编译问题

Guru**** 2604225 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/748430/tms570ls3137-compilation-issue-in-spi_pbcfg-c

器件型号:TMS570LS3137

在 AUTOSAR_MCAL_TMS570LSx-05.30.00中、从 SPI_PBcfg.c 生成的 extern 声明如下所示

extern CDD_PM_TPS_Callback();
extern CDD_LSD_TLE_Callback();
extern CDD_IO_MCP_Callback();
extern CDD_IO_TIC_Callback();
extern CDD_PLCMModem 回调();
extern FLS_30_Spi01_DrvSequenceCbk ();
extern FLS_30_Spi01_DrvSequenceCbk ();
extern FLS_30_Spi01_DrvSequenceCbk ();

(缺少返回类型和空参数列表(“可变参数”)

下面是顶部五个回调声明的编译器警告:

"GenData/src/SPI_PBcfg.c"、第1234行:警告:类型"int (*)()"的值不能用于初始化类型为"void (*)(void)"的实体

必须修复警告。