16,215
社区成员
发帖
与我相关
我的任务
分享
using namespace std;
int setb (int fd, int nSpeed, int nBits, char nEvent, int nStop); //波特率
yourclass::yourclass()
{
...
}
void yourclass::run()
{
if((fd=open(...)<0)
...
setb(fd, 9600, 8, 'N', 1);
...
while(1)
{
...
n=read(fd, xxx, BUFFER_SIZE);
}
}
//C的具体实现代码
int setb (int fd, int nSpeed, int nBits, char nEvent, int nStop)
{
}