Renesas Community
Search Community
User
Join or sign in
Site
Search Community
User
Renesas Engineering Community
FAQ
HELP
More
Cancel
团体和论坛
English Community
Japanese Community
More
Cancel
中文论坛
团体和论坛
Vault Archive
2020 NUEDC AITIC
More
Cancel
2020 NUEDC AITIC
2020NUEDC交流讨论区
关于添加一个工具链的头文件之后再OS_port.h中报错的问题
2020NUEDC交流讨论区
Notice-公告
Materials-参考资料
Tags
More
Cancel
New
Replies
2 replies
Subscribers
4 subscribers
Views
479 views
Users
0 members are here
调试
Options
Share
More
Cancel
Related
关于添加一个工具链的头文件之后再OS_port.h中报错的问题
Always
over 3 years ago
我在opencv的demo上的main.c添加了#include <unistd.h>,然后编译会出错,报错为bsp中os_port.h中的两个宏定义
请问这是为什么呢
Parents
George
over 3 years ago
unistd.h中定义了usleep()和sleep(),这两个函数和os_port.h中自定义的两个函数的实现方式有冲突。
如果你没有使用这两个函数,可以将os_port.h中以下2行注释掉,bsp本身没有使用这2个宏
#define usleep(delay) {volatile uint32_t n = delay * 4; while(n > 0) n--;}
#define sleep(delay) {volatile uint32_t n = delay * 4000; while(n > 0) n--;}
Cancel
Up
0
Down
Reply
Cancel
Always
over 3 years ago
in reply to
George
了解了,谢谢
Cancel
Up
0
Down
Reply
Cancel
Reply
Always
over 3 years ago
in reply to
George
了解了,谢谢
Cancel
Up
0
Down
Reply
Cancel
Children
No Data