X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fjtag_stm32%2Fpd.py;h=f2dd3c7726dfce97e6a5040204be57afac2b8547;hp=aa746e095cce02e77ba7864b7c6a6f1e15eb13f0;hb=35b380b1156434b73d4a976c68f5ab3604c8510a;hpb=0169f19c53e195df2f96c4df731ad3214c59e20a diff --git a/decoders/jtag_stm32/pd.py b/decoders/jtag_stm32/pd.py index aa746e0..f2dd3c7 100644 --- a/decoders/jtag_stm32/pd.py +++ b/decoders/jtag_stm32/pd.py @@ -18,8 +18,6 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -# ST STM32 JTAG protocol decoder - import sigrokdecode as srd # JTAG debug port data registers (in IR[3:0]) and their sizes (in bits) @@ -121,7 +119,7 @@ def data_out(bits): % (data_hex, ack_meaning) class Decoder(srd.Decoder): - api_version = 1 + api_version = 2 id = 'jtag_stm32' name = 'JTAG / STM32' longname = 'Joint Test Action Group / ST STM32' @@ -129,19 +127,15 @@ class Decoder(srd.Decoder): license = 'gplv2+' inputs = ['jtag'] outputs = ['jtag_stm32'] - probes = [] - optional_probes = [] - options = {} - annotations = [ - ['Text', 'Human-readable text'], - ] + annotations = ( + ('text', 'Human-readable text'), + ) def __init__(self, **kwargs): self.state = 'IDLE' # self.state = 'BYPASS' def start(self): - # self.out_proto = self.register(srd.OUTPUT_PYTHON) self.out_ann = self.register(srd.OUTPUT_ANN) def handle_reg_bypass(self, cmd, bits): @@ -224,6 +218,3 @@ class Decoder(srd.Decoder): handle_reg(cmd, val) if cmd == 'DR TDO': # TODO: Assumes 'DR TDI' comes before 'DR TDO' self.state = 'IDLE' - else: - raise Exception('Invalid state: %s' % self.state) -