From da9bcbd9f45b0153465c55ec726a0d76f6d7f01e Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Mon, 10 Mar 2014 12:23:38 +0100 Subject: Probes, optional probes and annotations now take a tuple. Annotation entries also consist of a tuple, not a list. --- decoders/mx25lxx05d/pd.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'decoders/mx25lxx05d') diff --git a/decoders/mx25lxx05d/pd.py b/decoders/mx25lxx05d/pd.py index c7dbd20..2a4fa61 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. @@ -91,15 +91,15 @@ class Decoder(srd.Decoder): license = 'gplv2+' inputs = ['spi', 'logic'] outputs = ['mx25lxx05d'] - optional_probes = [ + 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))), -- cgit v1.2.3-70-g09d2