]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/microwire/pd.py
avr_isp: Add more parts
[libsigrokdecode.git] / decoders / microwire / pd.py
index b8b18e8a2e57651963b3b89dc533b511e58f84e7..6650f383d2d57408cf283d84ca653893f9d556c6 100644 (file)
@@ -25,7 +25,7 @@ OUTPUT_PYTHON format:
 
 Packet:
 [namedtuple('ss': bit start sample number,
-  'se': bit end sample number,
+  'es': bit end sample number,
   'si': SI bit,
   'so': SO bit,
  ), ...]
@@ -38,7 +38,7 @@ To be able to annotate correctly the instructions formed by the bit, the start
 and end sample number of each bit (pair of SI/SO bit) are provided.
 '''
 
-PyPacket = namedtuple('PyPacket', 'ss se si so')
+PyPacket = namedtuple('PyPacket', 'ss es si so')
 Packet = namedtuple('Packet', 'samplenum matched cs sk si so')
 
 class Decoder(srd.Decoder):
@@ -50,6 +50,7 @@ class Decoder(srd.Decoder):
     license = 'gplv2+'
     inputs = ['logic']
     outputs = ['microwire']
+    tags = ['Embedded/industrial']
     channels = (
         {'id': 'cs', 'name': 'CS', 'desc': 'Chip select'},
         {'id': 'sk', 'name': 'SK', 'desc': 'Clock'},
@@ -71,6 +72,12 @@ class Decoder(srd.Decoder):
         ('warnings', 'Warnings', (5,)),
     )
 
+    def __init__(self):
+        self.reset()
+
+    def reset(self):
+        pass
+
     def start(self):
         self.out_python = self.register(srd.OUTPUT_PYTHON)
         self.out_ann = self.register(srd.OUTPUT_ANN)