summaryrefslogtreecommitdiff
path: root/decoders/graycode/pd.py
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2023-07-14 17:43:08 +0200
committerGerhard Sittig <gerhard.sittig@gmx.net>2023-07-18 21:09:40 +0200
commit647aba6af7745c14961674c5feebf83fd18303a3 (patch)
tree3ff40234546f9663255eb4f0290b2f49c5f54361 /decoders/graycode/pd.py
parent42fb0f33ff23c1633324bde8b3cf400493237d97 (diff)
downloadlibsigrokdecode-647aba6af7745c14961674c5feebf83fd18303a3.tar.gz
libsigrokdecode-647aba6af7745c14961674c5feebf83fd18303a3.zip
i2c: more idiomatic use of Python list, reduces redundancy, comments
Collect all bits of a byte time in a Python list (as was done before). Eliminate the bit counter and the value accumulator, use the list's length during accumulation and common conversion support after the accumulation instead. Also comment on the non-trivial start/end sample number update logic. The decoder implementation likes to claim data validity outside of the high SCL phase, which does not agree with the strict I2C protocol idea. Increases usability though (data visibility at zoom levels). This and backwards compatibility makes us keep the logic, as long as we remain aware of its implications. Comment on the rather unexpected LSB first emission of annotations and stacked layer data passing, while the I2C protocol itself is MSB first.
Diffstat (limited to 'decoders/graycode/pd.py')
0 files changed, 0 insertions, 0 deletions