]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/spi.py
new dynamic output stream registration code, not finished.
[libsigrokdecode.git] / decoders / spi.py
index a363b5afba3c0f53838229435876d83c0450d2e2..ba626734c68d616263d9654d088351be28fc90e1 100644 (file)
@@ -52,9 +52,13 @@ class Decoder(sigrok.Decoder):
         self.rxcount = 0
         self.rxdata = 0
         self.bytesreceived = 0
+        self.output_protocol = None
+        self.output_annotation = None
 
     def start(self, metadata):
         self.unitsize = metadata['unitsize']
+        self.output_protocol = self.output_new(2)
+        self.output_annotation = self.output_new(1)
 
     def report(self):
         return 'SPI: %d bytes received' % self.bytesreceived