]> sigrok.org Git - libsigrokdecode.git/commitdiff
rgb_led_ws281x: refactor bit/bits handling, use more common code
authorGerhard Sittig <redacted>
Fri, 28 Jul 2023 05:56:46 +0000 (07:56 +0200)
committerGerhard Sittig <redacted>
Sat, 29 Jul 2023 19:29:08 +0000 (21:29 +0200)
Pass all .decode() routine's bit handling through a common bit handler.
Accumulate the bit values as well as their ss/es timestamps. Reduce code
duplication in the bits handler. Use common support code to get the
24/32 bit wide integer from the list of bits. Prepare to handle streams
of different per-pixel length or layout.

This commit remains backwards compatible, and keeps all warts of the
previous implementation including inconsistent annotation order. Just
eliminates unnecessary instance members and hidden coupling, to keep
timestamp handling in the .decode() method.


No differences found