]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/mx25lxx05d/pd.py
tests/check_session.c: Fix compiler warning.
[libsigrokdecode.git] / decoders / mx25lxx05d / pd.py
index 2a4fa61dfac822746358ee76575aade3404b8190..2222c3773ca631a47f608edc24684dd9312c8f30 100644 (file)
@@ -83,18 +83,14 @@ def decode_status_reg(data):
     return ret
 
 class Decoder(srd.Decoder):
-    api_version = 1
+    api_version = 2
     id = 'mx25lxx05d'
     name = 'MX25Lxx05D'
     longname = 'Macronix MX25Lxx05D'
     desc = 'SPI (NOR) flash chip protocol.'
     license = 'gplv2+'
-    inputs = ['spi', 'logic']
+    inputs = ['logic']
     outputs = ['mx25lxx05d']
-    optional_probes = (
-        {'id': 'hold', 'name': 'HOLD#', 'desc': 'Pause device w/o deselecting it'},
-        {'id': 'wp_acc', 'name': 'WP#/ACC', 'desc': 'Write protect'},
-    )
     annotations = cmd_annotation_classes() + (
         ('bits', 'Bits'),
         ('bits2', 'Bits2'),
@@ -113,7 +109,6 @@ class Decoder(srd.Decoder):
         self.data = []
 
     def start(self):
-        # self.out_python = self.register(srd.OUTPUT_PYTHON)
         self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def putx(self, data):
@@ -365,7 +360,7 @@ class Decoder(srd.Decoder):
         self.ss, self.es = ss, es
 
         # If we encountered a known chip command, enter the resp. state.
-        if self.state == None:
+        if self.state is None:
             self.state = mosi
             self.cmdstate = 1
 
@@ -377,4 +372,3 @@ class Decoder(srd.Decoder):
         else:
             self.putx([24, ['Unknown command: 0x%02x' % mosi]])
             self.state = None
-