switch (ai_databits) /*设置数据位数*/
{
case 5:
options.c_cflag |= CS5;
break;
case 6:
options.c_cflag |= CS6;
break;
case 7:
options.c_cflag |= CS7;
break;
case 8:
options.c_cflag |= CS8;
break;
default:
return ERROR_DATABITS;
}
switch (ai_parity)
{
/*case 'n':
case 'N':*/
case 1:
options.c_cflag &= ~PARENB; /* Clear parity enable */
options.c_iflag &= ~INPCK; /* Enable parity checking
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页