summaryrefslogtreecommitdiff
path: root/decoders/i2c/pd.py
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2014-03-10 12:23:38 +0100
committerBert Vermeulen <bert@biot.com>2014-03-10 12:23:38 +0100
commitda9bcbd9f45b0153465c55ec726a0d76f6d7f01e (patch)
tree01190e6a1e52a3aedf5b2578716b8a470cd50fd0 /decoders/i2c/pd.py
parentd1e2129c7b01a760d48bcc8e7fc12956a62698c1 (diff)
downloadlibsigrokdecode-da9bcbd9f45b0153465c55ec726a0d76f6d7f01e.tar.gz
libsigrokdecode-da9bcbd9f45b0153465c55ec726a0d76f6d7f01e.zip
Probes, optional probes and annotations now take a tuple.
Annotation entries also consist of a tuple, not a list.
Diffstat (limited to 'decoders/i2c/pd.py')
-rw-r--r--decoders/i2c/pd.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/decoders/i2c/pd.py b/decoders/i2c/pd.py
index 97614ae..1770838 100644
--- a/decoders/i2c/pd.py
+++ b/decoders/i2c/pd.py
@@ -72,27 +72,27 @@ class Decoder(srd.Decoder):
license = 'gplv2+'
inputs = ['logic']
outputs = ['i2c']
- probes = [
+ probes = (
{'id': 'scl', 'name': 'SCL', 'desc': 'Serial clock line'},
{'id': 'sda', 'name': 'SDA', 'desc': 'Serial data line'},
- ]
+ )
options = (
{'id': 'address_format', 'desc': 'Displayed slave address format',
'default': 'shifted', 'values': ('shifted', 'unshifted')},
)
- annotations = [
- ['start', 'Start condition'],
- ['repeat-start', 'Repeat start condition'],
- ['stop', 'Stop condition'],
- ['ack', 'ACK'],
- ['nack', 'NACK'],
- ['bit', 'Data/address bit'],
- ['address-read', 'Address read'],
- ['address-write', 'Address write'],
- ['data-read', 'Data read'],
- ['data-write', 'Data write'],
- ['warnings', 'Human-readable warnings'],
- ]
+ annotations = (
+ ('start', 'Start condition'),
+ ('repeat-start', 'Repeat start condition'),
+ ('stop', 'Stop condition'),
+ ('ack', 'ACK'),
+ ('nack', 'NACK'),
+ ('bit', 'Data/address bit'),
+ ('address-read', 'Address read'),
+ ('address-write', 'Address write'),
+ ('data-read', 'Data read'),
+ ('data-write', 'Data write'),
+ ('warnings', 'Human-readable warnings'),
+ )
annotation_rows = (
('bits', 'Bits', (5,)),
('addr-data', 'Address/Data', (0, 1, 2, 3, 4, 6, 7, 8, 9)),