Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

快速访问,其他串口没有反应 #31

Open
l937928908 opened this issue Jul 3, 2020 · 4 comments
Open

快速访问,其他串口没有反应 #31

l937928908 opened this issue Jul 3, 2020 · 4 comments

Comments

@l937928908
Copy link

当我以10毫秒的速度同时访问2个串口一段时间后,停止之后再访问其他串口会出现无反应的情况

@itas109
Copy link
Owner

itas109 commented Jul 3, 2020

时间间隔过短会有问题
是什么场景要求,必须要这么短的时间通信吗

@l937928908
Copy link
Author

谢谢回答,目前的确没有这样的场景,通过
if (ReadFile(m_handle, (void*)data, (DWORD)maxSize, &dRet, &m_overlapRead))
{
//data[dRet] = '\0';
PurgeComm(m_handle,PURGE_RXCLEAR);
}
很好的解决了这个bug

@itas109
Copy link
Owner

itas109 commented Jul 6, 2020

好的 感谢反馈

@qbq600
Copy link

qbq600 commented May 14, 2022

这个是死循环访问串口的吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants