X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fmx25lxx05d%2Fpd.py;h=1099953553d4c0333484624ca20b56b803ea3208;hp=c7dbd20f5035ddc1141284667448f3b9692b84f7;hb=4e4f8527de0927f2eb1d98e90b58e018ba28d341;hpb=780770f1295b7fdeb4481eb42623bad5da1e19a7 diff --git a/decoders/mx25lxx05d/pd.py b/decoders/mx25lxx05d/pd.py index c7dbd20..1099953 100644 --- a/decoders/mx25lxx05d/pd.py +++ b/decoders/mx25lxx05d/pd.py @@ -55,7 +55,7 @@ device_name = { } def cmd_annotation_classes(): - return [[cmd[0].lower(), cmd[1]] for cmd in cmds.values()] + return tuple([tuple([cmd[0].lower(), cmd[1]]) for cmd in cmds.values()]) def decode_status_reg(data): # TODO: Additional per-bit(s) self.put() calls with correct start/end. @@ -89,17 +89,13 @@ class Decoder(srd.Decoder): longname = 'Macronix MX25Lxx05D' desc = 'SPI (NOR) flash chip protocol.' license = 'gplv2+' - inputs = ['spi', 'logic'] + inputs = ['logic'] outputs = ['mx25lxx05d'] - optional_probes = [ - {'id': 'hold', 'name': 'HOLD#', 'desc': 'Pause device w/o deselecting it'}, - {'id': 'wp_acc', 'name': 'WP#/ACC', 'desc': 'Write protect'}, - ] - annotations = cmd_annotation_classes() + [ - ['bits', 'Bits'], - ['bits2', 'Bits2'], - ['warnings', 'Warnings'], - ] + annotations = cmd_annotation_classes() + ( + ('bits', 'Bits'), + ('bits2', 'Bits2'), + ('warnings', 'Warnings'), + ) annotation_rows = ( ('bits', 'Bits', (24, 25)), ('commands', 'Commands', tuple(range(23 + 1))),