#include "recivedata.h"
#include "posix_qextserialport.h"
#include <stdio.h>
void ReciveData::deliverdata()
{
Posix_QextSerialPort* RS232 = new Posix_QextSerialPort("/dev/ttyS0");
RS232->setBaudRate(BAUD19200);
RS232->setFlowControl(FLOW_OFF);
RS232->setParity(PAR_NONE);
RS232->setDataBits(DATA_8);
RS232->setStopBits(STOP_1);
RS232->setTimeout(150);
if(RS232->open()){
if((read=RS232->readBlock(buff,64))>0)
buff[read+1]='\0';
RS232->flush();
}
}
我写的程序是这样的,可是为什么会出现下面的错误呢?
In file included from posix_qextserialport.h:8,
from recivedata.cpp:2:
/usr/include/sys/time.h:38: error: expected unqualified-id before string constant
/usr/include/sys/time.h:38: error: expected `,' or `;' before string constant
请高手指点,谢谢,在线等
[ 此贴被XChinux在2006-05-12 10:51重新编辑 ]