dotnet/runtime

SerialPort read latency on linux

Open

#45,635 建立於 2020年12月5日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)C# (5,445 fork)batch import
area-System.IO.Portshelp wantedin-pr

倉庫指標

Star
 (17,886 star)
PR 合併指標
 (平均合併 12天 11小時) (30 天內合併 661 個 PR)

描述

https://github.com/dotnet/runtime/blob/dc0e11d2e681659fc20feebf4c092082e75706af/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Unix.cs#L841

if you short read the available bytes, there is a 1ms delay between reads as all reads now go via an async process and queue eg port.BytesToRead > 4

port.ReadByte(); // 1ms port.ReadByte(); // 1ms port.ReadByte(); // 1ms port.ReadByte();

貢獻者指南