You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
If I understand correctly, Stream.Resolution() is duration for a single bit and Duration() should return for all bits*.
Current implementation uses the count of bytes instead of bits, this looks wrong to me. https://github.com/google/periph/blob/master/conn/gpio/gpiostream/gpiostream.go#L68
It should be return b.Res * time.Duration(len(b.Bits)) * 8
Yeah, it is confusing that len(b.Bits) returns number of bytes.
If I understand correctly, Stream.Resolution() is duration for a single bit and Duration() should return for all bits*.
Current implementation uses the count of bytes instead of bits, this looks wrong to me.
https://github.com/google/periph/blob/master/conn/gpio/gpiostream/gpiostream.go#L68
It should be
return b.Res * time.Duration(len(b.Bits)) * 8Yeah, it is confusing that len(b.Bits) returns number of bytes.
There may be some code assuming this bug.