go-serial icon indicating copy to clipboard operation
go-serial copied to clipboard

serial_unix.go: Keep writing until complete

Open ccollins476ad opened this issue 1 year ago • 1 comments

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.

ccollins476ad avatar Jul 07 '24 02:07 ccollins476ad

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

richyo-codes avatar Sep 16 '24 18:09 richyo-codes