summaryrefslogtreecommitdiff
path: root/decoders/spi.py
diff options
context:
space:
mode:
Diffstat (limited to 'decoders/spi.py')
-rw-r--r--decoders/spi.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/decoders/spi.py b/decoders/spi.py
index a363b5a..ba62673 100644
--- a/decoders/spi.py
+++ b/decoders/spi.py
@@ -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