]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/i2c.py
expose SRD_OUTPUT_* as symbols in the sigrokdecode module.
[libsigrokdecode.git] / decoders / i2c.py
index 0f554f78f5fefce887fdc612eed5edbb2d2c2b1c..2a10ab7408eb4c8950f27a46ff549a065c2a373a 100644 (file)
@@ -180,8 +180,8 @@ class Decoder(sigrokdecode.Decoder):
         self.oldsda = None
 
     def start(self, metadata):
-        self.output_protocol = self.output_new(1)
-        self.output_annotation = self.output_new(0)
+        self.output_protocol = self.output_new(sigrokdecode.SRD_OUTPUT_PROTOCOL, 'i2c')
+        self.output_annotation = self.output_new(sigrokdecode.SRD_OUTPUT_ANNOTATION, 'i2c')
 
     def report(self):
         pass