]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/spi.py
srd: decoders: Metadata consistency fixes/updates.
[libsigrokdecode.git] / decoders / spi.py
index 5529025b1c1c029d6c88b3c01f2a9a4757d994f4..e6a59bf6cbdda9e49482ddc0d3667f8fea2e3d00 100644 (file)
@@ -23,8 +23,8 @@ import sigrokdecode as srd
 class Decoder(srd.Decoder):
     id = 'spi'
     name = 'SPI'
-    desc = '...desc...'
     longname = 'Serial Peripheral Interface (SPI) bus'
+    desc = '...desc...'
     longdesc = '...longdesc...'
     author = 'Gareth McMullin'
     email = 'gareth@blacksphere.co.nz'
@@ -36,18 +36,17 @@ class Decoder(srd.Decoder):
         {'id': 'sck', 'name': 'CLK', 'desc': 'SPI clock line'},
     ]
     options = {}
+    annotations = []
 
     def __init__(self):
         self.oldsck = 1
         self.rxcount = 0
         self.rxdata = 0
         self.bytesreceived = 0
-        self.out_proto = None
-        self.out_ann = None
 
     def start(self, metadata):
-        # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'spi')
-        self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'spi')
+        # self.out_proto = self.add(srd.OUTPUT_PROTO, 'spi')
+        self.out_ann = self.add(srd.OUTPUT_ANN, 'spi')
 
     def report(self):
         return 'SPI: %d bytes received' % self.bytesreceived