summaryrefslogtreecommitdiff
path: root/decoders/pca9571
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2023-07-17 20:16:15 +0200
committerGerhard Sittig <gerhard.sittig@gmx.net>2023-07-18 21:28:44 +0200
commit782c35b0158a84bbdbcfd2fc2f0ed7e507f17650 (patch)
tree409b2da3d501c1e80cb416f1dfb21e237f6b596a /decoders/pca9571
parent0fbf152810a812baee1d7e69d4621bb8445f9e7e (diff)
downloadlibsigrokdecode-782c35b0158a84bbdbcfd2fc2f0ed7e507f17650.tar.gz
libsigrokdecode-782c35b0158a84bbdbcfd2fc2f0ed7e507f17650.zip
i2c: rephrase state machine, eliminate text matching
Rephrase the conditions which drive the I2C decoder's progress. Remove self.state and its space separated string literals which were tedious to search for, and which "lent themselves" to magic string matching. Use other existing conditions instead, which also reduces redundancy. Defer the "forgetting data bits" until after ACK was seen. Comment on the motivation to keep the "protocol violating" implementation, which misses error conditions that happen on the wire, but happens to support heavily undersampled captures to an astonishing degree. Also addresses minor style nits: Prefer to think of "dominant ACK" and "recessive NAK". Rephrase a byte shift for the first address byte. Emit the first warning annotation for the row which was declared before but was not used so far.
Diffstat (limited to 'decoders/pca9571')
0 files changed, 0 insertions, 0 deletions