在IAR使用FreeRTOS出现Error[Pa045]: function "XXX" has no prototype

FreeRTOS官方例程中设置了需要“Require prototype”,所以每个函数(除了main函数)都需要函数声明,其中对于无形参的函数声明要加void,比如void led_init(void);

 

如果不需要“Require prototype”,如果函数被调用,同样需要函数声明,但是对于无形参的函数声明可以不用加void,比如void led_init();

 

总结:推荐需要“Require prototype”

posted @ 2017-05-15 14:32  流水灯  阅读(1153)  评论(0)    收藏  举报