..\..\..\..\..\middlewares\Third_Party\bms-firmware\app\src\bms.h(530): error: #79: expected a type specifier bool CHARGER_IS_PLUG_IN(); ..\..\..\..\..\middlewares\Third_Party\bms-firmware\app\src\bms.h(530): error: #79: expected a type specifier bool CHARGER_IS_PLUG_IN(); ..\..\..\..\..\middlewares\Third_Party\bms-firmware\app\src\bms.h(530): error: #18: expected a ")" bool CHARGER_IS_PLUG_IN(); ..\..\..\..\..\middlewares\Third_Party\bms-firmware\app\src\bms.h(530): error: #147-D: declaration is incompatible with "uint8_t GPIO_ReadInputDataBit(GPIO_Module *, uint16_t)" (declared at line 435 of "..\..\..\..\..\firmware\n32wb03x_std_periph_driver\inc\n32wb03x_gpio.h") bool CHARGER_IS_PLUG_IN();
时间: 2023-07-12 07:05:17 浏览: 142
这个错误提示是因为你的代码中定义的函数类型不正确。bool 是 C++ 的基本数据类型,但是在 C 语言中并没有定义该类型。你需要在代码中添加一个 bool 类型的定义,或者将 bool 替换为其他合适的类型,如 int 或 char。
另外,该函数的声明与另一个头文件中定义的同名函数的声明不兼容,可能是因为参数类型或返回类型不一致导致的。你需要检查两个头文件中函数的定义是否相同,如果不同需要将它们统一起来。
如果你无法找到问题所在,可以把相关代码段贴出来,我可以帮你看看。
阅读全文
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)