]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/mx25lxx05d/pd.py
Add a few missing probe-names.
[libsigrokdecode.git] / decoders / mx25lxx05d / pd.py
index 15af222c9a33a7cd05adb04ac381c86520fb5063..fdb8248e6dd959b1f6e331a798f7caf454950e97 100644 (file)
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-# Macronix MX25Lxx05D SPI (NOR) flash chip protocol decoder
-
-# Note: Works for MX25L1605D/MX25L3205D/MX25L6405D.
-
 import sigrokdecode as srd
 
 # Dict which maps command IDs to their names and descriptions.
@@ -94,14 +90,14 @@ class Decoder(srd.Decoder):
     outputs = ['mx25lxx05d']
     probes = []
     optional_probes = [
-        {'id': 'hold', 'name': 'HOLD#', 'desc': 'TODO.'},
-        {'id': 'wp_acc', 'name': 'WP#/ACC', 'desc': 'TODO.'},
+        {'id': 'hold', 'name': 'HOLD#', 'desc': 'Pause device w/o deselecting it'},
+        {'id': 'wp_acc', 'name': 'WP#/ACC', 'desc': 'Write protect'},
     ]
     options = {}
     annotations = [
-        ['Text', 'Human-readable text'],
-        ['Verbose decode', 'Decoded register bits, read/write data'],
-        ['Warnings', 'Human-readable warnings'],
+        ['text', 'Human-readable text'],
+        ['verbose-decode', 'Decoded register bits, read/write data'],
+        ['warnings', 'Human-readable warnings'],
     ]
 
     def __init__(self, **kwargs):
@@ -110,12 +106,9 @@ class Decoder(srd.Decoder):
         self.addr = 0
         self.data = []
 
-    def start(self, metadata):
-        # self.out_proto = self.add(srd.OUTPUT_PROTO, 'mx25lxx05d')
-        self.out_ann = self.add(srd.OUTPUT_ANN, 'mx25lxx05d')
-
-    def report(self):
-        pass
+    def start(self):
+        # self.out_python = self.register(srd.OUTPUT_PYTHON)
+        self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def putx(self, data):
         # Simplification, most annotations span exactly one SPI byte/packet.