]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/jtag_stm32/pd.py
Show backtrace when decode() aborts due to an error.
[libsigrokdecode.git] / decoders / jtag_stm32 / pd.py
index bc3a4c7e168d9dc75a15aab4bb1f37d2c0d9d07a..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'
@@ -156,7 +155,10 @@ class Decoder(srd.Decoder):
         ('warnings', 'Warnings', (3,)),
     )
 
-    def __init__(self, **kwargs):
+    def __init__(self):
+        self.reset()
+
+    def reset(self):
         self.state = 'IDLE'
         self.samplenums = None