diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2019-04-15 18:50:12 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2019-04-15 19:14:02 +0200 |
commit | dab5420eca0c5d217e8a41a53888c609dd70321b (patch) | |
tree | 3c4fc8428d63d82c6e3c1bd7de30652df7bce85e | |
parent | 984e3e3d3202e531c723b2e945529785a0f02ace (diff) | |
download | libsigrokdecode-dab5420eca0c5d217e8a41a53888c609dd70321b.tar.gz libsigrokdecode-dab5420eca0c5d217e8a41a53888c609dd70321b.zip |
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.
-rw-r--r-- | decoders/sdcard_spi/pd.py | 4 |
1 files changed, 2 insertions, 2 deletions
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): |