dotnet/runtime

SerialPort read latency on linux

開放

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

 (3 則留言) (0 個反應) (0 位負責人)C# (5,445 個分叉)batch import
area-System.IO.Portshelp wantedin-pr

倉庫指標

星標
 (17,886 顆星)
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();

貢獻者指南