X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fspi.py;h=95302ce759ce56d4185b1e36f784bb3ffd0b1830;hb=5cc2d7bbc075ef6048bd5cd4e36533e874efb6a7;hp=8c62cde6c40aae8445af67fadb898cc524912d8b;hpb=2fd89a85c4a1131ca259d794a43b26b8bd84b6a0;p=libsigrokdecode.git diff --git a/decoders/spi.py b/decoders/spi.py index 8c62cde..95302ce 100644 --- a/decoders/spi.py +++ b/decoders/spi.py @@ -42,12 +42,12 @@ class Decoder(sigrokdecode.Decoder): self.rxcount = 0 self.rxdata = 0 self.bytesreceived = 0 - self.output_protocol = None - self.output_annotation = None + self.out_proto = None + self.out_ann = None def start(self, metadata): - # self.output_protocol = self.add(2) - self.output_annotation = self.add(1) + # self.out_proto = self.add(sigrokdecode.SRD_OUTPUT_PROTOCOL, 'spi') + self.out_ann = self.add(sigrokdecode.SRD_OUTPUT_ANNOTATION, 'spi') def report(self): return 'SPI: %d bytes received' % self.bytesreceived @@ -81,8 +81,8 @@ class Decoder(sigrokdecode.Decoder): 'display':('%02X' % self.rxdata), 'type':'spi', } - # self.put(0, 0, self.output_protocol, out_proto) - self.put(0, 0, self.output_annotation, outdata) + # self.put(0, 0, self.out_proto, out_proto) + self.put(0, 0, self.out_ann, outdata) # Reset decoder state self.rxdata = 0 self.rxcount = 0