summaryrefslogtreecommitdiff
path: root/decoders
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2017-04-26 17:17:31 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2017-05-02 20:13:28 +0200
commit619ed6b4ef103f1dc0d4a03b68447a44cd2f12d6 (patch)
tree2f8d09133329efdc29e943adf965fec9213d746b /decoders
parentee390f6741427244a43de56e6254e487eecbc530 (diff)
downloadlibsigrokdecode-619ed6b4ef103f1dc0d4a03b68447a44cd2f12d6.tar.gz
libsigrokdecode-619ed6b4ef103f1dc0d4a03b68447a44cd2f12d6.zip
sdcard_sd: always show CMD argument in hex
This is especially useful with the default handler, so you can better understand the transfer if you are already familiar with CMD numbers and their arguments. It makes it also easier to compare with the debug output of the e.g. Linux Kernel. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'decoders')
-rw-r--r--decoders/sdcard_sd/pd.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/decoders/sdcard_sd/pd.py b/decoders/sdcard_sd/pd.py
index b544b37..1ad9cb6 100644
--- a/decoders/sdcard_sd/pd.py
+++ b/decoders/sdcard_sd/pd.py
@@ -135,7 +135,8 @@ class Decoder(srd.Decoder):
'CMD%d' % self.cmd, 'Cmd', 'C']])
# CMD[39:08]: Argument
- self.putf(8, 39, [132, ['Argument', 'Arg', 'A']])
+ self.arg = int('0b' + ''.join([str(s[i][2]) for i in range(8, 40)]), 2)
+ self.putf(8, 39, [132, ['Argument: 0x%08x' % self.arg, 'Arg', 'A']])
# CMD[07:01]: CRC7
self.crc = int('0b' + ''.join([str(s[i][2]) for i in range(40, 47)]), 2)