]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/jtag_stm32/pd.py
i2s: make samplerate meta data optional
[libsigrokdecode.git] / decoders / jtag_stm32 / pd.py
index ff5bb770666090a60d5f322b03e81379f2434209..d27a5577babc7af7889c7f0154652d80c17cc393 100644 (file)
@@ -14,8 +14,7 @@
 ## GNU General Public License for more details.
 ##
 ## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
 ##
 
 import sigrokdecode as srd
@@ -135,7 +134,7 @@ def data_out(bits):
            % (data_hex, ack_meaning)
 
 class Decoder(srd.Decoder):
-    api_version = 2
+    api_version = 3
     id = 'jtag_stm32'
     name = 'JTAG / STM32'
     longname = 'Joint Test Action Group / ST STM32'
@@ -157,6 +156,9 @@ class Decoder(srd.Decoder):
     )
 
     def __init__(self):
+        self.reset()
+
+    def reset(self):
         self.state = 'IDLE'
         self.samplenums = None