VC停止位的问题
(2023-01-04 17:47:07)| 分类: VC |
原来是这样的:
if(temp_str == "1")
stopbit = ONESTOPBIT;
else if(temp_str == "1.5")
stopbit = ONE5STOPBITS;
else if(temp_str == "2")
stopbit = TWOSTOPBITS;
经调试不对。
改为如下:
stopbit = ONESTOPBIT;
stopbit = ONE5STOPBITS;
stopbit = TWOSTOPBITS;
if(0==strcmp(temp_str, "1" ))
else if(0==strcmp(temp_str, "1.5"))
else if(0==strcmp(temp_str, "2" ))

加载中…