]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/ddc.py
srd: Add ebr30a_i2c_demux PD (I2C in, 3 x I2C out).
[libsigrokdecode.git] / decoders / ddc.py
index 9b5bc5fdd525a053892993a8e32362c12305792d..123881f807e81bcbdcf83363d445bf90914a1559 100644 (file)
@@ -35,8 +35,8 @@ class Decoder(srd.Decoder):
     longname = 'Display Data Channel'
     desc = 'A protocol for communication between computers and displays.'
     longdesc = ''
-    author = 'Bert Vermeulen <bert@biot.com>'
-    email = '<bert@biot.com>'
+    author = 'Bert Vermeulen'
+    email = 'bert@biot.com'
     license = 'gplv3+'
     inputs = ['i2c']
     outputs = ['ddc']
@@ -60,10 +60,10 @@ class Decoder(srd.Decoder):
 
         if self.state is None:
             # Wait for the DDC session to start.
-            if cmd in ('START', 'START_REPEAT'):
+            if cmd in ('START', 'START REPEAT'):
                 self.state = 'start'
         elif self.state == 'start':
-            if cmd == 'ADDRESS_READ' and data == 80:
+            if cmd == 'ADDRESS READ' and data == 80:
                 # 80 is the I2C slave address of a connected display,
                 # so this marks the start of the DDC data transfer.
                 self.state = 'transfer'
@@ -71,7 +71,7 @@ class Decoder(srd.Decoder):
                 # Got back to the idle state.
                 self.state = None
         elif self.state == 'transfer':
-            if cmd == 'DATA_READ':
+            if cmd == 'DATA READ':
                 # There shouldn't be anything but data reads on this
                 # address, so ignore everything else.
                 self.put(ss, es, self.out_ann, [0, ['0x%.2x' % data]])