go-serial
go-serial copied to clipboard
serial_unix.go: Keep writing until complete
Fixes #191.
Change unix port.Write() implementation to match io.Writer requirement:
Write must return a non-nil error if it returns n < len(p)
Keep executing write syscall until failure or entire buffer is written.
I seem to be experiencing this same issue on a specific piece of hardware / uart. Write reports 5 bytes, and only wrote 2 bytes. Obviously this is very frustrating and should be fixed. I will test this PR