毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> linux >> 正文

修改了串口通信的代码板子发送的数据PC收不到 第2页

更新时间:2012-11-12:  来源:毕业论文
bsp;      tcflush(fd,TCIOFLUSH);     } }     /** *@brief   设置串口数据位,停止位和效验位 *@param  fd     类型  int  打开的串口文件句柄* *@param  databits 类型  int 数据位   取值 为 7 或者8* *@param  stopbits 类型  int 停止位   取值为 1 或者2* *@param  parity  类型  int  效验类型 取值为N,E,O,,S */int set_Parity(int fd,int databits,int stopbits,int parity) {     struct termios options;           if(tcgetattr(fd,&options)!= 0)     {         printf("SetupSerial 1");         return(FALSE);     }           options.c_cflag &= ~CSIZE;     switch (databits) /*设置数据位数*/    {     case 7:         options.c_cflag |= CS7;         break;     case 8:         options.c_cflag |= CS8;         break;     default:         fprintf(stderr,"Unsupported data size\n");         return (FALSE);     }           switch (parity)     {     case 'n':     case 'N':         options.c_cflag &= ~PARENB;   /* Clear parity enable */        options.c_iflag &=

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©chuibin.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。