]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/sdcard_spi/pd.py
Add PD tags handling and some tags
[libsigrokdecode.git] / decoders / sdcard_spi / pd.py
index 545cee58a5b6f470c89129fc719aa2fe7d1f0783..8ed709800a48d3161505198648b2ef8a97dfdb1e 100644 (file)
@@ -21,7 +21,7 @@ import sigrokdecode as srd
 from common.sdcard import (cmd_names, acmd_names)
 
 class Decoder(srd.Decoder):
-    api_version = 2
+    api_version = 3
     id = 'sdcard_spi'
     name = 'SD card (SPI mode)'
     longname = 'Secure Digital card (SPI mode)'
@@ -29,6 +29,7 @@ class Decoder(srd.Decoder):
     license = 'gplv2+'
     inputs = ['spi']
     outputs = ['sdcard_spi']
+    tags = ['Logic', 'Memory']
     annotations = \
         tuple(('cmd%d' % i, 'CMD%d' % i) for i in range(64)) + \
         tuple(('acmd%d' % i, 'ACMD%d' % i) for i in range(64)) + ( \
@@ -46,6 +47,9 @@ class Decoder(srd.Decoder):
     )
 
     def __init__(self):
+        self.reset()
+
+    def reset(self):
         self.state = 'IDLE'
         self.ss, self.es = 0, 0
         self.ss_bit, self.es_bit = 0, 0