]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/parallel/pd.py
i2c: Add Python tests.
[libsigrokdecode.git] / decoders / parallel / pd.py
index 476bf2fa04fb30c800f4d433e98a0228d09a194a..e766ac162662156e56ea3a40c47a4033909f477d 100644 (file)
@@ -75,7 +75,7 @@ class Decoder(srd.Decoder):
     probes = [
         {'id': 'clk', 'name': 'CLK', 'desc': 'Clock line'},
     ]
-    optional_probes = probe_list(32)
+    optional_probes = probe_list(8)
     options = {
         'clock_edge': ['Clock edge to sample on', 'rising'],
         'wordsize': ['Word size of the data', 1],
@@ -98,12 +98,9 @@ class Decoder(srd.Decoder):
         self.first = True
         self.state = 'IDLE'
 
-    def start(self, metadata):
-        self.out_proto = self.add(srd.OUTPUT_PROTO, 'parallel')
-        self.out_ann = self.add(srd.OUTPUT_ANN, 'parallel')
-
-    def report(self):
-        pass
+    def start(self):
+        self.out_proto = self.register(srd.OUTPUT_PYTHON)
+        self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def putpb(self, data):
         self.put(self.ss_item, self.es_item, self.out_proto, data)