diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2014-02-19 19:00:36 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2014-02-23 18:58:16 +0100 |
commit | 3c8031b3f543f82a4a357b4987e0ae6273facfcf (patch) | |
tree | 0b9db0a5b9b21a94ed24f6cefc3b4fc79a5ac6b0 /decoders | |
parent | ae33d639670cd4ca6bfe683c4284dd55377e5f21 (diff) | |
download | libsigrokdecode-3c8031b3f543f82a4a357b4987e0ae6273facfcf.tar.gz libsigrokdecode-3c8031b3f543f82a4a357b4987e0ae6273facfcf.zip |
sdcard_spi: Use list comprehensions.
Diffstat (limited to 'decoders')
-rw-r--r-- | decoders/sdcard_spi/pd.py | 9 |
1 files changed, 2 insertions, 7 deletions
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'], |