]> sigrok.org Git - libsigrokdecode.git/commit - decoders/spi/pd.py
spi: Improve use of PD API version 3
authorGerhard Sittig <redacted>
Tue, 6 Jun 2017 20:55:52 +0000 (22:55 +0200)
committerGerhard Sittig <redacted>
Tue, 6 Jun 2017 20:55:52 +0000 (22:55 +0200)
commitde15aa2a9bbecbd495279ae88e57623b138686da
tree29948a791b80ce7c64a46e3a8743ae609fd80b0c
parent3b5b9ad27f507a9669231940acdf411ba7139b1f
spi: Improve use of PD API version 3

Eliminate more instances where Python code tracked signal changes instead
of having common library code do the work. Reduce the number of boundary
crossings between library and decoder code (Python vs C), by inspecting
fewer input edges. Yet cope with the CS signal's being optional. Emit
identical annotations to the previous implementation for CS changes,
including the initial change "from None to 0/1". Sort the checks for
optional input signals at the top of decode() into a more natural order.
Improve and update comments.

This commit results in a more appropriate use of the PD v3 API in the
SPI protocol decoder.
decoders/spi/pd.py