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

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

更新时间:2012-11-12:  来源:毕业论文
>    switch (ai_stopbits)
    {
        case 1:
            options.c_cflag &= ~CSTOPB;
            break;
         case 2:
            options.c_cflag |= CSTOPB;
            break;
         default:
            return ERROR_STOPBITS;
    }

    /* Set input parity option */
/*    if (ai_parity != 'n')*/
    if (ai_parity != 1)
        options.c_iflag |= INPCK;
    tcflush(ai_com,TCIFLUSH);
    options.c_cc[VTIME] = 0; /* 设置超时15 seconds*/
    options.c_cc[VMIN] = 1; /* define the minimum bytes data to be readed*/
    if (tcsetattr(ai_com,TCSANOW,&options) != 0)
    {
        /*printf("set_Parity error\n");*/
        return (FALSE);
    }
    /*printf("set_Parity success\n");*/
    return (TRUE);
}
这是我的set_Parity,用在modem拨号程序上,做了些修改以对应数据库里的参数,大体上和你用的差不多

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

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

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