主题 : 串口操作 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 110032
精华: 0
发帖: 0
金钱: 5 两
威望: 1 点
贡献值: 0 点
综合积分: 0 分
注册时间: 2014-11-12
最后登录: 2014-11-13
楼主  发表于: 2014-11-13 10:12

 串口操作

串口操作
[ 93%] Built target tutorial_BasicLinearTransformsTrackbar
/media/t1/ROOTFS/opencv/samples/cpp/facedetect.cpp: In function 鈏nt main(int, const char**)?
/media/t1/ROOTFS/opencv/samples/cpp/facedetect.cpp:139:35: error: 釵_RDWR?was not declared in this scope
         fd = open("/dev/ttySAC0", O_RDWR|O_NOCTTY|O_NDELAY);
                                   ^
/media/t1/ROOTFS/opencv/samples/cpp/facedetect.cpp:139:42: error: 釵_NOCTTY?was not declared in this scope
         fd = open("/dev/ttySAC0", O_RDWR|O_NOCTTY|O_NDELAY);
                                          ^
/media/t1/ROOTFS/opencv/samples/cpp/facedetect.cpp:139:51: error: 釵_NDELAY?was not declared in this scope
         fd = open("/dev/ttySAC0", O_RDWR|O_NOCTTY|O_NDELAY);
                                                   ^
/media/t1/ROOTFS/opencv/samples/cpp/facedetect.cpp:139:59: error: 鈕pen?was not declared in this scope
         fd = open("/dev/ttySAC0", O_RDWR|O_NOCTTY|O_NDELAY);
                                                           ^
/media/t1/ROOTFS/opencv/samples/cpp/facedetect.cpp:140:40: error: 鈙et_com_config?was not declared in this scope
         set_com_config(fd,96000,8,'N',1);
                                        ^
/media/t1/ROOTFS/opencv/samples/cpp/facedetect.cpp:173:37: warning: suggest parentheses around ??inside ?<?[-Wparentheses]
             int tranvalue=curr_x<<16+curr_y;
                                     ^
/media/t1/ROOTFS/opencv/samples/cpp/facedetect.cpp:174:33: error: no matching function for call to 鈝rite(int&, int&, int)?
             write(fd,tranvalue,4);
                                 ^
/media/t1/ROOTFS/opencv/samples/cpp/facedetect.cpp:174:33: note: candidates are:
In file included from /media/t1/ROOTFS/opencv/modules/core/include/opencv2/core.hpp:58:0,
                 from /media/t1/ROOTFS/opencv/modules/objdetect/include/opencv2/objdetect.hpp:47,


串口操作头文件引哪个呢?
我艹
级别: 新手上路
UID: 104847
精华: 0
发帖: 46
金钱: 235 两
威望: 47 点
贡献值: 0 点
综合积分: 92 分
注册时间: 2014-06-06
最后登录: 2019-06-21
1楼  发表于: 2014-11-14 11:06
从第一个错开始解决,
/media/t1/ROOTFS/opencv/samples/cpp/facedetect.cpp