summaryrefslogtreecommitdiffstats
path: root/examples/serialport/cenumerator/cenumerator.pro
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2016-04-22 18:47:41 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2016-04-27 15:53:00 +0000
commit4679301c184b7964fd197cca5bf5b30fefaee386 (patch)
tree9aa9ea17547e5049f47e04506c10567efccdb354 /examples/serialport/cenumerator/cenumerator.pro
parent9a70ee2389d3302f6a4262325f8a76e4d867b478 (diff)
Fix reading of data remainder with CDC USB device on Windows
In some cases the WaitCommEvent function does not triggered, even if the input driver's queue has an unread bytes. Most likely this happens if a bytes has been arrived between calls of ReadFile and WaitCommEvent. Thus, it can be avoided by means of ClearCommError function which should be called in end of ReadFile to require amount of bytes that has been arrived but still are unread. If it returns more than zero, then we start reading again, without calling of WaitCommEvent. Task-number: QTBUG-48677 Change-Id: I054975971a7c1823f7de879669c3d97f31348ed8 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'examples/serialport/cenumerator/cenumerator.pro')
0 files changed, 0 insertions, 0 deletions