From: Uwe Hermann Date: Mon, 15 Apr 2019 16:50:12 +0000 (+0200) Subject: sdcard_spi: Fix some abbreviations and names to match the spec. X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff_plain;h=dab5420eca0c5d217e8a41a53888c609dd70321b sdcard_spi: Fix some abbreviations and names to match the spec. The official abbreviation for CMD24 in the spec is "WRITE_BLOCK", as opposed to "WRITE_MULTIPLE_BLOCK" for CMD25 (chapter 4.7.4, "Detailed Command Description", table 4-24). The byte preceeding e.g. the CMD24 block data is called "Start Block" token (chapter 7.3.3.2, "Start Block Tokens and Stop Tran Token"). We don't include the "token" itself for consistency, since the decoder doesn't do that for any other tokens either. --- diff --git a/decoders/sdcard_spi/pd.py b/decoders/sdcard_spi/pd.py index 6b5486d..5054d9e 100644 --- a/decoders/sdcard_spi/pd.py +++ b/decoders/sdcard_spi/pd.py @@ -227,7 +227,7 @@ class Decoder(srd.Decoder): self.state = 'GET RESPONSE R1' def handle_cmd24(self): - # CMD24: WRITE_SINGLE_BLOCK + # CMD24: WRITE_BLOCK self.putc(24, 'Write a block to address 0x%04x' % self.arg) self.is_cmd24 = True self.state = 'GET RESPONSE R1' @@ -378,7 +378,7 @@ class Decoder(srd.Decoder): self.read_buf = [] self.state = 'DATA RESPONSE' elif mosi == 0xfe: - self.put(self.ss, self.es, self.out_ann, [24, ['Data Start Token']]) + self.put(self.ss, self.es, self.out_ann, [24, ['Start Block']]) self.cmd24_start_token_found = True def handle_data_response(self, miso):