ff38fe2a780f46777bf5ed91729ec99d01e88918
Tested on Mac OS, Linux and Windows with UART emulated on USB. I wrote general BSD code, because it should work, but I am not able to test it. On Mac OS I am quite sure that drain behaves as expected because it fixed an issue with buffer overflow (which OS does not report but fails). For Windows it seems that drain is actually part of `Write`, because `Write` was long and `Drain` was fast. But I have not found any mention in Win32 docs about buffering and asynchronous write, so I put there flushing code to be sure, and this code did not break anything. For Linux `Drain` is also taking more time than writing so it looks working too.
go.bug.st/serial
A cross-platform serial library for go-lang.
Documentation and examples
See the godoc here: https://godoc.org/go.bug.st/serial
go.mod transition
This library now support go.mod with the import go.bug.st/serial.
If you came from the pre-go.mod era please update your import paths from go.bug.st/serial.v1 to go.bug.st/serial to receive new updates. Anyway, the latest v1 release should still be avaiable using the old import.
Credits
✨ Thanks to all awesome contributors! ✨
License
The software is release under a BSD 3-clause license
Description
Languages
Go
100%