尝试对串口返回值情况进行优化,思路,引入期望返回字节,当不是,进行重发

This commit is contained in:
zhengxuan.zhang
2022-11-28 14:09:02 +08:00
parent 4e11acde01
commit 39e26fadba
6 changed files with 179 additions and 81 deletions
@@ -474,7 +474,10 @@ int CPSerial::ReadBlock(BYTE* abIn, int MaxLength)
// m_osRead.Offset=(m_osRead.Offset+dwLength)%MAXBLOCK;
}
else
{
dwLength = 0;
}
}
}
return dwLength;