From 619ed6b4ef103f1dc0d4a03b68447a44cd2f12d6 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Wed, 26 Apr 2017 17:17:31 +0200 Subject: 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 --- decoders/sdcard_sd/pd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'decoders') 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) -- cgit v1.2.3-70-g09d2