From 3c8031b3f543f82a4a357b4987e0ae6273facfcf Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Wed, 19 Feb 2014 19:00:36 +0100 Subject: sdcard_spi: Use list comprehensions. --- decoders/sdcard_spi/pd.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'decoders/sdcard_spi/pd.py') diff --git a/decoders/sdcard_spi/pd.py b/decoders/sdcard_spi/pd.py index f92be0d..3c25f18 100644 --- a/decoders/sdcard_spi/pd.py +++ b/decoders/sdcard_spi/pd.py @@ -69,12 +69,6 @@ cmd_name = { 51: 'SEND_SCR', } -def ann_cmd_list(): - l = [] - for i in range(63 + 1): - l.append(['cmd%d' % i, 'CMD%d' % i]) - return l - class Decoder(srd.Decoder): api_version = 1 id = 'sdcard_spi' @@ -87,7 +81,8 @@ class Decoder(srd.Decoder): probes = [] optional_probes = [] options = {} - annotations = ann_cmd_list() + [ + annotations = \ + [['cmd%d' % i, 'CMD%d' % i] for i in range(63 + 1)] + [ ['cmd-desc', 'Command description'], ['r1', 'R1 reply'], ['r1b', 'R1B reply'], -- cgit v1.2.3-70-g09d2