Yecgaa1/STM32_MPU6050_HAL_DMP

Build Error in Keil with stm32l4xx_hal

zhengxi0922 opened this issue · 3 comments

Hi
this project would build fail when change "stm32f1xx_hal.h" to "stm32l4xx_hal.h" in Keil
the error shows as below
../Core/Inc/MPU6050/inv_mpu.h(44): error: #169: expected a declaration};
it seems that something wrong with the code

struct int_param_s {
#if defined EMPL_TARGET_MSP430 || defined MOTION_DRIVER_TARGET_MSP430
void (*cb)(void);
unsigned short pin;
unsigned char lp_exit;
unsigned char active_low;
#elif defined EMPL_TARGET_UC3L0
unsigned long pin;
void (cb)(volatile void);
void *arg;
#elif defined __STM32_HAL_LEGACY

#endif
};

do you have any idea what's wrong with this code?
it did not show red cross in Keil.

你看起来是中文名字,为什么不使用中文提问,要有点文化自信(
我记得我在某文章看到过这个问题好像是keil使用的C标准不同导致编译不过,你可以尝试一下C99标准编译
我并没有遇到这个问题,因为我是用的是mingw的编译链

不好意思,我觉得您有点多想了
写英文纯粹是下一个遇到跟我一样的问题的人不用再问一遍。
我会试试C99编译,谢谢

没有,纯粹是想起以前有个大佬这样说的而已
写中文的话也没有大碍,毕竟chrome网页翻译还是很不错的
不过我理解你的想法