diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2012-01-14 20:48:55 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2012-01-14 20:48:55 +0100 |
commit | ea90233eb2e76cca10adf3ed3c016c5b6cb993e1 (patch) | |
tree | 1bcd15f14e271c090283e45da54b37aa4779db66 /decoders/i2c.py | |
parent | acba48696ef9dd516d2cdf90f89e099deb7e1a73 (diff) | |
download | libsigrokdecode-ea90233eb2e76cca10adf3ed3c016c5b6cb993e1.tar.gz libsigrokdecode-ea90233eb2e76cca10adf3ed3c016c5b6cb993e1.zip |
srd: Consistent PD option defaults handling.
Diffstat (limited to 'decoders/i2c.py')
-rw-r--r-- | decoders/i2c.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/decoders/i2c.py b/decoders/i2c.py index cfaacb0..b0273c0 100644 --- a/decoders/i2c.py +++ b/decoders/i2c.py @@ -133,7 +133,7 @@ class Decoder(srd.Decoder): {'id': 'sda', 'name': 'SDA', 'desc': 'Serial data line'}, ] options = { - 'address-space': ['Address space (in bits)', 7], + 'addressing': ['Slave addressing (in bits)', 7], # 7 or 10 } annotations = [ # ANN_SHIFTED @@ -157,6 +157,9 @@ class Decoder(srd.Decoder): self.oldscl = None self.oldsda = None + # Set protocol decoder option defaults. + self.addressing = Decoder.options['addressing'][1] + def start(self, metadata): self.out_proto = self.add(srd.OUTPUT_PROTO, 'i2c') self.out_ann = self.add(srd.OUTPUT_ANN, 'i2c') |